[Libreoffice-commits] .: 2 commits - sw/inc sw/source

Nigel Hawkins nhawkins at kemper.freedesktop.org
Mon Feb 21 03:36:22 PST 2011


 sw/inc/undobj.hxx                |    2 +-
 sw/source/core/layout/layact.cxx |    5 +++--
 sw/source/core/undo/untbl.cxx    |    6 +++---
 3 files changed, 7 insertions(+), 6 deletions(-)

New commits:
commit 79a3c41c756f20aa6d9c603bb994c49f70fd052a
Author: Nigel Hawkins <n.hawkins at gmx.com>
Date:   Sun Feb 20 14:31:58 2011 +0000

    Remove use of SvBools in undobj.hxx and undtbl.cxx

diff --git a/sw/inc/undobj.hxx b/sw/inc/undobj.hxx
index 1efb36f..fb2ddf4 100644
--- a/sw/inc/undobj.hxx
+++ b/sw/inc/undobj.hxx
@@ -870,7 +870,7 @@ class SwUndoTblNdsChg : public SwUndo
         SvULongs* pNewSttNds;
         SwUndoSaveSections* pDelSects;
     } Ptrs;
-    SvBools aMvBoxes;		// fuers SplitRow (aufgeteilte Nodes einer Box)
+    std::vector<bool> aMvBoxes;  // fuers SplitRow (aufgeteilte Nodes einer Box)
     long nMin, nMax;        // for redo of delete column
     ULONG nSttNode, nCurrBox;
     USHORT nCount, nRelDiff, nAbsDiff, nSetColType;
diff --git a/sw/source/core/undo/untbl.cxx b/sw/source/core/undo/untbl.cxx
index b847089..2709195 100644
--- a/sw/source/core/undo/untbl.cxx
+++ b/sw/source/core/undo/untbl.cxx
@@ -1739,7 +1739,7 @@ void SwUndoTblNdsChg::SaveNewBoxes( const SwTableNode& rTblNd,
                 ( nNodes != ( pSourceBox->GetSttNd()->EndOfSectionIndex() -
                               pSourceBox->GetSttIdx() ) )
                 && ( nNodes - 1 > nLineDiff );
-            aMvBoxes.Insert( bNodesMoved, nInsPos );
+            aMvBoxes.insert( aMvBoxes.begin() + nInsPos, bNodesMoved );
         }
     }
 }
@@ -1799,7 +1799,7 @@ void SwUndoTblNdsChg::Undo( SwUndoIter& rUndoIter )
         }
         Ptrs.pDelSects->DeleteAndDestroy( 0, Ptrs.pDelSects->Count() );
     }
-    else if( aMvBoxes.Count() )
+    else if( !aMvBoxes.empty() )
     {
         // dann muessen Nodes verschoben und nicht geloescht werden!
         // Dafuer brauchen wir aber ein temp Array
@@ -3193,7 +3193,7 @@ void InsertSort( SvUShorts& rArr, USHORT nIdx, USHORT* pInsPos )
             nM = nU + ( nO - nU ) / 2;
             if( *(rArr.GetData() + nM) == nIdx )
             {
-                OSL_ENSURE( FALSE, "Index ist schon vorhanden, darf nie sein!" );
+                OSL_ENSURE( FALSE, "Index already exists. This should never happen." );
                 return;
             }
             if( *(rArr.GetData() + nM) < nIdx )
commit e5fc918e62f4cbf65dcf8e34d802141a1692157b
Author: Nigel Hawkins <n.hawkins at gmx.com>
Date:   Sun Feb 20 13:54:17 2011 +0000

    Remove use of SvBools in layact.cxx

diff --git a/sw/source/core/layout/layact.cxx b/sw/source/core/layout/layact.cxx
index 50a3e6d..7fffe95 100644
--- a/sw/source/core/layout/layact.cxx
+++ b/sw/source/core/layout/layact.cxx
@@ -92,6 +92,7 @@
 #include <sortedobjs.hxx>
 #include <objectformatter.hxx>
 #include <PostItMgr.hxx>
+#include <vector>
 
 // <--
 //#pragma optimize("ity",on)
@@ -2363,7 +2364,7 @@ SwLayIdle::SwLayIdle( SwRootFrm *pRt, SwViewImp *pI ) :
         //Veraenderungen der Seitenzahl nicht zu unerwuenschten Effekten kommt.
         //Wir merken uns bei welchen Shells der Cursor sichtbar ist, damit
         //wir ihn bei Dokumentaenderung ggf. wieder sichbar machen koennen.
-        SvBools aBools;
+        std::vector<bool> aBools;
         ViewShell *pSh = pImp->GetShell();
         do
         {	++pSh->nStartAction;
@@ -2375,7 +2376,7 @@ SwLayIdle::SwLayIdle( SwRootFrm *pRt, SwViewImp *pI ) :
 #endif
                 bVis = ((SwCrsrShell*)pSh)->GetCharRect().IsOver(pSh->VisArea());
             }
-            aBools.Insert( bVis, aBools.Count() );
+            aBools.push_back(bVis);
             pSh = (ViewShell*)pSh->GetNext();
         } while ( pSh != pImp->GetShell() );
 


More information about the Libreoffice-commits mailing list