Kaydet (Commit) a69691ff authored tarafından Miklos Vajna's avatar Miklos Vajna

fdo#45724 testcase

Change-Id: I27811a6e35cd07dd117831eb9dee177c54f9ff50
üst f5a98e08
...@@ -85,6 +85,7 @@ $(eval $(call gb_CppunitTest_use_components,sw_subsequent_ww8export,\ ...@@ -85,6 +85,7 @@ $(eval $(call gb_CppunitTest_use_components,sw_subsequent_ww8export,\
i18npool/util/i18npool \ i18npool/util/i18npool \
package/source/xstor/xstor \ package/source/xstor/xstor \
package/util/package2 \ package/util/package2 \
sax/source/expatwrap/expwrap \
sw/util/msword \ sw/util/msword \
sw/util/sw \ sw/util/sw \
sw/util/swd \ sw/util/swd \
......
...@@ -27,7 +27,9 @@ ...@@ -27,7 +27,9 @@
#include "../swmodeltestbase.hxx" #include "../swmodeltestbase.hxx"
#include <com/sun/star/form/validation/XValidatableFormComponent.hpp>
#include <com/sun/star/frame/XStorable.hpp> #include <com/sun/star/frame/XStorable.hpp>
#include <com/sun/star/drawing/XControlShape.hpp>
#include <com/sun/star/drawing/XDrawPageSupplier.hpp> #include <com/sun/star/drawing/XDrawPageSupplier.hpp>
#include <com/sun/star/beans/XPropertySet.hpp> #include <com/sun/star/beans/XPropertySet.hpp>
...@@ -39,10 +41,12 @@ class Test : public SwModelTestBase ...@@ -39,10 +41,12 @@ class Test : public SwModelTestBase
{ {
public: public:
void testN325936(); void testN325936();
void testFdo45724();
CPPUNIT_TEST_SUITE(Test); CPPUNIT_TEST_SUITE(Test);
#if !defined(MACOSX) && !defined(WNT) #if !defined(MACOSX) && !defined(WNT)
CPPUNIT_TEST(testN325936); CPPUNIT_TEST(testN325936);
CPPUNIT_TEST(testFdo45724);
#endif #endif
CPPUNIT_TEST_SUITE_END(); CPPUNIT_TEST_SUITE_END();
...@@ -80,6 +84,17 @@ void Test::testN325936() ...@@ -80,6 +84,17 @@ void Test::testN325936()
CPPUNIT_ASSERT_EQUAL(sal_Int32(100), nValue); CPPUNIT_ASSERT_EQUAL(sal_Int32(100), nValue);
} }
void Test::testFdo45724()
{
roundtrip("fdo45724.odt");
uno::Reference<drawing::XDrawPageSupplier> xDrawPageSupplier(mxComponent, uno::UNO_QUERY);
uno::Reference<container::XIndexAccess> xDraws(xDrawPageSupplier->getDrawPage(), uno::UNO_QUERY);
uno::Reference<drawing::XControlShape> xControlShape(xDraws->getByIndex(0), uno::UNO_QUERY);
uno::Reference<form::validation::XValidatableFormComponent> xComponent(xControlShape->getControl(), uno::UNO_QUERY);
CPPUNIT_ASSERT_EQUAL(COL_WHITE, getProperty<sal_uInt32>(xComponent, "BackgroundColor"));
CPPUNIT_ASSERT_EQUAL(OUString("xxx"), xComponent->getCurrentValue().get<OUString>());
}
CPPUNIT_TEST_SUITE_REGISTRATION(Test); CPPUNIT_TEST_SUITE_REGISTRATION(Test);
CPPUNIT_PLUGIN_IMPLEMENT(); CPPUNIT_PLUGIN_IMPLEMENT();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment