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-26 18:40:28 +0100 |
commit | f5faf300f8c0c9a33978b8560ed136844b0235e6 (patch) | |
tree | 3dca920b0791a7d071b9b3ad29a3577ea20dbc27 /desktop | |
parent | 16a0e85c9277665b3e74754fff7c690d83a97754 (diff) |
lok: Chart context menu: Replace tunneled context menu with JS context menu.
Reviewed-on: https://gerrit.libreoffice.org/83604
Tested-by: Jenkins
Reviewed-by: Tamás Zolnai <tamas.zolnai@collabora.com>
(cherry picked from commit 08d0326cd2125dabb94102adaf06e34fc49974bc)
Change-Id: I36db90887bff86036093ce0732db6fc6c76e79f6
Diffstat (limited to 'desktop')
-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 5a9cd839fd0c..9f4dfa961a20 100644 --- a/desktop/source/lib/init.cxx +++ b/desktop/source/lib/init.cxx @@ -3476,7 +3476,7 @@ static void doc_postUnoCommand(LibreOfficeKitDocument* pThis, const char* pComma } } - if (aChartHelper.GetWindow()) + if (aChartHelper.GetWindow() && aPropertyValuesVector.size() > 0) { if (aPropertyValuesVector[0].Name != "Action") { @@ -3509,7 +3509,17 @@ static void doc_postUnoCommand(LibreOfficeKitDocument* pThis, const char* pComma } bool bResult = false; - if (bNotifyWhenFinished && pDocument->mpCallbackFlushHandlers[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[nView]) { bResult = comphelper::dispatchCommand(aCommand, comphelper::containerToSequence(aPropertyValuesVector), new DispatchResultListener(pCommand, pDocument->mpCallbackFlushHandlers[nView])); |