diff options
author | Miklos Vajna <vmiklos@suse.cz> | 2013-08-09 16:00:04 +0200 |
---|---|---|
committer | Miklos Vajna <vmiklos@suse.cz> | 2013-08-09 16:12:18 +0200 |
commit | aa6959ba2c4ef1b718d8249fd47faaf677b16111 (patch) | |
tree | d222f8edbbac1d38d1a90d067eb9a9b790ec1c4c | |
parent | 9f1f7199736e2ae07b34849ba66f61a1ef5782e8 (diff) |
fdo#53556 testcase
Change-Id: If58376aec31ab00cab19221beed73e8275a834d2
-rw-r--r-- | sw/qa/extras/rtfimport/data/fdo53556.rtf | 49 | ||||
-rw-r--r-- | sw/qa/extras/rtfimport/rtfimport.cxx | 16 |
2 files changed, 65 insertions, 0 deletions
diff --git a/sw/qa/extras/rtfimport/data/fdo53556.rtf b/sw/qa/extras/rtfimport/data/fdo53556.rtf new file mode 100644 index 000000000000..aafa11cf714e --- /dev/null +++ b/sw/qa/extras/rtfimport/data/fdo53556.rtf @@ -0,0 +1,49 @@ +{\rtf1\ansi\deff0\viewkind1\paperw12240\paperh15840\marglsxn0\margrsxn0\margtsxn0\margbsxn0 +{\shp\shpbxpage\shpbypage\shpwr5\shpfhdr0\shpfblwtxt0\shpz3\shpleft1000\shpright12000\shptop1000\shpbottom1800 +{\sp +{\sn fFilled} +{\sv 0} +} +{\shpinst +{\sp +{\sn fLine} +{\sv 0} +} +{\shptxt +{\pard\cb1 \qc\sl367 \f0\fs32\b\cf2 ARL STATISTICS 2011-2012\line WORKSHEET\plain\par} +} +} +} +{\shp\shpbxpage\shpbypage\shpwr5\shpfhdr0\shpfblwtxt0\shpz18\shpleft1000\shpright4700\shptop900\shpbottom15040 +{\sp +{\sn fFilled} +{\sv 0} +} +{\shpinst +{\sp +{\sn shapeType} +{\sv 1} +} +{\sp +{\sn fLine} +{\sv 0} +} +} +} +{\shp\shpbxpage\shpbypage\shpwr5\shpfhdr0\shpfblwtxt0\shpz2\shpleft1000\shpright12000\shptop2480\shpbottom3320 +{\sp +{\sn fFilled} +{\sv 0} +} +{\shpinst +{\sp +{\sn fLine} +{\sv 0} +} +{\shptxt +{\pard\cb1 \ql\sl252 \f0\fs22\cf2 This worksheet is designed to help you plan your submission for the 2011-2012 ARL Statistics. The figures on this worksheet should be similar to those in the Summary page of your web form, except in cases where data are unavailable. If an exact figure is unavailable, use NA/UA. If the appropriate answer is zero or none, use 0.\plain\par} +} +} +} +\par +} diff --git a/sw/qa/extras/rtfimport/rtfimport.cxx b/sw/qa/extras/rtfimport/rtfimport.cxx index 5c7eb69e73be..c258d7cc5ae3 100644 --- a/sw/qa/extras/rtfimport/rtfimport.cxx +++ b/sw/qa/extras/rtfimport/rtfimport.cxx @@ -11,6 +11,7 @@ #include <com/sun/star/document/XImporter.hpp> #include <com/sun/star/drawing/EnhancedCustomShapeParameterPair.hpp> #include <com/sun/star/drawing/EnhancedCustomShapeSegment.hpp> +#include <com/sun/star/drawing/FillStyle.hpp> #include <com/sun/star/drawing/LineStyle.hpp> #include <com/sun/star/drawing/XDrawPageSupplier.hpp> #include <com/sun/star/graphic/GraphicType.hpp> @@ -160,6 +161,7 @@ public: void testFdo67365(); void testFdo67498(); void testFdo47440(); + void testFdo53556(); CPPUNIT_TEST_SUITE(Test); #if !defined(MACOSX) && !defined(WNT) @@ -305,6 +307,7 @@ void Test::run() {"fdo67365.rtf", &Test::testFdo67365}, {"fdo67498.rtf", &Test::testFdo67498}, {"fdo47440.rtf", &Test::testFdo47440}, + {"fdo53556.rtf", &Test::testFdo53556}, }; header(); for (unsigned int i = 0; i < SAL_N_ELEMENTS(aMethods); ++i) @@ -1489,6 +1492,19 @@ void Test::testFdo47440() CPPUNIT_ASSERT_EQUAL(text::RelOrientation::PAGE_FRAME, getProperty<sal_Int16>(xDraws->getByIndex(0), "VertOrientRelation")); } +void Test::testFdo53556() +{ + uno::Reference<drawing::XDrawPageSupplier> xDrawPageSupplier(mxComponent, uno::UNO_QUERY); + uno::Reference<container::XIndexAccess> xDraws(xDrawPageSupplier->getDrawPage(), uno::UNO_QUERY); + // This was drawing::FillStyle_SOLID, which resulted in being non-transparent, hiding text which would be visible. + CPPUNIT_ASSERT_EQUAL(drawing::FillStyle_NONE, getProperty<drawing::FillStyle>(xDraws->getByIndex(2), "FillStyle")); + + // This was a com.sun.star.drawing.CustomShape, which resulted in lack of word wrapping in the bugdoc. + uno::Reference<beans::XPropertySet> xShapeProperties(xDraws->getByIndex(0), uno::UNO_QUERY); + uno::Reference<drawing::XShapeDescriptor> xShapeDescriptor(xShapeProperties, uno::UNO_QUERY); + CPPUNIT_ASSERT_EQUAL(OUString("FrameShape"), xShapeDescriptor->getShapeType()); +} + CPPUNIT_TEST_SUITE_REGISTRATION(Test); CPPUNIT_PLUGIN_IMPLEMENT(); |