diff options
author | Jan Holesovsky <kendy@collabora.com> | 2013-09-19 14:49:48 +0200 |
---|---|---|
committer | Jan Holesovsky <kendy@collabora.com> | 2013-09-19 14:52:28 +0200 |
commit | f0e3c542ac88459d946b4f9cb8af69889f918a03 (patch) | |
tree | 29186a8f154ad69848cf1ee966436d0440d9d07a /sw | |
parent | 3c2c2692b0cfe376e2d14f33796ec10e924342b9 (diff) |
DOCX styles: Unit test for <w:next> style handling.
[covers both problems fixed in the previous commits.]
Change-Id: I3df3537c52e2f6ebcb60a38f3648a35a5eca9051
Diffstat (limited to 'sw')
-rw-r--r-- | sw/qa/extras/ooxmlexport/ooxmlexport.cxx | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport.cxx b/sw/qa/extras/ooxmlexport/ooxmlexport.cxx index 47b63181bb10..62398ca1b591 100644 --- a/sw/qa/extras/ooxmlexport/ooxmlexport.cxx +++ b/sw/qa/extras/ooxmlexport/ooxmlexport.cxx @@ -1367,6 +1367,15 @@ void Test::testStyleInheritance() // Check that we do _not_ export w:next for styles that point to themselves. assertXPath(pXmlStyles, "/w:styles/w:style[1]/w:next", 0); + + // Check that we roundtrip <w:next> correctly - on XML level + assertXPath(pXmlStyles, "/w:styles/w:style[2]/w:next", "val", "Normal"); + // And to be REALLY sure, check it on the API level too ;-) + uno::Reference< container::XNameAccess > paragraphStyles = getStyles("ParagraphStyles"); + uno::Reference< beans::XPropertySet > properties(paragraphStyles->getByName("Heading 1"), uno::UNO_QUERY); + CPPUNIT_ASSERT_EQUAL(OUString("Standard"), getProperty<OUString>(properties, "FollowStyle")); + properties = uno::Reference< beans::XPropertySet >(paragraphStyles->getByName("Heading 11"), uno::UNO_QUERY); + CPPUNIT_ASSERT_EQUAL(OUString("Heading 1"), getProperty<OUString>(properties, "FollowStyle")); } CPPUNIT_TEST_SUITE_REGISTRATION(Test); |