[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-6.2' - sw/qa writerfilter/source

László Németh (via logerrit) logerrit at kemper.freedesktop.org
Wed Aug 21 18:08:35 UTC 2019


 sw/qa/extras/rtfimport/rtfimport.cxx        |    2 +-
 writerfilter/source/dmapper/PropertyMap.cxx |   12 ++++++------
 2 files changed, 7 insertions(+), 7 deletions(-)

New commits:
commit 6e5f1b58b925321500b57f1fde0640a148e04022
Author:     László Németh <nemeth at numbertext.org>
AuthorDate: Thu Aug 1 17:06:47 2019 +0200
Commit:     Andras Timar <andras.timar at collabora.com>
CommitDate: Wed Aug 21 20:07:40 2019 +0200

    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 at numbertext.org>
    (cherry picked from commit 2550b380e8f81528aa2dde5790c3b607c068ee1a)
    Reviewed-on: https://gerrit.libreoffice.org/77000
    Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt at cib.de>
    Tested-by: Samuel Mehrbrodt <Samuel.Mehrbrodt at cib.de>
    Reviewed-on: https://gerrit.libreoffice.org/77895
    Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice at gmail.com>

diff --git a/sw/qa/extras/rtfimport/rtfimport.cxx b/sw/qa/extras/rtfimport/rtfimport.cxx
index c107563ffec2..263b9aef0e5d 100644
--- a/sw/qa/extras/rtfimport/rtfimport.cxx
+++ b/sw/qa/extras/rtfimport/rtfimport.cxx
@@ -436,7 +436,7 @@ DECLARE_RTFIMPORT_TEST(testFdo79319, "fdo79319.rtf")
     // the thin horizontal rule was imported as a big fat rectangle
     uno::Reference<drawing::XShape> xShape(getShape(1), uno::UNO_QUERY);
     CPPUNIT_ASSERT_EQUAL(sal_Int16(100), getProperty<sal_Int16>(xShape, "RelativeWidth"));
-    CPPUNIT_ASSERT_DOUBLES_EQUAL(sal_Int32(15238), xShape->getSize().Width, 10);
+    CPPUNIT_ASSERT_DOUBLES_EQUAL(sal_Int32(16508), xShape->getSize().Width, 10);
     CPPUNIT_ASSERT_DOUBLES_EQUAL(sal_Int32(53), xShape->getSize().Height, 10);
 #if 0
     CPPUNIT_ASSERT_EQUAL(text::VertOrientation::CENTER, getProperty<sal_Int16>(xShape, "VertOrient"));
diff --git a/writerfilter/source/dmapper/PropertyMap.cxx b/writerfilter/source/dmapper/PropertyMap.cxx
index 9bc6e3a8780c..f05e5a8d7d42 100644
--- a/writerfilter/source/dmapper/PropertyMap.cxx
+++ b/writerfilter/source/dmapper/PropertyMap.cxx
@@ -385,8 +385,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
@@ -423,10 +423,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


More information about the Libreoffice-commits mailing list