summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2014-07-25 14:16:44 +0100
committerCaolán McNamara <caolanm@redhat.com>2014-07-25 14:19:36 +0100
commit87266b182913372b06eb107674e49f665f6f4342 (patch)
tree6397b0d96949b7d39daf3ebc4bd99b645c4a0c7a
parent3969b608e5213c2b6d4924d658edf25137232037 (diff)
Revert "fdo#80911 toggle original page orientation on paper fallback"
see rhbz#1122868 for problems, needs a different approach This reverts commit 1c6bd2c40fd03ec735fd6dbec01520f10ee1d55a. Change-Id: I3aa943c086540a7bcde31ebb03c5be552dd739c6
-rw-r--r--vcl/source/gdi/print.cxx18
1 files changed, 6 insertions, 12 deletions
diff --git a/vcl/source/gdi/print.cxx b/vcl/source/gdi/print.cxx
index ded7ebc3c648..6c8bdc449264 100644
--- a/vcl/source/gdi/print.cxx
+++ b/vcl/source/gdi/print.cxx
@@ -1352,7 +1352,6 @@ 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);
@@ -1365,6 +1364,7 @@ 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,6 +1399,7 @@ 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 );
@@ -1411,7 +1412,7 @@ void Printer::ImplFindPaperFormatForUserSize( JobSetup& aJobSetup, bool bMatchNe
{
nBestMatch = nMatch;
nBestIndex = i;
- bToggleOrient = false;
+ eBestOrientation = ORIENTATION_PORTRAIT;
}
// check landscape match
@@ -1422,20 +1423,13 @@ void Printer::ImplFindPaperFormatForUserSize( JobSetup& aJobSetup, bool bMatchNe
{
nBestMatch = nMatch;
nBestIndex = i;
- bToggleOrient = true;
+ eBestOrientation = ORIENTATION_LANDSCAPE;
}
}
const PaperInfo& rBestInfo = GetPaperInfo( nBestIndex );
pSetupData->mePaperFormat = ImplGetPaperFormat( rBestInfo.getWidth(),
rBestInfo.getHeight() );
- }
-
- if (bToggleOrient)
- {
- if (pSetupData->meOrientation == ORIENTATION_PORTRAIT)
- pSetupData->meOrientation = ORIENTATION_LANDSCAPE;
- else
- pSetupData->meOrientation = ORIENTATION_PORTRAIT;
+ pSetupData->meOrientation = eBestOrientation;
}
}