diff options
author | Noel Grandin <noel@peralex.com> | 2016-04-25 09:59:16 +0200 |
---|---|---|
committer | Noel Grandin <noelgrandin@gmail.com> | 2016-04-26 10:55:58 +0000 |
commit | e8fd5a07eca70912ddee45aaa34d434809b59fb7 (patch) | |
tree | d5dc890d12987cad73f5e64301f823ba23a97f2d /cui | |
parent | e6adb3e8b4de3c0f78d249b83de19b849ef65b59 (diff) |
update loplugin stylepolice to check local pointers vars
are actually pointer vars.
Also convert from regex to normal code, so we can enable this
plugin all the time.
Change-Id: Ie36a25ecba61c18f99c77c77646d6459a443cbd1
Reviewed-on: https://gerrit.libreoffice.org/24391
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
Diffstat (limited to 'cui')
-rw-r--r-- | cui/source/options/personalization.cxx | 10 | ||||
-rw-r--r-- | cui/source/options/treeopt.cxx | 15 |
2 files changed, 11 insertions, 14 deletions
diff --git a/cui/source/options/personalization.cxx b/cui/source/options/personalization.cxx index 799da445cfc5..d7816883cfa1 100644 --- a/cui/source/options/personalization.cxx +++ b/cui/source/options/personalization.cxx @@ -131,11 +131,11 @@ IMPL_LINK_TYPED( SelectPersonaDialog, SearchPersonas, Button*, pButton, void ) searchTerm = m_pEdit->GetText(); else { - for(VclPtr<PushButton> & m_vSearchSuggestion : m_vSearchSuggestions) + for(VclPtr<PushButton> & i : m_vSearchSuggestions) { - if( pButton == m_vSearchSuggestion ) + if( pButton == i ) { - searchTerm = m_vSearchSuggestion->GetDisplayText(); + searchTerm = i->GetDisplayText(); break; } } @@ -288,8 +288,8 @@ void SvxPersonalizationTabPage::dispose() m_pDefaultPersona.clear(); m_pOwnPersona.clear(); m_pSelectPersona.clear(); - for (VclPtr<PushButton> & m_vDefaultPersonaImage : m_vDefaultPersonaImages) - m_vDefaultPersonaImage.clear(); + for (VclPtr<PushButton> & i : m_vDefaultPersonaImages) + i.clear(); m_pExtensionPersonaPreview.clear(); m_pPersonaList.clear(); m_pExtensionLabel.clear(); diff --git a/cui/source/options/treeopt.cxx b/cui/source/options/treeopt.cxx index 1450f6798607..6cf6e03deea8 100644 --- a/cui/source/options/treeopt.cxx +++ b/cui/source/options/treeopt.cxx @@ -1997,21 +1997,18 @@ VectorOfNodes OfaTreeOptionsDialog::LoadNodes( bool bAlreadyOpened = false; if ( pNode->m_aGroupedLeaves.size() > 0 ) { - for (std::vector<OptionsLeaf*> & m_aGroupedLeave : pNode->m_aGroupedLeaves) + for (std::vector<OptionsLeaf*> & rGroup : pNode->m_aGroupedLeaves) { - if ( m_aGroupedLeave.size() > 0 && - m_aGroupedLeave[0]->m_sGroupId - == sLeafGrpId ) + if ( rGroup.size() > 0 && + rGroup[0]->m_sGroupId == sLeafGrpId ) { sal_uInt32 l = 0; - for ( ; l < m_aGroupedLeave.size(); ++l ) + for ( ; l < rGroup.size(); ++l ) { - if ( m_aGroupedLeave[l]-> - m_nGroupIndex >= nLeafGrpIdx ) + if ( rGroup[l]->m_nGroupIndex >= nLeafGrpIdx ) break; } - m_aGroupedLeave.insert( - m_aGroupedLeave.begin() + l, pLeaf ); + rGroup.insert( rGroup.begin() + l, pLeaf ); bAlreadyOpened = true; break; } |