diff options
author | Miklos Vajna <vmiklos@suse.cz> | 2013-03-22 14:21:29 +0100 |
---|---|---|
committer | Miklos Vajna <vmiklos@suse.cz> | 2013-03-22 14:36:23 +0100 |
commit | f7b5afc895930f0ef67b2c67c98fc429f45e067d (patch) | |
tree | fe603b456a0254f0392900f107ecaee5614e835f /sw | |
parent | -Werror,-Wparentheses-equality (diff) | |
download | core-f7b5afc895930f0ef67b2c67c98fc429f45e067d.tar.gz core-f7b5afc895930f0ef67b2c67c98fc429f45e067d.zip |
testcase for 62344016de056965a58ea2016d912a68eac0d6b0
Change-Id: I5d7544f38c5d48826cad18a655ffd3b621eb0ca2
Diffstat (limited to 'sw')
-rw-r--r-- | sw/qa/extras/odfimport/data/fdo55814.odt | bin | 0 -> 10200 bytes | |||
-rw-r--r-- | sw/qa/extras/odfimport/odfimport.cxx | 16 |
2 files changed, 16 insertions, 0 deletions
diff --git a/sw/qa/extras/odfimport/data/fdo55814.odt b/sw/qa/extras/odfimport/data/fdo55814.odt Binary files differnew file mode 100644 index 000000000000..890fa4b9fd79 --- /dev/null +++ b/sw/qa/extras/odfimport/data/fdo55814.odt 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(); |