[Libreoffice-commits] core.git: 2 commits - sw/qa sw/source

Miklos Vajna vmiklos at collabora.co.uk
Thu Feb 6 06:55:47 PST 2014


 sw/qa/extras/ooxmlexport/data/testTitlePage.docx |binary
 sw/qa/extras/ooxmlexport/ooxmlexport.cxx         |    5 +++++
 sw/source/filter/ww8/wrtw8sty.cxx                |    2 +-
 3 files changed, 6 insertions(+), 1 deletion(-)

New commits:
commit f69e8483a41db121fec0337adac37527c8fea7b5
Author: Miklos Vajna <vmiklos at collabora.co.uk>
Date:   Thu Feb 6 15:44:41 2014 +0100

    CppunitTest_sw_ooxmlexport: fix testcase that didn't fail without the fix
    
    Change-Id: I87308b38bb44864db3531366ab354567847b1340

diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport.cxx b/sw/qa/extras/ooxmlexport/ooxmlexport.cxx
index dae77bc..a1cfd4c 100644
--- a/sw/qa/extras/ooxmlexport/ooxmlexport.cxx
+++ b/sw/qa/extras/ooxmlexport/ooxmlexport.cxx
@@ -2637,12 +2637,10 @@ DECLARE_OOXMLEXPORT_TEST(testTOCFlag_u,"testTOCFlag_u.docx")
     OUString contents = OUString::createFromAscii((const char*)((pXmlNode->children[0]).content));
     CPPUNIT_ASSERT(contents.match(" TOC \\z \\o \"1-9\" \\u \\h"));
 }
+
 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);
+    CPPUNIT_ASSERT_EQUAL(OUString("aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"), parseDump("/root/page[2]/footer/txt/text()"));
 }
 
 DECLARE_OOXMLEXPORT_TEST(testTableRowDataDisplayedTwice,"table-row-data-displayed-twice.docx")
commit dcea8ba3b4fc347e7b6d9e0d5ec2fd99bd77ce6f
Author: Rohit Deshmukh <rohit.deshmukh at synerzip.com>
Date:   Wed Jan 22 18:03:21 2014 +0530

    Fix for Footer is missing if fisrt page different header/footer is set
    
    Reviewed on:
    	https://gerrit.libreoffice.org/7589
    
    Change-Id: I2a2f2abc0dcf5542b7b950f9a232d7155a055fdd

diff --git a/sw/qa/extras/ooxmlexport/data/testTitlePage.docx b/sw/qa/extras/ooxmlexport/data/testTitlePage.docx
new file mode 100644
index 0000000..72bfdf8
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 1c82044..dae77bc 100644
--- a/sw/qa/extras/ooxmlexport/ooxmlexport.cxx
+++ b/sw/qa/extras/ooxmlexport/ooxmlexport.cxx
@@ -2637,6 +2637,13 @@ DECLARE_OOXMLEXPORT_TEST(testTOCFlag_u,"testTOCFlag_u.docx")
     OUString contents = OUString::createFromAscii((const char*)((pXmlNode->children[0]).content));
     CPPUNIT_ASSERT(contents.match(" TOC \\z \\o \"1-9\" \\u \\h"));
 }
+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);
+}
 
 DECLARE_OOXMLEXPORT_TEST(testTableRowDataDisplayedTwice,"table-row-data-displayed-twice.docx")
 {
diff --git a/sw/source/filter/ww8/wrtw8sty.cxx b/sw/source/filter/ww8/wrtw8sty.cxx
index ab89a94..3f79db8 100644
--- a/sw/source/filter/ww8/wrtw8sty.cxx
+++ b/sw/source/filter/ww8/wrtw8sty.cxx
@@ -1747,7 +1747,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 );


More information about the Libreoffice-commits mailing list