Rebased ref, commits from common ancestor:
commit c0093d60955ef4abfa6ffc0caf430ac78ce5b9f3
Author: Parth Raiyani <[email protected]>
AuthorDate: Wed Feb 4 19:03:06 2026 +0530
Commit: Andras Timar <[email protected]>
CommitDate: Mon Feb 23 20:17:06 2026 +0100
fix: update color palette handling by removing color name param in
insertions
Change-Id: I9c08a3d5b1ef744dc356d2a347c65dc61b6a329d
diff --git a/cui/source/tabpages/tpcolor.cxx b/cui/source/tabpages/tpcolor.cxx
index 1da93474a9d4..b62fab8afff8 100644
--- a/cui/source/tabpages/tpcolor.cxx
+++ b/cui/source/tabpages/tpcolor.cxx
@@ -374,7 +374,7 @@ IMPL_LINK_NOARG(SvxColorTabPage, ClickAddHdl_Impl,
weld::Button&, void)
sal_Int32 nId = !sLastColorItemId.isEmpty() ?
sLastColorItemId.toInt32() : -1;
auto pVDev =
SvxColorIconView::createColorVirtualDevice(m_aCurrentColor.m_aColor);
OUString sId = OUString::number(nId + 1);
- m_xIconViewColorList->insert( nId + 1, &aName, &sId, pVDev, nullptr);
+ m_xIconViewColorList->insert( nId + 1, nullptr, &sId, pVDev, nullptr);
m_xIconViewColorList->select( nId + 1 );
if (m_xIconViewRecentList)
m_xIconViewRecentList->unselect_all(); // needed if color is added
from recent colors
diff --git a/svx/source/tbxctrls/Palette.cxx b/svx/source/tbxctrls/Palette.cxx
index 1f080581de75..5a1e5e348137 100644
--- a/svx/source/tbxctrls/Palette.cxx
+++ b/svx/source/tbxctrls/Palette.cxx
@@ -60,9 +60,8 @@ void PaletteASE::LoadColorSet(weld::IconView& pIconView)
for (const auto& rColor : maColors)
{
SvxColorIconView::drawColor(*pVDev, rColor.m_aColor);
- OUString sColorName = rColor.m_aName;
OUString sId = OUString::number(nIx);
- pIconView.insert(nIx, &sColorName, &sId, pVDev.get(), nullptr);
+ pIconView.insert(nIx, nullptr, &sId, pVDev.get(), nullptr);
++nIx;
}
}
@@ -343,9 +342,8 @@ void PaletteGPL::LoadColorSet(weld::IconView& pIconView)
for (const auto& rColor : maColors)
{
SvxColorIconView::drawColor(*pVDev, rColor.m_aColor);
- OUString sColorName = rColor.m_aName;
OUString sId = OUString::number(nIx);
- pIconView.insert(nIx, &sColorName, &sId, pVDev.get(), nullptr);
+ pIconView.insert(nIx, nullptr, &sId, pVDev.get(), nullptr);
++nIx;
}
}
diff --git a/svx/source/tbxctrls/PaletteManager.cxx
b/svx/source/tbxctrls/PaletteManager.cxx
index 1da6f0731817..2c903b225a88 100644
--- a/svx/source/tbxctrls/PaletteManager.cxx
+++ b/svx/source/tbxctrls/PaletteManager.cxx
@@ -269,15 +269,13 @@ void PaletteManager::ReloadColorSet(weld::IconView
&pIconView)
{
pIconView.clear();
css::uno::Sequence< sal_Int32 > CustomColorList(
officecfg::Office::Common::UserColors::CustomColor::get() );
- css::uno::Sequence< OUString > CustomColorNameList(
officecfg::Office::Common::UserColors::CustomColorName::get() );
ScopedVclPtr<VirtualDevice> pVDev =
SvxColorIconView::createColorDevice();
for (int i = 0; i < CustomColorList.getLength(); ++i)
{
Color aColor(ColorTransparency, CustomColorList[i]);
SvxColorIconView::drawColor(*pVDev, aColor);
OUString sId = OUString::number(i);
- OUString sColorName = CustomColorNameList[i];
- pIconView.insert(i, &sColorName, &sId, pVDev.get(), nullptr);
+ pIconView.insert(i, nullptr, &sId, pVDev.get(), nullptr);
}
}
else if (IsThemePaletteSelected())
@@ -305,9 +303,8 @@ void PaletteManager::ReloadColorSet(weld::IconView
&pIconView)
{
auto const& rEffect = rColorData.maEffects[nEffect];
SvxColorIconView::drawColor(*pVDev, rEffect.maColor);
- OUString sColorName = rEffect.maColorName;
OUString sId = OUString::number(nItemId);
- pIconView.insert(nItemId, &sColorName, &sId, pVDev.get(),
nullptr);
+ pIconView.insert(nItemId, nullptr, &sId, pVDev.get(),
nullptr);
nItemId++;
}
}
@@ -348,7 +345,7 @@ void PaletteManager::ReloadRecentColorSet(weld::IconView&
pIconView)
OUString sColorName = bHasColorNames ? ColorNamelist[i] : ("#" +
aColor.AsRGBHexString().toAsciiUpperCase());
maRecentColors.emplace_back(aColor, sColorName);
OUString sId = OUString::number(nIx);
- pIconView.insert(nIx, &sColorName, &sId, pVDev.get(), nullptr);
+ pIconView.insert(nIx, nullptr, &sId, pVDev.get(), nullptr);
++nIx;
}
}
diff --git a/svx/source/tbxctrls/SvxColorIconView.cxx
b/svx/source/tbxctrls/SvxColorIconView.cxx
index 43018ff9b084..85ab8c2726e9 100644
--- a/svx/source/tbxctrls/SvxColorIconView.cxx
+++ b/svx/source/tbxctrls/SvxColorIconView.cxx
@@ -50,9 +50,8 @@ void
SvxColorIconView::addEntriesForXColorList(weld::IconView& pIconView,
if (pEntry)
{
drawColor(*pVDev, pEntry->GetColor());
- OUString sColorName = pEntry->GetName();
OUString sId = OUString::number(nIndex);
- pIconView.insert(nIndex, &sColorName, &sId, pVDev.get(), nullptr);
+ pIconView.insert(nIndex, nullptr, &sId, pVDev.get(), nullptr);
}
else
{
@@ -73,9 +72,8 @@ void SvxColorIconView::addEntriesForColorSet(weld::IconView&
pIconView,
for (const auto& rColor : rColorSet)
{
drawColor(*pVDev, rColor);
- OUString sName = OUString::Concat(rNamePrefix) +
OUString::number(nStartIndex);
OUString sId = OUString::number(nStartIndex);
- pIconView.insert(nStartIndex, &sName, &sId, pVDev.get(), nullptr);
+ pIconView.insert(nStartIndex, nullptr, &sId, pVDev.get(), nullptr);
nStartIndex++;
}
}
@@ -85,8 +83,7 @@ void SvxColorIconView::addEntriesForColorSet(weld::IconView&
pIconView,
{
drawColor(*pVDev, rColor);
OUString sId = OUString::number(nStartIndex);
- OUString sName = u""_ustr;
- pIconView.insert(nStartIndex, &sName, &sId, pVDev.get(), nullptr);
+ pIconView.insert(nStartIndex, nullptr, &sId, pVDev.get(), nullptr);
nStartIndex++;
}
}