[Libreoffice-commits] core.git: sfx2/sdi sfx2/source

Samuel Mehrbrodt (via logerrit) logerrit at kemper.freedesktop.org
Thu Nov 26 08:13:05 UTC 2020


 sfx2/sdi/sfx.sdi             |    2 +-
 sfx2/source/view/viewprn.cxx |    4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)

New commits:
commit a49600eb41bf28213e3adb0a911dae9edb56513e
Author:     Samuel Mehrbrodt <Samuel.Mehrbrodt at cib.de>
AuthorDate: Wed Nov 25 23:09:18 2020 +0100
Commit:     Samuel Mehrbrodt <Samuel.Mehrbrodt at cib.de>
CommitDate: Thu Nov 26 09:12:18 2020 +0100

    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 at cib.de>

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();


More information about the Libreoffice-commits mailing list