diff options
author | Noel Power <noel.power@suse.com> | 2013-03-29 11:27:50 +0000 |
---|---|---|
committer | Noel Power <noel.power@suse.com> | 2013-04-04 17:29:55 +0100 |
commit | 811a311ae7ea83f02bb07639dcbe4ac2763dd74e (patch) | |
tree | 60d69f9ea7da5e916aff0202bb9fdb78db0cde5f | |
parent | 24eb6cfc53561a73369800068aef8d62b677d6a2 (diff) |
squash NoSuchElementExceptions when modifying keybindings
Change-Id: If83183ae652e7a92b0795774b0f0a8a0b6c1ec82
-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 d962395b6dd2..5b713e044915 100644 --- a/sc/source/ui/vba/vbaapplication.cxx +++ b/sc/source/ui/vba/vbaapplication.cxx @@ -1870,6 +1870,21 @@ double SAL_CALL ScVbaApplication::InchesToPoints( double Inches ) throw (uno::Ru return MetricField::ConvertDoubleValue( Inches, 0, 0, FUNIT_INCH, FUNIT_POINT ); } +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 0f72d7bfaef5..95f1f7356874 100644 --- a/sc/source/ui/vba/vbaapplication.hxx +++ b/sc/source/ui/vba/vbaapplication.hxx @@ -110,7 +110,7 @@ public: virtual sal_Bool SAL_CALL getVisible() throw (css::uno::RuntimeException); virtual void SAL_CALL setVisible( sal_Bool bVisible ) 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 getIteration() throw (css::uno::RuntimeException); // add the support of Iteration virtual void SAL_CALL setIteration( sal_Bool bIteration ) throw (css::uno::RuntimeException); // add the support of Iteration virtual sal_Int32 SAL_CALL getEnableCancelKey() throw (css::uno::RuntimeException); // add the support of EnableCancelKey |