vcl/source/window/printdlg.cxx | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-)
New commits: commit d56690047760392cbdd512590f4f53f591d5aae8 Author: Justin Luth <[email protected]> AuthorDate: Thu Oct 23 12:03:15 2025 -0400 Commit: Justin Luth <[email protected]> CommitDate: Fri Oct 24 02:30:13 2025 +0200 tdf#166185 vcl print preview: only ORIENTATION_AUTOMATIC resizes paper This improves my 7.3 commit 324daa38a823477e1d1b650b5d91f3dc91c6a9af tdf#129638 print preview: use new paper size after switching page which should only do that for automatic paper size and orientation. I don't see any change in the dialog resulting from this but it seemed to be "more correct" as I was testing this bug report. Change-Id: Icd480f54b17f57612746278c72761cc9e2afd553 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/192925 Reviewed-by: Justin Luth <[email protected]> Tested-by: Jenkins diff --git a/vcl/source/window/printdlg.cxx b/vcl/source/window/printdlg.cxx index e854ea18b894..62ee78dfa389 100644 --- a/vcl/source/window/printdlg.cxx +++ b/vcl/source/window/printdlg.cxx @@ -961,7 +961,13 @@ void PrintDialog::preparePreview( bool i_bMayUseCache ) { PrinterController::PageSize aPageSize = maPController->getFilteredPageFile( mnCurPage, aMtf, i_bMayUseCache ); - aCurPageSize = aPrt->PixelToLogic(aPrt->GetPaperSizePixel(), MapMode(MapUnit::Map100thMM)); + + if (mxOrientationBox->get_active() == ORIENTATION_AUTOMATIC) + { + aCurPageSize + = aPrt->PixelToLogic(aPrt->GetPaperSizePixel(), MapMode(MapUnit::Map100thMM)); + } + if( ! aPageSize.bFullPaper ) { const MapMode aMapMode( MapUnit::Map100thMM );
