incubator-ooo-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From zjc...@apache.org
Subject svn commit: r1387109 - in /incubator/ooo/trunk/main/sw/source/filter/ww8: writerwordglue.cxx writerwordglue.hxx wrtw8sty.cxx
Date Tue, 18 Sep 2012 12:15:25 GMT
Author: zjchen
Date: Tue Sep 18 12:15:24 2012
New Revision: 1387109

URL: http://svn.apache.org/viewvc?rev=1387109&view=rev
Log:
#i119660# Doc file saved by AOO, header and footer in continuous section with incorrect first
page style.

Reported by: Yan Ji
Patch by: Chen Zuo Jun
Review by: Lei De Bin 

Modified:
    incubator/ooo/trunk/main/sw/source/filter/ww8/writerwordglue.cxx
    incubator/ooo/trunk/main/sw/source/filter/ww8/writerwordglue.hxx
    incubator/ooo/trunk/main/sw/source/filter/ww8/wrtw8sty.cxx

Modified: incubator/ooo/trunk/main/sw/source/filter/ww8/writerwordglue.cxx
URL: http://svn.apache.org/viewvc/incubator/ooo/trunk/main/sw/source/filter/ww8/writerwordglue.cxx?rev=1387109&r1=1387108&r2=1387109&view=diff
==============================================================================
--- incubator/ooo/trunk/main/sw/source/filter/ww8/writerwordglue.cxx (original)
+++ incubator/ooo/trunk/main/sw/source/filter/ww8/writerwordglue.cxx Tue Sep 18 12:15:24 2012
@@ -383,7 +383,7 @@ namespace sw
     {
 
         bool IsPlausableSingleWordSection(const SwFrmFmt &rTitleFmt,
-            const SwFrmFmt &rFollowFmt)
+            const SwFrmFmt &rFollowFmt, sal_Int8 nDocType )
         {
             bool bPlausableTitlePage = true;
 
@@ -405,8 +405,10 @@ namespace sw
             {
                 HdFtDistanceGlue aOne(rTitleFmt.GetAttrSet());
                 HdFtDistanceGlue aTwo(rFollowFmt.GetAttrSet());
+                //if one doesn't own a footer, then assume it equals with the other one.
+                const sal_Bool bCheckFooter = ( aOne.HasFooter() && aTwo.HasFooter()
) ? sal_True : sal_False;
                 //e.g. #i14509#
-                if (!aOne.EqualTopBottom(aTwo))
+                if (!aOne.EqualTopBottom(aTwo) && nDocType != 1 && bCheckFooter
)
                     bPlausableTitlePage = false;
             }
             return bPlausableTitlePage;

Modified: incubator/ooo/trunk/main/sw/source/filter/ww8/writerwordglue.hxx
URL: http://svn.apache.org/viewvc/incubator/ooo/trunk/main/sw/source/filter/ww8/writerwordglue.hxx?rev=1387109&r1=1387108&r2=1387109&view=diff
==============================================================================
--- incubator/ooo/trunk/main/sw/source/filter/ww8/writerwordglue.hxx (original)
+++ incubator/ooo/trunk/main/sw/source/filter/ww8/writerwordglue.hxx Tue Sep 18 12:15:24 2012
@@ -111,9 +111,10 @@ namespace sw
             <a href="mailto:cmc@openoffice.org">Caol&aacute;n McNamara</a>
 
             @see #i4320#/#i14509#/#i11717# for examples
+            add a param to identify documentype, 0 means NATIVE, 1 means MSWORD
         */
         bool IsPlausableSingleWordSection(const SwFrmFmt &rTitleFmt,
-            const SwFrmFmt &rFollowFmt);
+            const SwFrmFmt &rFollowFmt, sal_Int8 nDocType = 0 );
 
         /** Make export a word section top/bottom values easy
 

Modified: incubator/ooo/trunk/main/sw/source/filter/ww8/wrtw8sty.cxx
URL: http://svn.apache.org/viewvc/incubator/ooo/trunk/main/sw/source/filter/ww8/wrtw8sty.cxx?rev=1387109&r1=1387108&r2=1387109&view=diff
==============================================================================
--- incubator/ooo/trunk/main/sw/source/filter/ww8/wrtw8sty.cxx (original)
+++ incubator/ooo/trunk/main/sw/source/filter/ww8/wrtw8sty.cxx Tue Sep 18 12:15:24 2012
@@ -1605,7 +1605,8 @@ void MSWordExportBase::SectionProperties
         {
             const SwPageDesc *pFollow = pPd->GetFollow();
             const SwFrmFmt& rFollowFmt = pFollow->GetMaster();
-            if ( sw::util::IsPlausableSingleWordSection( *pPdFmt, rFollowFmt ) )
+            const sal_Int8 nType = pDoc->GetDocumentType();
+            if ( sw::util::IsPlausableSingleWordSection( *pPdFmt, rFollowFmt, nType ))
             {
                 if (rSepInfo.pPDNd)
                     pPdFirstPgFmt = pPd->GetPageFmtOfNode( *rSepInfo.pPDNd );



Mime
View raw message