no need to do repeated lookups here
Change-Id: Iec30aa6bbd1bcb8bb22cfb002f81ea04458755b6 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/178116 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Jenkins
This commit is contained in:
parent
0892ff2de0
commit
ba16fd8e74
1 changed files with 7 additions and 5 deletions
|
@ -1357,12 +1357,14 @@ void SwTextPaintInfo::DrawCSDFHighlighting(const SwLinePortion &rPor) const
|
|||
OUString sCharStyleDisplayName;
|
||||
sCharStyleDisplayName = SwStyleNameMapper::GetUIName(sCurrentCharStyle,
|
||||
SwGetPoolIdFromName::ChrFmt);
|
||||
if (!sCharStyleDisplayName.isEmpty()
|
||||
&& rCharStylesColorMap.find(sCharStyleDisplayName)
|
||||
!= rCharStylesColorMap.end())
|
||||
if (!sCharStyleDisplayName.isEmpty())
|
||||
{
|
||||
aFillColor = rCharStylesColorMap[sCharStyleDisplayName].first;
|
||||
sCSNumberOrDF = OUString::number(rCharStylesColorMap[sCharStyleDisplayName].second);
|
||||
auto it = rCharStylesColorMap.find(sCharStyleDisplayName);
|
||||
if (it != rCharStylesColorMap.end())
|
||||
{
|
||||
aFillColor = it->second.first;
|
||||
sCSNumberOrDF = OUString::number(it->second.second);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue