fdo#45724 testcase

Change-Id: I27811a6e35cd07dd117831eb9dee177c54f9ff50
This commit is contained in:
Miklos Vajna
2012-07-31 13:04:10 +02:00
parent f5a98e08e7
commit a69691ff8c
3 changed files with 16 additions and 0 deletions

View File

@@ -85,6 +85,7 @@ $(eval $(call gb_CppunitTest_use_components,sw_subsequent_ww8export,\
i18npool/util/i18npool \
package/source/xstor/xstor \
package/util/package2 \
sax/source/expatwrap/expwrap \
sw/util/msword \
sw/util/sw \
sw/util/swd \

Binary file not shown.

View File

@@ -27,7 +27,9 @@
#include "../swmodeltestbase.hxx"
#include <com/sun/star/form/validation/XValidatableFormComponent.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/beans/XPropertySet.hpp>
@@ -39,10 +41,12 @@ class Test : public SwModelTestBase
{
public:
void testN325936();
void testFdo45724();
CPPUNIT_TEST_SUITE(Test);
#if !defined(MACOSX) && !defined(WNT)
CPPUNIT_TEST(testN325936);
CPPUNIT_TEST(testFdo45724);
#endif
CPPUNIT_TEST_SUITE_END();
@@ -80,6 +84,17 @@ void Test::testN325936()
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_PLUGIN_IMPLEMENT();