You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@openoffice.apache.org by or...@apache.org on 2012/09/14 16:56:20 UTC

svn commit: r1384807 - /incubator/ooo/branches/writer001/main/sw/source/filter/ww8/ww8par5.cxx

Author: orw
Date: Fri Sep 14 14:56:19 2012
New Revision: 1384807

URL: http://svn.apache.org/viewvc?rev=1384807&view=rev
Log:
#120877# - method <SwWW8ImplReader::Read_F_Tox(..)> - correct adjustment of page/section segment insertion data in order to assure that the page/section starts at the correct node.

Modified:
    incubator/ooo/branches/writer001/main/sw/source/filter/ww8/ww8par5.cxx

Modified: incubator/ooo/branches/writer001/main/sw/source/filter/ww8/ww8par5.cxx
URL: http://svn.apache.org/viewvc/incubator/ooo/branches/writer001/main/sw/source/filter/ww8/ww8par5.cxx?rev=1384807&r1=1384806&r2=1384807&view=diff
==============================================================================
--- incubator/ooo/branches/writer001/main/sw/source/filter/ww8/ww8par5.cxx (original)
+++ incubator/ooo/branches/writer001/main/sw/source/filter/ww8/ww8par5.cxx Fri Sep 14 14:56:19 2012
@@ -3474,9 +3474,6 @@ eF_ResT SwWW8ImplReader::Read_F_Tox( WW8
 
     rDoc.InsertTableOf(*pPaM->GetPoint(), *aFltTOX.GetBase());
 
-
-    //inserting a toc inserts a section before this point, so adjust pos
-    //for future page/section segment insertion
     //The TOC field representation contents should be inserted into TOC section, but not after TOC section.
     //So we need update the document position when loading TOC representation and after loading TOC;
     if (mpPosAfterTOC)
@@ -3491,7 +3488,8 @@ eF_ResT SwWW8ImplReader::Read_F_Tox( WW8
     if (SwTOXBase* pBase2 = (SwTOXBase*)rDoc.GetCurTOX(*aRegion.GetPoint()))
     {
         pBase2->SetMSTOCExpression(rStr);
-        if(nIndexCols>1)
+
+        if ( nIndexCols > 1 )
         {
             // Set the column number for index
             SfxItemSet aSet( rDoc.GetAttrPool(), RES_COL, RES_COL );
@@ -3501,8 +3499,9 @@ eF_ResT SwWW8ImplReader::Read_F_Tox( WW8
             pBase2->SetAttrSet( aSet );
         }
 
-        maSectionManager.PrependedInlineNode(*pPaM->GetPoint(),
-            *aRegion.GetNode());
+        // inserting a toc inserts a section before this point, so adjust pos
+        // for future page/section segment insertion
+        maSectionManager.PrependedInlineNode( *mpPosAfterTOC->GetPoint(), *aRegion.GetNode() );
     }
 
     // Setze Ende in Stack