diff options
author | Rafael Dominguez <venccsralph@gmail.com> | 2012-04-01 08:22:34 -0430 |
---|---|---|
committer | Luboš Luňák <l.lunak@suse.cz> | 2012-04-13 18:42:10 +0200 |
commit | 236ebc083a3b69e140b01e7688e4650cb7d19c6f (patch) | |
tree | 43a9c019f045c51ea6732c75b1f25e34bb8f914b | |
parent | Remove deprecated List in ViewClipboard::InsertSlides. (diff) | |
download | core-236ebc083a3b69e140b01e7688e4650cb7d19c6f.tar.gz core-236ebc083a3b69e140b01e7688e4650cb7d19c6f.zip |
Replace deprecated List for std::vector<rtl::OUString>.
-rw-r--r-- | sd/source/ui/view/sdview2.cxx | 21 |
1 files changed, 6 insertions, 15 deletions
diff --git a/sd/source/ui/view/sdview2.cxx b/sd/source/ui/view/sdview2.cxx index a30d114e83e4..4e192e698f4b 100644 --- a/sd/source/ui/view/sdview2.cxx +++ b/sd/source/ui/view/sdview2.cxx @@ -861,8 +861,7 @@ IMPL_LINK( View, ExecuteNavigatorDrop, SdNavigatorDropEvent*, pSdNavigatorDropEv if( pPageObjsTransferable && aDataHelper.GetINetBookmark( SOT_FORMATSTR_ID_NETSCAPE_BOOKMARK, aINetBookmark ) ) { Point aPos; - List aBookmarkList; - String aBookmark; + rtl::OUString aBookmark; SdPage* pPage = (SdPage*) GetSdrPageView()->GetPage(); sal_uInt16 nPgPos = 0xFFFF; @@ -873,7 +872,9 @@ IMPL_LINK( View, ExecuteNavigatorDrop, SdNavigatorDropEvent*, pSdNavigatorDropEv sal_Int32 nIndex = aURL.indexOf( (sal_Unicode)'#' ); if( nIndex != -1 ) aBookmark = aURL.copy( nIndex+1 ); - aBookmarkList.Insert( &aBookmark ); + + std::vector<rtl::OUString> aExchangeList; + std::vector<rtl::OUString> aBookmarkList(1,aBookmark); if( !pPage->IsMasterPage() ) { @@ -886,9 +887,8 @@ IMPL_LINK( View, ExecuteNavigatorDrop, SdNavigatorDropEvent*, pSdNavigatorDropEv // Um zu gewaehrleisten, dass alle Seitennamen eindeutig sind, werden // die einzufuegenden geprueft und gegebenenfalls in einer Ersatzliste // aufgenommen (bNameOK == sal_False -> Benutzer hat abgebrochen) - List* pExchangeList = NULL; sal_Bool bLink = ( NAVIGATOR_DRAGTYPE_LINK == pPageObjsTransferable->GetDragType() ? sal_True : sal_False ); - sal_Bool bNameOK = GetExchangeList( pExchangeList, &aBookmarkList, 2 ); + sal_Bool bNameOK = GetExchangeList( aExchangeList, aBookmarkList, 2 ); sal_Bool bReplace = sal_False; // Da man hier nicht weiss, ob es sich um eine Seite oder ein Objekt handelt, @@ -896,20 +896,11 @@ IMPL_LINK( View, ExecuteNavigatorDrop, SdNavigatorDropEvent*, pSdNavigatorDropEv // Sollten Seitennamen und Objektnamen identisch sein gibt es hier natuerlich Probleme !!! if( bNameOK ) { - mrDoc.InsertBookmark( &aBookmarkList, pExchangeList, + mrDoc.InsertBookmark( aBookmarkList, aExchangeList, bLink, bReplace, nPgPos, sal_False, &pPageObjsTransferable->GetDocShell(), sal_True, &aPos ); } - - // Delete the ExchangeList - if( pExchangeList ) - { - for( void* p = pExchangeList->First(); p; p = pExchangeList->Next() ) - delete (String*) p; - - delete pExchangeList; - } } delete pSdNavigatorDropEvent; |