rpms/openoffice.org/devel openoffice.org-2.4.0.ooo85624.sw.headerfooters.patch, NONE, 1.1 openoffice.org.spec, 1.1422, 1.1423

Caolan McNamara (caolanm) fedora-extras-commits at redhat.com
Fri Feb 8 20:36:04 UTC 2008


Author: caolanm

Update of /cvs/pkgs/rpms/openoffice.org/devel
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv28506

Modified Files:
	openoffice.org.spec 
Added Files:
	openoffice.org-2.4.0.ooo85624.sw.headerfooters.patch 
Log Message:
fixup

openoffice.org-2.4.0.ooo85624.sw.headerfooters.patch:

--- NEW FILE openoffice.org-2.4.0.ooo85624.sw.headerfooters.patch ---
diff -u -r sw/source/filter/ww8/wrtw8sty.cxx sw/source/filter/ww8/wrtw8sty.cxx
--- openoffice.org.orig/sw/source/filter/ww8/wrtw8sty.cxx	2008-02-02 10:09:08.000000000 +0100
+++ openoffice.org/sw/source/filter/ww8/wrtw8sty.cxx	2008-02-02 10:17:40.000000000 +0100
@@ -1054,6 +1054,7 @@
 {
     if( nFlag & nHFFlags )
     {
+        rWrt.bHasHdr = true;
         const SwFmtHeader& rHd = rFmt.GetHeader();
         ASSERT( rHd.GetHeaderFmt(), "KopfText nicht richtig da" );
         const SwFmtCntnt& rCntnt = rHd.GetHeaderFmt()->GetCntnt();
@@ -1065,8 +1066,12 @@
     else if( rWrt.bWrtWW8 )
     {
         pTxtPos->Append( rCpPos );
-        rWrt.WriteStringAsPara( aEmptyStr ); // CR ans Ende ( sonst mault WW )
-        rCpPos = rWrt.Fc2Cp( rWrt.Strm().Tell() );
+        if (rWrt.bHasHdr)
+        {
+            rWrt.WriteStringAsPara( aEmptyStr ); // Empty paragraph for empty header
+            rWrt.WriteStringAsPara( aEmptyStr ); // a CR that WW8 needs for end of the stream
+            rCpPos = rWrt.Fc2Cp( rWrt.Strm().Tell() );
+        }
     }
 }
 void WW8_WrPlcSepx::OutFooter( SwWW8Writer& rWrt, const SwFmt& rFmt,
@@ -1074,6 +1079,7 @@
 {
     if( nFlag & nHFFlags )
     {
+        rWrt.bHasFtr = true;
         const SwFmtFooter& rFt = rFmt.GetFooter();
         ASSERT( rFt.GetFooterFmt(), "KopfText nicht richtig da" );
         const SwFmtCntnt& rCntnt = rFt.GetFooterFmt()->GetCntnt();
@@ -1085,8 +1091,12 @@
     else if( rWrt.bWrtWW8 )
     {
         pTxtPos->Append( rCpPos );
-        rWrt.WriteStringAsPara( aEmptyStr ); // CR ans Ende ( sonst mault WW )
-        rCpPos = rWrt.Fc2Cp( rWrt.Strm().Tell() );
+        if (rWrt.bHasFtr)
+        {
+            rWrt.WriteStringAsPara( aEmptyStr ); // Empty paragraph for empty footer
+            rWrt.WriteStringAsPara( aEmptyStr ); // a CR that WW8 needs for end of the stream
+            rCpPos = rWrt.Fc2Cp( rWrt.Strm().Tell() );
+        }
     }
 }
 
diff -u -r sw/source/filter/ww8/wrtww8.cxx sw/source/filter/ww8/wrtww8.cxx
--- openoffice.org.orig/sw/source/filter/ww8/wrtww8.cxx	2008-02-02 10:09:08.000000000 +0100
+++ openoffice.org/sw/source/filter/ww8/wrtww8.cxx	2008-02-02 10:10:12.000000000 +0100
@@ -2553,7 +2553,8 @@
 SwWW8Writer::SwWW8Writer(const String& rFltName, const String& rBaseURL)
     : aMainStg(sMainStream), pISet(0), pUsedNumTbl(0), mpTopNodeOfHdFtPage(0),
     pBmpPal(0), pKeyMap(0), pOLEExp(0), pOCXExp(0), pOleMap(0), nUniqueList(0),
-    mnHdFtIndex(0), pAktPageDesc(0), pPapPlc(0), pChpPlc(0), pChpIter(0), pO(0)
+    mnHdFtIndex(0), pAktPageDesc(0), pPapPlc(0), pChpPlc(0), pChpIter(0), pO(0),
+    bHasHdr(false), bHasFtr(false)
 {
     SetBaseURL( rBaseURL );
     bWrtWW8 = rFltName.EqualsAscii(FILTER_WW8);
diff -u -r sw/source/filter/ww8/wrtww8.hxx sw/source/filter/ww8/wrtww8.hxx
--- openoffice.org.orig/sw/source/filter/ww8/wrtww8.hxx	2008-02-02 10:09:08.000000000 +0100
+++ openoffice.org/sw/source/filter/ww8/wrtww8.hxx	2008-02-02 10:10:12.000000000 +0100
@@ -536,6 +536,8 @@
     BYTE bInWriteTOX : 1;       // true: all content are in a TOX
     BYTE bFtnAtTxtEnd : 1;      // true: all FTN at Textend
     BYTE bEndAtTxtEnd : 1;      // true: all END at Textend
+    BYTE bHasHdr : 1;
+    BYTE bHasFtr : 1;
 
 
 


Index: openoffice.org.spec
===================================================================
RCS file: /cvs/pkgs/rpms/openoffice.org/devel/openoffice.org.spec,v
retrieving revision 1.1422
retrieving revision 1.1423
diff -u -r1.1422 -r1.1423
--- openoffice.org.spec	7 Feb 2008 12:29:35 -0000	1.1422
+++ openoffice.org.spec	8 Feb 2008 20:35:04 -0000	1.1423
@@ -140,6 +140,7 @@
 Patch66: openoffice.org-2.4.0.ooo85854.sw.graphicsaveas.patch
 Patch67: openoffice.org-2.4.0.ooo85921.sd.editmasterundermouse.patch
 Patch68: openoffice.org-2.4.0.ooo85931.svx.getentrypos.patch
+Patch69: openoffice.org-2.4.0.ooo85624.sw.headerfooters.patch
 
 %define instdir %{_libdir}/openoffice.org
 
@@ -1094,6 +1095,7 @@
 %patch66 -p1 -b .ooo85854.sw.graphicsaveas.patch
 %patch67 -p1 -b .ooo85921.sd.editmasterundermouse.patch
 %patch68 -p1 -b .ooo85931.svx.getentrypos.patch
+%patch69 -p1 -b .ooo85624.sw.headerfooters.patch
 
 %build
 echo build start time is `date`, diskspace: `df -h . | tail -n 1`
@@ -2860,9 +2862,10 @@
 
 
 %changelog
-* Thu Feb 07 2008 Caolan McNamara <caolanm at redhat.com> - 1:2.4.0-6.3
+* Fri Feb 08 2008 Caolan McNamara <caolanm at redhat.com> - 1:2.4.0-6.3
 - Resolves: rhbz#431805 openoffice.org-2.4.0.ooo85931.svx.getentrypos.patch
 - Resolves: rhbz#431620 presentation problems
+- add openoffice.org-2.4.0.ooo85624.sw.headerfooters.patch from fridrich
 
 * Tue Feb 05 2008 Caolan McNamara <caolanm at redhat.com> - 1:2.4.0-6.2
 - fix problem with mixed fontsizes with same font face




More information about the fedora-extras-commits mailing list