summaryrefslogtreecommitdiff
path: root/sc
diff options
context:
space:
mode:
authorNoel Power <noel.power@suse.com>2013-03-29 16:53:24 +0000
committerNoel Power <noel.power@suse.com>2013-04-04 17:31:01 +0100
commit276914e9cedfa28cc4461e9020c51c6e982f3a94 (patch)
tree094aeb73a037bd4e849a86f6ec4b91bc23527c34 /sc
parent57b8dcc4323f736f51f9ed8334affeb042efbca4 (diff)
squash NoSuchElementExceptions when modifying keybindings
Change-Id: I37882845660929e0001a834b6685a4087dfb465f
Diffstat (limited to 'sc')
-rw-r--r--sc/source/ui/vba/vbaapplication.cxx15
-rw-r--r--sc/source/ui/vba/vbaapplication.hxx2
2 files changed, 16 insertions, 1 deletions
diff --git a/sc/source/ui/vba/vbaapplication.cxx b/sc/source/ui/vba/vbaapplication.cxx
index f15f0ab2edbb..db8bcaf03fc9 100644
--- a/sc/source/ui/vba/vbaapplication.cxx
+++ b/sc/source/ui/vba/vbaapplication.cxx
@@ -1297,6 +1297,21 @@ ScVbaApplication::MenuBars( const uno::Any& aIndex ) throw (uno::RuntimeExceptio
return uno::Any( xMenuBars );
}
+void SAL_CALL ScVbaApplication::OnKey( const ::rtl::OUString& Key, const uno::Any& Procedure ) throw (uno::RuntimeException)
+{
+ try
+ {
+ // Perhaps we can catch some excel specific
+ // related behaviour here
+ VbaApplicationBase::OnKey( Key, Procedure );
+ }
+ catch( container::NoSuchElementException& )
+ {
+ // #TODO special handling for unhandled
+ // bindings
+ }
+}
+
rtl::OUString
ScVbaApplication::getServiceImplName()
{
diff --git a/sc/source/ui/vba/vbaapplication.hxx b/sc/source/ui/vba/vbaapplication.hxx
index 072bd0ce7c1e..754117845722 100644
--- a/sc/source/ui/vba/vbaapplication.hxx
+++ b/sc/source/ui/vba/vbaapplication.hxx
@@ -96,7 +96,7 @@ public:
virtual void SAL_CALL setStatusBar( const css::uno::Any& _statusbar ) throw (css::uno::RuntimeException);
virtual ::sal_Int32 SAL_CALL getCursor() throw (css::uno::RuntimeException);
virtual void SAL_CALL setCursor( ::sal_Int32 _cursor ) throw (css::uno::RuntimeException);
-
+ virtual void SAL_CALL OnKey( const ::rtl::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);