summaryrefslogtreecommitdiff
path: root/sfx2
diff options
context:
space:
mode:
authorSamuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>2020-11-25 23:09:18 +0100
committerVasily Melenchuk <vasily.melenchuk@cib.de>2020-12-07 13:00:24 +0300
commit27c6a0f9a0e6f0fa18a21033ed31bfbc01b0a6c4 (patch)
tree1f5e05a027780a34c1b1b371060bd69a849a3071 /sfx2
parent2ff4f719919c3f4e33e7b684fa4a0a0e8ca42720 (diff)
uno:Printersetup: Allow preselecting a printer
When calling "uno:Printersetup" from a macro, allow preselecting a printer in the printer setup dialog by passing the printer name as an argument "PrinterName" Change-Id: I6b435f52a4123dc7fd49f6d771052ff1b8e743c1 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/106656 Tested-by: Thorsten Behrens <Thorsten.Behrens@CIB.de> Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
Diffstat (limited to 'sfx2')
-rw-r--r--sfx2/sdi/sfx.sdi2
-rw-r--r--sfx2/source/view/viewprn.cxx4
2 files changed, 3 insertions, 3 deletions
diff --git a/sfx2/sdi/sfx.sdi b/sfx2/sdi/sfx.sdi
index 624abe196661..2cd73b915bf7 100644
--- a/sfx2/sdi/sfx.sdi
+++ b/sfx2/sdi/sfx.sdi
@@ -3222,7 +3222,7 @@ SfxStringItem Printer SID_PRINTER_NAME
SfxVoidItem PrinterSetup SID_SETUPPRINTER
-()
+(SfxStringItem PrinterName SID_PRINTER_NAME)
[
AutoUpdate = FALSE,
FastCall = FALSE,
diff --git a/sfx2/source/view/viewprn.cxx b/sfx2/source/view/viewprn.cxx
index 8ee3fe18de04..b67267a61b53 100644
--- a/sfx2/source/view/viewprn.cxx
+++ b/sfx2/source/view/viewprn.cxx
@@ -829,8 +829,8 @@ void SfxViewShell::ExecPrint_Impl( SfxRequest &rReq )
return;
}
- // if no arguments are given, retrieve them from a dialog
- if ( !bIsAPI )
+ // Open Printer Setup dialog
+ if ( nId == SID_SETUPPRINTER )
{
// PrinterDialog needs a temporary printer
VclPtr<SfxPrinter> pDlgPrinter = pPrinter->Clone();