summaryrefslogtreecommitdiff
path: root/sw/qa/extras/ooxmlexport
diff options
context:
space:
mode:
authorJustin Luth <justin_luth@sil.org>2019-01-25 19:56:54 +0300
committerJustin Luth <justin_luth@sil.org>2019-03-16 08:12:46 +0100
commitb524cab24b8f7c39104db7842e071599eb1d674f (patch)
tree183a9ab3ac29fea1e5b8b5f2f56c40ee70b44c23 /sw/qa/extras/ooxmlexport
parent97b78d77ebaf6ba676d777454c6c957a87324f12 (diff)
tdf#98620 filter\ww8 export: spam Jc if environment defines BiDi
If the BiDi value value comes from the page style, then MS formats have no idea what to do with it, so those values are written out into the paragraph itself. Since Justify is highly dependent on BiDi in order to understand its meaning, it also needs to be spammed. Change-Id: I7407056573bb115e8bab2dce0070b0a718dcc1eb Reviewed-on: https://gerrit.libreoffice.org/66923 Tested-by: Jenkins Reviewed-by: Justin Luth <justin_luth@sil.org>
Diffstat (limited to 'sw/qa/extras/ooxmlexport')
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf98620_environmentBiDi.odtbin0 -> 9321 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/ooxmlexport11.cxx10
2 files changed, 10 insertions, 0 deletions
diff --git a/sw/qa/extras/ooxmlexport/data/tdf98620_environmentBiDi.odt b/sw/qa/extras/ooxmlexport/data/tdf98620_environmentBiDi.odt
new file mode 100644
index 000000000000..ae675b82ffbd
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf98620_environmentBiDi.odt
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport11.cxx b/sw/qa/extras/ooxmlexport/ooxmlexport11.cxx
index 08e0480e1322..a846bf70636d 100644
--- a/sw/qa/extras/ooxmlexport/ooxmlexport11.cxx
+++ b/sw/qa/extras/ooxmlexport/ooxmlexport11.cxx
@@ -14,6 +14,7 @@
#include <com/sun/star/style/BreakType.hpp>
#include <com/sun/star/style/ParagraphAdjust.hpp>
#include <com/sun/star/table/BorderLine.hpp>
+#include <com/sun/star/text/WritingMode2.hpp>
#include <com/sun/star/text/XDependentTextField.hpp>
#include <com/sun/star/text/XFootnote.hpp>
#include <com/sun/star/text/XPageCursor.hpp>
@@ -653,6 +654,15 @@ DECLARE_OOXMLEXPORT_TEST(testTdf119760_positionCellBorder, "tdf119760_positionCe
CPPUNIT_ASSERT( nRowLeft < nTextLeft );
}
+DECLARE_OOXMLEXPORT_TEST(testTdf98620_environmentBiDi, "tdf98620_environmentBiDi.odt")
+{
+ CPPUNIT_ASSERT_EQUAL(text::WritingMode2::RL_TB, getProperty<sal_Int16>( getParagraph(1), "WritingMode" ));
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(style::ParagraphAdjust_RIGHT), getProperty<sal_Int32>( getParagraph(1), "ParaAdjust" ));
+
+ CPPUNIT_ASSERT_EQUAL(text::WritingMode2::LR_TB, getProperty<sal_Int16>( getParagraph(2), "WritingMode" ));
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(style::ParagraphAdjust_RIGHT), getProperty<sal_Int32>( getParagraph(2), "ParaAdjust" ));
+}
+
DECLARE_OOXMLEXPORT_TEST(testTdf116976, "tdf116976.docx")
{
// This was 0, relative size of shape after bitmap was ignored.