summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sw/qa/extras/ooxmlexport/data/fdo71646.docxbin0 -> 22792 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/ooxmlexport.cxx12
-rw-r--r--sw/source/filter/ww8/docxattributeoutput.cxx2
3 files changed, 14 insertions, 0 deletions
diff --git a/sw/qa/extras/ooxmlexport/data/fdo71646.docx b/sw/qa/extras/ooxmlexport/data/fdo71646.docx
new file mode 100644
index 000000000000..d49d88b67cec
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/fdo71646.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport.cxx b/sw/qa/extras/ooxmlexport/ooxmlexport.cxx
index 13c0bf1cbd18..1bf422ff368c 100644
--- a/sw/qa/extras/ooxmlexport/ooxmlexport.cxx
+++ b/sw/qa/extras/ooxmlexport/ooxmlexport.cxx
@@ -1820,6 +1820,18 @@ DECLARE_OOXML_TEST(testCellGridSpan, "cell-grid-span.docx")
assertXPath(pXmlDoc, "/w:document/w:body/w:tbl/w:tr/w:tc[1]/w:tcPr/w:gridSpan",0);
assertXPath(pXmlDoc, "/w:document/w:body/w:tbl/w:tr/w:tc[2]/w:tcPr/w:gridSpan",0);
}
+DECLARE_OOXML_TEST(testFdo71646, "fdo71646.docx")
+{
+ // The problem was after save file created by MS the direction changed to RTL.
+ uno::Reference<uno::XInterface> xParaLTRLeft(getParagraph( 1, "LTR LEFT"));
+ sal_Int32 nLTRLeft = getProperty< sal_Int32 >( xParaLTRLeft, "ParaAdjust" );
+ // test the text Direction value for the pragraph
+ sal_Int16 nLRDir = getProperty< sal_Int32 >( xParaLTRLeft, "WritingMode" );
+
+ // this will test the both the text direction and alignment for paragraph
+ CPPUNIT_ASSERT_EQUAL( sal_Int32 (style::ParagraphAdjust_LEFT), nLTRLeft);
+ CPPUNIT_ASSERT_EQUAL(text::WritingMode2::LR_TB, nLRDir);
+}
#endif
diff --git a/sw/source/filter/ww8/docxattributeoutput.cxx b/sw/source/filter/ww8/docxattributeoutput.cxx
index 54e0a5fd0f85..9e41119da272 100644
--- a/sw/source/filter/ww8/docxattributeoutput.cxx
+++ b/sw/source/filter/ww8/docxattributeoutput.cxx
@@ -6157,6 +6157,8 @@ void DocxAttributeOutput::FormatFrameDirection( const SvxFrameDirectionItem& rDi
{
if ( bBiDi )
m_pSerializer->singleElementNS( XML_w, XML_bidi, FSNS( XML_w, XML_val ), "1", FSEND );
+ else
+ m_pSerializer->singleElementNS( XML_w, XML_bidi, FSNS( XML_w, XML_val ), "0", FSEND );
}
}