CppunitTest_sw_ooxmlexport: port testTextFrameBorders to textboxes
Change-Id: Idf837c1eecc3a5e0d6c82126685e4720e78b4481
This commit is contained in:
@@ -522,6 +522,9 @@ DECLARE_OOXMLEXPORT_TEST(testTextFrameBorders, "textframe-borders.docx")
|
|||||||
{
|
{
|
||||||
uno::Reference<text::XTextFramesSupplier> xTextFramesSupplier(mxComponent, uno::UNO_QUERY);
|
uno::Reference<text::XTextFramesSupplier> xTextFramesSupplier(mxComponent, uno::UNO_QUERY);
|
||||||
uno::Reference<container::XIndexAccess> xIndexAccess(xTextFramesSupplier->getTextFrames(), uno::UNO_QUERY);
|
uno::Reference<container::XIndexAccess> xIndexAccess(xTextFramesSupplier->getTextFrames(), uno::UNO_QUERY);
|
||||||
|
if (xIndexAccess->getCount())
|
||||||
|
{
|
||||||
|
// After import, a TextFrame is created by the VML import.
|
||||||
uno::Reference<beans::XPropertySet> xFrame(xIndexAccess->getByIndex(0), uno::UNO_QUERY);
|
uno::Reference<beans::XPropertySet> xFrame(xIndexAccess->getByIndex(0), uno::UNO_QUERY);
|
||||||
CPPUNIT_ASSERT_EQUAL(sal_Int32(0xD99594), getProperty<sal_Int32>(xFrame, "BackColor"));
|
CPPUNIT_ASSERT_EQUAL(sal_Int32(0xD99594), getProperty<sal_Int32>(xFrame, "BackColor"));
|
||||||
|
|
||||||
@@ -534,6 +537,20 @@ DECLARE_OOXMLEXPORT_TEST(testTextFrameBorders, "textframe-borders.docx")
|
|||||||
CPPUNIT_ASSERT_EQUAL(sal_Int16(48), aShadowFormat.ShadowWidth);
|
CPPUNIT_ASSERT_EQUAL(sal_Int16(48), aShadowFormat.ShadowWidth);
|
||||||
CPPUNIT_ASSERT_EQUAL(sal_Int32(0x622423), aShadowFormat.Color);
|
CPPUNIT_ASSERT_EQUAL(sal_Int32(0x622423), aShadowFormat.Color);
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
// After export and import, the result is a shape.
|
||||||
|
uno::Reference<beans::XPropertySet> xShape(getShape(1), uno::UNO_QUERY);
|
||||||
|
CPPUNIT_ASSERT_EQUAL(sal_Int32(0xD99594), getProperty<sal_Int32>(xShape, "FillColor"));
|
||||||
|
|
||||||
|
CPPUNIT_ASSERT_EQUAL(sal_Int32(0xC0504D), getProperty<sal_Int32>(xShape, "LineColor"));
|
||||||
|
CPPUNIT_ASSERT_EQUAL(sal_Int32(35), getProperty<sal_Int32>(xShape, "LineWidth"));
|
||||||
|
|
||||||
|
CPPUNIT_ASSERT_EQUAL(sal_Int32(48), getProperty<sal_Int32>(xShape, "ShadowXDistance"));
|
||||||
|
CPPUNIT_ASSERT_EQUAL(sal_Int32(48), getProperty<sal_Int32>(xShape, "ShadowYDistance"));
|
||||||
|
CPPUNIT_ASSERT_EQUAL(sal_Int32(0x622423), getProperty<sal_Int32>(xShape, "ShadowColor"));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
DECLARE_OOXMLEXPORT_TEST(testTextframeGradient, "textframe-gradient.docx")
|
DECLARE_OOXMLEXPORT_TEST(testTextframeGradient, "textframe-gradient.docx")
|
||||||
{
|
{
|
||||||
|
Reference in New Issue
Block a user