diff options
author | Rafael Dominguez <venccsralph@gmail.com> | 2012-03-28 19:58:26 -0430 |
---|---|---|
committer | Luboš Luňák <l.lunak@suse.cz> | 2012-04-13 18:42:09 +0200 |
commit | 8adf70b289476eb5c204d3f1e9cbcb259e019194 (patch) | |
tree | ae9f605ecf544c28f573d637a8625098c40212c9 | |
parent | Call size instead of count. (diff) | |
download | core-8adf70b289476eb5c204d3f1e9cbcb259e019194.tar.gz core-8adf70b289476eb5c204d3f1e9cbcb259e019194.zip |
Remove deprecated List for vector in ViewClipboard::GetFirstMasterPage.
-rw-r--r-- | sd/source/ui/view/ViewClipboard.cxx | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/sd/source/ui/view/ViewClipboard.cxx b/sd/source/ui/view/ViewClipboard.cxx index d535122f9bab..d8cd5b2fbdae 100644 --- a/sd/source/ui/view/ViewClipboard.cxx +++ b/sd/source/ui/view/ViewClipboard.cxx @@ -83,8 +83,9 @@ SdPage* ViewClipboard::GetFirstMasterPage (const SdTransferable& rTransferable) { do { - const List* pBookmarks = &rTransferable.GetPageBookmarks(); - if (pBookmarks == NULL) + const std::vector<rtl::OUString> &rBookmarks = rTransferable.GetPageBookmarks(); + + if (rBookmarks.empty()) break; DrawDocShell* pDocShell = rTransferable.GetPageDocShell(); @@ -95,13 +96,10 @@ SdPage* ViewClipboard::GetFirstMasterPage (const SdTransferable& rTransferable) if (pDocument == NULL) break; - if (pBookmarks->Count() <= 0) - break; - - int nBookmarkCount = pBookmarks->Count(); - for (int nIndex=0; nIndex<nBookmarkCount; nIndex++) + std::vector<rtl::OUString>::const_iterator pIter; + for ( pIter = rBookmarks.begin(); pIter != rBookmarks.end(); ++pIter ) { - String sName (*(String*) pBookmarks->GetObject(nIndex)); + String sName (*pIter); sal_Bool bIsMasterPage; // SdPage* GetMasterSdPage(sal_uInt16 nPgNum, PageKind ePgKind); |