cui/source/tabpages/tpcolor.cxx | 21 ++++++++++++++++++--- 1 file changed, 18 insertions(+), 3 deletions(-)
New commits: commit 676892af95079d00c19527b94396aacf4136bf0d Author: Jim Raykowski <[email protected]> AuthorDate: Tue Nov 4 18:30:49 2025 -0900 Commit: Jim Raykowski <[email protected]> CommitDate: Sun Nov 9 17:02:19 2025 +0100 related tdf#163347: sync color table with active color This patch makes the color table selected color in the Area and Background Color tab pages sync with the active color when the tab page is activated. Change-Id: Iedd913a7a3480dbaf7226b2833958b8c0f14db0f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/193438 Tested-by: Jenkins Reviewed-by: Jim Raykowski <[email protected]> Reviewed-by: Michael Weghorn <[email protected]> diff --git a/cui/source/tabpages/tpcolor.cxx b/cui/source/tabpages/tpcolor.cxx index 7f00956e1844..7e7388506d38 100644 --- a/cui/source/tabpages/tpcolor.cxx +++ b/cui/source/tabpages/tpcolor.cxx @@ -213,12 +213,27 @@ void SvxColorTabPage::ActivatePage( const SfxItemSet& ) NamedColor aNamedColor; aNamedColor.m_aColor = aColor; ChangeColor(aNamedColor); - sal_Int32 nPos = FindInPalette( aColor ); - if ( nPos != -1 ) + for (size_t i = 0, nSize = maPaletteManager.GetPaletteList().size(); i < nSize; ++i) + { + maPaletteManager.SetPalette(i, true/*bPosOnly*/); + + m_pColorList = XPropertyList::AsColorList(XPropertyList::CreatePropertyListFromURL( + XPropertyListType::Color, maPaletteManager.GetSelectedPalettePath())); + if (!m_pColorList->Load()) + continue; + + sal_Int32 nPos = FindInPalette(aColor); + if (nPos == -1) + continue; + + m_xSelectPalette->set_active_text(maPaletteManager.GetPaletteName()); + SelectPaletteLBHdl(*m_xSelectPalette); + m_xValSetColorList->SelectItem(m_xValSetColorList->GetItemId(nPos)); - // else search in other palettes? + break; + } } m_aCtlPreviewOld.SetAttributes(m_aXFillAttr.GetItemSet());
