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 /dbaccess/source | |
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 'dbaccess/source')
-rw-r--r-- | dbaccess/source/ui/browser/dsEntriesNoExp.cxx | 10 | ||||
-rw-r--r-- | dbaccess/source/ui/control/tabletree.cxx | 10 |
2 files changed, 10 insertions, 10 deletions
diff --git a/dbaccess/source/ui/browser/dsEntriesNoExp.cxx b/dbaccess/source/ui/browser/dsEntriesNoExp.cxx index 50d477d68625..85630214bb10 100644 --- a/dbaccess/source/ui/browser/dsEntriesNoExp.cxx +++ b/dbaccess/source/ui/browser/dsEntriesNoExp.cxx @@ -231,14 +231,14 @@ void SbaTableQueryBrowser::notifyHiContrastChanged() sal_uInt16 nCount = pEntryLoop->ItemCount(); for (sal_uInt16 i=0;i<nCount;++i) { - SvLBoxItem* pItem = pEntryLoop->GetItem(i); - if (!pItem || pItem->GetType() != SV_ITEM_ID_LBOXCONTEXTBMP) + SvLBoxItem& rItem = pEntryLoop->GetItem(i); + if (rItem.GetType() != SV_ITEM_ID_LBOXCONTEXTBMP) continue; - SvLBoxContextBmp* pContextBitmapItem = static_cast< SvLBoxContextBmp* >( pItem ); + SvLBoxContextBmp& rContextBitmapItem = static_cast< SvLBoxContextBmp& >( rItem ); - pContextBitmapItem->SetBitmap1( aImage ); - pContextBitmapItem->SetBitmap2( aImage ); + rContextBitmapItem.SetBitmap1( aImage ); + rContextBitmapItem.SetBitmap2( aImage ); break; } diff --git a/dbaccess/source/ui/control/tabletree.cxx b/dbaccess/source/ui/control/tabletree.cxx index ed0083b5b56b..352b85c945ba 100644 --- a/dbaccess/source/ui/control/tabletree.cxx +++ b/dbaccess/source/ui/control/tabletree.cxx @@ -112,10 +112,10 @@ void OTableTreeListBox::notifyHiContrastChanged() size_t nCount = pEntryLoop->ItemCount(); for (size_t i=0;i<nCount;++i) { - SvLBoxItem* pItem = pEntryLoop->GetItem(i); - if (pItem && pItem->GetType() == SV_ITEM_ID_LBOXCONTEXTBMP) + SvLBoxItem& rItem = pEntryLoop->GetItem(i); + if (rItem.GetType() == SV_ITEM_ID_LBOXCONTEXTBMP) { - SvLBoxContextBmp* pContextBitmapItem = static_cast< SvLBoxContextBmp* >( pItem ); + SvLBoxContextBmp& rContextBitmapItem = static_cast< SvLBoxContextBmp& >( rItem ); Image aImage; if ( isFolderEntry( pEntryLoop ) ) @@ -128,8 +128,8 @@ void OTableTreeListBox::notifyHiContrastChanged() m_xImageProvider->getImages( sCompleteName, DatabaseObject::TABLE, aImage ); } - pContextBitmapItem->SetBitmap1( aImage ); - pContextBitmapItem->SetBitmap2( aImage ); + rContextBitmapItem.SetBitmap1( aImage ); + rContextBitmapItem.SetBitmap2( aImage ); break; } } |