summaryrefslogtreecommitdiff
path: root/sc/source/ui/vba/vbaapplication.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'sc/source/ui/vba/vbaapplication.cxx')
-rw-r--r--sc/source/ui/vba/vbaapplication.cxx21
1 files changed, 21 insertions, 0 deletions
diff --git a/sc/source/ui/vba/vbaapplication.cxx b/sc/source/ui/vba/vbaapplication.cxx
index d9f4b10014fe..49638821dc9f 100644
--- a/sc/source/ui/vba/vbaapplication.cxx
+++ b/sc/source/ui/vba/vbaapplication.cxx
@@ -895,6 +895,27 @@ ScVbaApplication::setDisplayFullScreen( sal_Bool bSet ) throw (uno::RuntimeExce
}
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)
{
sal_Bool bVisible = sal_True;