summaryrefslogtreecommitdiff
path: root/writerfilter
diff options
context:
space:
mode:
authorLászló Németh <nemeth@numbertext.org>2019-08-01 17:06:47 +0200
committerLászló Németh <nemeth@numbertext.org>2019-08-02 10:21:11 +0200
commit2550b380e8f81528aa2dde5790c3b607c068ee1a (patch)
treebfc6529ef27c49563e95be2cc1346fe6061a90d6 /writerfilter
parent885ae69174cf717edd00526e5cf8f1585c505c95 (diff)
tdf#123702 RTF/DOCX default 1" left/right page margins
since MSO 2007: now 1440 twips = 2540 1/100 mm (it was 1800 twips = 3175 1/100 mm). Changing the default value fixes the layout of the documents based on RTF templates without explicit margins. Change-Id: I0395fb7cdd6ba176f266c8f0a9309ba48a047da3 Reviewed-on: https://gerrit.libreoffice.org/76812 Tested-by: Jenkins Reviewed-by: László Németh <nemeth@numbertext.org>
Diffstat (limited to 'writerfilter')
-rw-r--r--writerfilter/source/dmapper/PropertyMap.cxx12
1 files changed, 6 insertions, 6 deletions
diff --git a/writerfilter/source/dmapper/PropertyMap.cxx b/writerfilter/source/dmapper/PropertyMap.cxx
index a85b80735b1a..f720131c5fd5 100644
--- a/writerfilter/source/dmapper/PropertyMap.cxx
+++ b/writerfilter/source/dmapper/PropertyMap.cxx
@@ -382,8 +382,8 @@ SectionPropertyMap::SectionPropertyMap( bool bIsFirstSection )
, m_nPageNumber( -1 )
, m_nPageNumberType( -1 )
, m_nBreakType( -1 )
- , m_nLeftMargin( 3175 ) // page left margin, default 0x708 (1800) twip -> 3175 1/100 mm
- , m_nRightMargin( 3175 ) // page right margin, default 0x708 (1800) twip -> 3175 1/100 mm
+ , m_nLeftMargin( 2540 ) // page left margin, default 1 inch = 1440 twip -> 2540 1/100 mm
+ , m_nRightMargin( 2540 ) // page right margin, default 1 inch = 1440 twip -> 2540 1/100 mm
, m_nTopMargin( 2540 )
, m_nBottomMargin( 2540 )
, m_nHeaderTop( 1270 ) // 720 twip
@@ -420,10 +420,10 @@ SectionPropertyMap::SectionPropertyMap( bool bIsFirstSection )
Insert( PROP_HEIGHT, uno::makeAny( static_cast<sal_Int32>(aLetter.getHeight()) ) );
// page width, 1/100mm
Insert( PROP_WIDTH, uno::makeAny( static_cast<sal_Int32>(aLetter.getWidth()) ) );
- // page left margin, default 0x708 (1800) twip -> 3175 1/100 mm
- Insert( PROP_LEFT_MARGIN, uno::makeAny( sal_Int32(3175) ) );
- // page right margin, default 0x708 (1800) twip -> 3175 1/100 mm
- Insert( PROP_RIGHT_MARGIN, uno::makeAny( sal_Int32(3175) ) );
+ // page left margin, default 0x5a0 (1440) twip -> 2540 1/100 mm
+ Insert( PROP_LEFT_MARGIN, uno::makeAny( sal_Int32(2540) ) );
+ // page right margin, default 0x5a0 (1440) twip -> 2540 1/100 mm
+ Insert( PROP_RIGHT_MARGIN, uno::makeAny( sal_Int32(2540) ) );
// page top margin, default 0x5a0 (1440) twip -> 2540 1/100 mm
Insert( PROP_TOP_MARGIN, uno::makeAny( sal_Int32(2540) ) );
// page bottom margin, default 0x5a0 (1440) twip -> 2540 1/100 mm