diff options
author | sushil_shinde <sushil.shinde@synerzip.com> | 2014-04-28 17:10:27 +0530 |
---|---|---|
committer | Miklos Vajna <vmiklos@collabora.co.uk> | 2014-05-05 07:34:45 +0000 |
commit | 61e8452c62a587b40bf80076642b869cbd1b7ed6 (patch) | |
tree | e413601b06fead2f59e0efd42461f32620003b2a /sw | |
parent | 82a623fb08afc72decb78f061b751a43ae503678 (diff) |
fdo#77727 PAGEBREAK In first paragraph was not rendered and exported.
Case 1: If PAGEBREAK appears in first paragraph, LO was inserting
BreakType_PAGE_BEFORE but since it was first paragraph, PAGEBREAK
was not rendered in LO hence not exported back to docx file properly.
case 2: If PAGEBREAK appears after first run of any paragraph in document
LO was rendering it in wrong paragraph.
case 3: If COLUMNBREAK appears in first paragraph of section, LO was not
rendering and exporting it.
Change-Id: Ic557b3e6f80cfa6dd3eb6b4204be7e6531b9ecbf
Reviewed-on: https://gerrit.libreoffice.org/9191
Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
Tested-by: Miklos Vajna <vmiklos@collabora.co.uk>
Diffstat (limited to 'sw')
-rw-r--r-- | sw/qa/extras/ooxmlexport/data/fdo77727.docx | bin | 0 -> 48777 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/fdo77727.docx b/sw/qa/extras/ooxmlexport/data/fdo77727.docx Binary files differnew file mode 100644 index 000000000000..9f553e210df6 --- /dev/null +++ b/sw/qa/extras/ooxmlexport/data/fdo77727.docx diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport.cxx b/sw/qa/extras/ooxmlexport/ooxmlexport.cxx index 2edbd28cbc1a..44b9aa730046 100644 --- a/sw/qa/extras/ooxmlexport/ooxmlexport.cxx +++ b/sw/qa/extras/ooxmlexport/ooxmlexport.cxx @@ -3210,6 +3210,18 @@ DECLARE_OOXMLEXPORT_TEST(testContentTypeOLE, "fdo77759.docx") "/word/embeddings/oleObject1.xlsx"); } +DECLARE_OOXMLEXPORT_TEST(testPageBreakInFirstPara,"fdo77727.docx") +{ + /* Break to next page was not exported if it is in first paragraph of the section. + * Now after fix , LO writes Next Page Break and also preserves <w:br> tag. + */ + xmlDocPtr pXmlDoc = parseExport("word/document.xml"); + if (!pXmlDoc) + return; + + assertXPath(pXmlDoc, "/w:document/w:body/w:p[1]/w:r[2]/w:br","type","page"); +} + #endif CPPUNIT_PLUGIN_IMPLEMENT(); |