summaryrefslogtreecommitdiff
path: root/sw/qa/extras/ww8export
diff options
context:
space:
mode:
authorMiklos Vajna <vmiklos@suse.cz>2012-10-30 18:05:46 +0100
committerMiklos Vajna <vmiklos@suse.cz>2012-10-30 18:06:09 +0100
commita7339737f4bab4daf0c5843e36e2988919e6691f (patch)
treec2492eeb50fb0b3a2fc0cf393fbb6d865c37bd43 /sw/qa/extras/ww8export
parent4ece397f21fdb97841a0d355e2d62d446e2c89ac (diff)
sw: work around random crashes in ww8export
Change-Id: If11bff5804770976f069a49a1c508744d6e1987b
Diffstat (limited to 'sw/qa/extras/ww8export')
-rw-r--r--sw/qa/extras/ww8export/ww8export.cxx11
1 files changed, 8 insertions, 3 deletions
diff --git a/sw/qa/extras/ww8export/ww8export.cxx b/sw/qa/extras/ww8export/ww8export.cxx
index de2c80db6e80..7a205f123dcc 100644
--- a/sw/qa/extras/ww8export/ww8export.cxx
+++ b/sw/qa/extras/ww8export/ww8export.cxx
@@ -98,12 +98,17 @@ void Test::testN325936()
void Test::testFdo45724()
{
+ // The text and background color of the control shape was not correct.
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>());
+ // This should not happen (the shape was there before the fix as well), but let's avoid a segfault in some random cases...
+ if (xControlShape.is())
+ {
+ 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>());
+ }
}
void Test::testFdo46020()