diff options
Diffstat (limited to 'sw')
-rw-r--r-- | sw/qa/extras/rtfimport/data/shpz-dhgt.rtf | 43 | ||||
-rw-r--r-- | sw/qa/extras/rtfimport/rtfimport.cxx | 9 |
2 files changed, 52 insertions, 0 deletions
diff --git a/sw/qa/extras/rtfimport/data/shpz-dhgt.rtf b/sw/qa/extras/rtfimport/data/shpz-dhgt.rtf new file mode 100644 index 000000000000..63df566bc9b2 --- /dev/null +++ b/sw/qa/extras/rtfimport/data/shpz-dhgt.rtf @@ -0,0 +1,43 @@ +{\rtf1 +{\shp +{\*\shpinst\shpleft1898\shptop1043\shpright4598\shpbottom2123\shpfhdr0\shpbxcolumn\shpbxignore\shpbypara\shpbyignore\shpwr3\shpwrk0\shpfblwtxt0\shpz1\shplid1027 +{\sp +{\sn shapeType} +{\sv 1} +} +{\sp +{\sn fillColor} +{\sv 65280} +} +{\sp +{\sn fFilled} +{\sv 1} +} +{\sp +{\sn dhgt} +{\sv 5} +} +} +} +{\shp +{\*\shpinst\shpleft563\shptop518\shpright2243\shpbottom1448\shpfhdr0\shpbxcolumn\shpbxignore\shpbypara\shpbyignore\shpwr3\shpwrk0\shpfblwtxt0\shpz0\shplid1026 +{\sp +{\sn shapeType} +{\sv 1} +} +{\sp +{\sn fillColor} +{\sv 255} +} +{\sp +{\sn fFilled} +{\sv 1} +} +{\sp +{\sn dhgt} +{\sv 10} +} +} +} +\par +} diff --git a/sw/qa/extras/rtfimport/rtfimport.cxx b/sw/qa/extras/rtfimport/rtfimport.cxx index 2764730efcf2..3553bf97fc38 100644 --- a/sw/qa/extras/rtfimport/rtfimport.cxx +++ b/sw/qa/extras/rtfimport/rtfimport.cxx @@ -1389,6 +1389,15 @@ DECLARE_RTFIMPORT_TEST(testFdo65090, "fdo65090.rtf") CPPUNIT_ASSERT_EQUAL(sal_Int32(1), getProperty< uno::Sequence<text::TableColumnSeparator> >(xTableRows->getByIndex(0), "TableColumnSeparators").getLength()); } +DECLARE_RTFIMPORT_TEST(testShpzDhgt, "shpz-dhgt.rtf") +{ + // Test that shpz has priority over dhght and not the other way around. + // Drawpage is sorted by ZOrder, so first should be red (back). + CPPUNIT_ASSERT_EQUAL(sal_Int32(0xff0000), getProperty<sal_Int32>(getShape(1), "FillColor")); + // Second (front) should be green. + CPPUNIT_ASSERT_EQUAL(sal_Int32(0x00ff00), getProperty<sal_Int32>(getShape(2), "FillColor")); +} + CPPUNIT_PLUGIN_IMPLEMENT(); /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ |