summaryrefslogtreecommitdiff
path: root/sw/qa/extras/ww8export/ww8export2.cxx
diff options
context:
space:
mode:
authorJustin Luth <justin.luth@collabora.com>2018-12-06 22:09:47 +0300
committerMiklos Vajna <vmiklos@collabora.com>2018-12-17 09:38:20 +0100
commitf10404e30ab2f468147457f0304e0e9fe64eefa3 (patch)
treef786b0f9e20ee14f8040170375ca8d2aa1941bcd /sw/qa/extras/ww8export/ww8export2.cxx
parentbdc82e277759a2df68855fce0a3fdd58f9b1ea66 (diff)
tdf#121110 ww8import Jc80 justify is absolute, not Bidi relative
Paragraph justification can be specified either absolutely (in old versions or with eWW8:Jc80) or relatively (with eWW8:Jc). The last processed SPRM wins (I assume). The WW8 format seems to ALWAYS specify Jc80, and that is overwritten by an optional Jc SPRM. I haven't seen Jc be processed before a Jc80 SPRM, but if it does, then the justify would need to be treated as absolute. If for some reason neither of these exist, BiDi will adjust by default only if it is the newer WW8 format. Again, that is an assumption because I haven't seen such a document to test. Change-Id: I966077d743f1d148fe2fb9faba87fbdd8f3507f3 Reviewed-on: https://gerrit.libreoffice.org/63591 Tested-by: Jenkins Reviewed-by: Justin Luth <justin_luth@sil.org> Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
Diffstat (limited to 'sw/qa/extras/ww8export/ww8export2.cxx')
-rw-r--r--sw/qa/extras/ww8export/ww8export2.cxx6
1 files changed, 6 insertions, 0 deletions
diff --git a/sw/qa/extras/ww8export/ww8export2.cxx b/sw/qa/extras/ww8export/ww8export2.cxx
index e1597f634a0c..9154d45350ab 100644
--- a/sw/qa/extras/ww8export/ww8export2.cxx
+++ b/sw/qa/extras/ww8export/ww8export2.cxx
@@ -262,6 +262,12 @@ DECLARE_WW8EXPORT_TEST(testTdf98620_rtlJustify, "tdf98620_rtlJustify.doc")
CPPUNIT_ASSERT_EQUAL( style::ParagraphAdjust_RIGHT, static_cast<style::ParagraphAdjust>(getProperty<sal_Int16>(getParagraph(1), "ParaAdjust")) );
}
+DECLARE_WW8EXPORT_TEST(testTdf121110_absJustify, "tdf121110_absJustify.doc")
+{
+ CPPUNIT_ASSERT_EQUAL( style::ParagraphAdjust_RIGHT, static_cast<style::ParagraphAdjust>(getProperty<sal_Int16>(getParagraph(1), "ParaAdjust")) );
+ CPPUNIT_ASSERT_EQUAL( style::ParagraphAdjust_LEFT, static_cast<style::ParagraphAdjust>(getProperty<sal_Int16>(getParagraph(3), "ParaAdjust")) );
+}
+
DECLARE_WW8EXPORT_TEST(testTdf106174_rtlParaAlign, "tdf106174_rtlParaAlign.docx")
{
CPPUNIT_ASSERT_EQUAL(sal_Int16(style::ParagraphAdjust_CENTER), getProperty<sal_Int16>(getParagraph(1), "ParaAdjust"));