diff options
Diffstat (limited to 'sd/source/ui/view/ViewClipboard.cxx')
-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); |