summaryrefslogtreecommitdiff
path: root/sd
diff options
context:
space:
mode:
authorRafael Dominguez <venccsralph@gmail.com>2012-03-28 19:46:11 -0430
committerLuboš Luňák <l.lunak@suse.cz>2012-04-13 18:42:09 +0200
commita35bc3a35701a55234b51c2c3bc04e7c0a1553b1 (patch)
tree87585a6b557c6bc5c703cbeead46f936059fba4c /sd
parentcb5d50619dea504c149d7c54918fad974896f4c9 (diff)
Remove deprecated List usage in Clipboard::CreateSlideTransferable.
Diffstat (limited to 'sd')
-rw-r--r--sd/source/ui/slidesorter/controller/SlsClipboard.cxx13
1 files changed, 4 insertions, 9 deletions
diff --git a/sd/source/ui/slidesorter/controller/SlsClipboard.cxx b/sd/source/ui/slidesorter/controller/SlsClipboard.cxx
index 036946206bfd..afdf1339107e 100644
--- a/sd/source/ui/slidesorter/controller/SlsClipboard.cxx
+++ b/sd/source/ui/slidesorter/controller/SlsClipboard.cxx
@@ -424,7 +424,7 @@ void Clipboard::CreateSlideTransferable (
::Window* pWindow,
bool bDrag)
{
- List aBookmarkList;
+ std::vector<rtl::OUString> aBookmarkList;
// Insert all selected pages into a bookmark list and remember them in
// maPagesToRemove for possible later removal.
@@ -434,9 +434,7 @@ void Clipboard::CreateSlideTransferable (
while (aSelectedPages.HasMoreElements())
{
model::SharedPageDescriptor pDescriptor (aSelectedPages.GetNextElement());
- aBookmarkList.Insert (
- new String(pDescriptor->GetPage()->GetName()),
- LIST_APPEND);
+ aBookmarkList.push_back(pDescriptor->GetPage()->GetName());
maPagesToRemove.push_back (pDescriptor->GetPage());
}
@@ -461,7 +459,7 @@ void Clipboard::CreateSlideTransferable (
break;
}
- if (aBookmarkList.Count() > 0)
+ if (!aBookmarkList.empty())
{
mrSlideSorter.GetView().BrkAction();
SdDrawDocument* pDocument = mrSlideSorter.GetModel().GetDocument();
@@ -505,16 +503,13 @@ void Clipboard::CreateSlideTransferable (
pTransferable->SetPageBookmarks (aBookmarkList, !bDrag);
}
- for (void* p=aBookmarkList.First(); p!=NULL; p=aBookmarkList.Next())
- delete static_cast<String*>(p);
-
if (bDrag)
{
pTransferable->SetView (&mrSlideSorter.GetView());
sal_Int8 nDragSourceActions (DND_ACTION_COPY);
// The move action is available only when not all pages would be
// moved. Otherwise an empty document would remain. Crash.
- sal_Int32 nRemainingPages = mrSlideSorter.GetModel().GetPageCount() - aBookmarkList.Count();
+ sal_Int32 nRemainingPages = mrSlideSorter.GetModel().GetPageCount() - aBookmarkList.size();
if (nRemainingPages > 0)
nDragSourceActions |= DND_ACTION_MOVE;
pTransferable->StartDrag (pActionWindow, nDragSourceActions);