summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Stahl <mstahl@redhat.com>2012-07-25 16:21:05 +0200
committerMichael Stahl <mstahl@redhat.com>2012-07-25 16:28:17 +0200
commitf317119be32071e9ef82f3d8ff53170a5456ea0c (patch)
tree0d2a7fa7a4371f8a9d4d061013ff19986118627c
parentf5a625f61a4f0209a4ec74b919241593a56b5500 (diff)
sorted_vector: MSVC doesn't know which erase to call
Change-Id: Ib81388db2f93db662bb5439565f311835b08073e
-rw-r--r--cui/source/tabpages/autocdlg.cxx8
-rw-r--r--o3tl/inc/o3tl/sorted_vector.hxx5
-rw-r--r--sw/source/core/doc/acmplwrd.cxx3
-rw-r--r--sw/source/core/doc/docfld.cxx2
-rw-r--r--sw/source/core/docnode/nodes.cxx4
-rw-r--r--sw/source/core/fields/fldlst.cxx2
-rw-r--r--sw/source/filter/html/htmlfly.cxx2
7 files changed, 10 insertions, 16 deletions
diff --git a/cui/source/tabpages/autocdlg.cxx b/cui/source/tabpages/autocdlg.cxx
index b2923f809bcd..b770c8c19341 100644
--- a/cui/source/tabpages/autocdlg.cxx
+++ b/cui/source/tabpages/autocdlg.cxx
@@ -1540,7 +1540,7 @@ sal_Bool OfaAutocorrExceptPage::FillItemSet( SfxItemSet& )
if( !lcl_FindInArray(rArrays.aDoubleCapsStrings, *pString))
{
delete (*pWrdList)[ i ];
- pWrdList->erase( pWrdList->begin() + i );
+ pWrdList->erase(i);
}
}
@@ -1565,7 +1565,7 @@ sal_Bool OfaAutocorrExceptPage::FillItemSet( SfxItemSet& )
if( !lcl_FindInArray(rArrays.aAbbrevStrings, *pString))
{
delete (*pCplList)[ i ];
- pCplList->erase( pCplList->begin() + i );
+ pCplList->erase(i);
}
}
@@ -1594,7 +1594,7 @@ sal_Bool OfaAutocorrExceptPage::FillItemSet( SfxItemSet& )
if( USHRT_MAX == aDoubleCapsLB.GetEntryPos(*pString) )
{
delete (*pWrdList)[ i ];
- pWrdList->erase( pWrdList->begin() + i );
+ pWrdList->erase(i);
}
}
nCount = aDoubleCapsLB.GetEntryCount();
@@ -1619,7 +1619,7 @@ sal_Bool OfaAutocorrExceptPage::FillItemSet( SfxItemSet& )
if( USHRT_MAX == aAbbrevLB.GetEntryPos(*pString) )
{
delete (*pCplList)[ i ];
- pCplList->erase( pCplList->begin() + i );
+ pCplList->erase(i);
}
}
nCount = aAbbrevLB.GetEntryCount();
diff --git a/o3tl/inc/o3tl/sorted_vector.hxx b/o3tl/inc/o3tl/sorted_vector.hxx
index bf1cca5eb937..48ad0bcbabb6 100644
--- a/o3tl/inc/o3tl/sorted_vector.hxx
+++ b/o3tl/inc/o3tl/sorted_vector.hxx
@@ -68,11 +68,6 @@ public:
}
// hack: public erase with const_iterator, should not change sort order
- void erase(const_iterator const& position)
- {
- base_t::erase(begin_nonconst() + (position - begin()));
- }
-
void erase(const_iterator const& first, const_iterator const& last)
{
base_t::erase(begin_nonconst() + (first - begin()),
diff --git a/sw/source/core/doc/acmplwrd.cxx b/sw/source/core/doc/acmplwrd.cxx
index 20a43ad54c67..f7ff984ea445 100644
--- a/sw/source/core/doc/acmplwrd.cxx
+++ b/sw/source/core/doc/acmplwrd.cxx
@@ -320,7 +320,7 @@ void SwAutoCompleteWord::SetMaxCount( sal_uInt16 nNewMax )
m_WordList.find(aLRULst[ nLRUIndex++ ]);
OSL_ENSURE( m_WordList.end() != it, "String not found" );
editeng::IAutoCompleteString *const pDel = *it;
- m_WordList.erase(it);
+ m_WordList.erase(it - m_WordList.begin());
delete pDel;
}
aLRULst.erase( aLRULst.begin() + nNewMax - 1, aLRULst.end() );
@@ -383,7 +383,6 @@ void SwAutoCompleteWord::CheckChangedList(
SwAutoCompleteString *const pDel =
dynamic_cast<SwAutoCompleteString*>(m_WordList[nMyPos]);
m_WordList.erase(nMyPos);
-
SwAutoCompleteStringPtrDeque::iterator it = std::find( aLRULst.begin(), aLRULst.end(), pDel );
OSL_ENSURE( aLRULst.end() != it, "String not found" );
aLRULst.erase( it );
diff --git a/sw/source/core/doc/docfld.cxx b/sw/source/core/doc/docfld.cxx
index a8ae938a7f1a..6f1fdf6d72b5 100644
--- a/sw/source/core/doc/docfld.cxx
+++ b/sw/source/core/doc/docfld.cxx
@@ -2191,7 +2191,7 @@ void SwDocUpdtFld::InsDelFldInFldLst( sal_Bool bIns, const SwTxtFld& rFld )
if( &rFld == (*pFldSortLst)[ n ]->GetPointer() )
{
delete (*pFldSortLst)[n];
- pFldSortLst->erase( pFldSortLst->begin() + n );
+ pFldSortLst->erase(n);
n--; // one field can occur multiple times
}
}
diff --git a/sw/source/core/docnode/nodes.cxx b/sw/source/core/docnode/nodes.cxx
index d8d53e514ec6..400fe2d60025 100644
--- a/sw/source/core/docnode/nodes.cxx
+++ b/sw/source/core/docnode/nodes.cxx
@@ -1226,7 +1226,7 @@ void SwNodes::Delete(const SwNodeIndex &rIndex, sal_uLong nNodes)
pOutlineNds->Seek_Entry( pNd, &nIdxPos ))
{
// loesche die Gliederungs-Indizies.
- pOutlineNds->erase( pOutlineNds->begin() + nIdxPos );
+ pOutlineNds->erase(nIdxPos);
bUpdateOutline = sal_True;
}
pTxtNode->InvalidateNumRule();
@@ -1528,7 +1528,7 @@ void SwNodes::DelNodes( const SwNodeIndex & rStart, sal_uLong nCnt )
sal_uInt16 nIdxPos;
if( pOutlineNds->Seek_Entry( pNd, &nIdxPos ))
{
- pOutlineNds->erase( pOutlineNds->begin() + nIdxPos );
+ pOutlineNds->erase(nIdxPos);
bUpdateNum = 1;
}
}
diff --git a/sw/source/core/fields/fldlst.cxx b/sw/source/core/fields/fldlst.cxx
index 5485b1165be1..30eb90959498 100644
--- a/sw/source/core/fields/fldlst.cxx
+++ b/sw/source/core/fields/fldlst.cxx
@@ -212,7 +212,7 @@ void SwInputFieldList::RemoveUnselectedFlds()
{
// Feld innerhalb der Selektion
pNewLst->insert( (*pSrtLst)[i] );
- pSrtLst->erase( pSrtLst->begin() + i );
+ pSrtLst->erase(i);
}
else
i++;
diff --git a/sw/source/filter/html/htmlfly.cxx b/sw/source/filter/html/htmlfly.cxx
index 066f7321bd52..d75dc528140c 100644
--- a/sw/source/filter/html/htmlfly.cxx
+++ b/sw/source/filter/html/htmlfly.cxx
@@ -401,7 +401,7 @@ sal_Bool SwHTMLWriter::OutFlyFrm( sal_uLong nNdIdx, xub_StrLen nCntntIdx, sal_uI
// Erst entfernen ist wichtig, weil in tieferen
// Rekursionen evtl. weitere Eintraege oder das
// ganze Array geloscht werden koennte.
- pHTMLPosFlyFrms->erase( pHTMLPosFlyFrms->begin() + i );
+ pHTMLPosFlyFrms->erase(i);
i--;
if( pHTMLPosFlyFrms->empty() )
{