diff options
author | Noel Power <noel.power@suse.com> | 2013-03-29 16:53:24 +0000 |
---|---|---|
committer | Noel Power <noel.power@suse.com> | 2013-04-05 17:15:01 +0100 |
commit | e14a251c2d4478fe8cf085df792aa2181d15b4cf (patch) | |
tree | f57d9fa7c2d58bdbfa2d045ec4b214970440d270 /sc/source/ui | |
parent | 3ffd86188b470fa7ebd9e6d10678279a1f63a81c (diff) |
squash NoSuchElementExceptions when modifying keybindings
Change-Id: I37882845660929e0001a834b6685a4087dfb465f
Diffstat (limited to 'sc/source/ui')
-rw-r--r-- | sc/source/ui/vba/vbaapplication.cxx | 15 | ||||
-rw-r--r-- | sc/source/ui/vba/vbaapplication.hxx | 2 |
2 files changed, 16 insertions, 1 deletions
diff --git a/sc/source/ui/vba/vbaapplication.cxx b/sc/source/ui/vba/vbaapplication.cxx index 0d39fa37eead..07e53cb93f03 100644 --- a/sc/source/ui/vba/vbaapplication.cxx +++ b/sc/source/ui/vba/vbaapplication.cxx @@ -1295,6 +1295,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); |