summaryrefslogtreecommitdiff
path: root/sd
diff options
context:
space:
mode:
authorRafael Dominguez <venccsralph@gmail.com>2012-04-01 08:22:34 -0430
committerLuboš Luňák <l.lunak@suse.cz>2012-04-13 18:42:10 +0200
commit236ebc083a3b69e140b01e7688e4650cb7d19c6f (patch)
tree43a9c019f045c51ea6732c75b1f25e34bb8f914b /sd
parentc29542818295388db23652ec5a1c982496f66010 (diff)
Replace deprecated List for std::vector<rtl::OUString>.
Diffstat (limited to 'sd')
-rw-r--r--sd/source/ui/view/sdview2.cxx21
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;