[Libreoffice-commits] core.git: sw/source
Libreoffice Gerrit user
logerrit at kemper.freedesktop.org
Mon Oct 22 15:49:22 UTC 2018
sw/source/ui/dialog/uiregionsw.cxx | 14 +++++++-------
1 file changed, 7 insertions(+), 7 deletions(-)
New commits:
commit 7da3947535d1b3aac23b3d0a72e94396960ee751
Author: Caolán McNamara <caolanm at redhat.com>
AuthorDate: Mon Oct 22 15:23:26 2018 +0100
Commit: Caolán McNamara <caolanm at redhat.com>
CommitDate: Mon Oct 22 17:48:58 2018 +0200
pvs-studio: silence dodgy V763 Parameter always rewritten
Change-Id: I4939b77dd733a6502d9a4c8e04305764ce56f3b8
Reviewed-on: https://gerrit.libreoffice.org/62187
Reviewed-by: Caolán McNamara <caolanm at redhat.com>
Tested-by: Caolán McNamara <caolanm at redhat.com>
diff --git a/sw/source/ui/dialog/uiregionsw.cxx b/sw/source/ui/dialog/uiregionsw.cxx
index 008aa7869990..a08d180c859f 100644
--- a/sw/source/ui/dialog/uiregionsw.cxx
+++ b/sw/source/ui/dialog/uiregionsw.cxx
@@ -444,7 +444,7 @@ bool SwEditRegionDlg::CheckPasswd(CheckBox* pBox)
}
// recursively look for child-sections
-void SwEditRegionDlg::RecurseList( const SwSectionFormat* pFormat, SvTreeListEntry* pEntry )
+void SwEditRegionDlg::RecurseList(const SwSectionFormat* pFormat, SvTreeListEntry* pEntry)
{
SvTreeListEntry* pSelEntry = nullptr;
if (!pFormat)
@@ -461,13 +461,13 @@ void SwEditRegionDlg::RecurseList( const SwSectionFormat* pFormat, SvTreeListEnt
SwSection *pSect = pFormat->GetSection();
SectRepr* pSectRepr = new SectRepr( n, *pSect );
Image aImg = BuildBitmap( pSect->IsProtect(),pSect->IsHidden());
- pEntry = m_pTree->InsertEntry(pSect->GetSectionName(), aImg, aImg);
- pEntry->SetUserData(pSectRepr);
- RecurseList( pFormat, pEntry );
- if (pEntry->HasChildren())
- m_pTree->Expand(pEntry);
+ SvTreeListEntry* pNewEntry = m_pTree->InsertEntry(pSect->GetSectionName(), aImg, aImg);
+ pNewEntry->SetUserData(pSectRepr);
+ RecurseList( pFormat, pNewEntry );
+ if (pNewEntry->HasChildren())
+ m_pTree->Expand(pNewEntry);
if (pCurrSect==pSect)
- m_pTree->Select(pEntry);
+ m_pTree->Select(pNewEntry);
}
}
}
More information about the Libreoffice-commits
mailing list