diff options
Diffstat (limited to 'sc/source/ui/vba/vbaapplication.cxx')
-rw-r--r-- | sc/source/ui/vba/vbaapplication.cxx | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/sc/source/ui/vba/vbaapplication.cxx b/sc/source/ui/vba/vbaapplication.cxx index 4204ba0d662a..d9f4b10014fe 100644 --- a/sc/source/ui/vba/vbaapplication.cxx +++ b/sc/source/ui/vba/vbaapplication.cxx @@ -119,6 +119,8 @@ #include <basic/sbxobj.hxx> #include "vbafiledialog.hxx" +#include "viewutil.hxx" + using namespace ::ooo::vba; using namespace ::com::sun::star; using ::com::sun::star::uno::Reference; @@ -875,6 +877,24 @@ ScVbaApplication::getEnableEvents() throw (uno::RuntimeException) } sal_Bool SAL_CALL +ScVbaApplication::getDisplayFullScreen() throw (uno::RuntimeException) +{ + SfxViewShell* pShell = excel::getCurrentBestViewShell( mxContext ); + if ( pShell ) + return ScViewUtil::IsFullScreen( *pShell ); + return sal_False; +} + +void SAL_CALL +ScVbaApplication::setDisplayFullScreen( sal_Bool bSet ) throw (uno::RuntimeException) +{ + // #FIXME calling ScViewUtil::SetFullScreen( *pShell, bSet ); + // directly results in a strange crash, using dispatch instead + if ( bSet != getDisplayFullScreen() ) + dispatchRequests( getCurrentDocument(), rtl::OUString( RTL_CONSTASCII_USTRINGPARAM(".uno:FullScreen") ) ); +} + +sal_Bool SAL_CALL ScVbaApplication::getVisible() throw (uno::RuntimeException) { sal_Bool bVisible = sal_True; |