Kaydet (Commit) b2e84f9a authored tarafından Caolán McNamara's avatar Caolán McNamara

std::map::erase takes a nonconst iterator

üst 7434fa5b
......@@ -283,8 +283,8 @@ public:
virtual sal_Bool GotoTable( const String& rName );
void InsertBox( const SwTableBox& rTblBox );
void DeleteBox( SwSelBoxes::const_iterator it ) { aSelBoxes.erase( it ); bChg = sal_True; }
void DeleteBox( SwSelBoxes::const_iterator itFirst, SwSelBoxes::const_iterator itLast ) { aSelBoxes.erase( itFirst, itLast ); bChg = sal_True; }
void DeleteBox( SwSelBoxes::iterator it ) { aSelBoxes.erase( it ); bChg = sal_True; }
void DeleteBox( SwSelBoxes::iterator itFirst, SwSelBoxes::iterator itLast ) { aSelBoxes.erase( itFirst, itLast ); bChg = sal_True; }
void DeleteAllBoxes() { DeleteBox(aSelBoxes.begin(), aSelBoxes.end()); }
sal_uInt16 GetBoxesCount() const { return aSelBoxes.size(); }
const SwSelBoxes& GetBoxes() const { return aSelBoxes; }
......
......@@ -2165,8 +2165,9 @@ SwCursor* SwTableCursor::MakeBoxSels( SwCursor* pAktCrsr )
else
{
SwSelBoxes::const_iterator it = aTmp.find(pSttNd->GetIndex());
if( it != aTmp.end() ) {
SwSelBoxes::iterator it = aTmp.find(pSttNd->GetIndex());
if( it != aTmp.end() )
{
SwNodeIndex aIdx( *pSttNd, 1 );
const SwNode* pNd = &aIdx.GetNode();
if( !pNd->IsCntntNode() )
......@@ -2272,7 +2273,7 @@ bool SwTableCursor::NewTableSelection()
void SwTableCursor::ActualizeSelection( const SwSelBoxes &rNew )
{
SwSelBoxes::const_iterator itOld = aSelBoxes.begin();
SwSelBoxes::iterator itOld = aSelBoxes.begin();
SwSelBoxes::const_iterator itNew = rNew.begin();
while ( itOld != aSelBoxes.end() && itNew != rNew.end() )
{
......@@ -2285,7 +2286,7 @@ void SwTableCursor::ActualizeSelection( const SwSelBoxes &rNew )
}
else if( pPOld->GetSttIdx() < pPNew->GetSttIdx() )
{
SwSelBoxes::const_iterator it = itOld;
SwSelBoxes::iterator it = itOld;
++itOld;
DeleteBox( it ); // this box has to go
}
......
......@@ -349,7 +349,7 @@ void SwTableFormula::_MakeFormel( const SwTable& rTbl, String& rNewStr,
rNewStr += '(';
bool bDelim = false;
for( SwSelBoxes::const_iterator it = aBoxes.begin();
for( SwSelBoxes::iterator it = aBoxes.begin();
it != aBoxes.end() && !pCalcPara->rCalc.IsCalcError();
++it )
{
......@@ -960,7 +960,7 @@ void SwTableFormula::GetBoxes( const SwTableBox& rSttBox,
break;
// dann mal die Tabellenkoepfe raus:
for( SwSelBoxes::const_iterator it = rBoxes.begin(); it != rBoxes.end(); ++it )
for( SwSelBoxes::iterator it = rBoxes.begin(); it != rBoxes.end(); ++it )
{
pLine = it->second->GetUpper();
while( pLine->GetUpper() )
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment