[PATCH libreoffice-4-0] squash NoSuchElementExceptions when modifying keybindings

Noel Power (via Code Review) gerrit at gerrit.libreoffice.org
Fri Apr 5 01:47:59 PDT 2013


Hi,

I have submitted a patch for review:

    https://gerrit.libreoffice.org/3208

To pull it, you can do:

    git pull ssh://gerrit.libreoffice.org:29418/core refs/changes/08/3208/1

squash NoSuchElementExceptions when modifying keybindings

Change-Id: I37882845660929e0001a834b6685a4087dfb465f
---
M sc/source/ui/vba/vbaapplication.cxx
M sc/source/ui/vba/vbaapplication.hxx
2 files changed, 16 insertions(+), 1 deletion(-)



diff --git a/sc/source/ui/vba/vbaapplication.cxx b/sc/source/ui/vba/vbaapplication.cxx
index f15f0ab..db8bcaf 100644
--- a/sc/source/ui/vba/vbaapplication.cxx
+++ b/sc/source/ui/vba/vbaapplication.cxx
@@ -1297,6 +1297,21 @@
     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 072bd0c..7541178 100644
--- a/sc/source/ui/vba/vbaapplication.hxx
+++ b/sc/source/ui/vba/vbaapplication.hxx
@@ -96,7 +96,7 @@
     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);
 

-- 
To view, visit https://gerrit.libreoffice.org/3208
To unsubscribe, visit https://gerrit.libreoffice.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I37882845660929e0001a834b6685a4087dfb465f
Gerrit-PatchSet: 1
Gerrit-Project: core
Gerrit-Branch: libreoffice-4-0
Gerrit-Owner: Noel Power <noel.power at suse.com>



More information about the LibreOffice mailing list