summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--sw/qa/extras/rtfimport/data/fdo81892.rtf26
-rw-r--r--sw/qa/extras/rtfimport/rtfimport.cxx9
-rw-r--r--writerfilter/source/rtftok/rtfdocumentimpl.cxx21
3 files changed, 56 insertions, 0 deletions
diff --git a/sw/qa/extras/rtfimport/data/fdo81892.rtf b/sw/qa/extras/rtfimport/data/fdo81892.rtf
new file mode 100644
index 000000000000..73cd53d50acc
--- /dev/null
+++ b/sw/qa/extras/rtfimport/data/fdo81892.rtf
@@ -0,0 +1,26 @@
+{\rtf1
+
+\pard
+\qc
+\page
+Performance
+\par
+
+
+\trowd
+\trqc
+\cellx8199
+
+\pard
+\intbl
+13
+\cell
+
+\trowd
+\trqc
+\cellx8199
+\row
+
+\pard
+\par
+}
diff --git a/sw/qa/extras/rtfimport/rtfimport.cxx b/sw/qa/extras/rtfimport/rtfimport.cxx
index cfa347beacc0..f36b53032503 100644
--- a/sw/qa/extras/rtfimport/rtfimport.cxx
+++ b/sw/qa/extras/rtfimport/rtfimport.cxx
@@ -337,6 +337,15 @@ DECLARE_RTFIMPORT_TEST(testFdo46955, "fdo46955.rtf")
}
}
+DECLARE_RTFIMPORT_TEST(testFdo81892, "fdo81892.rtf")
+{
+ // table was not centered
+ uno::Reference<text::XTextTablesSupplier> xTextTablesSupplier(mxComponent, uno::UNO_QUERY);
+ uno::Reference<container::XIndexAccess> xTables(xTextTablesSupplier->getTextTables(), uno::UNO_QUERY);
+ uno::Reference<text::XTextTable> xTable(xTables->getByIndex(0), uno::UNO_QUERY);
+ CPPUNIT_ASSERT_EQUAL(text::HoriOrientation::CENTER, getProperty<sal_Int16>(xTable, "HoriOrient"));
+}
+
DECLARE_RTFIMPORT_TEST(testFdo45394, "fdo45394.rtf")
{
uno::Reference<text::XText> xHeaderText = getProperty< uno::Reference<text::XText> >(getStyles("PageStyles")->getByName(DEFAULT_STYLE), "HeaderText");
diff --git a/writerfilter/source/rtftok/rtfdocumentimpl.cxx b/writerfilter/source/rtftok/rtfdocumentimpl.cxx
index 68db15d778da..01a857479bdc 100644
--- a/writerfilter/source/rtftok/rtfdocumentimpl.cxx
+++ b/writerfilter/source/rtftok/rtfdocumentimpl.cxx
@@ -2693,6 +2693,27 @@ int RTFDocumentImpl::dispatchFlag(RTFKeyword nKeyword)
return 0;
}
+ switch (nKeyword)
+ {
+ case RTF_TRQL:
+ nParam = 0;
+ break;
+ case RTF_TRQC:
+ nParam = 1;
+ break;
+ case RTF_TRQR:
+ nParam = 2;
+ break;
+ default:
+ break;
+ }
+ if (nParam >= 0)
+ {
+ RTFValue::Pointer_t const pValue(new RTFValue(nParam));
+ m_aStates.top().aTableRowSprms.set(NS_ooxml::LN_CT_TrPrBase_jc, pValue);
+ return 0;
+ }
+
// Cell Text Flow
switch (nKeyword)
{