summaryrefslogtreecommitdiff
path: root/sc/source/core
diff options
context:
space:
mode:
Diffstat (limited to 'sc/source/core')
-rw-r--r--sc/source/core/data/column3.cxx8
-rw-r--r--sc/source/core/data/table3.cxx20
2 files changed, 12 insertions, 16 deletions
diff --git a/sc/source/core/data/column3.cxx b/sc/source/core/data/column3.cxx
index 5fd4a5965586..eef630c6f297 100644
--- a/sc/source/core/data/column3.cxx
+++ b/sc/source/core/data/column3.cxx
@@ -2432,12 +2432,12 @@ class FilterEntriesHandler
const SvxBrushItem* pBrush = rColumn.GetDoc().GetAttr(aPos, ATTR_BACKGROUND);
Color backgroundColor = pBrush->GetColor();
+ mrFilterEntries.addTextColor(textColor);
+ mrFilterEntries.addBackgroundColor(backgroundColor);
if (rCell.hasString())
{
mrFilterEntries.push_back(ScTypedStrData(aStr));
- mrFilterEntries.addTextColor(textColor);
- mrFilterEntries.addBackgroundColor(backgroundColor);
return;
}
@@ -2460,8 +2460,6 @@ class FilterEntriesHandler
if (!aErr.isEmpty())
{
mrFilterEntries.push_back(ScTypedStrData(aErr));
- mrFilterEntries.addTextColor(textColor);
- mrFilterEntries.addBackgroundColor(backgroundColor);
return;
}
}
@@ -2499,8 +2497,6 @@ class FilterEntriesHandler
to avoid duplicates in the filter lists with setting the mbIsFormatted */
bool bFormFiltVal = mrColumn.HasFiltering() && nFormat;
mrFilterEntries.push_back(ScTypedStrData(aStr, fVal, ScTypedStrData::Value, bDate, bFormFiltVal));
- mrFilterEntries.addTextColor(textColor);
- mrFilterEntries.addBackgroundColor(backgroundColor);
}
public:
diff --git a/sc/source/core/data/table3.cxx b/sc/source/core/data/table3.cxx
index dcc76104280b..54c0850931ee 100644
--- a/sc/source/core/data/table3.cxx
+++ b/sc/source/core/data/table3.cxx
@@ -2817,31 +2817,31 @@ bool ScTable::ValidQuery(
{
for (const auto& rItem : rItems)
{
- if (aEval.isQueryByValue(rItem, nCol, nRow, aCell))
+ if (rItem.meType == ScQueryEntry::ByTextColor)
{
- std::pair<bool,bool> aThisRes =
- aEval.compareByValue(aCell, nCol, nRow, rEntry, rItem, pContext);
+ std::pair<bool, bool> aThisRes
+ = aEval.compareByTextColor(nCol, nRow, nTab, rItem);
aRes.first |= aThisRes.first;
aRes.second |= aThisRes.second;
}
- else if (aEval.isQueryByString(rEntry, rItem, nCol, nRow, aCell))
+ else if (rItem.meType == ScQueryEntry::ByBackgroundColor)
{
std::pair<bool,bool> aThisRes =
- aEval.compareByString(aCell, nRow, rEntry, rItem, pContext);
+ aEval.compareByBackgroundColor(nCol, nRow, nTab, rItem);
aRes.first |= aThisRes.first;
aRes.second |= aThisRes.second;
}
- if (rItem.meType == ScQueryEntry::ByTextColor)
+ else if (aEval.isQueryByValue(rItem, nCol, nRow, aCell))
{
- std::pair<bool, bool> aThisRes
- = aEval.compareByTextColor(nCol, nRow, nTab, rItem);
+ std::pair<bool,bool> aThisRes =
+ aEval.compareByValue(aCell, nCol, nRow, rEntry, rItem, pContext);
aRes.first |= aThisRes.first;
aRes.second |= aThisRes.second;
}
- if (rItem.meType == ScQueryEntry::ByBackgroundColor)
+ else if (aEval.isQueryByString(rEntry, rItem, nCol, nRow, aCell))
{
std::pair<bool,bool> aThisRes =
- aEval.compareByBackgroundColor(nCol, nRow, nTab, rItem);
+ aEval.compareByString(aCell, nRow, rEntry, rItem, pContext);
aRes.first |= aThisRes.first;
aRes.second |= aThisRes.second;
}