diff options
author | Miklos Vajna <vmiklos@collabora.co.uk> | 2013-10-25 18:17:55 +0200 |
---|---|---|
committer | Miklos Vajna <vmiklos@collabora.co.uk> | 2013-10-25 18:23:01 +0200 |
commit | 0a8db454e5005b0c886ae7c5620d8df5bbab80e0 (patch) | |
tree | b6b0b4d340fb26801f56d5b3b0ceb6286e49e3f0 /sw | |
parent | 6df9dd68ec4fe457103c0327559653ed187b94ce (diff) |
DOCX export: more table style export testcases
Change-Id: I84a9dde8620b128ab426722fc06f4a1c71b0c5a2
Diffstat (limited to 'sw')
-rw-r--r-- | sw/qa/extras/ooxmlexport/data/calendar1.docx | bin | 0 -> 14148 bytes | |||
-rw-r--r-- | sw/qa/extras/ooxmlexport/ooxmlexport.cxx | 12 |
2 files changed, 12 insertions, 0 deletions
diff --git a/sw/qa/extras/ooxmlexport/data/calendar1.docx b/sw/qa/extras/ooxmlexport/data/calendar1.docx Binary files differnew file mode 100644 index 000000000000..81a5046171d9 --- /dev/null +++ b/sw/qa/extras/ooxmlexport/data/calendar1.docx diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport.cxx b/sw/qa/extras/ooxmlexport/ooxmlexport.cxx index 39b1d45d1c7d..d3dcf42f544d 100644 --- a/sw/qa/extras/ooxmlexport/ooxmlexport.cxx +++ b/sw/qa/extras/ooxmlexport/ooxmlexport.cxx @@ -120,6 +120,7 @@ public: void testFdo68787(); void testCharacterBorder(); void testStyleInheritance(); + void testCalendar1(); void testSmartart(); void testFdo69636(); void testCharHighlight(); @@ -240,6 +241,7 @@ void Test::run() {"fdo68787.docx", &Test::testFdo68787}, {"charborder.odt", &Test::testCharacterBorder}, {"style-inheritance.docx", &Test::testStyleInheritance}, + {"calendar1.docx", &Test::testCalendar1}, {"smartart.docx", &Test::testSmartart}, {"fdo69636.docx", &Test::testFdo69636}, {"char_highlight.docx", &Test::testCharHighlight}, @@ -1454,6 +1456,16 @@ void Test::testStyleInheritance() assertXPath(pXmlStyles, "/w:styles/w:style[@w:styleId='TableNormal']/w:tblPr/w:tblCellMar/w:left", "w", "108"); } +void Test::testCalendar1() +{ + // Document has a non-trivial table style, test the roundtrip of it. + xmlDocPtr pXmlStyles = parseExport("word/styles.xml"); + assertXPath(pXmlStyles, "/w:styles/w:style[@w:styleId='Calendar1']/w:basedOn", "val", "TableNormal"); + assertXPath(pXmlStyles, "/w:styles/w:style[@w:styleId='Calendar1']/w:rsid", "val", "00903003"); + assertXPath(pXmlStyles, "/w:styles/w:style[@w:styleId='Calendar1']/w:tblPr/w:tblStyleColBandSize", "val", "1"); + assertXPath(pXmlStyles, "/w:styles/w:style[@w:styleId='Calendar1']/w:tcPr/w:shd", "val", "clear"); +} + void Test::testSmartart() { uno::Reference<text::XTextDocument> xTextDocument(mxComponent, uno::UNO_QUERY); |