fdo#60722 testcase
Change-Id: Ib6097c844b2bc929c6ece31bcec62f27bfbf386c
This commit is contained in:
parent
1eaab77c71
commit
ea66024d4d
13
sw/qa/extras/rtfimport/data/fdo60722.rtf
Normal file
13
sw/qa/extras/rtfimport/data/fdo60722.rtf
Normal file
@ -0,0 +1,13 @@
|
||||
{\rtf1\ansi\deff0
|
||||
{\fonttbl
|
||||
{\f0\fnil\fcharset204\fprq0\cpg1251 Arial;}
|
||||
{\f1\fnil\fcharset204\fprq0\cpg1251 Times New Roman;}
|
||||
{\f2\fnil\fcharset204\fprq0\cpg1251 Courier New;}
|
||||
}
|
||||
{\*\viewkind1}{\*\viewscale100}\margl0\margr0\margt0\margb0
|
||||
\paperw11905\paperh16837
|
||||
{\shp{\*\shpinst\shpleft10480\shptop840\shpright11320\shpbottom840\shpfhdr0\shpbxpage\shpbypage\shpwr3\shpwrk0\shpfblwtxt1\shpz0{\sp{\sn shapeType}{\sv 20}}}}
|
||||
{\shp{\*\shpinst\shpleft8900\shptop11940\shpright10360\shpbottom12320\shpfhdr0\shpbxpage\shpbypage\shpwr3\shpwrk0\shpfblwtxt1\shpz0{\sp{\sn shapeType}{\sv 1}}{\sp{\sn fFilled}{\sv 0}}{\sp{\sn wzDescription}{\sv smaller}}}}
|
||||
{\shp{\*\shpinst\shpleft7920\shptop11040\shpright11320\shpbottom13440\shpfhdr0\shpbxpage\shpbypage\shpwr3\shpwrk0\shpfblwtxt1\shpz0{\sp{\sn shapeType}{\sv 1}}{\sp{\sn fFilled}{\sv 0}}{\sp{\sn wzDescription}{\sv larger}}}}
|
||||
{\par\plain\par
|
||||
}}
|
@ -144,6 +144,7 @@ public:
|
||||
void testFdo58076_2();
|
||||
void testFdo59953();
|
||||
void testFdo59638();
|
||||
void testFdo60722();
|
||||
|
||||
CPPUNIT_TEST_SUITE(Test);
|
||||
#if !defined(MACOSX) && !defined(WNT)
|
||||
@ -260,6 +261,7 @@ void Test::run()
|
||||
{"fdo58076-2.rtf", &Test::testFdo58076_2},
|
||||
{"fdo59953.rtf", &Test::testFdo59953},
|
||||
{"fdo59638.rtf", &Test::testFdo59638},
|
||||
{"fdo60722.rtf", &Test::testFdo60722},
|
||||
};
|
||||
header();
|
||||
for (unsigned int i = 0; i < SAL_N_ELEMENTS(aMethods); ++i)
|
||||
@ -1145,6 +1147,25 @@ void Test::testFdo59638()
|
||||
CPPUNIT_FAIL("no BulletChar property");
|
||||
}
|
||||
|
||||
void Test::testFdo60722()
|
||||
{
|
||||
// The problem was that the larger shape was over the smaller one, and not the other way around.
|
||||
uno::Reference<drawing::XDrawPageSupplier> xDrawPageSupplier(mxComponent, uno::UNO_QUERY);
|
||||
uno::Reference<container::XIndexAccess> xDraws(xDrawPageSupplier->getDrawPage(), uno::UNO_QUERY);
|
||||
uno::Reference<beans::XPropertySet> xShape(xDraws->getByIndex(0), uno::UNO_QUERY);
|
||||
CPPUNIT_ASSERT_EQUAL(sal_Int32(0), getProperty<sal_Int32>(xShape, "ZOrder"));
|
||||
CPPUNIT_ASSERT_EQUAL(OUString("larger"), getProperty<OUString>(xShape, "Description"));
|
||||
|
||||
xShape.set(xDraws->getByIndex(1), uno::UNO_QUERY);
|
||||
CPPUNIT_ASSERT_EQUAL(sal_Int32(1), getProperty<sal_Int32>(xShape, "ZOrder"));
|
||||
CPPUNIT_ASSERT_EQUAL(OUString("smaller"), getProperty<OUString>(xShape, "Description"));
|
||||
|
||||
// Color of the line was blue, and it had zero width.
|
||||
xShape.set(xDraws->getByIndex(2), uno::UNO_QUERY);
|
||||
CPPUNIT_ASSERT_EQUAL(sal_uInt32(26), getProperty<sal_uInt32>(xShape, "LineWidth"));
|
||||
CPPUNIT_ASSERT_EQUAL(sal_uInt32(0), getProperty<sal_uInt32>(xShape, "LineColor"));
|
||||
}
|
||||
|
||||
CPPUNIT_TEST_SUITE_REGISTRATION(Test);
|
||||
|
||||
CPPUNIT_PLUGIN_IMPLEMENT();
|
||||
|
Loading…
x
Reference in New Issue
Block a user