diff options
author | Justin Luth <justin_luth@sil.org> | 2019-09-26 16:46:56 +0300 |
---|---|---|
committer | Justin Luth <justin_luth@sil.org> | 2019-09-27 06:14:35 +0200 |
commit | 9b96f644c554f1b10a380dd3f9a04a405b948411 (patch) | |
tree | 3006b465126aceebb9c7560ca905e860c132ec67 /sw | |
parent | f526a525758c8e4507e0bcc039330f4fc8a174b4 (diff) |
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@sil.org>
Tested-by: Justin Luth <justin_luth@sil.org>
Diffstat (limited to 'sw')
-rw-r--r-- | sw/qa/extras/ww8export/data/tdf127316_autoEscapement.odt | bin | 0 -> 11475 bytes | |||
-rw-r--r-- | sw/qa/extras/ww8export/ww8export3.cxx | 7 | ||||
-rw-r--r-- | sw/source/filter/ww8/ww8atr.cxx | 4 |
3 files changed, 11 insertions, 0 deletions
diff --git a/sw/qa/extras/ww8export/data/tdf127316_autoEscapement.odt b/sw/qa/extras/ww8export/data/tdf127316_autoEscapement.odt Binary files differnew file mode 100644 index 000000000000..95987d4562cc --- /dev/null +++ b/sw/qa/extras/ww8export/data/tdf127316_autoEscapement.odt 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 ) { |