summaryrefslogtreecommitdiff
path: root/vcl/source/gdi/print.cxx
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2022-09-21 22:22:38 +0200
committerCaolán McNamara <caolanm@redhat.com>2022-09-22 19:40:02 +0200
commit6005aeca4416eb0d583fd12ab837afa91d9d18ec (patch)
tree47c5a3e238a0ab20a583b2748dac6b4c9f7bd7bf /vcl/source/gdi/print.cxx
parent3805a4090dbbffa54bb1a9d7fe63e723fc6d029b (diff)
tdf#151107 swap job orientation if paper matching swapped width/height
if we eventually are forced to pick a final paper size which has the orthogonal orientation than that requested, then swap the orientation of the jobdata too and re-init the orientation to defaults in Printer::SetPaperSizeUser when we set a new user paper size rather than keeping the orig Change-Id: Ie9e783575734c7f9eec3984efd1357cae5375130 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/140358 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'vcl/source/gdi/print.cxx')
-rw-r--r--vcl/source/gdi/print.cxx1
1 files changed, 1 insertions, 0 deletions
diff --git a/vcl/source/gdi/print.cxx b/vcl/source/gdi/print.cxx
index 5300de9a881d..6225db3a6b35 100644
--- a/vcl/source/gdi/print.cxx
+++ b/vcl/source/gdi/print.cxx
@@ -1347,6 +1347,7 @@ bool Printer::SetPaperSizeUser( const Size& rSize )
rData.SetPaperFormat( PAPER_USER );
rData.SetPaperWidth( aPageSize.Width() );
rData.SetPaperHeight( aPageSize.Height() );
+ rData.SetOrientation( Orientation::Portrait );
if ( IsDisplayPrinter() )
{