diff options
author | Miklos Vajna <vmiklos@collabora.co.uk> | 2014-08-28 15:45:21 +0200 |
---|---|---|
committer | Miklos Vajna <vmiklos@collabora.co.uk> | 2014-08-28 16:35:18 +0200 |
commit | 54bdfe0a891f2119bc35c5d82ecbc94c8cb13c0b (patch) | |
tree | 7969d38d724217588b636651c46a696c9ed9d892 /sw | |
parent | 0364d3b7e670bddb49d5132268cf28737c3301c6 (diff) |
fdo#74229 import RTF_TRGAPH
Regression from commit c4b91ae3178011c66c76c711c1a6469ba658872e
(fdo#55525 import RTF_TRLEFT, 2012-11-13).
Change-Id: I90f2c6399cfaf8399de0cf3488a23af6cc84710d
Diffstat (limited to 'sw')
-rw-r--r-- | sw/qa/extras/rtfimport/data/fdo74229.rtf | 33 | ||||
-rw-r--r-- | sw/qa/extras/rtfimport/rtfimport.cxx | 10 |
2 files changed, 43 insertions, 0 deletions
diff --git a/sw/qa/extras/rtfimport/data/fdo74229.rtf b/sw/qa/extras/rtfimport/data/fdo74229.rtf new file mode 100644 index 000000000000..f425f0847a1a --- /dev/null +++ b/sw/qa/extras/rtfimport/data/fdo74229.rtf @@ -0,0 +1,33 @@ +{\rtf1\ansi\ansicpg1252\uc1\deff0\deflang1036 +{\fonttbl +{\f1\fmodern\fprq1\fcharset0 Courier new;} +} +{\colortbl; +\red0\green0\blue0; +\red0\green0\blue255; +\red0\green255\blue255; +\red0\green255\blue0; +\red255\green0\blue255; +\red255\green0\blue0; +\red255\green255\blue0; +\red255\green255\blue255; +\red0\green0\blue128; +\red0\green128\blue128; +\red0\green128\blue0; +\red128\green0\blue128; +\red128\green0\blue0; +\red128\green128\blue0; +\red128\green128\blue128; +\red192\green192\blue192; +} +\pard +\trowd\trkeep\trql\trgaph67 +\clbrdrb\brdrs\brdrw10\brdrcf1\cltxlrtb\clvertalt\clcbpat8\cellx731 +\clbrdrb\brdrs\brdrw10\brdrcf1\cltxlrtb\clvertalt\clcbpat8\cellx1462 +\pard\plain\intbl\b\sb67\sa67\qc\f1\fs16\cf1 +{A1\cell} +\pard\plain\intbl\sb67\sa67\qr\f1\fs16\cf1 +{A2\cell} +{\row} +\pard\par +} diff --git a/sw/qa/extras/rtfimport/rtfimport.cxx b/sw/qa/extras/rtfimport/rtfimport.cxx index ba3b581c1d8f..2231e1fa821e 100644 --- a/sw/qa/extras/rtfimport/rtfimport.cxx +++ b/sw/qa/extras/rtfimport/rtfimport.cxx @@ -1918,6 +1918,16 @@ DECLARE_RTFIMPORT_TEST(testPictureWrapPolygon, "picture-wrap-polygon.rtf") CPPUNIT_ASSERT_EQUAL(sal_Int32(convertTwipToMm100(-67)), getProperty<sal_Int32>(getShape(1), "VertOrientPosition")); } +DECLARE_RTFIMPORT_TEST(testFdo74229, "fdo74229.rtf") +{ + 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); + uno::Reference<text::XTextRange> xCell(xTable->getCellByName("A1"), uno::UNO_QUERY); + // This was 0, due to ignoring RTF_TRGAPH. + CPPUNIT_ASSERT_EQUAL(sal_Int32(convertTwipToMm100(67)), getProperty<sal_Int32>(xCell, "RightBorderDistance")); +} + CPPUNIT_PLUGIN_IMPLEMENT(); /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ |