summaryrefslogtreecommitdiff
path: root/chart2/source/controller/dialogs/DialogModel.cxx
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2017-10-31 15:26:23 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2017-11-01 07:13:02 +0100
commit1a284d1f98069f55d5211882431f516691c2a6f0 (patch)
treee1f8d14a6499c928f1612361a3f296542f670f80 /chart2/source/controller/dialogs/DialogModel.cxx
parent8c9b5a901dcbb430bbf225ed0a2d7a286b1d5185 (diff)
loplugin:constantparam in c*
Change-Id: I10c7b62e6458062324367b94b207f776af79f598 Reviewed-on: https://gerrit.libreoffice.org/44129 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'chart2/source/controller/dialogs/DialogModel.cxx')
-rw-r--r--chart2/source/controller/dialogs/DialogModel.cxx26
1 files changed, 5 insertions, 21 deletions
diff --git a/chart2/source/controller/dialogs/DialogModel.cxx b/chart2/source/controller/dialogs/DialogModel.cxx
index 2efc9f77db44..752908ec9c89 100644
--- a/chart2/source/controller/dialogs/DialogModel.cxx
+++ b/chart2/source/controller/dialogs/DialogModel.cxx
@@ -67,7 +67,7 @@ struct lcl_ChartTypeToSeriesCnt
}
};
-OUString lcl_ConvertRole( const OUString & rRoleString, bool bFromInternalToUI )
+OUString lcl_ConvertRole( const OUString & rRoleString )
{
OUString aResult( rRoleString );
@@ -95,27 +95,11 @@ OUString lcl_ConvertRole( const OUString & rRoleString, bool bFromInternalToUI )
aTranslationMap[ "BorderColor" ] = ::chart::SchResId( STR_PROPERTY_ROLE_BORDERCOLOR );
}
- if( bFromInternalToUI )
+ tTranslationMap::const_iterator aIt( aTranslationMap.find( rRoleString ));
+ if( aIt != aTranslationMap.end())
{
- tTranslationMap::const_iterator aIt( aTranslationMap.find( rRoleString ));
- if( aIt != aTranslationMap.end())
- {
- aResult = (*aIt).second;
- }
- }
- else
- {
- tTranslationMap::const_iterator aIt(
- std::find_if( aTranslationMap.begin(), aTranslationMap.end(),
- [&rRoleString]
- ( const tTranslationMap::value_type& cp )
- { return rRoleString == cp.second; } )
- );
-
- if( aIt != aTranslationMap.end())
- aResult = (*aIt).first;
+ aResult = (*aIt).second;
}
-
return aResult;
}
@@ -750,7 +734,7 @@ void DialogModel::setTimeBasedRange( bool bTimeBased, sal_Int32 nStart, sal_Int3
OUString DialogModel::ConvertRoleFromInternalToUI( const OUString & rRoleString )
{
- return lcl_ConvertRole( rRoleString, true );
+ return lcl_ConvertRole( rRoleString );
}
OUString DialogModel::GetRoleDataLabel()