diff options
author | Noel Power <noel.power@novell.com> | 2012-04-20 17:44:14 +0100 |
---|---|---|
committer | Noel Power <noel.power@novell.com> | 2012-04-20 18:26:21 +0100 |
commit | 4fa65f95e86dc4e348c83814475b057e8f30c107 (patch) | |
tree | 1c0ff9ae875adfa9accc15d18ac237f901d1dd52 /sc/source/ui/vba/vbaapplication.cxx | |
parent | 6a018dec6b1abe75464bd510d441ab56d7291e1f (diff) |
implement VBA Application.DisplayFullScreen bnc#757885
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; |