summaryrefslogtreecommitdiff
path: root/sd
diff options
context:
space:
mode:
authorRafael Dominguez <venccsralph@gmail.com>2012-03-27 11:31:42 -0430
committerCaolán McNamara <caolanm@redhat.com>2012-04-11 16:47:08 +0100
commitb5f44caaed5b89e6d620ca2bc421af8c922bc0b8 (patch)
tree3a7ec8711b0da93f572945f97281f32492c896ac /sd
parent30fee1f94d67e53312f8d5ca72627882eb408664 (diff)
Replace deprecated List class for std::map<sal_uInt16,rtl::OUString>.
Diffstat (limited to 'sd')
-rw-r--r--sd/source/core/drawdoc3.cxx12
1 files changed, 6 insertions, 6 deletions
diff --git a/sd/source/core/drawdoc3.cxx b/sd/source/core/drawdoc3.cxx
index 65e47e7ae761..354389ae9cfc 100644
--- a/sd/source/core/drawdoc3.cxx
+++ b/sd/source/core/drawdoc3.cxx
@@ -573,9 +573,9 @@ sal_Bool SdDrawDocument::InsertBookmarkAsPage(
sal_uInt16 nActualInsertPos = nInsertPos;
- List aNameList;
- std::set<sal_uInt16> aRenameSet;
sal_uInt16 nBMSdPage;
+ std::set<sal_uInt16> aRenameSet;
+ std::map<sal_uInt16,rtl::OUString> aNameMap;
for (nBMSdPage=0; nBMSdPage < nBMSdPageCount; nBMSdPage++)
{
@@ -586,7 +586,7 @@ sal_Bool SdDrawDocument::InsertBookmarkAsPage(
if (bLink)
{
// Es werden sich die Namen aller Seiten gemerkt
- aNameList.Insert(new String(pName), nBMSdPage);
+ aNameMap.insert(std::make_pair(nBMSdPage,pName));
}
// Have to check for duplicate names here, too
@@ -612,7 +612,6 @@ sal_Bool SdDrawDocument::InsertBookmarkAsPage(
{
SdPage* pPage = (SdPage*) GetPage(nActualInsertPos);
SdPage* pNotesPage = (SdPage*) GetPage(nActualInsertPos+1);
- String* pName = (String*) aNameList.GetObject(nBMSdPage);
// delay renaming *after* pages are copied (might destroy source otherwise)
if( aRenameSet.find(nBMSdPage) != aRenameSet.end() )
@@ -625,10 +624,11 @@ sal_Bool SdDrawDocument::InsertBookmarkAsPage(
if (bLink)
{
+ String aName(aNameMap[nBMSdPage]);
+
// Nun werden die Link-Namen zusammengestellt
pPage->SetFileName(aBookmarkName);
- pPage->SetBookmarkName(*(pName));
- delete pName;
+ pPage->SetBookmarkName(aName);
pPage->SetModel(this);
}