diff options
author | Rafael Dominguez <venccsralph@gmail.com> | 2012-04-14 21:37:36 -0430 |
---|---|---|
committer | Luboš Luňák <l.lunak@suse.cz> | 2012-04-16 18:44:00 +0200 |
commit | ae7ad6dab30463f961798f3203ef10c69b76c632 (patch) | |
tree | c474b1bddafd839af3e728113f73bf0700a888bd /sd/source | |
parent | 6242b36b78a563823d45aeb1e757bcb88ca03b69 (diff) |
Make an out argument a pointer instead of a reference.
- Fix some style issues.
Diffstat (limited to 'sd/source')
-rw-r--r-- | sd/source/core/drawdoc3.cxx | 17 | ||||
-rw-r--r-- | sd/source/core/pglink.cxx | 3 | ||||
-rw-r--r-- | sd/source/ui/app/sdxfer.cxx | 3 | ||||
-rw-r--r-- | sd/source/ui/func/fuinsfil.cxx | 2 | ||||
-rw-r--r-- | sd/source/ui/slidesorter/controller/SlsClipboard.cxx | 8 | ||||
-rw-r--r-- | sd/source/ui/view/ViewClipboard.cxx | 5 |
6 files changed, 19 insertions, 19 deletions
diff --git a/sd/source/core/drawdoc3.cxx b/sd/source/core/drawdoc3.cxx index 63ce713db394..71b792d47739 100644 --- a/sd/source/core/drawdoc3.cxx +++ b/sd/source/core/drawdoc3.cxx @@ -353,7 +353,7 @@ sal_Bool SdDrawDocument::InsertBookmark( if ( bOK && bInsertPages ) { // Zuerst werden alle Seiten-Bookmarks eingefuegt - bOK = InsertBookmarkAsPage(rBookmarkList, rExchangeList, bLink, bReplace, + bOK = InsertBookmarkAsPage(rBookmarkList, &rExchangeList, bLink, bReplace, nInsertPos, bNoDialogs, pBookmarkDocSh, bCopy, sal_True, sal_False); } @@ -369,7 +369,7 @@ sal_Bool SdDrawDocument::InsertBookmark( sal_Bool SdDrawDocument::InsertBookmarkAsPage( const std::vector<rtl::OUString> &rBookmarkList, - std::vector<rtl::OUString> &rExchangeList, // Liste der zu verwendenen Namen + std::vector<rtl::OUString> *pExchangeList, // Liste der zu verwendenen Namen sal_Bool bLink, sal_Bool bReplace, sal_uInt16 nInsertPos, @@ -816,12 +816,16 @@ sal_Bool SdDrawDocument::InsertBookmarkAsPage( nSdPageEnd = nSdPageStart + nReplacedStandardPages - 1; } - std::vector<rtl::OUString>::iterator pExchangeIter = rExchangeList.begin(); + std::vector<rtl::OUString>::iterator pExchangeIter; + + if (pExchangeList) + pExchangeIter = pExchangeList->begin(); + for (sal_uInt16 nSdPage = nSdPageStart; nSdPage <= nSdPageEnd; nSdPage++) { pRefPage = GetSdPage(nSdPage, PK_STANDARD); - if (pExchangeIter != rExchangeList.end()) + if (pExchangeList && pExchangeIter != pExchangeList->end()) { // Zuverwendener Name aus Exchange-Liste holen String aExchangeName (*pExchangeIter); @@ -879,7 +883,8 @@ sal_Bool SdDrawDocument::InsertBookmarkAsPage( } ///Remove processed elements, to avoid doings hacks in InsertBookmarkAsObject - rExchangeList.erase(rExchangeList.begin(),pExchangeIter); + if ( pExchangeList ) + pExchangeList->erase(pExchangeList->begin(),pExchangeIter); for (sal_uInt16 nPage = nMPageCount; nPage < nNewMPageCount; nPage++) { @@ -930,7 +935,7 @@ sal_Bool SdDrawDocument::InsertBookmarkAsPage( sal_Bool SdDrawDocument::InsertBookmarkAsObject( const std::vector<rtl::OUString> &rBookmarkList, - std::vector<rtl::OUString> &rExchangeList, // Liste der zu verwendenen Namen + const std::vector<rtl::OUString> &rExchangeList, // Liste der zu verwendenen Namen sal_Bool /* bLink */, ::sd::DrawDocShell* pBookmarkDocSh, Point* pObjPos, bool bCalcObjCount) diff --git a/sd/source/core/pglink.cxx b/sd/source/core/pglink.cxx index f40dfdbfed91..bae8a47bed12 100644 --- a/sd/source/core/pglink.cxx +++ b/sd/source/core/pglink.cxx @@ -116,8 +116,7 @@ SdPageLink::~SdPageLink() bCopy = sal_True; } - std::vector<rtl::OUString> aExchangeList; - pDoc->InsertBookmarkAsPage(aBookmarkList, aExchangeList, bLink, bReplace, + pDoc->InsertBookmarkAsPage(aBookmarkList, NULL, bLink, bReplace, nInsertPos, bNoDialogs, NULL, bCopy, sal_True, sal_True); if( !pDoc->pDocLockedInsertingLinks ) diff --git a/sd/source/ui/app/sdxfer.cxx b/sd/source/ui/app/sdxfer.cxx index 2f4c93f67d2c..fe168f7f73bf 100644 --- a/sd/source/ui/app/sdxfer.cxx +++ b/sd/source/ui/app/sdxfer.cxx @@ -724,9 +724,8 @@ void SdTransferable::SetPageBookmarks( const std::vector<rtl::OUString> &rPageBo if( bPersistent ) { - std::vector<rtl::OUString> aExchangeList; mpSdDrawDocument->CreateFirstPages(mpSourceDoc); - mpSdDrawDocument->InsertBookmarkAsPage( rPageBookmarks, aExchangeList, sal_False, sal_True, 1, sal_True, + mpSdDrawDocument->InsertBookmarkAsPage( rPageBookmarks, NULL, sal_False, sal_True, 1, sal_True, mpSourceDoc->GetDocSh(), sal_True, sal_True, sal_False ); } else diff --git a/sd/source/ui/func/fuinsfil.cxx b/sd/source/ui/func/fuinsfil.cxx index dce5dd67e2d1..624f309ccbdb 100644 --- a/sd/source/ui/func/fuinsfil.cxx +++ b/sd/source/ui/func/fuinsfil.cxx @@ -401,7 +401,7 @@ sal_Bool FuInsertFile::InsSDDinDrMode(SfxMedium* pMedium) bNameOK = mpView->GetExchangeList( aExchangeList, aBookmarkList, 0 ); if( bNameOK ) - bOK = mpDoc->InsertBookmarkAsPage( aBookmarkList, aExchangeList, + bOK = mpDoc->InsertBookmarkAsPage( aBookmarkList, &aExchangeList, bLink, bReplace, nPos, sal_False, NULL, sal_True, sal_True, sal_False ); diff --git a/sd/source/ui/slidesorter/controller/SlsClipboard.cxx b/sd/source/ui/slidesorter/controller/SlsClipboard.cxx index ec3ea1d2e435..0ff1eb0339a0 100644 --- a/sd/source/ui/slidesorter/controller/SlsClipboard.cxx +++ b/sd/source/ui/slidesorter/controller/SlsClipboard.cxx @@ -344,14 +344,13 @@ sal_Int32 Clipboard::PasteTransferable (sal_Int32 nInsertPosition) sal_Int32 nInsertPageCount (0); if (pClipTransferable->HasPageBookmarks()) { - std::vector<rtl::OUString> aExchangeList; const std::vector<rtl::OUString> &rBookmarkList = pClipTransferable->GetPageBookmarks(); const SolarMutexGuard aGuard; nInsertPageCount = (sal_uInt16) rBookmarkList.size(); rModel.GetDocument()->InsertBookmarkAsPage( rBookmarkList, - aExchangeList, + NULL, sal_False, sal_False, nInsertIndex, @@ -370,14 +369,13 @@ sal_Int32 Clipboard::PasteTransferable (sal_Int32 nInsertPosition) if (pDataDoc!=NULL && pDataDoc->GetSdPageCount(PK_STANDARD)) { - std::vector<rtl::OUString> aBookmarkList, aExchangeList; const SolarMutexGuard aGuard; bMergeMasterPages = (pDataDoc != rModel.GetDocument()); nInsertPageCount = pDataDoc->GetSdPageCount( PK_STANDARD ); rModel.GetDocument()->InsertBookmarkAsPage( - aBookmarkList, - aExchangeList, + std::vector<rtl::OUString>(), + NULL, sal_False, sal_False, nInsertIndex, diff --git a/sd/source/ui/view/ViewClipboard.cxx b/sd/source/ui/view/ViewClipboard.cxx index 2470adbfd40e..7c03b8c57a19 100644 --- a/sd/source/ui/view/ViewClipboard.cxx +++ b/sd/source/ui/view/ViewClipboard.cxx @@ -246,10 +246,9 @@ sal_uInt16 ViewClipboard::InsertSlides ( if( bWait ) pWin->LeaveWait(); - std::vector<rtl::OUString> aExchangeList; rDoc.InsertBookmarkAsPage( - *pBookmarkList, - aExchangeList, + pBookmarkList ? *pBookmarkList : std::vector<rtl::OUString>(), + NULL, sal_False, sal_False, nInsertPosition, |