From 6e50e03262aa12921f108b502d3c76ce983d54f1 Mon Sep 17 00:00:00 2001 From: Yusuf Keten Date: Sun, 19 Jul 2020 20:22:23 +0300 Subject: tdf#133026: Additions - Parameter support to UNO Command After this patch, parameter support to uno command(.uno:AdditionsDialog) will be available. To use parameter, add "?AdditionsTag:string=YourParameter" to UNO command. Parameters are the tags of extensions on webpage. Change-Id: I0072c7340bda14ee13c21c347e06a04545cba69a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/99007 Tested-by: Jenkins Reviewed-by: Muhammet Kara --- sc/source/ui/view/tabvwshb.cxx | 21 ++++++++++++++------- 1 file changed, 14 insertions(+), 7 deletions(-) (limited to 'sc/source') diff --git a/sc/source/ui/view/tabvwshb.cxx b/sc/source/ui/view/tabvwshb.cxx index 01f91d325a2a..7f0542420d39 100644 --- a/sc/source/ui/view/tabvwshb.cxx +++ b/sc/source/ui/view/tabvwshb.cxx @@ -42,6 +42,7 @@ #include #include #include +#include #include #include #include @@ -413,16 +414,22 @@ void ScTabViewShell::ExecDrawIns(SfxRequest& rReq) break; } - case SID_ADDITIONS_DIALOG: + case SID_ADDITIONS_DIALOG: { - VclAbstractDialogFactory* pFact = VclAbstractDialogFactory::Create(); - ScopedVclPtr pDialog( - pFact->CreateAdditionsDialog(pWin->GetFrameWeld())); - pDialog->Execute(); - break; + OUString sAdditionsTag = ""; + + const SfxStringItem* pStringArg = rReq.GetArg(SID_ADDITIONS_TAG); + if (pStringArg) + sAdditionsTag = pStringArg->GetValue(); + + VclAbstractDialogFactory* pFact = VclAbstractDialogFactory::Create(); + ScopedVclPtr pDialog( + pFact->CreateAdditionsDialog(pWin->GetFrameWeld(), sAdditionsTag)); + pDialog->Execute(); + break; } - case SID_OBJECTRESIZE: + case SID_OBJECTRESIZE: { // the server would like to change the client size -- cgit