[Libreoffice-commits] core.git: comphelper/source
Ashod Nakashian (via logerrit)
logerrit at kemper.freedesktop.org
Wed Jun 12 09:53:59 UTC 2019
comphelper/source/misc/dispatchcommand.cxx | 16 +++++++++++-----
1 file changed, 11 insertions(+), 5 deletions(-)
New commits:
commit 953db3ca96d0055a83f718794416a9e39b0b20ce
Author: Ashod Nakashian <ashod.nakashian at collabora.co.uk>
AuthorDate: Sat Apr 13 21:40:20 2019 -0400
Commit: Jan Holesovsky <kendy at collabora.com>
CommitDate: Wed Jun 12 11:52:39 2019 +0200
comphelper: use dispatchwithNotification only when we have a callback
Change-Id: Ica7448458ecc5e9adc802a288f72b1fceb709f79
Reviewed-on: https://gerrit.libreoffice.org/70724
Reviewed-by: Ashod Nakashian <ashnakash at gmail.com>
Tested-by: Ashod Nakashian <ashnakash at gmail.com>
Reviewed-on: https://gerrit.libreoffice.org/73492
Tested-by: Jenkins
Reviewed-by: Jan Holesovsky <kendy at collabora.com>
diff --git a/comphelper/source/misc/dispatchcommand.cxx b/comphelper/source/misc/dispatchcommand.cxx
index 0b5d3b18a65a..069a9d835032 100644
--- a/comphelper/source/misc/dispatchcommand.cxx
+++ b/comphelper/source/misc/dispatchcommand.cxx
@@ -48,11 +48,17 @@ bool dispatchCommand(const OUString& rCommand, const uno::Reference<css::frame::
return false;
// And do the work...
- uno::Reference<frame::XNotifyingDispatch> xNotifyingDisp(xDisp, uno::UNO_QUERY);
- if (xNotifyingDisp.is())
- xNotifyingDisp->dispatchWithNotification(aCommandURL, rArguments, rListener);
- else
- xDisp->dispatch(aCommandURL, rArguments);
+ if (rListener.is())
+ {
+ uno::Reference<frame::XNotifyingDispatch> xNotifyingDisp(xDisp, uno::UNO_QUERY);
+ if (xNotifyingDisp.is())
+ {
+ xNotifyingDisp->dispatchWithNotification(aCommandURL, rArguments, rListener);
+ return true;
+ }
+ }
+
+ xDisp->dispatch(aCommandURL, rArguments);
return true;
}
More information about the Libreoffice-commits
mailing list