diff options
author | Tamás Zolnai <tamas.zolnai@collabora.com> | 2019-11-21 16:13:06 +0100 |
---|---|---|
committer | Tamás Zolnai <tamas.zolnai@collabora.com> | 2019-11-24 13:40:45 +0100 |
commit | 08d0326cd2125dabb94102adaf06e34fc49974bc (patch) | |
tree | 4dbcb51ec0b7fcb04828d2a51f2b3f1eddcc7115 /desktop/source/lib | |
parent | 822181788ec011418ac0ce95c57ea70feb4769f1 (diff) |
lok: Chart context menu: Replace tunneled context menu with JS context menu.
Change-Id: I36db90887bff86036093ce0732db6fc6c76e79f6
Reviewed-on: https://gerrit.libreoffice.org/83604
Tested-by: Jenkins
Reviewed-by: Tamás Zolnai <tamas.zolnai@collabora.com>
Diffstat (limited to 'desktop/source/lib')
-rw-r--r-- | desktop/source/lib/init.cxx | 14 |
1 files changed, 12 insertions, 2 deletions
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<css::frame::XDispatch>& 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])); |