Resolves: rhbz#1122868 landscape printing is broken

f41
Caolán McNamara 11 years ago
parent f5f8afa0e8
commit 4dfd8bac3f

@ -1,88 +0,0 @@
From 1c6bd2c40fd03ec735fd6dbec01520f10ee1d55a Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Caol=C3=A1n=20McNamara?= <caolanm@redhat.com>
Date: Fri, 4 Jul 2014 13:28:08 +0100
Subject: [PATCH] Resolves: fdo#80911 toggle original page orientation on paper
fallback
User defined page sizes which match rotated paper sizes available to the
printer don't work correctly when they are already in landscape mode. i.e. the
orientation should be toggled, not overwritten.
Change-Id: I30dca5f988ad72319410a03f47eccff277be8640
---
vcl/source/gdi/print.cxx | 18 ++++++++++++------
1 file changed, 12 insertions(+), 6 deletions(-)
diff --git a/vcl/source/gdi/print.cxx b/vcl/source/gdi/print.cxx
index 6c8bdc4..ded7ebc 100644
--- a/vcl/source/gdi/print.cxx
+++ b/vcl/source/gdi/print.cxx
@@ -1352,6 +1352,7 @@ void Printer::ImplFindPaperFormatForUserSize( JobSetup& aJobSetup, bool bMatchNe
int nLandscapeAngle = GetLandscapeAngle();
int nPaperCount = GetPaperInfoCount();
bool bFound = false;
+ bool bToggleOrient = false;
PaperInfo aInfo(pSetupData->mnPaperWidth, pSetupData->mnPaperHeight);
@@ -1364,7 +1365,6 @@ void Printer::ImplFindPaperFormatForUserSize( JobSetup& aJobSetup, bool bMatchNe
{
pSetupData->mePaperFormat = ImplGetPaperFormat( rPaperInfo.getWidth(),
rPaperInfo.getHeight() );
- pSetupData->meOrientation = ORIENTATION_PORTRAIT;
bFound = true;
break;
}
@@ -1388,8 +1388,8 @@ void Printer::ImplFindPaperFormatForUserSize( JobSetup& aJobSetup, bool bMatchNe
{
pSetupData->mePaperFormat = ImplGetPaperFormat( rPaperInfo.getWidth(),
rPaperInfo.getHeight() );
- pSetupData->meOrientation = ORIENTATION_LANDSCAPE;
bFound = true;
+ bToggleOrient = true;
break;
}
}
@@ -1399,7 +1399,6 @@ void Printer::ImplFindPaperFormatForUserSize( JobSetup& aJobSetup, bool bMatchNe
{
sal_Int64 nBestMatch = SAL_MAX_INT64;
int nBestIndex = 0;
- Orientation eBestOrientation = ORIENTATION_PORTRAIT;
for( int i = 0; i < nPaperCount; i++ )
{
const PaperInfo& rPaperInfo = GetPaperInfo( i );
@@ -1412,7 +1411,7 @@ void Printer::ImplFindPaperFormatForUserSize( JobSetup& aJobSetup, bool bMatchNe
{
nBestMatch = nMatch;
nBestIndex = i;
- eBestOrientation = ORIENTATION_PORTRAIT;
+ bToggleOrient = false;
}
// check landscape match
@@ -1423,13 +1422,20 @@ void Printer::ImplFindPaperFormatForUserSize( JobSetup& aJobSetup, bool bMatchNe
{
nBestMatch = nMatch;
nBestIndex = i;
- eBestOrientation = ORIENTATION_LANDSCAPE;
+ bToggleOrient = true;
}
}
const PaperInfo& rBestInfo = GetPaperInfo( nBestIndex );
pSetupData->mePaperFormat = ImplGetPaperFormat( rBestInfo.getWidth(),
rBestInfo.getHeight() );
- pSetupData->meOrientation = eBestOrientation;
+ }
+
+ if (bToggleOrient)
+ {
+ if (pSetupData->meOrientation == ORIENTATION_PORTRAIT)
+ pSetupData->meOrientation = ORIENTATION_LANDSCAPE;
+ else
+ pSetupData->meOrientation = ORIENTATION_PORTRAIT;
}
}
--
1.9.3

@ -46,7 +46,7 @@ Summary: Free Software Productivity Suite
Name: libreoffice
Epoch: 1
Version: %{libo_version}.3
Release: 2%{?libo_prerelease}%{?dist}
Release: 3%{?libo_prerelease}%{?dist}
License: (MPLv1.1 or LGPLv3+) and LGPLv3 and LGPLv2+ and BSD and (MPLv1.1 or GPLv2 or LGPLv2 or Netscape) and Public Domain and ASL 2.0 and Artistic and MPLv2.0
Group: Applications/Productivity
URL: http://www.libreoffice.org/
@ -305,12 +305,11 @@ Patch14: 0001-disable-PSD-import-test-which-deadlocks-on-ARM.patch
Patch15: 0001-rhbz-1111216-allow-to-export-an-empty-sheet-to-PDF.patch
Patch16: 0001-allow-build-with-icu-4.2.patch
Patch17: 0001-avoid-problems-detecting-HTML-files-with-.xls-ext.patch
Patch18: 0001-Resolves-fdo-80911-toggle-original-page-orientation-.patch
Patch19: 0001-scrolling-very-slow-in-calc.patch
Patch20: 0001-Related-rhbz-1117853-nStartPara-of-EE_PARA_NOT_FOUND.patch
Patch21: 0001-Resolves-fdo-81487-pasting-into-outline-view-crashes.patch
Patch22: 0001-fdo-81113-always-run-the-actual-detection.patch
Patch23: 0001-Resolves-i125289-do-apply-possible-changed-GraphicSt.patch
Patch18: 0001-scrolling-very-slow-in-calc.patch
Patch19: 0001-Related-rhbz-1117853-nStartPara-of-EE_PARA_NOT_FOUND.patch
Patch20: 0001-Resolves-fdo-81487-pasting-into-outline-view-crashes.patch
Patch21: 0001-fdo-81113-always-run-the-actual-detection.patch
Patch22: 0001-Resolves-i125289-do-apply-possible-changed-GraphicSt.patch
%define instdir %{_libdir}
%define baseinstdir %{instdir}/libreoffice
@ -2283,6 +2282,9 @@ update-desktop-database %{_datadir}/applications &> /dev/null || :
%endif
%changelog
* Fri Jul 25 2014 Caolán McNamara <caolanm@redhat.com> - 1:4.3.0.3-3
- Resolves: rhbz#1122868 landscape printing is broken
* Thu Jul 24 2014 David Tardon <dtardon@redhat.com> - 1:4.3.0.3-2
- avoid image loss in Impress after auto-save

Loading…
Cancel
Save