[Libreoffice-commits] core.git: Branch 'libreoffice-7-1' - vcl/source

Gabor Kelemen (via logerrit) logerrit at kemper.freedesktop.org
Wed Jan 27 14:13:16 UTC 2021


 vcl/source/window/printdlg.cxx |    7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

New commits:
commit fdb2b760d9fd3b65ad54bad14a62f3c47374731e
Author:     Gabor Kelemen <kelemen.gabor2 at nisz.hu>
AuthorDate: Tue Jan 19 19:24:53 2021 +0100
Commit:     Caolán McNamara <caolanm at redhat.com>
CommitDate: Wed Jan 27 15:12:39 2021 +0100

    tdf#129180 Fix default paper size in the dropdown
    
    Seems like a few calls to getJobPageSize() are necessary
    before the Page size list can get a correct value.
    
    This is why the problem appeared only on opening the dialog
    but opening/closing the printers Properties dialog fixed it.
    
    Thanks to Justin Luth for the idea!
    
    Note: for testing, change among paper sizes supported by
    the printer, e.g. A4, Legal and Letter.
    
    See also tdf#134646
    
    Change-Id: I792139e274886c1b232ef97a4f1e800e6b32cf71
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109655
    Tested-by: László Németh <nemeth at numbertext.org>
    Reviewed-by: László Németh <nemeth at numbertext.org>
    (cherry picked from commit 3c85bf2af5ae2f7b180db8f8abf2d4e997491bb9)
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109979
    Tested-by: Jenkins
    Reviewed-by: Caolán McNamara <caolanm at redhat.com>

diff --git a/vcl/source/window/printdlg.cxx b/vcl/source/window/printdlg.cxx
index a2956b748dc1..2d5ebf2a49a8 100644
--- a/vcl/source/window/printdlg.cxx
+++ b/vcl/source/window/printdlg.cxx
@@ -595,9 +595,6 @@ PrintDialog::PrintDialog(weld::Window* i_pWindow, const std::shared_ptr<PrinterC
     // update the text fields for the printer
     updatePrinterText();
 
-    // set paper sizes listbox
-    setPaperSizes();
-
     // setup dependencies
     checkControlDependencies();
 
@@ -680,6 +677,10 @@ PrintDialog::PrintDialog(weld::Window* i_pWindow, const std::shared_ptr<PrinterC
 
     updateNupFromPages();
 
+    // tdf#129180 Delay setting the default value in the Paper Size list
+    // set paper sizes listbox
+    setPaperSizes();
+
     // lock the dialog height, regardless of later expander state
     mxScrolledWindow->set_size_request(
         mxScrolledWindow->get_preferred_size().Width() + mxScrolledWindow->get_vscroll_width(),


More information about the Libreoffice-commits mailing list