summaryrefslogtreecommitdiff
path: root/sw
diff options
context:
space:
mode:
Diffstat (limited to 'sw')
-rw-r--r--sw/qa/extras/rtfexport/data/tdf137085.rtf10
-rw-r--r--sw/qa/extras/rtfexport/rtfexport5.cxx16
2 files changed, 26 insertions, 0 deletions
diff --git a/sw/qa/extras/rtfexport/data/tdf137085.rtf b/sw/qa/extras/rtfexport/data/tdf137085.rtf
new file mode 100644
index 000000000000..6aed787ef8ad
--- /dev/null
+++ b/sw/qa/extras/rtfexport/data/tdf137085.rtf
@@ -0,0 +1,10 @@
+{\rtf1\ansi
+
+\trowd
+\trgaph600\trpaddfr3\trpaddl0
+\cellx3000
+\cellx6000
+<- no padding here\cell
+<- no padding here\cell
+\row
+}
diff --git a/sw/qa/extras/rtfexport/rtfexport5.cxx b/sw/qa/extras/rtfexport/rtfexport5.cxx
index aa043ecfc750..4bac42fecfb4 100644
--- a/sw/qa/extras/rtfexport/rtfexport5.cxx
+++ b/sw/qa/extras/rtfexport/rtfexport5.cxx
@@ -1002,6 +1002,22 @@ DECLARE_RTFEXPORT_TEST(testTdf74795, "tdf74795.rtf")
getProperty<sal_Int32>(xCell, "LeftBorderDistance"));
}
+DECLARE_RTFEXPORT_TEST(testTdf137085, "tdf137085.rtf")
+{
+ uno::Reference<text::XTextTable> xTable(getParagraphOrTable(1), uno::UNO_QUERY);
+ // \trpaddl0 overrides \trgaph600 (-1058 mm100) and built-in default of 190
+ CPPUNIT_ASSERT_EQUAL(static_cast<sal_Int32>(0), getProperty<sal_Int32>(xTable, "LeftMargin"));
+
+ // the \trpaddl0 is applied to all cells
+ uno::Reference<text::XTextRange> xCell(xTable->getCellByName("A1"), uno::UNO_QUERY);
+ CPPUNIT_ASSERT_EQUAL(static_cast<sal_Int32>(0),
+ getProperty<sal_Int32>(xCell, "LeftBorderDistance"));
+
+ xCell.set(xTable->getCellByName("B1"), uno::UNO_QUERY);
+ CPPUNIT_ASSERT_EQUAL(static_cast<sal_Int32>(0),
+ getProperty<sal_Int32>(xCell, "LeftBorderDistance"));
+}
+
DECLARE_RTFEXPORT_TEST(testTdf77349, "tdf77349.rtf")
{
uno::Reference<container::XNamed> xImage(getShape(1), uno::UNO_QUERY);