diff options
author | Jakub Trzebiatowski <ubap.dev@gmail.com> | 2016-09-07 20:42:11 +0200 |
---|---|---|
committer | Miklos Vajna <vmiklos@collabora.co.uk> | 2016-09-08 07:49:11 +0200 |
commit | 6ccb82ddf302acbd56bd4ea67fce107883e5391c (patch) | |
tree | 3e125009a2d6c51a7bd7cae20da57dfb4da49e56 /sw/qa/extras | |
parent | 1c2ac71f80e271a6352384e0bce8c8f432bf37f6 (diff) |
tdf#101712 Writer Table Style; odf export; remove parent export for cell style
Do not export the parent-style-name attribute for a cell style.
The parent-style-name attribute should refer to a style of table-cell
family. Not a table-template element.
Reviewed on:
https://gerrit.libreoffice.org/28729
Change-Id: I350ec7cef0ac544ce4e5dec54015412a4070b1d8
Diffstat (limited to 'sw/qa/extras')
-rw-r--r-- | sw/qa/extras/odfexport/data/table_styles_5.odt | bin | 0 -> 9841 bytes | |||
-rw-r--r-- | sw/qa/extras/odfexport/odfexport.cxx | 24 |
2 files changed, 24 insertions, 0 deletions
diff --git a/sw/qa/extras/odfexport/data/table_styles_5.odt b/sw/qa/extras/odfexport/data/table_styles_5.odt Binary files differnew file mode 100644 index 000000000000..c90958322a30 --- /dev/null +++ b/sw/qa/extras/odfexport/data/table_styles_5.odt diff --git a/sw/qa/extras/odfexport/odfexport.cxx b/sw/qa/extras/odfexport/odfexport.cxx index cca1ed0f6c5f..f53ec92c9c02 100644 --- a/sw/qa/extras/odfexport/odfexport.cxx +++ b/sw/qa/extras/odfexport/odfexport.cxx @@ -1139,6 +1139,30 @@ DECLARE_ODFIMPORT_TEST(testTableStyles4, "table_styles_4.odt") CPPUNIT_ASSERT_EQUAL(sal_Int32(0x00ff00), getProperty<sal_Int32>(xCell1Style, "BackColor")); } +DECLARE_ODFEXPORT_TEST(testTableStyles5, "table_styles_5.odt") +{ + // Test if cell styles doesn't have a style:parent-style-name attribute. + if (xmlDocPtr pXmlDoc = parseExport("styles.xml")) + { + assertXPathNoAttribute(pXmlDoc, "/office:document-styles/office:styles/style:style[@style:display-name='Test style.1']", "parent-style-name"); + assertXPathNoAttribute(pXmlDoc, "/office:document-styles/office:styles/style:style[@style:display-name='Test style.2']", "parent-style-name"); + assertXPathNoAttribute(pXmlDoc, "/office:document-styles/office:styles/style:style[@style:display-name='Test style.3']", "parent-style-name"); + assertXPathNoAttribute(pXmlDoc, "/office:document-styles/office:styles/style:style[@style:display-name='Test style.4']", "parent-style-name"); + assertXPathNoAttribute(pXmlDoc, "/office:document-styles/office:styles/style:style[@style:display-name='Test style.5']", "parent-style-name"); + assertXPathNoAttribute(pXmlDoc, "/office:document-styles/office:styles/style:style[@style:display-name='Test style.6']", "parent-style-name"); + assertXPathNoAttribute(pXmlDoc, "/office:document-styles/office:styles/style:style[@style:display-name='Test style.7']", "parent-style-name"); + assertXPathNoAttribute(pXmlDoc, "/office:document-styles/office:styles/style:style[@style:display-name='Test style.8']", "parent-style-name"); + assertXPathNoAttribute(pXmlDoc, "/office:document-styles/office:styles/style:style[@style:display-name='Test style.9']", "parent-style-name"); + assertXPathNoAttribute(pXmlDoc, "/office:document-styles/office:styles/style:style[@style:display-name='Test style.10']", "parent-style-name"); + assertXPathNoAttribute(pXmlDoc, "/office:document-styles/office:styles/style:style[@style:display-name='Test style.11']", "parent-style-name"); + assertXPathNoAttribute(pXmlDoc, "/office:document-styles/office:styles/style:style[@style:display-name='Test style.12']", "parent-style-name"); + assertXPathNoAttribute(pXmlDoc, "/office:document-styles/office:styles/style:style[@style:display-name='Test style.13']", "parent-style-name"); + assertXPathNoAttribute(pXmlDoc, "/office:document-styles/office:styles/style:style[@style:display-name='Test style.14']", "parent-style-name"); + assertXPathNoAttribute(pXmlDoc, "/office:document-styles/office:styles/style:style[@style:display-name='Test style.15']", "parent-style-name"); + assertXPathNoAttribute(pXmlDoc, "/office:document-styles/office:styles/style:style[@style:display-name='Test style.16']", "parent-style-name"); + } +} + #endif CPPUNIT_PLUGIN_IMPLEMENT(); |