summaryrefslogtreecommitdiff
path: root/sc/source/core/tool/queryentry.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'sc/source/core/tool/queryentry.cxx')
-rw-r--r--sc/source/core/tool/queryentry.cxx20
1 files changed, 20 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)