summaryrefslogtreecommitdiff
path: root/svx/source
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2015-07-03 11:31:14 +0200
committerNoel Grandin <noelgrandin@gmail.com>2015-07-06 07:04:50 +0000
commite9c3583c2cc27fc88ee81047c236ec99dd51e8de (patch)
treeb3e8394ca1ec402a31b227339366fc790124c1f8 /svx/source
parent89c77994d4638c86635c70535fab6508e2f3d900 (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 'svx/source')
-rw-r--r--svx/source/dialog/docrecovery.cxx4
-rw-r--r--svx/source/inc/svdobjuserdatalist.hxx2
-rw-r--r--svx/source/svdraw/svdobj.cxx2
-rw-r--r--svx/source/svdraw/svdobjplusdata.cxx2
-rw-r--r--svx/source/svdraw/svdobjuserdatalist.cxx4
-rw-r--r--svx/source/unodialogs/textconversiondlgs/chinese_dictionarydialog.cxx2
6 files changed, 8 insertions, 8 deletions
diff --git a/svx/source/dialog/docrecovery.cxx b/svx/source/dialog/docrecovery.cxx
index ab68137adf47..7b9d2fea288a 100644
--- a/svx/source/dialog/docrecovery.cxx
+++ b/svx/source/dialog/docrecovery.cxx
@@ -847,8 +847,8 @@ void RecovDocList::InitEntry(SvTreeListEntry* pEntry,
SvTabListBox::InitEntry(pEntry, rText, rImage1, rImage2, eButtonKind);
DBG_ASSERT( TabCount() == 2, "*RecovDocList::InitEntry(): structure missmatch" );
- SvLBoxString* pCol = static_cast<SvLBoxString*>(pEntry->GetItem(2));
- RecovDocListEntry* p = new RecovDocListEntry(pEntry, 0, pCol->GetText());
+ SvLBoxString& rCol = static_cast<SvLBoxString&>(pEntry->GetItem(2));
+ RecovDocListEntry* p = new RecovDocListEntry(pEntry, 0, rCol.GetText());
pEntry->ReplaceItem(p, 2);
}
diff --git a/svx/source/inc/svdobjuserdatalist.hxx b/svx/source/inc/svdobjuserdatalist.hxx
index b13b640fa310..e40e4b9908e5 100644
--- a/svx/source/inc/svdobjuserdatalist.hxx
+++ b/svx/source/inc/svdobjuserdatalist.hxx
@@ -26,7 +26,7 @@ public:
~SdrObjUserDataList();
size_t GetUserDataCount() const;
- SdrObjUserData* GetUserData(size_t nNum);
+ SdrObjUserData& GetUserData(size_t nNum);
void AppendUserData(SdrObjUserData* pData);
void DeleteUserData(size_t nNum);
};
diff --git a/svx/source/svdraw/svdobj.cxx b/svx/source/svdraw/svdobj.cxx
index 9bf94f7fe8eb..d00a5036a457 100644
--- a/svx/source/svdraw/svdobj.cxx
+++ b/svx/source/svdraw/svdobj.cxx
@@ -2765,7 +2765,7 @@ sal_uInt16 SdrObject::GetUserDataCount() const
SdrObjUserData* SdrObject::GetUserData(sal_uInt16 nNum) const
{
if (pPlusData==NULL || pPlusData->pUserDataList==NULL) return NULL;
- return pPlusData->pUserDataList->GetUserData(nNum);
+ return &pPlusData->pUserDataList->GetUserData(nNum);
}
void SdrObject::AppendUserData(SdrObjUserData* pData)
diff --git a/svx/source/svdraw/svdobjplusdata.cxx b/svx/source/svdraw/svdobjplusdata.cxx
index e9d069600aee..6fbc5cf8ec22 100644
--- a/svx/source/svdraw/svdobjplusdata.cxx
+++ b/svx/source/svdraw/svdobjplusdata.cxx
@@ -36,7 +36,7 @@ SdrObjPlusData* SdrObjPlusData::Clone(SdrObject* pObj1) const
if (nCount!=0) {
pNeuPlusData->pUserDataList=new SdrObjUserDataList;
for (sal_uInt16 i=0; i<nCount; i++) {
- SdrObjUserData* pNeuUserData=pUserDataList->GetUserData(i)->Clone(pObj1);
+ SdrObjUserData* pNeuUserData=pUserDataList->GetUserData(i).Clone(pObj1);
if (pNeuUserData!=NULL) {
pNeuPlusData->pUserDataList->AppendUserData(pNeuUserData);
} else {
diff --git a/svx/source/svdraw/svdobjuserdatalist.cxx b/svx/source/svdraw/svdobjuserdatalist.cxx
index c7d24ddb8a58..59d727fef4c1 100644
--- a/svx/source/svdraw/svdobjuserdatalist.cxx
+++ b/svx/source/svdraw/svdobjuserdatalist.cxx
@@ -17,9 +17,9 @@ size_t SdrObjUserDataList::GetUserDataCount() const
return maList.size();
}
-SdrObjUserData* SdrObjUserDataList::GetUserData(size_t nNum)
+SdrObjUserData& SdrObjUserDataList::GetUserData(size_t nNum)
{
- return &maList.at(nNum);
+ return maList.at(nNum);
}
void SdrObjUserDataList::AppendUserData(SdrObjUserData* pData)
diff --git a/svx/source/unodialogs/textconversiondlgs/chinese_dictionarydialog.cxx b/svx/source/unodialogs/textconversiondlgs/chinese_dictionarydialog.cxx
index 6993716536d7..38b007fa8dc0 100644
--- a/svx/source/unodialogs/textconversiondlgs/chinese_dictionarydialog.cxx
+++ b/svx/source/unodialogs/textconversiondlgs/chinese_dictionarydialog.cxx
@@ -334,7 +334,7 @@ SvLBoxItem* DictionaryList::getItemAtColumn( SvTreeListEntry* pEntry, sal_uInt16
if( nTreeFlags & SvTreeFlags::CHKBTN )
nColumn++;
if( nColumn < nCount )
- pItem = pEntry->GetItem( nColumn );
+ pItem = &pEntry->GetItem( nColumn );
}
return pItem;
}