[Libreoffice-commits] core.git: sw/qa sw/source

Justin Luth (via logerrit) logerrit at kemper.freedesktop.org
Fri Sep 27 04:15:52 UTC 2019


 sw/qa/extras/ww8export/data/tdf127316_autoEscapement.odt |binary
 sw/qa/extras/ww8export/ww8export3.cxx                    |    7 +++++++
 sw/source/filter/ww8/ww8atr.cxx                          |    4 ++++
 3 files changed, 11 insertions(+)

New commits:
commit 9b96f644c554f1b10a380dd3f9a04a405b948411
Author:     Justin Luth <justin_luth at sil.org>
AuthorDate: Thu Sep 26 16:46:56 2019 +0300
Commit:     Justin Luth <justin_luth at sil.org>
CommitDate: Fri Sep 27 06:14:35 2019 +0200

    tdf#127316 ww8export: use default escapement for AUTO
    
    Previously it looked bad, but not horrendous when
    AUTO was 101.  Now that AUTO is 13999, it is obviously
    wrong (in Word). Better to use the default of 33.
    
    Change-Id: If0e12d315346515ce6ec5ae4bcc4110efba14f9b
    Reviewed-on: https://gerrit.libreoffice.org/79651
    Reviewed-by: Justin Luth <justin_luth at sil.org>
    Tested-by: Justin Luth <justin_luth at sil.org>

diff --git a/sw/qa/extras/ww8export/data/tdf127316_autoEscapement.odt b/sw/qa/extras/ww8export/data/tdf127316_autoEscapement.odt
new file mode 100644
index 000000000000..95987d4562cc
Binary files /dev/null and b/sw/qa/extras/ww8export/data/tdf127316_autoEscapement.odt differ
diff --git a/sw/qa/extras/ww8export/ww8export3.cxx b/sw/qa/extras/ww8export/ww8export3.cxx
index 36d525f22d15..801e77eff3f5 100644
--- a/sw/qa/extras/ww8export/ww8export3.cxx
+++ b/sw/qa/extras/ww8export/ww8export3.cxx
@@ -169,6 +169,13 @@ DECLARE_WW8EXPORT_TEST(testTdf120225_textControlCrossRef, "tdf120225_textControl
     CPPUNIT_ASSERT_EQUAL(OUString("Text1"), sTextFieldName);
 }
 
+DECLARE_WW8EXPORT_TEST(testTdf127316_autoEscapement, "tdf127316_autoEscapement.odt")
+{
+    uno::Reference<text::XTextRange> xPara = getParagraph(2);
+    CPPUNIT_ASSERT_DOUBLES_EQUAL( 0.f, getProperty<float>(getRun(xPara, 1), "CharEscapement"), 0);
+    CPPUNIT_ASSERT_DOUBLES_EQUAL(-33.f, getProperty<float>(getRun(xPara, 2), "CharEscapement"), 3);
+}
+
 DECLARE_WW8EXPORT_TEST(testTdf121111_fillStyleNone, "tdf121111_fillStyleNone.docx")
 {
     uno::Reference<beans::XPropertySet> xStyle(getStyles("ParagraphStyles")->getByName("Numbering - First level"),
diff --git a/sw/source/filter/ww8/ww8atr.cxx b/sw/source/filter/ww8/ww8atr.cxx
index 7ca8b34cb9a9..535a6568360c 100644
--- a/sw/source/filter/ww8/ww8atr.cxx
+++ b/sw/source/filter/ww8/ww8atr.cxx
@@ -1396,6 +1396,10 @@ void WW8AttributeOutput::CharEscapement( const SvxEscapementItem& rEscapement )
         else if ( DFLT_ESC_SUPER == nEsc || DFLT_ESC_AUTO_SUPER == nEsc )
             b = 1;
     }
+    else if ( DFLT_ESC_AUTO_SUPER == nEsc )
+        nEsc = DFLT_ESC_SUPER;
+    else if ( DFLT_ESC_AUTO_SUB == nEsc )
+        nEsc = DFLT_ESC_SUB;
 
     if ( 0xFF != b )
     {


More information about the Libreoffice-commits mailing list