diff options
author | Miklos Vajna <vmiklos@collabora.co.uk> | 2013-12-29 15:21:51 +0100 |
---|---|---|
committer | Miklos Vajna <vmiklos@collabora.co.uk> | 2013-12-29 16:07:44 +0100 |
commit | ff7ac1a9b82bc20fe6e3d82322e53a7024edb84f (patch) | |
tree | f90cada2d36296182bd9671020a0dfdddc2660ae /sw | |
parent | 4b710225818e66917ef19ebf68d5e08223a13c2f (diff) |
fdo#41109 RTF shape import: shpz has priority over dhgt
And not the other way around, how
24ee3df385cf2aa95cd888581c84fdf90cc682dc (RTF import: fix priority
handling of shpz vs dhgt, 2012-04-10) did, this time with a reproducer.
Change-Id: I9412341c6b35ca2760e4490a18f11bc6a0e0b78a
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: */ |