ooo-build r15556 - in trunk: . patches/dev300



Author: freuter
Date: Tue Mar 17 12:34:16 2009
New Revision: 15556
URL: http://svn.gnome.org/viewvc/ooo-build?rev=15556&view=rev

Log:
Fix tabs export problem which caused the broken TOC in n#479068.

Added:
   trunk/patches/dev300/sw-tab-export-fix-i100264.diff
Modified:
   trunk/ChangeLog
   trunk/patches/dev300/apply

Modified: trunk/patches/dev300/apply
==============================================================================
--- trunk/patches/dev300/apply	(original)
+++ trunk/patches/dev300/apply	Tue Mar 17 12:34:16 2009
@@ -2729,6 +2729,7 @@
 fix-ppt-linespacing-import-export.diff, n#355302, rodo
 sw-section-import-fix.diff, n#364533, freuter
 sw-allow-negative-spacing.diff, n#364534, freuter
+sw-tab-export-fix-i100264.diff, n#479068, freuter
 
 sd-slideshow-slideshowview-transformation-fix.diff, rodo
 

Added: trunk/patches/dev300/sw-tab-export-fix-i100264.diff
==============================================================================
--- (empty file)
+++ trunk/patches/dev300/sw-tab-export-fix-i100264.diff	Tue Mar 17 12:34:16 2009
@@ -0,0 +1,71 @@
+diff --git sw/source/filter/ww8/wrtw8sty.cxx sw/source/filter/ww8/wrtw8sty.cxx
+index fc97f47..1528f49 100644
+--- sw/source/filter/ww8/wrtw8sty.cxx
++++ sw/source/filter/ww8/wrtw8sty.cxx
+@@ -432,7 +432,13 @@ void WW8WrtStyle::BuildUpx(const SwFmt* pFmt, bool bPap, USHORT nPos,
+     if( bPap )
+         SwWW8Writer::InsUInt16( *pO, nPos);     // Style-Nummer
+ 
++    assert(rWrt.pCurrentStyle==NULL);   // set current style before calling out
++    rWrt.pCurrentStyle=pFmt;
++    
+     rWrt.Out_SwFmt( *pFmt, bPap, !bPap );
++    
++    assert(rWrt.pCurrentStyle!=pFmt);  // reset current style...
++    rWrt.pCurrentStyle=NULL;
+ 
+     if( bInsDefCharSiz  )                   // nicht abgeleitet v. anderem Style
+         Set1StyleDefaults( *pFmt, bPap );
+diff --git sw/source/filter/ww8/wrtww8.cxx sw/source/filter/ww8/wrtww8.cxx
+index da32ca5..61e499e 100644
+--- sw/source/filter/ww8/wrtww8.cxx
++++ sw/source/filter/ww8/wrtww8.cxx
+@@ -2660,6 +2660,7 @@ ULONG SwWW8Writer::StoreDoc()
+     // <--
+     nStyleBeforeFly = nLastFmtId = 0;
+     pStyAttr = 0;
++    pCurrentStyle = NULL;
+     pOutFmtNode = 0;
+     pEscher = 0;
+     pRedlAuthors = 0;
+diff --git sw/source/filter/ww8/wrtww8.hxx sw/source/filter/ww8/wrtww8.hxx
+index 9b3b5de..bd4e551 100644
+--- sw/source/filter/ww8/wrtww8.hxx
++++ sw/source/filter/ww8/wrtww8.hxx
+@@ -482,6 +482,7 @@ public:
+     SwWW8WrGrf* pGrf;
+     const SwAttrSet* pStyAttr;      // StyleAttr fuer Tabulatoren
+     const SwModify* pOutFmtNode;    // write Format or Node
++    const SwFmt *pCurrentStyle;     // iff bStyDef=true, then this store the current style
+ 
+     MainTxtPlcDrawObj *pSdrObjs;   // Draw-/Fly-Objects
+     HdFtPlcDrawObj *pHFSdrObjs;     // Draw-/Fly-Objects in header or footer
+diff --git sw/source/filter/ww8/ww8atr.cxx sw/source/filter/ww8/ww8atr.cxx
+index 3e01060..60a93db 100644
+--- sw/source/filter/ww8/ww8atr.cxx
++++ sw/source/filter/ww8/ww8atr.cxx
+@@ -4958,6 +4958,24 @@ static Writer& OutWW8_SwTabStop(Writer& rWrt, const SfxPoolItem& rHt)
+     const SfxPoolItem* pLR = rWW8Wrt.HasItem( RES_LR_SPACE );
+     long nCurrentLeft = pLR ? ((const SvxLRSpaceItem*)pLR)->GetTxtLeft() : 0;
+ 
++
++    // --> FLR 2009-03-17 #i100264#
++    if (rWW8Wrt.bStyDef 
++	&& rWW8Wrt.pCurrentStyle!=NULL 
++	&& rWW8Wrt.pCurrentStyle->DerivedFrom()!=NULL) {
++      SvxTabStopItem aTabs(0, 0, SVX_TAB_ADJUST_DEFAULT, RES_PARATR_TABSTOP);
++      const SwFmt *pParentStyle=rWW8Wrt.pCurrentStyle->DerivedFrom();
++      const SvxTabStopItem* pParentTabs=HasItem<SvxTabStopItem>(pParentStyle->GetAttrSet(), RES_PARATR_TABSTOP);
++      if (pParentTabs) {
++	aTabs.Insert(pParentTabs);
++      }
++      
++      OutWW8_SwTabStopDelAdd(rWW8Wrt, aTabs, 0, rTStops, 0);
++      return rWrt;
++    }
++    // <--
++
++
+     // StyleDef -> "einfach" eintragen || keine Style-Attrs -> dito
+     const SvxTabStopItem* pStyleTabs = 0;
+     if (!rWW8Wrt.bStyDef && rWW8Wrt.pStyAttr)



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]