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 c932203b1f46b52ae1fa4e56de9fe1a6b6cb49a1
Author:     Justin Luth <justin_l...@sil.org>
AuthorDate: Thu Sep 26 16:46:56 2019 +0300
Commit:     Michael Stahl <michael.st...@cib.de>
CommitDate: Fri Sep 27 10:52:56 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_l...@sil.org>
    Tested-by: Justin Luth <justin_l...@sil.org>
    (cherry picked from commit 9b96f644c554f1b10a380dd3f9a04a405b948411)
    Reviewed-on: https://gerrit.libreoffice.org/79664
    Tested-by: Jenkins
    Reviewed-by: Michael Stahl <michael.st...@cib.de>

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 9e8d17d86ac5..a143a2ea6310 100644
--- a/sw/qa/extras/ww8export/ww8export3.cxx
+++ b/sw/qa/extras/ww8export/ww8export3.cxx
@@ -168,6 +168,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 ae95c7a13d76..ce11617247c3 100644
--- a/sw/source/filter/ww8/ww8atr.cxx
+++ b/sw/source/filter/ww8/ww8atr.cxx
@@ -1394,6 +1394,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 )
     {
_______________________________________________
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to