sc/source/ui/dbgui/filtdlg.cxx |   18 +++++++++---------
 sc/source/ui/inc/filtdlg.hxx   |    2 +-
 2 files changed, 10 insertions(+), 10 deletions(-)

New commits:
commit d84291f55746cd4fa7c1f236a14b362eaddde7b9
Author:     Taichi Haradaguchi <20001...@ymail.ne.jp>
AuthorDate: Sun Feb 26 18:26:42 2023 +0900
Commit:     Taichi Haradaguchi <20001...@ymail.ne.jp>
CommitDate: Sat Jun 24 00:49:26 2023 +0200

    Rename "aStrTextColor" to "aStrFontColor"
    
    This patch improves consistently with item labels in AutoFilter/Standard 
Filter menu.
    
    Change-Id: Ibee26623f5561d228930b887778d5c61b32a1456
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/147747
    Tested-by: Taichi Haradaguchi  <20001...@ymail.ne.jp>
    Reviewed-by: Taichi Haradaguchi  <20001...@ymail.ne.jp>

diff --git a/sc/source/ui/dbgui/filtdlg.cxx b/sc/source/ui/dbgui/filtdlg.cxx
index dd6060021e7e..ca9a59ec566f 100644
--- a/sc/source/ui/dbgui/filtdlg.cxx
+++ b/sc/source/ui/dbgui/filtdlg.cxx
@@ -59,7 +59,7 @@ ScFilterDlg::ScFilterDlg(SfxBindings* pB, SfxChildWindow* 
pCW, weld::Window* pPa
     , aStrEmpty(ScResId(SCSTR_FILTER_EMPTY))
     , aStrNotEmpty(ScResId(SCSTR_FILTER_NOTEMPTY))
     , aStrColumn(ScResId(SCSTR_COLUMN_LETTER))
-    , aStrTextColor(ScResId(SCSTR_FILTER_FONT_COLOR_COND))
+    , aStrFontColor(ScResId(SCSTR_FILTER_FONT_COLOR_COND))
     , aStrBackgroundColor(ScResId(SCSTR_FILTER_BACKGROUND_COLOR_COND))
     , nWhichQuery(rArgSet.GetPool()->GetWhich(SID_QUERY))
     , theQueryData(static_cast<const 
ScQueryItem&>(rArgSet.Get(nWhichQuery)).GetQueryData())
@@ -113,7 +113,7 @@ ScFilterDlg::ScFilterDlg(SfxBindings* pB, SfxChildWindow* 
pCW, weld::Window* pPa
     m_xEdCopyArea->SetReferences(this, m_xFtDbAreaLabel.get());
     m_xRbCopyArea->SetReferences(this, m_xEdCopyArea.get());
 
-    assert(m_xLbCond1->find_text(aStrTextColor) != -1);
+    assert(m_xLbCond1->find_text(aStrFontColor) != -1);
     assert(m_xLbCond1->find_text(aStrBackgroundColor) != -1);
 
     Init( rArgSet );
@@ -288,7 +288,7 @@ void ScFilterDlg::Init( const SfxItemSet& rArgSet )
             else if (rEntry.IsQueryByTextColor() || 
rEntry.IsQueryByBackgroundColor())
             {
                 nCondPos = maCondLbArr[i]->find_text(
-                    rEntry.IsQueryByTextColor() ? aStrTextColor : 
aStrBackgroundColor);
+                    rEntry.IsQueryByTextColor() ? aStrFontColor : 
aStrBackgroundColor);
                 maValueEdArr[i]->set_visible(false);
                 maColorLbArr[i]->set_visible(true);
                 maColorLbArr[i]->set_sensitive(true);
@@ -646,7 +646,7 @@ void ScFilterDlg::UpdateColorList(size_t nList)
 
     std::set<Color> aColors;
     OUString sSelectedCondition = maCondLbArr[nPos]->get_active_text();
-    if (sSelectedCondition == aStrTextColor)
+    if (sSelectedCondition == aStrFontColor)
         aColors = pList->maFilterEntries.getTextColors();
     else if (sSelectedCondition == aStrBackgroundColor)
         aColors = pList->maFilterEntries.getBackgroundColors();
@@ -659,7 +659,7 @@ void ScFilterDlg::UpdateColorList(size_t nList)
         OUString sId = rColor.AsRGBHexString();
         if (rColor == COL_AUTO)
         {
-            OUString sText = sSelectedCondition == aStrTextColor
+            OUString sText = sSelectedCondition == aStrFontColor
                                  ? ScResId(SCSTR_FILTER_AUTOMATIC_COLOR)
                                  : ScResId(SCSTR_FILTER_NO_FILL);
             maColorLbArr[nPos]->append(sId, sText);
@@ -672,7 +672,7 @@ void ScFilterDlg::UpdateColorList(size_t nList)
 
         auto aItem = rEntry.GetQueryItem();
         if (aItem.maColor == rColor
-            && ((sSelectedCondition == aStrTextColor && aItem.meType == 
ScQueryEntry::ByTextColor)
+            && ((sSelectedCondition == aStrFontColor && aItem.meType == 
ScQueryEntry::ByTextColor)
                 || (sSelectedCondition == aStrBackgroundColor
                     && aItem.meType == ScQueryEntry::ByBackgroundColor)))
         {
@@ -1117,7 +1117,7 @@ IMPL_LINK(ScFilterDlg, LbSelectHdl, weld::ComboBox&, rLb, 
void)
         ScQueryOp op;
         sal_uInt16 nQ = 0;
         bool bEnableColorLb = false;
-        if (rLb.get_active_text() == aStrTextColor || rLb.get_active_text() == 
aStrBackgroundColor)
+        if (rLb.get_active_text() == aStrFontColor || rLb.get_active_text() == 
aStrBackgroundColor)
         {
             bEnableColorLb = true;
             op = SC_EQUAL;
@@ -1186,7 +1186,7 @@ IMPL_LINK(ScFilterDlg, LbSelectHdl, weld::ComboBox&, rLb, 
void)
 
         ScQueryEntry& aEntry = theQueryData.GetEntry(nQ);
         Color aColor = Color::STRtoRGB(maColorLbArr[nQ]->get_active_id());
-        if (maCondLbArr[nQ]->get_active_text() == aStrTextColor)
+        if (maCondLbArr[nQ]->get_active_text() == aStrFontColor)
         {
             aEntry.SetQueryByTextColor(aColor);
         }
@@ -1452,7 +1452,7 @@ void ScFilterDlg::RefreshEditRow( size_t nOffset )
             else if (rEntry.IsQueryByTextColor() || 
rEntry.IsQueryByBackgroundColor())
             {
                 nCondPos = maCondLbArr[i]->find_text(
-                    rEntry.IsQueryByTextColor() ? aStrTextColor : 
aStrBackgroundColor);
+                    rEntry.IsQueryByTextColor() ? aStrFontColor : 
aStrBackgroundColor);
 
                 maValueEdArr[i]->set_visible(false);
                 maColorLbArr[i]->set_visible(true);
diff --git a/sc/source/ui/inc/filtdlg.hxx b/sc/source/ui/inc/filtdlg.hxx
index cac9bc71ee26..a99bc93edf8c 100644
--- a/sc/source/ui/inc/filtdlg.hxx
+++ b/sc/source/ui/inc/filtdlg.hxx
@@ -70,7 +70,7 @@ private:
     const OUString aStrEmpty;
     const OUString aStrNotEmpty;
     const OUString aStrColumn;
-    const OUString aStrTextColor;
+    const OUString aStrFontColor;
     const OUString aStrBackgroundColor;
 
     std::unique_ptr<ScFilterOptionsMgr> pOptionsMgr;

Reply via email to