diff options
author | Jochen Nitschke <j.nitschke+logerrit@ok.de> | 2018-09-16 18:36:22 +0200 |
---|---|---|
committer | Jochen Nitschke <j.nitschke+logerrit@ok.de> | 2018-09-17 20:47:29 +0200 |
commit | f717cf15d3dc8f4cebffba8a6673273c1d4a549c (patch) | |
tree | b6812363a5661c83b267e601186196fcf6463fae /cui/source/tabpages/page.cxx | |
parent | c090d2fc981d237a5591a51a94674a35835b706d (diff) |
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@ok.de>
Diffstat (limited to 'cui/source/tabpages/page.cxx')
-rw-r--r-- | cui/source/tabpages/page.cxx | 14 |
1 files changed, 4 insertions, 10 deletions
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); |