[Libreoffice-commits] core.git: Branch 'distro/lhm/libreoffice-6-4+backports' - sc/source sc/uiconfig solenv/sanitizers
Samuel Mehrbrodt (via logerrit)
logerrit at kemper.freedesktop.org
Thu Sep 23 06:41:39 UTC 2021
sc/source/ui/dbgui/filtdlg.cxx | 240 ++++++++++++++++++++++++---
sc/source/ui/inc/filtdlg.hxx | 11 +
sc/uiconfig/scalc/ui/standardfilterdialog.ui | 205 +++++++++++++++++------
solenv/sanitizers/ui/modules/scalc.suppr | 5
4 files changed, 393 insertions(+), 68 deletions(-)
New commits:
commit 94a51d9497f630ce42d59c812077e25753daedaf
Author: Samuel Mehrbrodt <samuel.mehrbrodt at allotropia.de>
AuthorDate: Thu Sep 9 09:33:49 2021 +0200
Commit: Thorsten Behrens <thorsten.behrens at allotropia.de>
CommitDate: Thu Sep 23 08:41:04 2021 +0200
tdf#143103 Support Color Filter in "Standard Filter" dialog
Change-Id: Ie8ffc928315b742d5b445d5fdda62cb9c2aabc0e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/122089
Tested-by: Jenkins
Reviewed-by: Samuel Mehrbrodt <samuel.mehrbrodt at allotropia.de>
(cherry picked from commit d9dd003f63a781e63bfbe380ea737e080c21881f)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/122347
Reviewed-by: Thorsten Behrens <thorsten.behrens at allotropia.de>
Tested-by: Samuel Mehrbrodt <samuel.mehrbrodt at allotropia.de>
diff --git a/sc/source/ui/dbgui/filtdlg.cxx b/sc/source/ui/dbgui/filtdlg.cxx
index 8882d9139c89..8fbe257d2206 100644
--- a/sc/source/ui/dbgui/filtdlg.cxx
+++ b/sc/source/ui/dbgui/filtdlg.cxx
@@ -34,9 +34,13 @@
#include <strings.hrc>
#include <filtdlg.hxx>
+#include <vcl/menu.hxx>
#include <vcl/svapp.hxx>
+#include <vcl/settings.hxx>
+#include <vcl/virdev.hxx>
#include <vcl/weld.hxx>
#include <svl/sharedstringpool.hxx>
+#include <toolkit/helper/vclunohelper.hxx>
#include <limits>
@@ -55,6 +59,8 @@ ScFilterDlg::ScFilterDlg(SfxBindings* pB, SfxChildWindow* pCW, weld::Window* pPa
, aStrEmpty(ScResId(SCSTR_FILTER_EMPTY))
, aStrNotEmpty(ScResId(SCSTR_FILTER_NOTEMPTY))
, aStrColumn(ScResId(SCSTR_COLUMN))
+ , aStrTextColor(ScResId(SCSTR_FILTER_TEXT_COLOR))
+ , aStrBackgroundColor(ScResId(SCSTR_FILTER_BACKGROUND_COLOR))
, nWhichQuery(rArgSet.GetPool()->GetWhich(SID_QUERY))
, theQueryData(static_cast<const ScQueryItem&>(rArgSet.Get(nWhichQuery)).GetQueryData())
, pViewData(nullptr)
@@ -65,18 +71,22 @@ ScFilterDlg::ScFilterDlg(SfxBindings* pB, SfxChildWindow* pCW, weld::Window* pPa
, m_xLbField1(m_xBuilder->weld_combo_box("field1"))
, m_xLbCond1(m_xBuilder->weld_combo_box("cond1"))
, m_xEdVal1(m_xBuilder->weld_combo_box("val1"))
+ , m_xLbColor1(m_xBuilder->weld_combo_box("color1"))
, m_xLbConnect2(m_xBuilder->weld_combo_box("connect2"))
, m_xLbField2(m_xBuilder->weld_combo_box("field2"))
, m_xLbCond2(m_xBuilder->weld_combo_box("cond2"))
, m_xEdVal2(m_xBuilder->weld_combo_box("val2"))
+ , m_xLbColor2(m_xBuilder->weld_combo_box("color2"))
, m_xLbConnect3(m_xBuilder->weld_combo_box("connect3"))
, m_xLbField3(m_xBuilder->weld_combo_box("field3"))
, m_xLbCond3(m_xBuilder->weld_combo_box("cond3"))
, m_xEdVal3(m_xBuilder->weld_combo_box("val3"))
+ , m_xLbColor3(m_xBuilder->weld_combo_box("color3"))
, m_xLbConnect4(m_xBuilder->weld_combo_box("connect4"))
, m_xLbField4(m_xBuilder->weld_combo_box("field4"))
, m_xLbCond4(m_xBuilder->weld_combo_box("cond4"))
, m_xEdVal4(m_xBuilder->weld_combo_box("val4"))
+ , m_xLbColor4(m_xBuilder->weld_combo_box("color4"))
, m_xContents(m_xBuilder->weld_widget("grid"))
, m_xScrollBar(m_xBuilder->weld_scrolled_window("scrollbar"))
, m_xExpander(m_xBuilder->weld_expander("more"))
@@ -116,6 +126,33 @@ ScFilterDlg::~ScFilterDlg()
pTimer.reset();
}
+namespace {
+VirtualDevice* lcl_getColorImage(const Color &rColor)
+{
+ const StyleSettings& rStyleSettings = Application::GetSettings().GetStyleSettings();
+ Size aImageSize(rStyleSettings.GetListBoxPreviewDefaultPixelSize());
+
+ VclPtrInstance<VirtualDevice> xDevice;
+ xDevice->SetOutputSize(aImageSize);
+ const tools::Rectangle aRect(Point(0, 0), aImageSize);
+ if (rColor == COL_NONE_COLOR)
+ {
+ const Color aW(COL_WHITE);
+ const Color aG(0xef, 0xef, 0xef);
+ xDevice->DrawCheckered(aRect.TopLeft(), aRect.GetSize(), 8, aW, aG);
+ xDevice->SetFillColor();
+ }
+ else
+ {
+ xDevice->SetFillColor(rColor);
+ }
+
+ xDevice->DrawRect(aRect);
+
+ return xDevice.get();
+}
+}
+
void ScFilterDlg::Init( const SfxItemSet& rArgSet )
{
const ScQueryItem& rQueryItem = static_cast<const ScQueryItem&>(
@@ -150,6 +187,11 @@ void ScFilterDlg::Init( const SfxItemSet& rArgSet )
m_xLbCond3->connect_changed( LINK( this, ScFilterDlg, LbSelectHdl ) );
m_xLbCond4->connect_changed( LINK( this, ScFilterDlg, LbSelectHdl ) );
+ m_xLbColor1->connect_changed( LINK( this, ScFilterDlg, LbSelectHdl ) );
+ m_xLbColor2->connect_changed( LINK( this, ScFilterDlg, LbSelectHdl ) );
+ m_xLbColor3->connect_changed( LINK( this, ScFilterDlg, LbSelectHdl ) );
+ m_xLbColor4->connect_changed( LINK( this, ScFilterDlg, LbSelectHdl ) );
+
pViewData = rQueryItem.GetViewData();
pDoc = pViewData ? pViewData->GetDocument() : nullptr;
nSrcTab = pViewData ? pViewData->GetTabNo() : static_cast<SCTAB>(0);
@@ -175,6 +217,11 @@ void ScFilterDlg::Init( const SfxItemSet& rArgSet )
maConnLbArr.push_back(m_xLbConnect2.get());
maConnLbArr.push_back(m_xLbConnect3.get());
maConnLbArr.push_back(m_xLbConnect4.get());
+ maColorLbArr.reserve(QUERY_ENTRY_COUNT);
+ maColorLbArr.push_back(m_xLbColor1.get());
+ maColorLbArr.push_back(m_xLbColor2.get());
+ maColorLbArr.push_back(m_xLbColor3.get());
+ maColorLbArr.push_back(m_xLbColor4.get());
// Option initialization:
pOptionsMgr.reset( new ScFilterOptionsMgr(
@@ -202,6 +249,8 @@ void ScFilterDlg::Init( const SfxItemSet& rArgSet )
size_t nCondPos = 0;
size_t nFieldSelPos = 0;
+ maColorLbArr[i]->set_visible(false);
+
ScQueryEntry& rEntry = theQueryData.GetEntry(i);
if ( rEntry.bDoQuery )
{
@@ -220,8 +269,11 @@ void ScFilterDlg::Init( const SfxItemSet& rArgSet )
}
else if (rEntry.IsQueryByTextColor() || rEntry.IsQueryByBackgroundColor())
{
- // No support for color filters in filter dialog currently
- continue;
+ nCondPos = maCondLbArr[i]->find_text(
+ rEntry.IsQueryByTextColor() ? aStrTextColor : aStrBackgroundColor);
+ maValueEdArr[i]->set_visible(false);
+ maColorLbArr[i]->set_visible(true);
+ maColorLbArr[i]->set_sensitive(true);
}
else
{
@@ -276,6 +328,7 @@ void ScFilterDlg::Init( const SfxItemSet& rArgSet )
maValueEdArr[i]->set_entry_completion(false);
maValueEdArr[i]->connect_changed( LINK( this, ScFilterDlg, ValModifyHdl ) );
UpdateValueList(i+1);
+ UpdateColorList(i+1);
}
m_xScrollBar->set_user_managed_scrolling();
@@ -307,12 +360,14 @@ void ScFilterDlg::Init( const SfxItemSet& rArgSet )
m_xLbField2->set_sensitive(false);
m_xLbCond2->set_sensitive(false);
m_xEdVal2->set_sensitive(false);
+ m_xLbColor2->set_sensitive(false);
}
else if ( m_xLbConnect2->get_active() == -1 )
{
m_xLbField2->set_sensitive(false);
m_xLbCond2->set_sensitive(false);
m_xEdVal2->set_sensitive(false);
+ m_xLbColor2->set_sensitive(false);
}
if ( m_xLbField2->get_active() == 0 )
@@ -321,12 +376,14 @@ void ScFilterDlg::Init( const SfxItemSet& rArgSet )
m_xLbField3->set_sensitive(false);
m_xLbCond3->set_sensitive(false);
m_xEdVal3->set_sensitive(false);
+ m_xLbColor3->set_sensitive(false);
}
else if ( m_xLbConnect3->get_active() == -1 )
{
m_xLbField3->set_sensitive(false);
m_xLbCond3->set_sensitive(false);
m_xEdVal3->set_sensitive(false);
+ m_xLbColor3->set_sensitive(false);
}
if ( m_xLbField3->get_active() == 0 )
{
@@ -334,12 +391,14 @@ void ScFilterDlg::Init( const SfxItemSet& rArgSet )
m_xLbField4->set_sensitive(false);
m_xLbCond4->set_sensitive(false);
m_xEdVal4->set_sensitive(false);
+ m_xLbColor4->set_sensitive(false);
}
else if ( m_xLbConnect4->get_active() == -1 )
{
m_xLbField4->set_sensitive(false);
m_xLbCond4->set_sensitive(false);
m_xEdVal4->set_sensitive(false);
+ m_xLbColor4->set_sensitive(false);
}
m_xEdVal1->set_entry_width_chars(10);
@@ -578,6 +637,62 @@ void ScFilterDlg::ClearValueList( size_t nList )
}
}
+void ScFilterDlg::UpdateColorList(size_t nList)
+{
+ if (!pDoc || nList <= 0 || nList > QUERY_ENTRY_COUNT)
+ return;
+
+ size_t nPos = nList - 1;
+ ScQueryEntry& rEntry = theQueryData.GetEntry(nPos);
+ const sal_Int32 nFieldSelPos = maFieldLbArr[nPos]->get_active();
+ if (!nFieldSelPos)
+ return;
+
+ SCCOL nColumn = theQueryData.nCol1 + static_cast<SCCOL>(nFieldSelPos) - 1;
+ EntryList* pList = m_EntryLists[nColumn].get();
+ if (!pList)
+ return;
+
+ std::set<Color> aColors;
+ OUString sSelectedCondition = maCondLbArr[nPos]->get_active_text();
+ if (sSelectedCondition == aStrTextColor)
+ aColors = pList->maFilterEntries.getTextColors();
+ else if (sSelectedCondition == aStrBackgroundColor)
+ aColors = pList->maFilterEntries.getBackgroundColors();
+ else
+ return;
+
+ sal_Int32 i = 1;
+ maColorLbArr[nPos]->clear();
+ for (const auto& rColor : aColors)
+ {
+ OUString sId = rColor.AsRGBHexString();
+ if (rColor == COL_AUTO)
+ {
+ OUString sText = sSelectedCondition == aStrTextColor
+ ? ScResId(SCSTR_FILTER_AUTOMATIC_COLOR)
+ : ScResId(SCSTR_FILTER_NO_FILL);
+ maColorLbArr[nPos]->append(sId, sText);
+ }
+ else
+ {
+ VirtualDevice* pDev = lcl_getColorImage(rColor);
+ maColorLbArr[nPos]->append(sId, OUString(), *pDev);
+ }
+
+ auto aItem = rEntry.GetQueryItem();
+ if (aItem.maColor == rColor
+ && ((sSelectedCondition == aStrTextColor && aItem.meType == ScQueryEntry::ByTextColor)
+ || (sSelectedCondition == aStrBackgroundColor
+ && aItem.meType == ScQueryEntry::ByBackgroundColor)))
+ {
+ maColorLbArr[nPos]->set_active_id(sId);
+ }
+
+ i++;
+ }
+}
+
size_t ScFilterDlg::GetFieldSelPos( SCCOL nField )
{
if ( nField >= theQueryData.nCol1 && nField <= theQueryData.nCol2 )
@@ -748,6 +863,7 @@ IMPL_LINK(ScFilterDlg, LbSelectHdl, weld::ComboBox&, rLb, void)
m_xLbField4->set_sensitive(true);
m_xLbCond4->set_sensitive(true);
m_xEdVal4->set_sensitive(true);
+ m_xLbColor4->set_sensitive(true);
const sal_Int32 nConnect4 = m_xLbConnect4->get_active();
size_t nQE = 3 + nOffset;
@@ -786,6 +902,9 @@ IMPL_LINK(ScFilterDlg, LbSelectHdl, weld::ComboBox&, rLb, void)
m_xEdVal2->set_sensitive(false);
m_xEdVal3->set_sensitive(false);
m_xEdVal4->set_sensitive(false);
+ m_xLbColor2->set_sensitive(false);
+ m_xLbColor3->set_sensitive(false);
+ m_xLbColor4->set_sensitive(false);
SCSIZE nCount = theQueryData.GetEntryCount();
if (maRefreshExceptQuery.size() < nCount + 1)
maRefreshExceptQuery.resize(nCount + 1, false);
@@ -800,6 +919,7 @@ IMPL_LINK(ScFilterDlg, LbSelectHdl, weld::ComboBox&, rLb, void)
else
{
UpdateValueList( 1 );
+ UpdateColorList( 1 );
if ( !m_xLbConnect2->get_sensitive() )
{
m_xLbConnect2->set_sensitive(true);
@@ -831,6 +951,8 @@ IMPL_LINK(ScFilterDlg, LbSelectHdl, weld::ComboBox&, rLb, void)
m_xLbCond4->set_sensitive(false);
m_xEdVal3->set_sensitive(false);
m_xEdVal4->set_sensitive(false);
+ m_xLbColor3->set_sensitive(false);
+ m_xLbColor4->set_sensitive(false);
sal_uInt16 nTemp=nOffset+1;
SCSIZE nCount = theQueryData.GetEntryCount();
@@ -847,6 +969,7 @@ IMPL_LINK(ScFilterDlg, LbSelectHdl, weld::ComboBox&, rLb, void)
else
{
UpdateValueList( 2 );
+ UpdateColorList( 2 );
if ( !m_xLbConnect3->get_sensitive() )
{
m_xLbConnect3->set_sensitive(true);
@@ -871,6 +994,7 @@ IMPL_LINK(ScFilterDlg, LbSelectHdl, weld::ComboBox&, rLb, void)
m_xLbField4->set_sensitive(false);
m_xLbCond4->set_sensitive(false);
m_xEdVal4->set_sensitive(false);
+ m_xLbColor4->set_sensitive(false);
sal_uInt16 nTemp=nOffset+2;
SCSIZE nCount = theQueryData.GetEntryCount();
@@ -887,6 +1011,7 @@ IMPL_LINK(ScFilterDlg, LbSelectHdl, weld::ComboBox&, rLb, void)
else
{
UpdateValueList( 3 );
+ UpdateColorList( 3 );
if ( !m_xLbConnect4->get_sensitive() )
{
m_xLbConnect4->set_sensitive(true);
@@ -919,6 +1044,7 @@ IMPL_LINK(ScFilterDlg, LbSelectHdl, weld::ComboBox&, rLb, void)
else
{
UpdateValueList( 4 );
+ UpdateColorList( 4 );
const sal_Int32 nField = rLb.get_active();
sal_uInt16 nQ=3+nOffset;
theQueryData.GetEntry(nQ).bDoQuery = true;
@@ -926,24 +1052,89 @@ IMPL_LINK(ScFilterDlg, LbSelectHdl, weld::ComboBox&, rLb, void)
}
}
- else if ( &rLb == m_xLbCond1.get())
- {
- theQueryData.GetEntry(nOffset).eOp=static_cast<ScQueryOp>(rLb.get_active());
- }
- else if ( &rLb == m_xLbCond2.get())
- {
- sal_uInt16 nQ=1+nOffset;
- theQueryData.GetEntry(nQ).eOp=static_cast<ScQueryOp>(rLb.get_active());
- }
- else if ( &rLb == m_xLbCond3.get())
+ else if (&rLb == m_xLbCond1.get() || &rLb == m_xLbCond2.get() || &rLb == m_xLbCond3.get()
+ || &rLb == m_xLbCond4.get())
{
- sal_uInt16 nQ=2+nOffset;
- theQueryData.GetEntry(nQ).eOp=static_cast<ScQueryOp>(rLb.get_active());
+ ScQueryOp op;
+ sal_uInt16 nQ = 0;
+ bool bEnableColorLb = false;
+ if (rLb.get_active_text() == aStrTextColor || rLb.get_active_text() == aStrBackgroundColor)
+ {
+ bEnableColorLb = true;
+ op = SC_EQUAL;
+ }
+ else
+ {
+ op = static_cast<ScQueryOp>(rLb.get_active());
+ }
+
+ if (&rLb == m_xLbCond1.get())
+ {
+ nQ = nOffset;
+ m_xLbColor1->set_visible(bEnableColorLb);
+ m_xLbColor1->set_sensitive(bEnableColorLb);
+ m_xEdVal1->set_visible(!bEnableColorLb);
+ UpdateColorList(1);
+ }
+ else if (&rLb == m_xLbCond2.get())
+ {
+ nQ = 1 + nOffset;
+ m_xLbColor2->set_visible(bEnableColorLb);
+ m_xLbColor2->set_sensitive(bEnableColorLb);
+ m_xEdVal2->set_visible(!bEnableColorLb);
+ UpdateColorList(2);
+ }
+ else if (&rLb == m_xLbCond3.get())
+ {
+ nQ = 2 + nOffset;
+ m_xLbColor3->set_visible(bEnableColorLb);
+ m_xLbColor3->set_sensitive(bEnableColorLb);
+ m_xEdVal3->set_visible(!bEnableColorLb);
+ UpdateColorList(3);
+ }
+ else if (&rLb == m_xLbCond4.get())
+ {
+ nQ = 3 + nOffset;
+ m_xLbColor4->set_visible(bEnableColorLb);
+ m_xLbColor4->set_sensitive(bEnableColorLb);
+ m_xEdVal4->set_visible(!bEnableColorLb);
+ UpdateColorList(4);
+ }
+
+ auto aEntry = theQueryData.GetEntry(nQ);
+ aEntry.eOp = op;
}
- else
+ else if (&rLb == m_xLbColor1.get() || &rLb == m_xLbColor2.get() || &rLb == m_xLbColor3.get()
+ || &rLb == m_xLbColor4.get())
{
- sal_uInt16 nQ=3+nOffset;
- theQueryData.GetEntry(nQ).eOp=static_cast<ScQueryOp>(rLb.get_active());
+ sal_uInt16 nQ = 0;
+ if (&rLb == m_xLbColor1.get())
+ {
+ nQ = nOffset;
+ }
+ else if (&rLb == m_xLbColor2.get())
+ {
+ nQ = 1 + nOffset;
+ }
+ else if (&rLb == m_xLbColor3.get())
+ {
+ nQ = 2 + nOffset;
+ }
+ else if (&rLb == m_xLbColor4.get())
+ {
+ nQ = 3 + nOffset;
+ }
+
+ ScQueryEntry& aEntry = theQueryData.GetEntry(nQ);
+ Color aColor = Color::STRtoRGB(maColorLbArr[nQ]->get_active_id());
+ if (maCondLbArr[nQ]->get_active_text() == aStrTextColor)
+ {
+ aEntry.SetQueryByTextColor(aColor);
+ }
+ else if (maCondLbArr[nQ]->get_active_text() == aStrBackgroundColor)
+ {
+ aEntry.SetQueryByBackgroundColor(aColor);
+ }
}
}
@@ -980,6 +1171,11 @@ IMPL_LINK( ScFilterDlg, CheckBoxHdl, weld::Button&, rBox, void )
UpdateValueList( 2 );
UpdateValueList( 3 );
UpdateValueList( 4 );
+
+ UpdateColorList( 1 );
+ UpdateColorList( 2 );
+ UpdateColorList( 3 );
+ UpdateColorList( 4 );
}
}
@@ -1096,6 +1292,8 @@ void ScFilterDlg::RefreshEditRow( size_t nOffset )
size_t nFieldSelPos = 0;
size_t nQE = i + nOffset;
+ maColorLbArr[i]->set_visible(false);
+
if (maRefreshExceptQuery.size() < nQE + 1)
maRefreshExceptQuery.resize(nQE + 1, false);
@@ -1120,7 +1318,12 @@ void ScFilterDlg::RefreshEditRow( size_t nOffset )
}
else if (rEntry.IsQueryByTextColor() || rEntry.IsQueryByBackgroundColor())
{
- continue;
+ nCondPos = maCondLbArr[i]->find_text(
+ rEntry.IsQueryByTextColor() ? aStrTextColor : aStrBackgroundColor);
+
+ maValueEdArr[i]->set_visible(false);
+ maColorLbArr[i]->set_visible(true);
+ maColorLbArr[i]->set_sensitive(true);
}
else
{
@@ -1189,6 +1392,7 @@ void ScFilterDlg::RefreshEditRow( size_t nOffset )
maCondLbArr [i]->set_active( nCondPos );
maValueEdArr[i]->set_entry_text( aValStr );
UpdateValueList(i+1);
+ UpdateColorList(i+1);
}
}
diff --git a/sc/source/ui/inc/filtdlg.hxx b/sc/source/ui/inc/filtdlg.hxx
index de306709a2b6..822556f14923 100644
--- a/sc/source/ui/inc/filtdlg.hxx
+++ b/sc/source/ui/inc/filtdlg.hxx
@@ -25,6 +25,8 @@
#include <queryparam.hxx>
#include <filterentries.hxx>
+#include <svx/colorbox.hxx>
+
#include <memory>
#include <deque>
#include <vector>
@@ -70,6 +72,8 @@ private:
const OUString aStrEmpty;
const OUString aStrNotEmpty;
const OUString aStrColumn;
+ const OUString aStrTextColor;
+ const OUString aStrBackgroundColor;
std::unique_ptr<ScFilterOptionsMgr> pOptionsMgr;
@@ -84,6 +88,7 @@ private:
std::vector<weld::ComboBox*> maFieldLbArr;
std::vector<weld::ComboBox*> maCondLbArr;
std::vector<weld::ComboBox*> maConnLbArr;
+ std::vector<weld::ComboBox*> maColorLbArr;
std::deque<bool> maHasDates;
std::deque<bool> maRefreshExceptQuery;
@@ -98,21 +103,24 @@ private:
std::unique_ptr<weld::ComboBox> m_xLbField1;
std::unique_ptr<weld::ComboBox> m_xLbCond1;
std::unique_ptr<weld::ComboBox> m_xEdVal1;
-
+ std::unique_ptr<weld::ComboBox> m_xLbColor1;
std::unique_ptr<weld::ComboBox> m_xLbConnect2;
std::unique_ptr<weld::ComboBox> m_xLbField2;
std::unique_ptr<weld::ComboBox> m_xLbCond2;
std::unique_ptr<weld::ComboBox> m_xEdVal2;
+ std::unique_ptr<weld::ComboBox> m_xLbColor2;
std::unique_ptr<weld::ComboBox> m_xLbConnect3;
std::unique_ptr<weld::ComboBox> m_xLbField3;
std::unique_ptr<weld::ComboBox> m_xLbCond3;
std::unique_ptr<weld::ComboBox> m_xEdVal3;
+ std::unique_ptr<weld::ComboBox> m_xLbColor3;
std::unique_ptr<weld::ComboBox> m_xLbConnect4;
std::unique_ptr<weld::ComboBox> m_xLbField4;
std::unique_ptr<weld::ComboBox> m_xLbCond4;
std::unique_ptr<weld::ComboBox> m_xEdVal4;
+ std::unique_ptr<weld::ComboBox> m_xLbColor4;
std::unique_ptr<weld::Widget> m_xContents;
std::unique_ptr<weld::ScrolledWindow> m_xScrollBar;
@@ -139,6 +147,7 @@ private:
void UpdateValueList ( size_t nList );
void UpdateHdrInValueList( size_t nList );
void ClearValueList ( size_t nList );
+ void UpdateColorList ( size_t nList );
size_t GetFieldSelPos ( SCCOL nField );
ScQueryItem* GetOutputItem ();
diff --git a/sc/uiconfig/scalc/ui/standardfilterdialog.ui b/sc/uiconfig/scalc/ui/standardfilterdialog.ui
index d47f384d471d..8e6f1e3610da 100644
--- a/sc/uiconfig/scalc/ui/standardfilterdialog.ui
+++ b/sc/uiconfig/scalc/ui/standardfilterdialog.ui
@@ -2,6 +2,10 @@
<!-- Generated with glade 3.38.2 -->
<interface domain="sc">
<requires lib="gtk+" version="3.18"/>
+ <object class="GtkListStore" id="liststore1"/>
+ <object class="GtkListStore" id="liststore2"/>
+ <object class="GtkListStore" id="liststore3"/>
+ <object class="GtkListStore" id="liststore4"/>
<object class="GtkDialog" id="StandardFilterDialog">
<property name="can-focus">False</property>
<property name="border-width">6</property>
@@ -338,6 +342,8 @@
<item translatable="yes" context="standardfilterdialog|cond1">Does not begin with</item>
<item translatable="yes" context="standardfilterdialog|cond1">Ends with</item>
<item translatable="yes" context="standardfilterdialog|cond1">Does not end with</item>
+ <item translatable="yes" context="standardfilterdialog|cond1">Text color</item>
+ <item translatable="yes" context="standardfilterdialog|cond1">Background color</item>
</items>
<accessibility>
<relation type="labelled-by" target="label4"/>
@@ -374,6 +380,8 @@
<item translatable="yes" context="standardfilterdialog|cond2">Does not begin with</item>
<item translatable="yes" context="standardfilterdialog|cond2">Ends with</item>
<item translatable="yes" context="standardfilterdialog|cond2">Does not end with</item>
+ <item translatable="yes" context="standardfilterdialog|cond2">Text color</item>
+ <item id="<Enter ID>" translatable="yes" context="standardfilterdialog|cond2">Background color</item>
</items>
<accessibility>
<relation type="labelled-by" target="label4"/>
@@ -410,6 +418,8 @@
<item translatable="yes" context="standardfilterdialog|cond3">Does not begin with</item>
<item translatable="yes" context="standardfilterdialog|cond3">Ends with</item>
<item translatable="yes" context="standardfilterdialog|cond3">Does not end with</item>
+ <item translatable="yes" context="standardfilterdialog|cond3">Text color</item>
+ <item translatable="yes" context="standardfilterdialog|cond3">Background color</item>
</items>
<accessibility>
<relation type="labelled-by" target="label4"/>
@@ -446,6 +456,8 @@
<item translatable="yes" context="standardfilterdialog|cond4">Does not begin with</item>
<item translatable="yes" context="standardfilterdialog|cond4">Ends with</item>
<item translatable="yes" context="standardfilterdialog|cond4">Does not end with</item>
+ <item translatable="yes" context="standardfilterdialog|cond4">Text color</item>
+ <item translatable="yes" context="standardfilterdialog|cond4">Background color</item>
</items>
<child internal-child="accessible">
<object class="AtkObject" id="cond4-atkobject">
@@ -459,24 +471,47 @@
</packing>
</child>
<child>
- <object class="GtkComboBoxText" id="val1">
+ <object class="GtkBox">
<property name="visible">True</property>
<property name="can-focus">False</property>
- <property name="hexpand">True</property>
- <property name="has-entry">True</property>
- <child internal-child="entry">
- <object class="GtkEntry" id="comboboxtext-entry2">
- <property name="can-focus">True</property>
- <property name="activates-default">True</property>
+ <child>
+ <object class="GtkComboBoxText" id="val1">
+ <property name="visible">True</property>
+ <property name="can-focus">False</property>
+ <property name="hexpand">True</property>
+ <property name="has-entry">True</property>
+ <child internal-child="entry">
+ <object class="GtkEntry">
+ <property name="can-focus">False</property>
+ </object>
+ </child>
+ <accessibility>
+ <relation type="labelled-by" target="label5"/>
+ </accessibility>
+ <child internal-child="accessible">
+ <object class="AtkObject" id="val1-atkobject">
+ <property name="AtkObject::accessible-name" translatable="yes" context="standardfilterdialog|val1-atkobject">Value 1</property>
+ </object>
+ </child>
</object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">0</property>
+ </packing>
</child>
- <accessibility>
- <relation type="labelled-by" target="label5"/>
- </accessibility>
- <child internal-child="accessible">
- <object class="AtkObject" id="val1-atkobject">
- <property name="AtkObject::accessible-name" translatable="yes" context="standardfilterdialog|val1-atkobject">Value 1</property>
+ <child>
+ <object class="GtkComboBox" id="color1">
+ <property name="visible">True</property>
+ <property name="can-focus">False</property>
+ <property name="hexpand">True</property>
+ <property name="model">liststore1</property>
</object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">1</property>
+ </packing>
</child>
</object>
<packing>
@@ -485,24 +520,47 @@
</packing>
</child>
<child>
- <object class="GtkComboBoxText" id="val2">
+ <object class="GtkBox">
<property name="visible">True</property>
<property name="can-focus">False</property>
- <property name="hexpand">True</property>
- <property name="has-entry">True</property>
- <child internal-child="entry">
- <object class="GtkEntry" id="comboboxtext-entry4">
- <property name="can-focus">True</property>
- <property name="activates-default">True</property>
+ <child>
+ <object class="GtkComboBoxText" id="val2">
+ <property name="visible">True</property>
+ <property name="can-focus">False</property>
+ <property name="hexpand">True</property>
+ <property name="has-entry">True</property>
+ <child internal-child="entry">
+ <object class="GtkEntry">
+ <property name="can-focus">True</property>
+ </object>
+ </child>
+ <accessibility>
+ <relation type="labelled-by" target="label5"/>
+ </accessibility>
+ <child internal-child="accessible">
+ <object class="AtkObject" id="val2-atkobject">
+ <property name="AtkObject::accessible-name" translatable="yes" context="standardfilterdialog|val1-atkobject">Value 1</property>
+ </object>
+ </child>
</object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">0</property>
+ </packing>
</child>
- <accessibility>
- <relation type="labelled-by" target="label5"/>
- </accessibility>
- <child internal-child="accessible">
- <object class="AtkObject" id="val2-atkobject">
- <property name="AtkObject::accessible-name" translatable="yes" context="standardfilterdialog|val2-atkobject">Value 2</property>
+ <child>
+ <object class="GtkComboBox" id="color2">
+ <property name="visible">True</property>
+ <property name="can-focus">False</property>
+ <property name="hexpand">True</property>
+ <property name="model">liststore2</property>
</object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">1</property>
+ </packing>
</child>
</object>
<packing>
@@ -511,24 +569,47 @@
</packing>
</child>
<child>
- <object class="GtkComboBoxText" id="val3">
+ <object class="GtkBox">
<property name="visible">True</property>
<property name="can-focus">False</property>
- <property name="hexpand">True</property>
- <property name="has-entry">True</property>
- <child internal-child="entry">
- <object class="GtkEntry" id="comboboxtext-entry6">
- <property name="can-focus">True</property>
- <property name="activates-default">True</property>
+ <child>
+ <object class="GtkComboBoxText" id="val3">
+ <property name="visible">True</property>
+ <property name="can-focus">False</property>
+ <property name="hexpand">True</property>
+ <property name="has-entry">True</property>
+ <child internal-child="entry">
+ <object class="GtkEntry">
+ <property name="can-focus">True</property>
+ </object>
+ </child>
+ <accessibility>
+ <relation type="labelled-by" target="label5"/>
+ </accessibility>
+ <child internal-child="accessible">
+ <object class="AtkObject" id="val3-atkobject">
+ <property name="AtkObject::accessible-name" translatable="yes" context="standardfilterdialog|val1-atkobject">Value 1</property>
+ </object>
+ </child>
</object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">0</property>
+ </packing>
</child>
- <accessibility>
- <relation type="labelled-by" target="label5"/>
- </accessibility>
- <child internal-child="accessible">
- <object class="AtkObject" id="val3-atkobject">
- <property name="AtkObject::accessible-name" translatable="yes" context="standardfilterdialog|val3-atkobject">Value 3</property>
+ <child>
+ <object class="GtkComboBox" id="color3">
+ <property name="visible">True</property>
+ <property name="can-focus">False</property>
+ <property name="hexpand">True</property>
+ <property name="model">liststore3</property>
</object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">1</property>
+ </packing>
</child>
</object>
<packing>
@@ -537,21 +618,47 @@
</packing>
</child>
<child>
- <object class="GtkComboBoxText" id="val4">
+ <object class="GtkBox">
<property name="visible">True</property>
<property name="can-focus">False</property>
- <property name="hexpand">True</property>
- <property name="has-entry">True</property>
- <child internal-child="entry">
- <object class="GtkEntry" id="comboboxtext-entry8">
- <property name="can-focus">True</property>
- <property name="activates-default">True</property>
+ <child>
+ <object class="GtkComboBoxText" id="val4">
+ <property name="visible">True</property>
+ <property name="can-focus">False</property>
+ <property name="hexpand">True</property>
+ <property name="has-entry">True</property>
+ <child internal-child="entry">
+ <object class="GtkEntry">
+ <property name="can-focus">True</property>
+ </object>
+ </child>
+ <accessibility>
+ <relation type="labelled-by" target="label5"/>
+ </accessibility>
+ <child internal-child="accessible">
+ <object class="AtkObject" id="val4-atkobject">
+ <property name="AtkObject::accessible-name" translatable="yes" context="standardfilterdialog|val1-atkobject">Value 1</property>
+ </object>
+ </child>
</object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">0</property>
+ </packing>
</child>
- <child internal-child="accessible">
- <object class="AtkObject" id="val4-atkobject">
- <property name="AtkObject::accessible-name" translatable="yes" context="standardfilterdialog|val4-atkobject">Value 4</property>
+ <child>
+ <object class="GtkComboBox" id="color4">
+ <property name="visible">True</property>
+ <property name="can-focus">False</property>
+ <property name="hexpand">True</property>
+ <property name="model">liststore4</property>
</object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">1</property>
+ </packing>
</child>
</object>
<packing>
diff --git a/solenv/sanitizers/ui/modules/scalc.suppr b/solenv/sanitizers/ui/modules/scalc.suppr
index 1f5c72e6be46..9fa0dd849f6b 100644
--- a/solenv/sanitizers/ui/modules/scalc.suppr
+++ b/solenv/sanitizers/ui/modules/scalc.suppr
@@ -177,6 +177,11 @@ sc/uiconfig/scalc/ui/standardfilterdialog.ui://GtkComboBoxText[@id='cond3'] miss
sc/uiconfig/scalc/ui/standardfilterdialog.ui://GtkComboBoxText[@id='val1'] missing-label-for
sc/uiconfig/scalc/ui/standardfilterdialog.ui://GtkComboBoxText[@id='val2'] missing-label-for
sc/uiconfig/scalc/ui/standardfilterdialog.ui://GtkComboBoxText[@id='val3'] missing-label-for
+sc/uiconfig/scalc/ui/standardfilterdialog.ui://GtkComboBoxText[@id='val4'] missing-label-for
+sc/uiconfig/scalc/ui/standardfilterdialog.ui://GtkComboBox[@id='color1'] missing-label-for
+sc/uiconfig/scalc/ui/standardfilterdialog.ui://GtkComboBox[@id='color2'] missing-label-for
+sc/uiconfig/scalc/ui/standardfilterdialog.ui://GtkComboBox[@id='color3'] missing-label-for
+sc/uiconfig/scalc/ui/standardfilterdialog.ui://GtkComboBox[@id='color4'] missing-label-for
sc/uiconfig/scalc/ui/standardfilterdialog.ui://GtkLabel[@id='dbarealabel'] orphan-label
sc/uiconfig/scalc/ui/standardfilterdialog.ui://GtkLabel[@id='dbarea'] orphan-label
sc/uiconfig/scalc/ui/scenariodialog.ui://GtkEntry[@id='name'] no-labelled-by
More information about the Libreoffice-commits
mailing list