[Libreoffice-commits] core.git: cui/source
Libreoffice Gerrit user
logerrit at kemper.freedesktop.org
Mon Sep 17 18:47:53 UTC 2018
cui/source/tabpages/page.cxx | 14 ++++----------
1 file changed, 4 insertions(+), 10 deletions(-)
New commits:
commit f717cf15d3dc8f4cebffba8a6673273c1d4a549c
Author: Jochen Nitschke <j.nitschke+logerrit at ok.de>
AuthorDate: Sun Sep 16 18:36:22 2018 +0200
Commit: Jochen Nitschke <j.nitschke+logerrit at ok.de>
CommitDate: Mon Sep 17 20:47:29 2018 +0200
remove ancient PRINT_OFFSET
it's useless since
commit c30e0cd9948e721e114d1233daca14ec9496bcd2
Date: Wed Apr 10 11:33:37 2002 +0000
#97886# remove unnecessary page border offset
Change-Id: I89c7d4514ff212c62c6e681739ff3dfe0f04f633
Reviewed-on: https://gerrit.libreoffice.org/60553
Tested-by: Jenkins
Reviewed-by: Jochen Nitschke <j.nitschke+logerrit at ok.de>
diff --git a/cui/source/tabpages/page.cxx b/cui/source/tabpages/page.cxx
index db3b1977d39d..be2f6ff317f2 100644
--- a/cui/source/tabpages/page.cxx
+++ b/cui/source/tabpages/page.cxx
@@ -60,8 +60,6 @@
// static ----------------------------------------------------------------
static const long MINBODY = 284; // 0,5 cm rounded up in twips
-//static const long PRINT_OFFSET = 17; // 0,03 cm rounded down in twips
-static const long PRINT_OFFSET = 0; // why was this ever set to 17 ? it led to wrong right and bottom margins.
const sal_uInt16 SvxPageDescPage::pRanges[] =
{
@@ -266,11 +264,10 @@ SvxPageDescPage::SvxPageDescPage(TabPageParent pParent, const SfxItemSet& rAttr)
Point aPrintOffset = mpDefPrinter->GetPageOffset() - mpDefPrinter->PixelToLogic( Point() );
mpDefPrinter->SetMapMode( aOldMode );
- long nOffset = !aPrintOffset.X() && !aPrintOffset.Y() ? 0 : PRINT_OFFSET;
nFirstLeftMargin = m_xLeftMarginEdit->convert_value_from(m_xLeftMarginEdit->normalize(aPrintOffset.X()), FUNIT_TWIP);
- nFirstRightMargin = m_xRightMarginEdit->convert_value_from(m_xRightMarginEdit->normalize(aPaperSize.Width() - aPrintSize.Width() - aPrintOffset.X() + nOffset), FUNIT_TWIP);
+ nFirstRightMargin = m_xRightMarginEdit->convert_value_from(m_xRightMarginEdit->normalize(aPaperSize.Width() - aPrintSize.Width() - aPrintOffset.X()), FUNIT_TWIP);
nFirstTopMargin = m_xTopMarginEdit->convert_value_from(m_xTopMarginEdit->normalize(aPrintOffset.Y() ), FUNIT_TWIP);
- nFirstBottomMargin = m_xBottomMarginEdit->convert_value_from(m_xBottomMarginEdit->normalize(aPaperSize.Height() - aPrintSize.Height() - aPrintOffset.Y() + nOffset), FUNIT_TWIP );
+ nFirstBottomMargin = m_xBottomMarginEdit->convert_value_from(m_xBottomMarginEdit->normalize(aPaperSize.Height() - aPrintSize.Height() - aPrintOffset.Y()), FUNIT_TWIP );
nLastLeftMargin = m_xLeftMarginEdit->convert_value_from(m_xLeftMarginEdit->normalize(aPrintOffset.X() + aPrintSize.Width()), FUNIT_TWIP);
nLastRightMargin = m_xRightMarginEdit->convert_value_from(m_xRightMarginEdit->normalize(aPrintOffset.X() + aPrintSize.Width()), FUNIT_TWIP);
nLastTopMargin = m_xTopMarginEdit->convert_value_from(m_xTopMarginEdit->normalize(aPrintOffset.Y() + aPrintSize.Height()), FUNIT_TWIP);
@@ -965,13 +962,10 @@ void SvxPageDescPage::SwapFirstValues_Impl( bool bSet )
sal_Int64 nSetB = m_xBottomMarginEdit->denormalize(
m_xBottomMarginEdit->get_value( FUNIT_TWIP ) );
- long nOffset = !aPrintOffset.X() && !aPrintOffset.Y() ? 0 : PRINT_OFFSET;
long nNewL = aPrintOffset.X();
- long nNewR =
- aPaperSize.Width() - aPrintSize.Width() - aPrintOffset.X() + nOffset;
+ long nNewR = aPaperSize.Width() - aPrintSize.Width() - aPrintOffset.X();
long nNewT = aPrintOffset.Y();
- long nNewB =
- aPaperSize.Height() - aPrintSize.Height() - aPrintOffset.Y() + nOffset;
+ long nNewB = aPaperSize.Height() - aPrintSize.Height() - aPrintOffset.Y();
nFirstLeftMargin = m_xLeftMarginEdit->convert_value_from(m_xLeftMarginEdit->normalize(nNewL), FUNIT_TWIP);
nFirstRightMargin = m_xRightMarginEdit->convert_value_from(m_xRightMarginEdit->normalize(nNewR), FUNIT_TWIP);
More information about the Libreoffice-commits
mailing list