[Libreoffice-commits] core.git: Branch 'distro/lhm/libreoffice-6-4+backports' - sc/inc sc/source
Samuel Mehrbrodt (via logerrit)
logerrit at kemper.freedesktop.org
Mon Jun 28 07:57:07 UTC 2021
sc/inc/queryentry.hxx | 2 ++
sc/source/core/tool/queryentry.cxx | 19 +++++++++++++++++++
sc/source/ui/dbgui/filtdlg.cxx | 9 +++++++++
3 files changed, 30 insertions(+)
New commits:
commit ecffe9d86ac942c970b92c4f4e76dd44834ce88f
Author: Samuel Mehrbrodt <samuel.mehrbrodt at allotropia.de>
AuthorDate: Tue May 11 11:52:30 2021 +0200
Commit: Thorsten Behrens <thorsten.behrens at allotropia.de>
CommitDate: Mon Jun 28 09:56:33 2021 +0200
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 at allotropia.de>
(cherry picked from commit 518d0d8283b6d732cffa102c6b7c2fe01d1ec348)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/116601
Tested-by: Thorsten Behrens <thorsten.behrens at allotropia.de>
Reviewed-by: Thorsten Behrens <thorsten.behrens at allotropia.de>
diff --git a/sc/inc/queryentry.hxx b/sc/inc/queryentry.hxx
index 848e55c3016d..4ded8551a342 100644
--- a/sc/inc/queryentry.hxx
+++ b/sc/inc/queryentry.hxx
@@ -81,7 +81,9 @@ struct SC_DLLPUBLIC ScQueryEntry
const Item& GetQueryItem() const;
Item& GetQueryItem();
void SetQueryByTextColor(Color color);
+ bool IsQueryByTextColor() const;
void SetQueryByBackgroundColor(Color color);
+ bool IsQueryByBackgroundColor() const;
void Clear();
ScQueryEntry& operator=( const ScQueryEntry& r );
bool operator==( const ScQueryEntry& r ) const;
diff --git a/sc/source/core/tool/queryentry.cxx b/sc/source/core/tool/queryentry.cxx
index 581939748f86..075fa12f04d5 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,15 @@ 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;
+}
+
const ScQueryEntry::Item& ScQueryEntry::GetQueryItem() const
{
if (maQueryItems.size() > 1)
diff --git a/sc/source/ui/dbgui/filtdlg.cxx b/sc/source/ui/dbgui/filtdlg.cxx
index 9ee84fc714cd..8882d9139c89 100644
--- a/sc/source/ui/dbgui/filtdlg.cxx
+++ b/sc/source/ui/dbgui/filtdlg.cxx
@@ -218,6 +218,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
{
OUString aQueryStr = rItem.maString.getString();
@@ -1113,6 +1118,10 @@ void ScFilterDlg::RefreshEditRow( size_t nOffset )
aValStr = aStrNotEmpty;
maCondLbArr[i]->set_sensitive(false);
}
+ else if (rEntry.IsQueryByTextColor() || rEntry.IsQueryByBackgroundColor())
+ {
+ continue;
+ }
else
{
aValStr = aQueryStr;
More information about the Libreoffice-commits
mailing list