From 08d0326cd2125dabb94102adaf06e34fc49974bc Mon Sep 17 00:00:00 2001 From: Tamás Zolnai Date: Thu, 21 Nov 2019 16:13:06 +0100 Subject: lok: Chart context menu: Replace tunneled context menu with JS context menu. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Change-Id: I36db90887bff86036093ce0732db6fc6c76e79f6 Reviewed-on: https://gerrit.libreoffice.org/83604 Tested-by: Jenkins Reviewed-by: Tamás Zolnai --- desktop/source/lib/init.cxx | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) (limited to 'desktop/source') diff --git a/desktop/source/lib/init.cxx b/desktop/source/lib/init.cxx index 9298be14c0dc..a5100da75627 100644 --- a/desktop/source/lib/init.cxx +++ b/desktop/source/lib/init.cxx @@ -3470,7 +3470,7 @@ static void doc_postUnoCommand(LibreOfficeKitDocument* pThis, const char* pComma } } - if (aChartHelper.GetWindow()) + if (aChartHelper.GetWindow() && aPropertyValuesVector.size() > 0) { if (aPropertyValuesVector[0].Name != "Action") { @@ -3502,7 +3502,17 @@ static void doc_postUnoCommand(LibreOfficeKitDocument* pThis, const char* pComma } bool bResult = false; - if (bNotifyWhenFinished && pDocument->mpCallbackFlushHandlers.count(nView)) + LokChartHelper aChartHelper(SfxViewShell::Current()); + + if (aChartHelper.GetWindow() ) + { + util::URL aCommandURL; + aCommandURL.Path = aCommand.copy(5); + css::uno::Reference& aChartDispatcher = aChartHelper.GetXDispatcher(); + aChartDispatcher->dispatch(aCommandURL, comphelper::containerToSequence(aPropertyValuesVector)); + return; + } + else if (bNotifyWhenFinished && pDocument->mpCallbackFlushHandlers.count(nView)) { bResult = comphelper::dispatchCommand(aCommand, comphelper::containerToSequence(aPropertyValuesVector), new DispatchResultListener(pCommand, pDocument->mpCallbackFlushHandlers[nView])); -- cgit