tdf#82008 - Index the widget arrays by row and not by query entry

Change-Id: I53933c26f92b050562bdbdb58b2806e44e8d0971
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/211147
Tested-by: Jenkins
Reviewed-by: Andreas Heinisch <andreas.heinisch@yahoo.de>
This commit is contained in:
Andreas Heinisch
2026-09-18 16:11:53 +02:00
parent 643aab12aa
commit 397519e8d8
+10 -12
View File
@@ -1051,31 +1051,29 @@ IMPL_LINK(ScFilterDlg, LbSelectHdl, weld::ComboBox&, rLb, void)
else if (&rLb == m_xLbColor1.get() || &rLb == m_xLbColor2.get() || &rLb == m_xLbColor3.get()
|| &rLb == m_xLbColor4.get())
{
sal_uInt16 nQ = 0;
if (&rLb == m_xLbColor1.get())
// Index the widget arrays by the visible row and not by the query entry
sal_uInt16 nRow = 0;
if (&rLb == m_xLbColor2.get())
{
nQ = nOffset;
}
else if (&rLb == m_xLbColor2.get())
{
nQ = 1 + nOffset;
nRow = 1;
}
else if (&rLb == m_xLbColor3.get())
{
nQ = 2 + nOffset;
nRow = 2;
}
else if (&rLb == m_xLbColor4.get())
{
nQ = 3 + nOffset;
nRow = 3;
}
const sal_uInt16 nQ = nRow + nOffset;
ScQueryEntry& aEntry = theQueryData.GetEntry(nQ);
Color aColor = Color::STRtoRGB(maColorLbArr[nQ]->get_active_id());
if (maCondLbArr[nQ]->get_active_text() == aStrFontColor)
Color aColor = Color::STRtoRGB(rLb.get_active_id());
if (maCondLbArr[nRow]->get_active_text() == aStrFontColor)
{
aEntry.SetQueryByTextColor(aColor);
}
else if (maCondLbArr[nQ]->get_active_text() == aStrBackgroundColor)
else if (maCondLbArr[nRow]->get_active_text() == aStrBackgroundColor)
{
aEntry.SetQueryByBackgroundColor(aColor);
}