comphelper/source/misc/dispatchcommand.cxx | 7 +++++-- include/comphelper/dispatchcommand.hxx | 4 ++-- starmath/source/SmPropertiesPanel.hxx | 5 +++++ 3 files changed, 12 insertions(+), 4 deletions(-)
New commits: commit d2b1a92b128a6ad7cbe56b6846e8dee298564b5e Author: Mike Kaganski <mike.kagan...@collabora.com> AuthorDate: Mon Jul 7 13:33:34 2025 +0500 Commit: Miklos Vajna <vmik...@collabora.com> CommitDate: Thu Jul 10 08:34:33 2025 +0200 Let comphelper::dispatchCommand take XInterface Not only XFrame can represent an object implementing XDispatchProvider. Useful for a follow-up change passing a controller there. Change-Id: I883c6a6905e78da0c083323b5ef641fa27f133b4 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/187525 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoff...@gmail.com> Reviewed-by: Miklos Vajna <vmik...@collabora.com> diff --git a/comphelper/source/misc/dispatchcommand.cxx b/comphelper/source/misc/dispatchcommand.cxx index 6fa212ab7f05..2ea452c18ead 100644 --- a/comphelper/source/misc/dispatchcommand.cxx +++ b/comphelper/source/misc/dispatchcommand.cxx @@ -31,9 +31,12 @@ using namespace css; namespace comphelper { -bool dispatchCommand(const OUString& rCommand, const uno::Reference<css::frame::XFrame>& rFrame, const css::uno::Sequence<css::beans::PropertyValue>& rArguments, const uno::Reference<css::frame::XDispatchResultListener>& rListener) +bool dispatchCommand(const OUString& rCommand, + const uno::Reference<uno::XInterface>& xDispatchSource, + const uno::Sequence<beans::PropertyValue>& rArguments, + const uno::Reference<frame::XDispatchResultListener>& rListener) { - uno::Reference<frame::XDispatchProvider> xDispatchProvider(rFrame, uno::UNO_QUERY); + uno::Reference<frame::XDispatchProvider> xDispatchProvider(xDispatchSource, uno::UNO_QUERY); if (!xDispatchProvider.is()) return false; diff --git a/include/comphelper/dispatchcommand.hxx b/include/comphelper/dispatchcommand.hxx index 384536952789..0e127d526108 100644 --- a/include/comphelper/dispatchcommand.hxx +++ b/include/comphelper/dispatchcommand.hxx @@ -15,7 +15,7 @@ #include <com/sun/star/uno/Reference.hxx> namespace com::sun::star::beans { struct PropertyValue; } -namespace com::sun::star::frame { class XDispatchResultListener; class XFrame; } +namespace com::sun::star::frame { class XDispatchResultListener; } namespace com::sun::star::uno { template <typename > class Sequence; } namespace comphelper @@ -32,7 +32,7 @@ COMPHELPER_DLLPUBLIC bool dispatchCommand(const OUString& rCommand, const css::uno::Reference<css::frame::XDispatchResultListener>& rListener = css::uno::Reference<css::frame::XDispatchResultListener>()); COMPHELPER_DLLPUBLIC bool dispatchCommand(const OUString& rCommand, - const css::uno::Reference<css::frame::XFrame>& rFrame, + const css::uno::Reference<css::uno::XInterface>& xDispatchSource, const css::uno::Sequence<css::beans::PropertyValue>& rArguments, const css::uno::Reference<css::frame::XDispatchResultListener>& rListener = css::uno::Reference<css::frame::XDispatchResultListener>()); diff --git a/starmath/source/SmPropertiesPanel.hxx b/starmath/source/SmPropertiesPanel.hxx index f19316e3fac1..69ad4da635d5 100644 --- a/starmath/source/SmPropertiesPanel.hxx +++ b/starmath/source/SmPropertiesPanel.hxx @@ -26,6 +26,11 @@ #include <map> #include <memory> +namespace com::sun::star::frame +{ +class XFrame; +} + namespace sm::sidebar { class SmPropertiesPanel : public PanelLayout