summaryrefslogtreecommitdiff
path: root/sw
diff options
context:
space:
mode:
authorMiklos Vajna <vmiklos@suse.cz>2012-07-31 13:04:10 +0200
committerMiklos Vajna <vmiklos@suse.cz>2012-08-01 10:57:10 +0200
commita69691ff8c1cfeca6b67973000d17fa01947a0a5 (patch)
tree5e13a68a4bb469be1613089bc077a0da6873188e /sw
parentf5a98e08e7f12453c469b277554b0e45f0c2310f (diff)
fdo#45724 testcase
Change-Id: I27811a6e35cd07dd117831eb9dee177c54f9ff50
Diffstat (limited to 'sw')
-rw-r--r--sw/CppunitTest_sw_subsequent_ww8export.mk1
-rw-r--r--sw/qa/extras/ww8export/data/fdo45724.odtbin0 -> 13499 bytes
-rw-r--r--sw/qa/extras/ww8export/ww8export.cxx15
3 files changed, 16 insertions, 0 deletions
diff --git a/sw/CppunitTest_sw_subsequent_ww8export.mk b/sw/CppunitTest_sw_subsequent_ww8export.mk
index 8c051e354f0e..e01da9b1dad1 100644
--- a/sw/CppunitTest_sw_subsequent_ww8export.mk
+++ b/sw/CppunitTest_sw_subsequent_ww8export.mk
@@ -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 \
diff --git a/sw/qa/extras/ww8export/data/fdo45724.odt b/sw/qa/extras/ww8export/data/fdo45724.odt
new file mode 100644
index 000000000000..45c6d9a58a9f
--- /dev/null
+++ b/sw/qa/extras/ww8export/data/fdo45724.odt
Binary files differ
diff --git a/sw/qa/extras/ww8export/ww8export.cxx b/sw/qa/extras/ww8export/ww8export.cxx
index 4bf4a574df98..58692a65f925 100644
--- a/sw/qa/extras/ww8export/ww8export.cxx
+++ b/sw/qa/extras/ww8export/ww8export.cxx
@@ -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();