summaryrefslogtreecommitdiff
path: root/sfx2
diff options
context:
space:
mode:
authorSamuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>2020-11-25 23:09:18 +0100
committerThorsten Behrens <Thorsten.Behrens@CIB.de>2020-12-03 02:45:17 +0100
commit9b0824e2b4d2228325d17190c63d8d1641e12798 (patch)
tree1ec4fb548bedb95b8e9a77c0902faac7dccbe56c /sfx2
parent7ed3ab4fd497ffa20359cdc73201e18508fcad54 (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/+/106634 Tested-by: Jenkins Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de> (cherry picked from commit ccb0b825305a158d9142e1a5316c6ff7905f6ecb) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/106678 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 a0de55dbfddb..6cdad85a8d53 100644
--- a/sfx2/sdi/sfx.sdi
+++ b/sfx2/sdi/sfx.sdi
@@ -3238,7 +3238,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 45341cd1892a..796a505ed8d4 100644
--- a/sfx2/source/view/viewprn.cxx
+++ b/sfx2/source/view/viewprn.cxx
@@ -820,8 +820,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();