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 /basctl/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 'basctl/source')
-rw-r--r-- | basctl/source/basicide/moduldl2.cxx | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/basctl/source/basicide/moduldl2.cxx b/basctl/source/basicide/moduldl2.cxx index 82189204bbaa..5f57528894ec 100644 --- a/basctl/source/basicide/moduldl2.cxx +++ b/basctl/source/basicide/moduldl2.cxx @@ -126,7 +126,7 @@ void LibLBoxString::Paint(const Point& rPos, SvTreeListBox& /*rDev*/, vcl::Rende { ScriptDocument aDocument(static_cast<LibUserData*>(rEntry.GetUserData())->GetDocument()); - OUString aLibName = static_cast<const SvLBoxString*>(rEntry.GetItem(1))->GetText(); + OUString aLibName = static_cast<const SvLBoxString&>(rEntry.GetItem(1)).GetText(); Reference<script::XLibraryContainer2> xModLibContainer(aDocument.getLibraryContainer(E_SCRIPTS), UNO_QUERY); Reference<script::XLibraryContainer2 > xDlgLibContainer(aDocument.getLibraryContainer(E_DIALOGS), UNO_QUERY); bReadOnly = (xModLibContainer.is() && xModLibContainer->hasByName(aLibName) && xModLibContainer->isLibraryReadOnly(aLibName)) @@ -251,8 +251,8 @@ void CheckBox::InitEntry(SvTreeListEntry* pEntry, const OUString& rTxt, sal_uInt16 nCount = pEntry->ItemCount(); for ( sal_uInt16 nCol = 1; nCol < nCount; ++nCol ) { - SvLBoxString* pCol = static_cast<SvLBoxString*>(pEntry->GetItem( nCol )); - LibLBoxString* pStr = new LibLBoxString( pEntry, 0, pCol->GetText() ); + SvLBoxString& rCol = static_cast<SvLBoxString&>(pEntry->GetItem( nCol )); + LibLBoxString* pStr = new LibLBoxString( pEntry, 0, rCol.GetText() ); pEntry->ReplaceItem( pStr, nCol ); } } |