diff options
-rw-r--r-- | oovbaapi/ooo/vba/excel/XApplication.idl | 1 | ||||
-rw-r--r-- | sc/source/ui/inc/viewutil.hxx | 2 | ||||
-rw-r--r-- | sc/source/ui/vba/vbaapplication.cxx | 20 | ||||
-rw-r--r-- | sc/source/ui/vba/vbaapplication.hxx | 2 |
4 files changed, 24 insertions, 1 deletions
diff --git a/oovbaapi/ooo/vba/excel/XApplication.idl b/oovbaapi/ooo/vba/excel/XApplication.idl index e9bee9bae44d..6453011b1131 100644 --- a/oovbaapi/ooo/vba/excel/XApplication.idl +++ b/oovbaapi/ooo/vba/excel/XApplication.idl @@ -74,6 +74,7 @@ interface XApplication [attribute] boolean Visible; [attribute] boolean Iteration; [attribute] long EnableCancelKey; + [attribute] boolean DisplayFullScreen; void setDefaultFilePath([in] string DefaultFilePath) raises(com::sun::star::script::BasicErrorException); diff --git a/sc/source/ui/inc/viewutil.hxx b/sc/source/ui/inc/viewutil.hxx index d01faeae35ff..87d8f8089e66 100644 --- a/sc/source/ui/inc/viewutil.hxx +++ b/sc/source/ui/inc/viewutil.hxx @@ -50,7 +50,7 @@ enum ScUpdateMode { SC_UPDATE_ALL, SC_UPDATE_CHANGED, SC_UPDATE_MARKS }; // --------------------------------------------------------------------------- -class ScViewUtil // static Methoden +class SC_DLLPUBLIC ScViewUtil // static Methoden { public: static sal_Bool ExecuteCharMap( const SvxFontItem& rOldFont, 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; diff --git a/sc/source/ui/vba/vbaapplication.hxx b/sc/source/ui/vba/vbaapplication.hxx index ad8c83309c38..3712bc14736a 100644 --- a/sc/source/ui/vba/vbaapplication.hxx +++ b/sc/source/ui/vba/vbaapplication.hxx @@ -122,6 +122,8 @@ public: virtual sal_Bool SAL_CALL getEnableEvents() throw (css::uno::RuntimeException); virtual void SAL_CALL setEnableEvents( sal_Bool bEnable ) throw (css::uno::RuntimeException); + virtual sal_Bool SAL_CALL getDisplayFullScreen() throw (css::uno::RuntimeException); + virtual void SAL_CALL setDisplayFullScreen( sal_Bool bSet ) throw (css::uno::RuntimeException); virtual css::uno::Any SAL_CALL Windows( const css::uno::Any& aIndex ) throw (css::uno::RuntimeException); virtual void SAL_CALL wait( double time ) throw (css::uno::RuntimeException); virtual css::uno::Any SAL_CALL Range( const css::uno::Any& Cell1, const css::uno::Any& Cell2 ) throw (css::uno::RuntimeException); |