summaryrefslogtreecommitdiff
path: root/sc/source
diff options
context:
space:
mode:
authorYusuf Keten <ketenyusuf@gmail.com>2020-07-19 20:22:23 +0300
committerMuhammet Kara <muhammet.kara@collabora.com>2020-07-21 22:25:13 +0200
commit6e50e03262aa12921f108b502d3c76ce983d54f1 (patch)
treef39f736608778299607de1ab259c146cdeba6302 /sc/source
parent0587c88e23b4d3d1a0504cd4c6cf1d51fa9ff498 (diff)
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 <muhammet.kara@collabora.com>
Diffstat (limited to 'sc/source')
-rw-r--r--sc/source/ui/view/tabvwshb.cxx21
1 files changed, 14 insertions, 7 deletions
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 <sfx2/viewfrm.hxx>
#include <svtools/soerr.hxx>
#include <svl/rectitem.hxx>
+#include <svl/stritem.hxx>
#include <svl/slstitm.hxx>
#include <svl/whiter.hxx>
#include <unotools/moduleoptions.hxx>
@@ -413,16 +414,22 @@ void ScTabViewShell::ExecDrawIns(SfxRequest& rReq)
break;
}
- case SID_ADDITIONS_DIALOG:
+ case SID_ADDITIONS_DIALOG:
{
- VclAbstractDialogFactory* pFact = VclAbstractDialogFactory::Create();
- ScopedVclPtr<AbstractAdditionsDialog> pDialog(
- pFact->CreateAdditionsDialog(pWin->GetFrameWeld()));
- pDialog->Execute();
- break;
+ OUString sAdditionsTag = "";
+
+ const SfxStringItem* pStringArg = rReq.GetArg<SfxStringItem>(SID_ADDITIONS_TAG);
+ if (pStringArg)
+ sAdditionsTag = pStringArg->GetValue();
+
+ VclAbstractDialogFactory* pFact = VclAbstractDialogFactory::Create();
+ ScopedVclPtr<AbstractAdditionsDialog> pDialog(
+ pFact->CreateAdditionsDialog(pWin->GetFrameWeld(), sAdditionsTag));
+ pDialog->Execute();
+ break;
}
- case SID_OBJECTRESIZE:
+ case SID_OBJECTRESIZE:
{
// the server would like to change the client size