summaryrefslogtreecommitdiff
path: root/sw/qa/extras/odfimport/odfimport.cxx
diff options
context:
space:
mode:
authorMiklos Vajna <vmiklos@suse.cz>2013-03-22 14:21:29 +0100
committerMiklos Vajna <vmiklos@suse.cz>2013-03-22 14:36:23 +0100
commitf7b5afc895930f0ef67b2c67c98fc429f45e067d (patch)
treefe603b456a0254f0392900f107ecaee5614e835f /sw/qa/extras/odfimport/odfimport.cxx
parent68579e6054c660de345a5c95f54fee60b3498f4a (diff)
Change-Id: I5d7544f38c5d48826cad18a655ffd3b621eb0ca2
Diffstat (limited to 'sw/qa/extras/odfimport/odfimport.cxx')
-rw-r--r--sw/qa/extras/odfimport/odfimport.cxx16
1 files changed, 16 insertions, 0 deletions
diff --git a/sw/qa/extras/odfimport/odfimport.cxx b/sw/qa/extras/odfimport/odfimport.cxx
index 3bef663a399e..d9b37d2a6861 100644
--- a/sw/qa/extras/odfimport/odfimport.cxx
+++ b/sw/qa/extras/odfimport/odfimport.cxx
@@ -45,6 +45,7 @@ public:
void testFdo61952();
void testFdo60842();
void testFdo56272();
+ void testFdo55814();
CPPUNIT_TEST_SUITE(Test);
#if !defined(MACOSX) && !defined(WNT)
@@ -67,6 +68,7 @@ void Test::run()
{"hello.odt", &Test::testFdo61952},
{"fdo60842.odt", &Test::testFdo60842},
{"fdo56272.odt", &Test::testFdo56272},
+ {"fdo55814.odt", &Test::testFdo55814},
};
header();
for (unsigned int i = 0; i < SAL_N_ELEMENTS(aMethods); ++i)
@@ -325,6 +327,20 @@ void Test::testFdo56272()
CPPUNIT_ASSERT_EQUAL(sal_Int32(422), xShape->getPosition().Y); // Was -2371
}
+void Test::testFdo55814()
+{
+ uno::Reference<text::XTextFieldsSupplier> xTextFieldsSupplier(mxComponent, uno::UNO_QUERY);
+ uno::Reference<container::XEnumerationAccess> xFieldsAccess(xTextFieldsSupplier->getTextFields());
+ uno::Reference<container::XEnumeration> xFields(xFieldsAccess->createEnumeration());
+ uno::Reference<beans::XPropertySet> xField(xFields->nextElement(), uno::UNO_QUERY);
+ xField->setPropertyValue("Content", uno::makeAny(OUString("Yes")));
+ uno::Reference<util::XRefreshable>(xTextFieldsSupplier->getTextFields(), uno::UNO_QUERY)->refresh();
+ uno::Reference<text::XTextSectionsSupplier> xTextSectionsSupplier(mxComponent, uno::UNO_QUERY);
+ uno::Reference<container::XIndexAccess> xSections(xTextSectionsSupplier->getTextSections(), uno::UNO_QUERY);
+ // This was "0".
+ CPPUNIT_ASSERT_EQUAL(OUString("Hide==\"Yes\""), getProperty<OUString>(xSections->getByIndex(0), "Condition"));
+}
+
CPPUNIT_TEST_SUITE_REGISTRATION(Test);
CPPUNIT_PLUGIN_IMPLEMENT();