diff options
author | Caolán McNamara <caolan.mcnamara@collabora.com> | 2024-07-09 09:19:05 +0100 |
---|---|---|
committer | Caolán McNamara <caolan.mcnamara@collabora.com> | 2024-07-09 18:19:19 +0200 |
commit | f675395370a81c5668a6b95c31aa1d2b5a3b4dac (patch) | |
tree | fdbef85425b0da7eff7c048aa8d6399980d8956e /sc/source/ui/dbgui/filtdlg.cxx | |
parent | 5cc0af1faa5496c7afcfd5984cfee0d8888769a3 (diff) |
cid#1558011 Use of auto that causes a copy
Change-Id: If828a232a28f87c0677f83e0cccf2e940c3339e7
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/170199
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Diffstat (limited to 'sc/source/ui/dbgui/filtdlg.cxx')
-rw-r--r-- | sc/source/ui/dbgui/filtdlg.cxx | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/sc/source/ui/dbgui/filtdlg.cxx b/sc/source/ui/dbgui/filtdlg.cxx index e238ff61a2ed..1382057b4524 100644 --- a/sc/source/ui/dbgui/filtdlg.cxx +++ b/sc/source/ui/dbgui/filtdlg.cxx @@ -670,11 +670,11 @@ void ScFilterDlg::UpdateColorList(size_t nList) maColorLbArr[nPos]->append(sId, OUString(), *pDev); } - auto aItem = rEntry.GetQueryItem(); - if (aItem.maColor == rColor - && ((sSelectedCondition == aStrFontColor && aItem.meType == ScQueryEntry::ByTextColor) + const auto& rItem = rEntry.GetQueryItem(); + if (rItem.maColor == rColor + && ((sSelectedCondition == aStrFontColor && rItem.meType == ScQueryEntry::ByTextColor) || (sSelectedCondition == aStrBackgroundColor - && aItem.meType == ScQueryEntry::ByBackgroundColor))) + && rItem.meType == ScQueryEntry::ByBackgroundColor))) { maColorLbArr[nPos]->set_active_id(sId); } |