vcl/source/window/printdlg.cxx |    2 ++
 1 file changed, 2 insertions(+)

New commits:
commit 35137efbb2b50b5eae8c9377f658f7bc8f23d9cc
Author:     Julien Nabet <[email protected]>
AuthorDate: Tue Aug 23 17:27:10 2022 +0200
Commit:     Christian Lohmaier <[email protected]>
CommitDate: Wed Sep 21 11:30:01 2022 +0200

    tdf#150561: Page dimension don't match paper format in Print Preview
    
    ...like claiming 210x148 to be A4
    
    Page size may have changed so sync mePaper with it
    
    Change-Id: I7d7329bbacfb2f0bd56e495b7390eedebecee02c
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/138736
    Tested-by: Jenkins
    Reviewed-by: Julien Nabet <[email protected]>
    (cherry picked from commit 653d098a00f737e79f2e1ea81978320b2d5d27cc)
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/138818
    Reviewed-by: Christian Lohmaier <[email protected]>

diff --git a/vcl/source/window/printdlg.cxx b/vcl/source/window/printdlg.cxx
index 9944541fb91e..c50bd3ae351a 100644
--- a/vcl/source/window/printdlg.cxx
+++ b/vcl/source/window/printdlg.cxx
@@ -988,6 +988,8 @@ void PrintDialog::preparePreview( bool i_bMayUseCache )
             Point aOff( aPrt->PixelToLogic( aPrt->GetPageOffsetPixel(), 
aMapMode ) );
             aMtf.Move( aOff.X(), aOff.Y() );
         }
+        // tdf#150561: page size may have changed so sync mePaper with it
+        mePaper = aPrt->GetPaper();
     }
 
     mxPreview->setPreview( aMtf, aCurPageSize,

Reply via email to