summaryrefslogtreecommitdiff
path: root/i18nutil/source
diff options
context:
space:
mode:
authorDaniel Silva <danielfaleirosilva@gmail.com>2018-06-29 11:36:03 -0300
committerDaniel Silva <danielfaleirosilva@gmail.com>2018-11-29 13:02:16 -0200
commitff4896a2af1df6138e9246fe1588dfe8c3748f1a (patch)
tree73dbd9d54f1a760a14756ecb2259cadf8bc130ee /i18nutil/source
parent1a2ebd24e5daaefa209dea7f4b1889a8295b5794 (diff)
Sets paper sizes listbox in print dialog
Change-Id: Iaeb50f6e854b90c1062d2ed6e3e053a6c26ea520 Reviewed-on: https://gerrit.libreoffice.org/56711 Tested-by: Jenkins Reviewed-by: Katarina Behrens <Katarina.Behrens@cib.de>
Diffstat (limited to 'i18nutil/source')
-rw-r--r--i18nutil/source/utility/paper.cxx5
1 files changed, 4 insertions, 1 deletions
diff --git a/i18nutil/source/utility/paper.cxx b/i18nutil/source/utility/paper.cxx
index 9c1476c0dc03..07a8cc695adf 100644
--- a/i18nutil/source/utility/paper.cxx
+++ b/i18nutil/source/utility/paper.cxx
@@ -169,8 +169,11 @@ void PaperInfo::doSloppyFit()
long lDiffW = labs(aDinTab[i].m_nWidth - m_nPaperWidth);
long lDiffH = labs(aDinTab[i].m_nHeight - m_nPaperHeight);
+ long lFlipDiffW = labs(aDinTab[i].m_nHeight - m_nPaperWidth);
+ long lFlipDiffH = labs(aDinTab[i].m_nWidth - m_nPaperHeight);
- if ( lDiffW < MAXSLOPPY && lDiffH < MAXSLOPPY )
+ if ( (lDiffW < MAXSLOPPY && lDiffH < MAXSLOPPY) ||
+ (lFlipDiffW < MAXSLOPPY && lFlipDiffH < MAXSLOPPY) )
{
m_nPaperWidth = aDinTab[i].m_nWidth;
m_nPaperHeight = aDinTab[i].m_nHeight;