diff options
author | Ivan Timofeev <timofeev.i.s@gmail.com> | 2012-02-01 19:58:05 +0400 |
---|---|---|
committer | Ivan Timofeev <timofeev.i.s@gmail.com> | 2012-02-01 20:00:29 +0400 |
commit | bc8fa08a7ae48f68ee5578cb7820336c70898202 (patch) | |
tree | 470f439b2e5e72c629fd238428fe6a97855e1ba8 /sd/source/ui/view/ViewClipboard.cxx | |
parent | a31acd6b405777aa3ccb7298fabbe8b4aba55a32 (diff) |
pointer -> reference
Diffstat (limited to 'sd/source/ui/view/ViewClipboard.cxx')
-rw-r--r-- | sd/source/ui/view/ViewClipboard.cxx | 20 |
1 files changed, 9 insertions, 11 deletions
diff --git a/sd/source/ui/view/ViewClipboard.cxx b/sd/source/ui/view/ViewClipboard.cxx index 2f65a8a9815d..d535122f9bab 100644 --- a/sd/source/ui/view/ViewClipboard.cxx +++ b/sd/source/ui/view/ViewClipboard.cxx @@ -150,9 +150,7 @@ void ViewClipboard::AssignMasterPage ( if (pPage == NULL) return; - SdDrawDocument* pDocument = mrView.GetDoc(); - if (pDocument == NULL) - return; + SdDrawDocument& rDocument = mrView.GetDoc(); if ( ! rTransferable.HasPageBookmarks()) return; @@ -175,7 +173,7 @@ void ViewClipboard::AssignMasterPage ( sLayoutSuffix)) sLayoutName = String(sLayoutName, 0, sLayoutName.Len()-nLength); - pDocument->SetMasterPage ( + rDocument.SetMasterPage ( pPage->GetPageNum() / 2, sLayoutName, pSourceDocument, @@ -190,15 +188,15 @@ void ViewClipboard::AssignMasterPage ( sal_uInt16 ViewClipboard::DetermineInsertPosition ( const SdTransferable& ) { - SdDrawDocument* pDoc = mrView.GetDoc(); - sal_uInt16 nPgCnt = pDoc->GetSdPageCount( PK_STANDARD ); + SdDrawDocument& rDoc = mrView.GetDoc(); + sal_uInt16 nPgCnt = rDoc.GetSdPageCount( PK_STANDARD ); // Insert position is the behind the last selected page or behind the // last page when the selection is empty. - sal_uInt16 nInsertPos = pDoc->GetSdPageCount( PK_STANDARD ) * 2 + 1; + sal_uInt16 nInsertPos = rDoc.GetSdPageCount( PK_STANDARD ) * 2 + 1; for( sal_uInt16 nPage = 0; nPage < nPgCnt; nPage++ ) { - SdPage* pPage = pDoc->GetSdPage( nPage, PK_STANDARD ); + SdPage* pPage = rDoc.GetSdPage( nPage, PK_STANDARD ); if( pPage->IsSelected() ) nInsertPos = nPage * 2 + 3; @@ -214,10 +212,10 @@ sal_uInt16 ViewClipboard::InsertSlides ( const SdTransferable& rTransferable, sal_uInt16 nInsertPosition) { - SdDrawDocument* pDoc = mrView.GetDoc(); + SdDrawDocument& rDoc = mrView.GetDoc(); sal_uInt16 nInsertPgCnt = 0; - sal_Bool bMergeMasterPages = !rTransferable.HasSourceDoc( pDoc ); + sal_Bool bMergeMasterPages = !rTransferable.HasSourceDoc( &rDoc ); // Prepare the insertion. const List* pBookmarkList; @@ -250,7 +248,7 @@ sal_uInt16 ViewClipboard::InsertSlides ( if( bWait ) pWin->LeaveWait(); - pDoc->InsertBookmarkAsPage( + rDoc.InsertBookmarkAsPage( const_cast<List*>(pBookmarkList), NULL, sal_False, |