[Libreoffice-commits] .: 2 commits - sw/source
Nigel Hawkins
nhawkins at kemper.freedesktop.org
Thu Jun 16 07:44:39 PDT 2011
sw/source/core/doc/docfld.cxx | 14 +++++---------
sw/source/core/docnode/ndtbl.cxx | 6 +++---
sw/source/core/inc/UndoTable.hxx | 2 +-
sw/source/core/undo/untbl.cxx | 2 +-
4 files changed, 10 insertions(+), 14 deletions(-)
New commits:
commit 59f7e88cadfcf692cf021b0b25a5bb92aedfa239
Author: Nigel Hawkins <n.hawkins at gmx.com>
Date: Wed Jun 15 16:00:39 2011 +0100
Replace SvULongs with std::vector in ndtbl.cxx
Also cascaded changes. LGPLv3+/MPL.
diff --git a/sw/source/core/docnode/ndtbl.cxx b/sw/source/core/docnode/ndtbl.cxx
index 1925953..1148bfe 100644
--- a/sw/source/core/docnode/ndtbl.cxx
+++ b/sw/source/core/docnode/ndtbl.cxx
@@ -2145,7 +2145,7 @@ sal_Bool SwDoc::SplitTbl( const SwSelBoxes& rBoxes, sal_Bool bVert, sal_uInt16 n
if( rTbl.ISA( SwDDETable ))
return sal_False;
- SvULongs aNdsCnts;
+ std::vector<sal_uLong> aNdsCnts;
SwTableSortBoxes aTmpLst( 0, 5 );
SwUndoTblNdsChg* pUndo = 0;
if (GetIDocumentUndoRedo().DoesUndo())
@@ -2159,8 +2159,8 @@ sal_Bool SwDoc::SplitTbl( const SwSelBoxes& rBoxes, sal_Bool bVert, sal_uInt16 n
for( sal_uInt16 n = 0; n < rBoxes.Count(); ++n )
{
const SwStartNode* pSttNd = rBoxes[ n ]->GetSttNd();
- aNdsCnts.Insert( pSttNd->EndOfSectionIndex() -
- pSttNd->GetIndex(), n );
+ aNdsCnts.push_back( pSttNd->EndOfSectionIndex() -
+ pSttNd->GetIndex() );
}
}
}
diff --git a/sw/source/core/inc/UndoTable.hxx b/sw/source/core/inc/UndoTable.hxx
index 78c0af9..84108dc 100644
--- a/sw/source/core/inc/UndoTable.hxx
+++ b/sw/source/core/inc/UndoTable.hxx
@@ -209,7 +209,7 @@ public:
void SaveNewBoxes( const SwTableNode& rTblNd, const SwTableSortBoxes& rOld );
void SaveNewBoxes( const SwTableNode& rTblNd, const SwTableSortBoxes& rOld,
- const SwSelBoxes& rBoxes, const SvULongs& rNodeCnts );
+ const SwSelBoxes& rBoxes, const std::vector<sal_uLong> &rNodeCnts );
void SaveSection( SwStartNode* pSttNd );
void ReNewBoxes( const SwSelBoxes& rBoxes );
diff --git a/sw/source/core/undo/untbl.cxx b/sw/source/core/undo/untbl.cxx
index 0d2bc9b..b7c8861 100644
--- a/sw/source/core/undo/untbl.cxx
+++ b/sw/source/core/undo/untbl.cxx
@@ -1663,7 +1663,7 @@ const SwTableLines& lcl_FindParentLines( const SwTable& rTable,
void SwUndoTblNdsChg::SaveNewBoxes( const SwTableNode& rTblNd,
const SwTableSortBoxes& rOld,
const SwSelBoxes& rBoxes,
- const SvULongs& rNodeCnts )
+ const std::vector<sal_uLong> &rNodeCnts )
{
const SwTable& rTbl = rTblNd.GetTable();
const SwTableSortBoxes& rTblBoxes = rTbl.GetTabSortBoxes();
commit 3804182f56e014445f103325e37a730d433e14f1
Author: Nigel Hawkins <n.hawkins at gmx.com>
Date: Wed Jun 15 15:44:40 2011 +0100
Replace SvULongs with std:vector in docfld.cxx. LGPLv3+/MPL.
diff --git a/sw/source/core/doc/docfld.cxx b/sw/source/core/doc/docfld.cxx
index 4fcca81..bbbc608 100644
--- a/sw/source/core/doc/docfld.cxx
+++ b/sw/source/core/doc/docfld.cxx
@@ -36,7 +36,6 @@
#include <float.h>
#include <tools/datetime.hxx>
#ifndef _SVSTDARR_HXX
-#define _SVSTDARR_ULONGS
#include <svl/svarray.hxx>
#endif
#include <vcl/svapp.hxx>
@@ -2241,7 +2240,7 @@ void SwDocUpdtFld::_MakeFldList( SwDoc& rDoc, int eGetMode )
{
// damit die Frames richtig angelegt werden, muessen sie in der
// Reihenfolgen von oben nach unten expandiert werden
- SvULongs aTmpArr;
+ std::vector<sal_uLong> aTmpArr;
SwSectionFmts& rArr = rDoc.GetSections();
SwSectionNode* pSectNd;
sal_uInt16 nArrStt = 0;
@@ -2254,20 +2253,17 @@ void SwDocUpdtFld::_MakeFldList( SwDoc& rDoc, int eGetMode )
0 != ( pSectNd = pSect->GetFmt()->GetSectionNode() ))
{
sal_uLong nIdx = pSectNd->GetIndex();
- sal_uInt16 i;
-
- for( i = 0; i < aTmpArr.Count() && aTmpArr[ i ] < nIdx; ++i )
- ;
- aTmpArr.Insert( nIdx, i );
+ aTmpArr.push_back( nIdx );
if( nIdx < nSttCntnt )
++nArrStt;
}
}
+ std::sort(aTmpArr.begin(), aTmpArr.end());
// erst alle anzeigen, damit die Frames vorhanden sind. Mit deren
// Position wird das BodyAnchor ermittelt.
// Dafuer erst den ContentBereich, dann die Sonderbereiche!!!
- for (sal_uInt16 n = nArrStt; n < aTmpArr.Count(); ++n)
+ for (sal_uInt16 n = nArrStt; n < aTmpArr.size(); ++n)
{
pSectNd = rDoc.GetNodes()[ aTmpArr[ n ] ]->GetSectionNode();
OSL_ENSURE( pSectNd, "Wo ist mein SectionNode" );
@@ -2281,7 +2277,7 @@ void SwDocUpdtFld::_MakeFldList( SwDoc& rDoc, int eGetMode )
}
// so, erst jetzt alle sortiert in die Liste eintragen
- for (sal_uInt16 n = 0; n < aTmpArr.Count(); ++n)
+ for (sal_uInt16 n = 0; n < aTmpArr.size(); ++n)
{
GetBodyNode( *rDoc.GetNodes()[ aTmpArr[ n ] ]->GetSectionNode() );
}
More information about the Libreoffice-commits
mailing list