summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--svtools/source/misc/acceleratorexecute.cxx21
1 files changed, 19 insertions, 2 deletions
diff --git a/svtools/source/misc/acceleratorexecute.cxx b/svtools/source/misc/acceleratorexecute.cxx
index a9e44ba6a9f8..fc42ef7b415d 100644
--- a/svtools/source/misc/acceleratorexecute.cxx
+++ b/svtools/source/misc/acceleratorexecute.cxx
@@ -33,6 +33,10 @@
#include <cppuhelper/implbase.hxx>
#include <vcl/evntpost.hxx>
+#include <sal/log.hxx>
+#include <vcl/lok.hxx>
+#include <vcl/window.hxx>
+#include <vcl/svapp.hxx>
#include <osl/mutex.hxx>
namespace svt
@@ -198,8 +202,21 @@ bool AcceleratorExecute::execute(const css::awt::KeyEvent& aAWTKey)
{
// Note: Such instance can be used one times only and destroy itself afterwards .-)
css::uno::Reference<css::lang::XComponent> xFrame(xProvider, css::uno::UNO_QUERY);
- AsyncAccelExec* pExec = AsyncAccelExec::createOneShotInstance(xFrame, xDispatch, aURL);
- pExec->execAsync();
+ if (vcl::lok::isUnipoll())
+ { // tdf#130382 - all synchronous really.
+ try {
+ xDispatch->dispatch (aURL, css::uno::Sequence< css::beans::PropertyValue >());
+ }
+ catch(const css::uno::Exception&ev)
+ {
+ SAL_INFO("svtools", "exception on key emission: " << ev.Message);
+ }
+ }
+ else
+ {
+ AsyncAccelExec* pExec = AsyncAccelExec::createOneShotInstance(xFrame, xDispatch, aURL);
+ pExec->execAsync();
+ }
}
return bRet;