summaryrefslogtreecommitdiff
path: root/sc/source
diff options
context:
space:
mode:
authorSamuel Mehrbrodt <samuel.mehrbrodt@allotropia.de>2021-05-11 11:52:30 +0200
committerSamuel Mehrbrodt <samuel.mehrbrodt@allotropia.de>2021-05-11 13:35:45 +0200
commit518d0d8283b6d732cffa102c6b7c2fe01d1ec348 (patch)
tree920db4c75a145a9cb83ab29145d3715eede494d3 /sc/source
parent0111565f560a4978ee664403ba86af1e72a2ba05 (diff)
tdf#76258 Skip color items in filter dialog for now
Change-Id: Iada39f065dbb9b975ada90bcc4135c39b9710def Reviewed-on: https://gerrit.libreoffice.org/c/core/+/115393 Tested-by: Jenkins Reviewed-by: Samuel Mehrbrodt <samuel.mehrbrodt@allotropia.de>
Diffstat (limited to 'sc/source')
-rw-r--r--sc/source/core/tool/queryentry.cxx20
-rw-r--r--sc/source/ui/dbgui/filtdlg.cxx9
2 files changed, 29 insertions, 0 deletions
diff --git a/sc/source/core/tool/queryentry.cxx b/sc/source/core/tool/queryentry.cxx
index 836b2caf7dd8..5853a9760c1d 100644
--- a/sc/source/core/tool/queryentry.cxx
+++ b/sc/source/core/tool/queryentry.cxx
@@ -128,6 +128,16 @@ void ScQueryEntry::SetQueryByTextColor(Color color)
rItem.maColor = color;
}
+bool ScQueryEntry::IsQueryByTextColor() const
+{
+ if (maQueryItems.size() != 1)
+ return false;
+
+ const Item& rItem = maQueryItems[0];
+ return eOp == SC_EQUAL &&
+ rItem.meType == ByTextColor;
+}
+
void ScQueryEntry::SetQueryByBackgroundColor(Color color)
{
eOp = SC_EQUAL;
@@ -139,6 +149,16 @@ void ScQueryEntry::SetQueryByBackgroundColor(Color color)
rItem.maColor = color;
}
+bool ScQueryEntry::IsQueryByBackgroundColor() const
+{
+ if (maQueryItems.size() != 1)
+ return false;
+
+ const Item& rItem = maQueryItems[0];
+ return eOp == SC_EQUAL &&
+ rItem.meType == ByBackgroundColor;
+}
+
ScQueryEntry::Item& ScQueryEntry::GetQueryItemImpl() const
{
if (maQueryItems.size() != 1)
diff --git a/sc/source/ui/dbgui/filtdlg.cxx b/sc/source/ui/dbgui/filtdlg.cxx
index 322c617aa2f9..db015dcaa268 100644
--- a/sc/source/ui/dbgui/filtdlg.cxx
+++ b/sc/source/ui/dbgui/filtdlg.cxx
@@ -233,6 +233,11 @@ void ScFilterDlg::Init( const SfxItemSet& rArgSet )
aValStr = aStrNotEmpty;
maCondLbArr[i]->set_sensitive(false);
}
+ else if (rEntry.IsQueryByTextColor() || rEntry.IsQueryByBackgroundColor())
+ {
+ // No support for color filters in filter dialog currently
+ continue;
+ }
else
{
const ScQueryEntry::Item& rItem = rEntry.GetQueryItem();
@@ -1247,6 +1252,10 @@ void ScFilterDlg::RefreshEditRow( size_t nOffset )
aValStr = aStrNotEmpty;
maCondLbArr[i]->set_sensitive(false);
}
+ else if (rEntry.IsQueryByTextColor() || rEntry.IsQueryByBackgroundColor())
+ {
+ continue;
+ }
else
{
SetValString(aQueryStr, rItem, aValStr);