vba api Application.DisplayScrollBars implementation bnc#757840

This commit is contained in:
Noel Power
2012-04-20 17:57:02 +01:00
parent 4fa65f95e8
commit f2cf3f30a7
3 changed files with 24 additions and 0 deletions

View File

@@ -894,6 +894,27 @@ ScVbaApplication::setDisplayFullScreen( sal_Bool bSet ) throw (uno::RuntimeExce
dispatchRequests( getCurrentDocument(), rtl::OUString( RTL_CONSTASCII_USTRINGPARAM(".uno:FullScreen") ) );
}
sal_Bool SAL_CALL
ScVbaApplication::getDisplayScrollBars() throw (uno::RuntimeException)
{
ScTabViewShell* pShell = excel::getCurrentBestViewShell( mxContext );
if ( pShell )
{
return ( pShell->GetViewData()->IsHScrollMode() && pShell->GetViewData()->IsVScrollMode() );
}
return true;
}
void SAL_CALL
ScVbaApplication::setDisplayScrollBars( sal_Bool bSet ) throw (uno::RuntimeException)
{
// use uno here as it does all he repainting etc. magic
uno::Reference< sheet::XSpreadsheetView > xView( getCurrentDocument()->getCurrentController(), uno::UNO_QUERY_THROW );
uno::Reference< beans::XPropertySet > xProps( xView, uno::UNO_QUERY );
xProps->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("HasVerticalScrollBar") ), uno::makeAny( bSet ) );
xProps->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("HasHorizontalScrollBar") ), uno::makeAny( bSet ) );
}
sal_Bool SAL_CALL
ScVbaApplication::getVisible() throw (uno::RuntimeException)
{