incubator-ooo-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From le...@apache.org
Subject svn commit: r1366990 - /incubator/ooo/trunk/main/sw/source/filter/ww8/ww8par.cxx
Date Mon, 30 Jul 2012 03:01:01 GMT
Author: leidb
Date: Mon Jul 30 03:01:01 2012
New Revision: 1366990

URL: http://svn.apache.org/viewvc?rev=1366990&view=rev
Log:
#119620# fix .doc page number is lost issue, caused by section break.

Reported by: luo qing le 
Patch by: Lei De Bin 
Review by: Chen Zuo Jun

Modified:
    incubator/ooo/trunk/main/sw/source/filter/ww8/ww8par.cxx

Modified: incubator/ooo/trunk/main/sw/source/filter/ww8/ww8par.cxx
URL: http://svn.apache.org/viewvc/incubator/ooo/trunk/main/sw/source/filter/ww8/ww8par.cxx?rev=1366990&r1=1366989&r2=1366990&view=diff
==============================================================================
--- incubator/ooo/trunk/main/sw/source/filter/ww8/ww8par.cxx (original)
+++ incubator/ooo/trunk/main/sw/source/filter/ww8/ww8par.cxx Mon Jul 30 03:01:01 2012
@@ -3461,6 +3461,26 @@ void wwSectionManager::SetUseOn(wwSectio
         rSection.mpTitlePage->WriteUseOn(
             (UseOnPage) (eUseBase | nsUseOnPage::PD_HEADERSHARE | nsUseOnPage::PD_FOOTERSHARE));
     }
+
+	if( nsUseOnPage::PD_MIRROR != (UseOnPage)(eUse & nsUseOnPage::PD_MIRROR) )
+	{
+		if( rSection.maSep.bkc == 3 )
+		{
+			if( rSection.mpPage )
+				rSection.mpPage->SetUseOn( nsUseOnPage::PD_LEFT );
+			if( rSection.mpTitlePage )
+				rSection.mpTitlePage->SetUseOn( nsUseOnPage::PD_LEFT );
+		}
+		else if( rSection.maSep.bkc == 4 )
+		{
+			if( rSection.mpPage )
+				rSection.mpPage->SetUseOn( nsUseOnPage::PD_RIGHT );
+			if( rSection.mpTitlePage )
+				rSection.mpTitlePage->SetUseOn( nsUseOnPage::PD_RIGHT );
+		}
+		
+	}
+    
 }
 
 //Set the page descriptor on this node, handle the different cases for a text
@@ -3542,8 +3562,19 @@ SwFmtPageDesc wwSectionManager::SetSwFmt
 
     //Set page before hd/ft
     const wwSection *pPrevious = 0;
-    if (rIter != rStart)
-        pPrevious = &(*(rIter-1));
+
+	mySegIter aPrev = rIter;
+	while( aPrev!= rStart )
+	{
+		aPrev--;
+		pPrevious = &(*(aPrev));
+		if( aPrev->IsContinous())
+			continue;
+		else{
+			break;
+		}
+	}
+
     SetHdFt(*rIter, std::distance(rStart, rIter), pPrevious);
     SetUseOn(*rIter);
 



Mime
View raw message