From 517e5d1e3339133c3a91d801fdb85f1d70057883 Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Thu, 30 Jul 2015 14:23:47 +0200 Subject: fix tdf#92861, AutoCorrect Options checkboxes do not work caused by commit e9c3583c2cc27fc88ee81047c236ec99dd51e8de "improve the returnbyref loplugin" Change-Id: Ib8703e06e2f150538cdffcd08deca9c841e824b4 --- svtools/source/contnr/treelistbox.cxx | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'svtools') diff --git a/svtools/source/contnr/treelistbox.cxx b/svtools/source/contnr/treelistbox.cxx index 2619b86d245c..c30e62d8e4ee 100644 --- a/svtools/source/contnr/treelistbox.cxx +++ b/svtools/source/contnr/treelistbox.cxx @@ -2719,7 +2719,7 @@ void SvTreeListBox::ImplEditEntry( SvTreeListEntry* pEntry ) nTabPos = pTab->GetPos(); if( !bIsMouseTriggered || (nClickX > nTabPos && (nNextTabPos == -1 || nClickX < nNextTabPos ) ) ) { - pItem = &static_cast( rTmpItem ); + pItem = static_cast( &rTmpItem ); break; } } @@ -3281,7 +3281,7 @@ SvLBoxItem* SvTreeListBox::GetItem_Impl( SvTreeListEntry* pEntry, long nX, sal_uInt16 nTabCount = aTabs.size(); sal_uInt16 nItemCount = pEntry->ItemCount(); SvLBoxTab* pTab = aTabs.front(); - SvLBoxItem& rItem = pEntry->GetItem(0); + SvLBoxItem* pItem = &pEntry->GetItem(0); sal_uInt16 nNextItem = 1; nX -= GetMapMode().GetOrigin().X(); long nRealWidth = pImp->GetOutputSize().Width(); @@ -3302,7 +3302,7 @@ SvLBoxItem* SvTreeListBox::GetItem_Impl( SvTreeListEntry* pEntry, long nX, nNextTabPos += 50; } - Size aItemSize( rItem.GetSize(this, pEntry)); + Size aItemSize( pItem->GetSize(this, pEntry)); nStart += pTab->CalcOffset( aItemSize.Width(), nNextTabPos - nStart ); long nLen = aItemSize.Width(); if( pNextTab ) @@ -3317,7 +3317,7 @@ SvLBoxItem* SvTreeListBox::GetItem_Impl( SvTreeListEntry* pEntry, long nX, if( nX >= nStart && nX < (nStart+nLen ) ) { - pItemClicked = &rItem; + pItemClicked = pItem; if( ppTab ) { *ppTab = pTab; @@ -3327,7 +3327,7 @@ SvLBoxItem* SvTreeListBox::GetItem_Impl( SvTreeListEntry* pEntry, long nX, if( nNextItem >= nItemCount || nNextItem >= nTabCount) break; pTab = aTabs[ nNextItem ]; - rItem = pEntry->GetItem( nNextItem ); + pItem = &pEntry->GetItem( nNextItem ); nNextItem++; } return pItemClicked; -- cgit