Kaydet (Commit) dce20aa0 authored tarafından Miklos Vajna's avatar Miklos Vajna

writerfilter: handle ooxml:CT_TblPrBase_bidiVisual

Change-Id: I619a6b161e5ed7e902406b288552b06fe7da487e
üst d156dd49
...@@ -15,6 +15,7 @@ ...@@ -15,6 +15,7 @@
#include <com/sun/star/text/FontEmphasis.hpp> #include <com/sun/star/text/FontEmphasis.hpp>
#include <com/sun/star/text/HoriOrientation.hpp> #include <com/sun/star/text/HoriOrientation.hpp>
#include <com/sun/star/text/XTextRangeCompare.hpp> #include <com/sun/star/text/XTextRangeCompare.hpp>
#include <com/sun/star/text/WritingMode2.hpp>
#include <string> #include <string>
...@@ -503,6 +504,15 @@ DECLARE_OOXMLEXPORT_TEST(testPageBreakBefore, "page-break-before.docx") ...@@ -503,6 +504,15 @@ DECLARE_OOXMLEXPORT_TEST(testPageBreakBefore, "page-break-before.docx")
CPPUNIT_ASSERT_EQUAL(style::BreakType_NONE, getProperty<style::BreakType>(getParagraph(2), "BreakType")); CPPUNIT_ASSERT_EQUAL(style::BreakType_NONE, getProperty<style::BreakType>(getParagraph(2), "BreakType"));
} }
DECLARE_OOXMLEXPORT_TEST(testTableRtl, "table-rtl.docx")
{
uno::Reference<text::XTextTablesSupplier> xTablesSupplier(mxComponent, uno::UNO_QUERY);
uno::Reference<container::XIndexAccess> xTables(xTablesSupplier->getTextTables(), uno::UNO_QUERY);
uno::Reference<text::XTextTable> xTable(xTables->getByIndex(0), uno::UNO_QUERY);
// This was text::WritingMode2::LR_TB, i.e. direction of the table was ignored.
CPPUNIT_ASSERT_EQUAL(text::WritingMode2::RL_TB, getProperty<sal_Int16>(xTable, "WritingMode"));
}
CPPUNIT_PLUGIN_IMPLEMENT(); CPPUNIT_PLUGIN_IMPLEMENT();
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
...@@ -463,6 +463,13 @@ bool DomainMapperTableManager::sprm(Sprm & rSprm) ...@@ -463,6 +463,13 @@ bool DomainMapperTableManager::sprm(Sprm & rSprm)
case NS_ooxml::LN_CT_TblPrBase_tblCellSpacing: case NS_ooxml::LN_CT_TblPrBase_tblCellSpacing:
// To-Do: Not yet preserved // To-Do: Not yet preserved
break; break;
case NS_ooxml::LN_CT_TblPrBase_bidiVisual:
{
TablePropertyMapPtr pPropMap(new TablePropertyMap());
pPropMap->Insert(PROP_WRITING_MODE, uno::makeAny(nIntValue ? text::WritingMode2::RL_TB : text::WritingMode2::LR_TB));
insertTableProps(pPropMap);
break;
}
default: default:
bRet = false; bRet = false;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment