summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNoel Power <noel.power@suse.com>2013-05-03 16:14:03 +0100
committerNoel Power <noel.power@suse.com>2013-05-07 09:56:28 +0100
commitb713643f19ca45b0451f10e89562c802edaa699d (patch)
tree0d52fd8deea2a04affc29674340f63b1a570eef3
parent7f4eccece6864b59b2b6dcbea90ea368fa051aa8 (diff)
stub implementation(s) for Application EnableCancelKey & International
Change-Id: I810897b3981390fc39e59d9c8a4c0095547a407a
-rw-r--r--oovbaapi/ooo/vba/excel/XApplication.idl3
-rw-r--r--sc/source/ui/vba/vbaapplication.cxx26
-rw-r--r--sc/source/ui/vba/vbaapplication.hxx3
3 files changed, 30 insertions, 2 deletions
diff --git a/oovbaapi/ooo/vba/excel/XApplication.idl b/oovbaapi/ooo/vba/excel/XApplication.idl
index 183db9763874..4e8c1855ce2c 100644
--- a/oovbaapi/ooo/vba/excel/XApplication.idl
+++ b/oovbaapi/ooo/vba/excel/XApplication.idl
@@ -56,6 +56,7 @@ interface XApplication
[attribute] any StatusBar;
[attribute] long Cursor;
[attribute] boolean EnableEvents;
+ [attribute] boolean EnableCancelKey;
[attribute] boolean DisplayFullScreen;
[attribute] boolean DisplayScrollBars;
[attribute] boolean DisplayExcel4Menus;
@@ -70,7 +71,7 @@ interface XApplication
string getDefaultFilePath() raises(com::sun::star::script::BasicErrorException);
- //any CommandBars( [in] any Index );
+ any International( [in] long Index );
any Workbooks( [in] any Index );
any Worksheets( [in] any Index );
any Windows( [in] any Index );
diff --git a/sc/source/ui/vba/vbaapplication.cxx b/sc/source/ui/vba/vbaapplication.cxx
index 4885ce3fca24..9db16fb14749 100644
--- a/sc/source/ui/vba/vbaapplication.cxx
+++ b/sc/source/ui/vba/vbaapplication.cxx
@@ -117,6 +117,7 @@ struct ScVbaAppSettings
sal_Bool mbExcel4Menus;
sal_Bool mbDisplayNoteIndicator;
sal_Bool mbShowWindowsInTaskbar;
+ sal_Bool mbEnableCancelKey;
explicit ScVbaAppSettings();
};
@@ -126,7 +127,8 @@ ScVbaAppSettings::ScVbaAppSettings() :
mbEnableEvents( sal_True ),
mbExcel4Menus( sal_False ),
mbDisplayNoteIndicator( sal_True ),
- mbShowWindowsInTaskbar( sal_True )
+ mbShowWindowsInTaskbar( sal_True ),
+ mbEnableCancelKey( sal_False )
{
}
@@ -325,6 +327,15 @@ ScVbaApplication::getActiveCell() throw (uno::RuntimeException )
}
uno::Any SAL_CALL
+ScVbaApplication::International( sal_Int32 Index ) throw (uno::RuntimeException)
+{
+ // complete stub for now
+ // #TODO flesh out some of the Indices we could handle
+ uno::Any aRet;
+ return aRet;
+}
+
+uno::Any SAL_CALL
ScVbaApplication::Workbooks( const uno::Any& aIndex ) throw (uno::RuntimeException)
{
uno::Reference< XCollection > xWorkBooks( new ScVbaWorkbooks( this, mxContext ) );
@@ -742,6 +753,19 @@ ScVbaApplication::getEnableEvents() throw (uno::RuntimeException)
return mrAppSettings.mbEnableEvents;
}
+void SAL_CALL
+ScVbaApplication::setEnableCancelKey(sal_Bool bEnable) throw (uno::RuntimeException)
+{
+ // Stub, does nothing
+ mrAppSettings.mbEnableCancelKey = bEnable;
+}
+
+sal_Bool SAL_CALL
+ScVbaApplication::getEnableCancelKey() throw (uno::RuntimeException)
+{
+ return mrAppSettings.mbEnableCancelKey;
+}
+
sal_Bool SAL_CALL
ScVbaApplication::getDisplayFullScreen() throw (uno::RuntimeException)
{
diff --git a/sc/source/ui/vba/vbaapplication.hxx b/sc/source/ui/vba/vbaapplication.hxx
index 0b09a78e2a71..105b2010c70f 100644
--- a/sc/source/ui/vba/vbaapplication.hxx
+++ b/sc/source/ui/vba/vbaapplication.hxx
@@ -85,6 +85,7 @@ public:
virtual css::uno::Reference< ov::XAssistant > SAL_CALL getAssistant() throw (css::uno::RuntimeException);
virtual css::uno::Reference< ov::excel::XWorkbook > SAL_CALL getThisWorkbook() throw (css::uno::RuntimeException);
+ virtual css::uno::Any SAL_CALL International( sal_Int32 Index ) throw (css::uno::RuntimeException);
virtual css::uno::Any SAL_CALL Workbooks( const css::uno::Any& aIndex ) throw (css::uno::RuntimeException);
virtual css::uno::Any SAL_CALL Worksheets( const css::uno::Any& aIndex ) throw (css::uno::RuntimeException);
virtual css::uno::Any SAL_CALL WorksheetFunction( ) throw (css::uno::RuntimeException);
@@ -99,6 +100,8 @@ public:
virtual void SAL_CALL OnKey( const OUString& Key, const css::uno::Any& Procedure ) 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 sal_Bool SAL_CALL getEnableCancelKey() throw (css::uno::RuntimeException);
+ virtual void SAL_CALL setEnableCancelKey( 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);