summaryrefslogtreecommitdiff
path: root/sw
diff options
context:
space:
mode:
authorJustin Luth <justin_luth@sil.org>2016-09-09 23:32:11 +0300
committerMiklos Vajna <vmiklos@collabora.co.uk>2016-12-02 10:54:19 +0000
commit5a61165b32dc356ca41117f101846d43929bc551 (patch)
treefe593bffbfbfa2ac46ddc2009ffdc6042f30c207 /sw
parentb35bfc7c10a5e06d68340db22486f6682247d8df (diff)
tdf#89315 writerfilter add missing parents to out-of-order styles
Styles that inherit from a parent style, but were defined in style.xml before the parent, were losing their base style. Change-Id: Ic12876dddb1aa961cd8ef7579061cca30c320c71 Reviewed-on: https://gerrit.libreoffice.org/28785 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Justin Luth <justin_luth@sil.org> Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Signed-off-by: Michael Meeks <michael.meeks@collabora.com> Reviewed-on: https://gerrit.libreoffice.org/31466
Diffstat (limited to 'sw')
-rw-r--r--sw/qa/extras/ooxmlexport/ooxmlexport4.cxx5
1 files changed, 5 insertions, 0 deletions
diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport4.cxx b/sw/qa/extras/ooxmlexport/ooxmlexport4.cxx
index c199d6f4a1bb..699cc0386f10 100644
--- a/sw/qa/extras/ooxmlexport/ooxmlexport4.cxx
+++ b/sw/qa/extras/ooxmlexport/ooxmlexport4.cxx
@@ -982,6 +982,11 @@ DECLARE_OOXMLEXPORT_TEST(testTdf81345_045Original,"tdf81345.docx")
xCursor->jumpToPage(2);
OUString pageStyleName = getProperty<OUString>(xCursor, "PageStyleName");
CPPUNIT_ASSERT(pageStyleName != "Standard");
+
+ // tdf89297 Styles were being added before their base/parent/inherited-from style existed, and so were using default settings.
+ uno::Reference<container::XNameAccess> xParaStyles(getStyles("ParagraphStyles"));
+ uno::Reference<beans::XPropertySet> xStyle(xParaStyles->getByName("Pull quote"), uno::UNO_QUERY);
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(6736947), getProperty<sal_Int32>(xStyle, "CharColor"));
}
CPPUNIT_PLUGIN_IMPLEMENT();