diff options
author | Noel Grandin <noel@peralex.com> | 2015-07-03 11:31:14 +0200 |
---|---|---|
committer | Noel Grandin <noelgrandin@gmail.com> | 2015-07-06 07:04:50 +0000 |
commit | e9c3583c2cc27fc88ee81047c236ec99dd51e8de (patch) | |
tree | b3e8394ca1ec402a31b227339366fc790124c1f8 /sw/source/uibase/utlui | |
parent | 89c77994d4638c86635c70535fab6508e2f3d900 (diff) |
improve the returnbyref loplugin
Change-Id: I1b510a6194282dfa4a9001d473127c5ebc8b44eb
Reviewed-on: https://gerrit.libreoffice.org/16731
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
Diffstat (limited to 'sw/source/uibase/utlui')
-rw-r--r-- | sw/source/uibase/utlui/content.cxx | 14 | ||||
-rw-r--r-- | sw/source/uibase/utlui/glbltree.cxx | 4 |
2 files changed, 9 insertions, 9 deletions
diff --git a/sw/source/uibase/utlui/content.cxx b/sw/source/uibase/utlui/content.cxx index b81bc63c777f..388b8101bd35 100644 --- a/sw/source/uibase/utlui/content.cxx +++ b/sw/source/uibase/utlui/content.cxx @@ -427,7 +427,7 @@ void SwContentType::Init(bool* pbInvalidateWindow) { sTypeToken.clear(); nMemberCount = 0; - SwDrawModel* pModel = pWrtShell->getIDocumentDrawModelAccess()->GetDrawModel(); + SwDrawModel* pModel = pWrtShell->getIDocumentDrawModelAccess().GetDrawModel(); if(pModel) { SdrPage* pPage = pModel->GetPage(0); @@ -736,8 +736,8 @@ void SwContentType::FillMemberList(bool* pbLevelOrVisibilityChanged) else if(!pMember->empty()) pMember->DeleteAndDestroyAll(); - IDocumentDrawModelAccess* pIDDMA = pWrtShell->getIDocumentDrawModelAccess(); - SwDrawModel* pModel = pIDDMA->GetDrawModel(); + IDocumentDrawModelAccess& rIDDMA = pWrtShell->getIDocumentDrawModelAccess(); + SwDrawModel* pModel = rIDDMA.GetDrawModel(); if(pModel) { SdrPage* pPage = pModel->GetPage(0); @@ -757,7 +757,7 @@ void SwContentType::FillMemberList(bool* pbLevelOrVisibilityChanged) this, pTemp->GetName(), nYPos); - if(!pIDDMA->IsVisibleLayerId(pTemp->GetLayer())) + if(!rIDDMA.IsVisibleLayerId(pTemp->GetLayer())) pCnt->SetInvisible(); pMember->insert(pCnt); nMemberCount++; @@ -3367,7 +3367,7 @@ void SwContentTree::GotoContent(SwContent* pCnt) { pDrawView->SdrEndTextEdit(); pDrawView->UnmarkAll(); - SwDrawModel* _pModel = pActiveShell->getIDocumentDrawModelAccess()->GetDrawModel(); + SwDrawModel* _pModel = pActiveShell->getIDocumentDrawModelAccess().GetDrawModel(); SdrPage* pPage = _pModel->GetPage(0); const size_t nCount = pPage->GetObjCount(); for( size_t i=0; i<nCount; ++i ) @@ -3460,8 +3460,8 @@ void SwContentTree::InitEntry(SvTreeListEntry* pEntry, { const size_t nColToHilite = 1; //0==Bitmap;1=="Column1";2=="Column2" SvTreeListBox::InitEntry( pEntry, rStr, rImg1, rImg2, eButtonKind ); - SvLBoxString* pCol = static_cast<SvLBoxString*>(pEntry->GetItem( nColToHilite )); - SwContentLBoxString* pStr = new SwContentLBoxString( pEntry, 0, pCol->GetText() ); + SvLBoxString& rCol = static_cast<SvLBoxString&>(pEntry->GetItem( nColToHilite )); + SwContentLBoxString* pStr = new SwContentLBoxString( pEntry, 0, rCol.GetText() ); pEntry->ReplaceItem( pStr, nColToHilite ); } diff --git a/sw/source/uibase/utlui/glbltree.cxx b/sw/source/uibase/utlui/glbltree.cxx index 42131fa4279d..8b2c4d39ec99 100644 --- a/sw/source/uibase/utlui/glbltree.cxx +++ b/sw/source/uibase/utlui/glbltree.cxx @@ -1232,8 +1232,8 @@ void SwGlobalTree::InitEntry(SvTreeListEntry* pEntry, { const size_t nColToHilite = 1; //0==Bitmap;1=="Column1";2=="Column2" SvTreeListBox::InitEntry( pEntry, rStr, rImg1, rImg2, eButtonKind ); - SvLBoxString* pCol = static_cast<SvLBoxString*>(pEntry->GetItem( nColToHilite )); - SwLBoxString* pStr = new SwLBoxString( pEntry, 0, pCol->GetText() ); + SvLBoxString& rCol = static_cast<SvLBoxString&>(pEntry->GetItem( nColToHilite )); + SwLBoxString* pStr = new SwLBoxString( pEntry, 0, rCol.GetText() ); pEntry->ReplaceItem( pStr, nColToHilite ); } |