From aa6959ba2c4ef1b718d8249fd47faaf677b16111 Mon Sep 17 00:00:00 2001 From: Miklos Vajna Date: Fri, 9 Aug 2013 16:00:04 +0200 Subject: fdo#53556 testcase Change-Id: If58376aec31ab00cab19221beed73e8275a834d2 --- sw/qa/extras/rtfimport/data/fdo53556.rtf | 49 ++++++++++++++++++++++++++++++++ sw/qa/extras/rtfimport/rtfimport.cxx | 16 +++++++++++ 2 files changed, 65 insertions(+) create mode 100644 sw/qa/extras/rtfimport/data/fdo53556.rtf 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 #include #include +#include #include #include #include @@ -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(xDraws->getByIndex(0), "VertOrientRelation")); } +void Test::testFdo53556() +{ + uno::Reference xDrawPageSupplier(mxComponent, uno::UNO_QUERY); + uno::Reference 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(xDraws->getByIndex(2), "FillStyle")); + + // This was a com.sun.star.drawing.CustomShape, which resulted in lack of word wrapping in the bugdoc. + uno::Reference xShapeProperties(xDraws->getByIndex(0), uno::UNO_QUERY); + uno::Reference xShapeDescriptor(xShapeProperties, uno::UNO_QUERY); + CPPUNIT_ASSERT_EQUAL(OUString("FrameShape"), xShapeDescriptor->getShapeType()); +} + CPPUNIT_TEST_SUITE_REGISTRATION(Test); CPPUNIT_PLUGIN_IMPLEMENT(); -- cgit v1.2.3