[Libreoffice-commits] .: cui/source o3tl/inc sw/source

Michael Stahl mst at kemper.freedesktop.org
Wed Jul 25 07:29:45 PDT 2012


 cui/source/tabpages/autocdlg.cxx  |    8 ++++----
 o3tl/inc/o3tl/sorted_vector.hxx   |    5 -----
 sw/source/core/doc/acmplwrd.cxx   |    3 +--
 sw/source/core/doc/docfld.cxx     |    2 +-
 sw/source/core/docnode/nodes.cxx  |    4 ++--
 sw/source/core/fields/fldlst.cxx  |    2 +-
 sw/source/filter/html/htmlfly.cxx |    2 +-
 7 files changed, 10 insertions(+), 16 deletions(-)

New commits:
commit f317119be32071e9ef82f3d8ff53170a5456ea0c
Author: Michael Stahl <mstahl at redhat.com>
Date:   Wed Jul 25 16:21:05 2012 +0200

    sorted_vector: MSVC doesn't know which erase to call
    
    Change-Id: Ib81388db2f93db662bb5439565f311835b08073e

diff --git a/cui/source/tabpages/autocdlg.cxx b/cui/source/tabpages/autocdlg.cxx
index b2923f8..b770c8c 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 bf1cca5..48ad0bc 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 20a43ad..f7ff984 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 a8ae938..6f1fdf6 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 d8d53e5..400fe2d 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 5485b11..30eb909 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 066f732..d75dc52 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() )
                 {


More information about the Libreoffice-commits mailing list