summaryrefslogtreecommitdiff
path: root/sc
diff options
context:
space:
mode:
authorHossein <hossein@libreoffice.org>2024-10-04 11:27:02 +0200
committerAdolfo Jayme Barrientos <fitojb@ubuntu.com>2024-10-05 19:49:16 +0200
commite0c8191d7f30957a50fbfa3b5938cb6f9dacc9bf (patch)
tree30f1995dc0fee3f77d1e633b6536bf72a2daccc6 /sc
parent81268254b69ae1a9acbe52e4aa63910343f4987c (diff)
tdf#163291 Fix AdditionsDialog in start center
Previously, AdditionsDialog was not working while in start center. Also, there were a lot of code duplicates. This patch fixes these issues. The UNO command .uno:AdditionsDialog was incorrectly implemented as application specific. There were multiple duplicate conditions for checking SID_ADDITIONS_DIALOG in each and every application. Now, this is only done in sfx2/source/appl/appserv.cxx in a single point. The AdditionsDialog can now be opened while in start center in different places of "Tools > Options" for icons, dictionaries, etc. Also, this LibreOffice BASIC code snippet opens it: Sub Main() oDispatch = CreateUnoService("com.sun.star.frame.DispatchHelper") Dim args(0) As New com.sun.star.beans.PropertyValue oDispatch.executeDispatch(StarDesktop.ActiveFrame, ".uno:AdditionsDialog", "", 0, args) End Sub Change-Id: Ifb7e466449008b9bb6e5b678da2e54f58bc101e3 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/174469 Reviewed-by: Hossein <hossein@libreoffice.org> Tested-by: Jenkins (cherry picked from commit bb0e5aa97965b2710200da677db032289c373afe) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/174447 Reviewed-by: Adolfo Jayme Barrientos <fitojb@ubuntu.com>
Diffstat (limited to 'sc')
-rw-r--r--sc/sdi/tabvwsh.sdi1
-rw-r--r--sc/source/ui/view/tabvwshb.cxx20
2 files changed, 0 insertions, 21 deletions
diff --git a/sc/sdi/tabvwsh.sdi b/sc/sdi/tabvwsh.sdi
index 7130ff4cabd8..cfdc827b2423 100644
--- a/sc/sdi/tabvwsh.sdi
+++ b/sc/sdi/tabvwsh.sdi
@@ -62,7 +62,6 @@ interface BaseSelection
SID_INSERT_QRCODE [ ExecMethod = ExecDrawIns; StateMethod = GetDrawInsState; ]
SID_EDIT_QRCODE [ ExecMethod = ExecDrawIns; StateMethod = GetDrawInsState; ]
- SID_ADDITIONS_DIALOG [ ExecMethod = ExecDrawIns; StateMethod = GetDrawInsState; ]
SID_IMAP [ ExecMethod = ExecImageMap; StateMethod = GetImageMapState; ]
SID_IMAP_EXEC [ ExecMethod = ExecImageMap; StateMethod = GetImageMapState; ]
diff --git a/sc/source/ui/view/tabvwshb.cxx b/sc/source/ui/view/tabvwshb.cxx
index a4204f57e767..0a174df6d84b 100644
--- a/sc/source/ui/view/tabvwshb.cxx
+++ b/sc/source/ui/view/tabvwshb.cxx
@@ -466,26 +466,6 @@ void ScTabViewShell::ExecDrawIns(SfxRequest& rReq)
break;
}
- case SID_ADDITIONS_DIALOG:
- {
- OUString sAdditionsTag = u""_ustr;
-
- const SfxStringItem* pStringArg = rReq.GetArg<SfxStringItem>(FN_PARAM_ADDITIONS_TAG);
- if (pStringArg)
- sAdditionsTag = pStringArg->GetValue();
-
- VclAbstractDialogFactory* pFact = VclAbstractDialogFactory::Create();
- VclPtr<AbstractAdditionsDialog> pDialog(
- pFact->CreateAdditionsDialog(pWin->GetFrameWeld(), sAdditionsTag));
- pDialog->StartExecuteAsync(
- [pDialog] (sal_Int32 /*nResult*/)->void
- {
- pDialog->disposeOnce();
- }
- );
- break;
- }
-
case SID_OBJECTRESIZE:
{
// the server would like to change the client size