From f71749ac15d7e0851c73952a5d9b7b727d1cd262 Mon Sep 17 00:00:00 2001 From: Rohit Deshmukh Date: Wed, 22 Jan 2014 18:03:21 +0530 Subject: Fix for Footer is missing if fisrt page different header/footer is set MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Reviewed on: https://gerrit.libreoffice.org/7589 Signed-off-by: Luboš Luňák Conflicts: sw/qa/extras/ooxmlexport/ooxmlexport.cxx Change-Id: I2a2f2abc0dcf5542b7b950f9a232d7155a055fdd --- sw/qa/extras/ooxmlexport/data/testTitlePage.docx | Bin 0 -> 16479 bytes sw/qa/extras/ooxmlexport/ooxmlexport.cxx | 8 ++++++++ sw/source/filter/ww8/wrtw8sty.cxx | 2 +- 3 files changed, 9 insertions(+), 1 deletion(-) create mode 100644 sw/qa/extras/ooxmlexport/data/testTitlePage.docx diff --git a/sw/qa/extras/ooxmlexport/data/testTitlePage.docx b/sw/qa/extras/ooxmlexport/data/testTitlePage.docx new file mode 100644 index 000000000000..72bfdf81f886 Binary files /dev/null and b/sw/qa/extras/ooxmlexport/data/testTitlePage.docx differ diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport.cxx b/sw/qa/extras/ooxmlexport/ooxmlexport.cxx index 460d49707e0d..ea37815b42a8 100644 --- a/sw/qa/extras/ooxmlexport/ooxmlexport.cxx +++ b/sw/qa/extras/ooxmlexport/ooxmlexport.cxx @@ -2088,6 +2088,14 @@ DECLARE_OOXMLEXPORT_TEST(testBnc884615, "bnc884615.docx") CPPUNIT_ASSERT_EQUAL(false, bool(getProperty(getShape(1), "Opaque"))); } +DECLARE_OOXMLEXPORT_TEST(testTestTitlePage, "testTitlePage.docx") +{ + xmlDocPtr pXmlDoc = parseExport("word/document.xml"); + if (!pXmlDoc) + return; + assertXPathChildren(pXmlDoc, "/w:document/w:body/w:sectPr/w:titlePg", 0); +} + #endif CPPUNIT_PLUGIN_IMPLEMENT(); diff --git a/sw/source/filter/ww8/wrtw8sty.cxx b/sw/source/filter/ww8/wrtw8sty.cxx index 2675cc56c385..a4edf4b86a07 100644 --- a/sw/source/filter/ww8/wrtw8sty.cxx +++ b/sw/source/filter/ww8/wrtw8sty.cxx @@ -1748,7 +1748,7 @@ void MSWordExportBase::SectionProperties( const WW8_SepInfo& rSepInfo, WW8_PdAtt { const SwPageDesc *pFollow = pPd->GetFollow(); const SwFrmFmt& rFollowFmt = pFollow->GetMaster(); - if ( sw::util::IsPlausableSingleWordSection( *pPdFirstPgFmt, rFollowFmt ) ) + if ( sw::util::IsPlausableSingleWordSection( *pPdFirstPgFmt, rFollowFmt ) || titlePage ) { if (rSepInfo.pPDNd) pPdFirstPgFmt = pPd->GetPageFmtOfNode( *rSepInfo.pPDNd ); -- cgit v1.2.3