Kaydet (Commit) 4fa65f95 authored tarafından Noel Power's avatar Noel Power

implement VBA Application.DisplayFullScreen bnc#757885

üst 6a018dec
...@@ -74,6 +74,7 @@ interface XApplication ...@@ -74,6 +74,7 @@ interface XApplication
[attribute] boolean Visible; [attribute] boolean Visible;
[attribute] boolean Iteration; [attribute] boolean Iteration;
[attribute] long EnableCancelKey; [attribute] long EnableCancelKey;
[attribute] boolean DisplayFullScreen;
void setDefaultFilePath([in] string DefaultFilePath) raises(com::sun::star::script::BasicErrorException); void setDefaultFilePath([in] string DefaultFilePath) raises(com::sun::star::script::BasicErrorException);
......
...@@ -50,7 +50,7 @@ enum ScUpdateMode { SC_UPDATE_ALL, SC_UPDATE_CHANGED, SC_UPDATE_MARKS }; ...@@ -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: public:
static sal_Bool ExecuteCharMap( const SvxFontItem& rOldFont, static sal_Bool ExecuteCharMap( const SvxFontItem& rOldFont,
......
...@@ -119,6 +119,8 @@ ...@@ -119,6 +119,8 @@
#include <basic/sbxobj.hxx> #include <basic/sbxobj.hxx>
#include "vbafiledialog.hxx" #include "vbafiledialog.hxx"
#include "viewutil.hxx"
using namespace ::ooo::vba; using namespace ::ooo::vba;
using namespace ::com::sun::star; using namespace ::com::sun::star;
using ::com::sun::star::uno::Reference; using ::com::sun::star::uno::Reference;
...@@ -874,6 +876,24 @@ ScVbaApplication::getEnableEvents() throw (uno::RuntimeException) ...@@ -874,6 +876,24 @@ ScVbaApplication::getEnableEvents() throw (uno::RuntimeException)
return mrAppSettings.mbEnableEvents; return mrAppSettings.mbEnableEvents;
} }
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 sal_Bool SAL_CALL
ScVbaApplication::getVisible() throw (uno::RuntimeException) ScVbaApplication::getVisible() throw (uno::RuntimeException)
{ {
......
...@@ -122,6 +122,8 @@ public: ...@@ -122,6 +122,8 @@ public:
virtual sal_Bool SAL_CALL getEnableEvents() throw (css::uno::RuntimeException); virtual sal_Bool SAL_CALL getEnableEvents() throw (css::uno::RuntimeException);
virtual void SAL_CALL setEnableEvents( sal_Bool bEnable ) 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 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 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); virtual css::uno::Any SAL_CALL Range( const css::uno::Any& Cell1, const css::uno::Any& Cell2 ) throw (css::uno::RuntimeException);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment