cui/source/tabpages/tpcolor.cxx              |   72 +++++++++++++++------------
 sw/source/filter/ww8/docxattributeoutput.cxx |    6 +-
 2 files changed, 44 insertions(+), 34 deletions(-)

New commits:
commit e47b348bfb3d8ed97f751ea21f34b4ef860e8593
Author:     Noel Grandin <[email protected]>
AuthorDate: Tue Dec 9 17:10:47 2025 +0200
Commit:     Xisco Fauli <[email protected]>
CommitDate: Thu Dec 11 09:31:04 2025 +0100

    officeotron: w:cellIns needs to come at the end
    
    Found by running tdf127814 with validation on.
    
    Change-Id: I4f479596db9042fae507e52116f01aef762b3f2f
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/195330
    Reviewed-by: Michael Stahl <[email protected]>
    Tested-by: Jenkins
    (cherry picked from commit ca61332eef143162454eb04993bd10c074348692)
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/195361
    Reviewed-by: Xisco Fauli <[email protected]>

diff --git a/sw/source/filter/ww8/docxattributeoutput.cxx 
b/sw/source/filter/ww8/docxattributeoutput.cxx
index 22406b69160a..8d3e9369592b 100644
--- a/sw/source/filter/ww8/docxattributeoutput.cxx
+++ b/sw/source/filter/ww8/docxattributeoutput.cxx
@@ -4774,9 +4774,6 @@ void DocxAttributeOutput::TableCellProperties( 
ww8::WW8TableNodeInfoInner::Point
 
     bool const bEcma = GetExport().GetFilter().getVersion() == 
oox::core::ECMA_376_1ST_EDITION;
 
-    // Output any table cell redlines if there are any attached to this 
specific cell
-    TableCellRedline( pTableTextNodeInfoInner );
-
     if (const SfxGrabBagItem* pItem = 
pTableBox->GetFrameFormat()->GetAttrSet().GetItem<SfxGrabBagItem>(RES_FRMATR_GRABBAG))
     {
         const std::map<OUString, uno::Any>& rGrabBag = pItem->GetGrabBag();
@@ -4843,6 +4840,9 @@ void DocxAttributeOutput::TableCellProperties( 
ww8::WW8TableNodeInfoInner::Point
 
     TableVerticalCell( pTableTextNodeInfoInner );
 
+    // Output any table cell redlines if there are any attached to this 
specific cell
+    TableCellRedline( pTableTextNodeInfoInner );
+
     m_pSerializer->endElementNS( XML_w, XML_tcPr );
 }
 
commit 2dc2444fed56ba50353cd150634a443a379ed706
Author:     Jim Raykowski <[email protected]>
AuthorDate: Mon Dec 8 19:47:19 2025 -0900
Commit:     Xisco Fauli <[email protected]>
CommitDate: Thu Dec 11 09:30:55 2025 +0100

    tdf#169851 sync color table with active color
    
    commit 676892af95079d00c19527b94396aacf4136bf0d was my first stab.
    This second effort aims to provide the expected behavior of not
    changing the last used palette when it does not have a color match of
    the 'Active' color. Additionally this patch handles when the
    'Custom', 'Theme colors', or 'Document colors' palette is the last
    used palette.
    
    Change-Id: Ibce078778d8cad483448837dbb6364acbf668a40
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/195265
    Reviewed-by: Jim Raykowski <[email protected]>
    Tested-by: Jenkins
    (cherry picked from commit 8c3fc56d37a557cf34a2a8a918eabd8811177514)
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/195354
    Reviewed-by: Xisco Fauli <[email protected]>

diff --git a/cui/source/tabpages/tpcolor.cxx b/cui/source/tabpages/tpcolor.cxx
index 7e7388506d38..2313464991e7 100644
--- a/cui/source/tabpages/tpcolor.cxx
+++ b/cui/source/tabpages/tpcolor.cxx
@@ -204,37 +204,7 @@ void SvxColorTabPage::ActivatePage( const SfxItemSet& )
     if (!m_pColorList.is())
         return;
 
-    if (const XFillColorItem* pFillColorItem = 
m_rOutAttrs.GetItemIfSet(GetWhich(XATTR_FILLCOLOR)))
-    {
-        SetColorModel( ColorModel::RGB );
-        ChangeColorModel();
-
-        const Color aColor = pFillColorItem->GetColorValue();
-        NamedColor aNamedColor;
-        aNamedColor.m_aColor = aColor;
-        ChangeColor(aNamedColor);
-
-        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));
-
-            break;
-        }
-    }
+    SelectPaletteLBHdl(*m_xSelectPalette);
 
     m_aCtlPreviewOld.SetAttributes(m_aXFillAttr.GetItemSet());
     m_aCtlPreviewOld.Invalidate();
@@ -501,6 +471,46 @@ IMPL_LINK_NOARG(SvxColorTabPage, SelectPaletteLBHdl, 
weld::ComboBox&, void)
     }
 
     m_xValSetColorList->Resize();
+
+    // select the 'Active' color in the m_xValSetColorList if it has it
+    if (const XFillColorItem* pFillColorItem = 
m_rOutAttrs.GetItemIfSet(GetWhich(XATTR_FILLCOLOR)))
+    {
+        SetColorModel(ColorModel::RGB);
+        ChangeColorModel();
+
+        const Color aColor = pFillColorItem->GetColorValue();
+        NamedColor aNamedColor;
+        aNamedColor.m_aColor = aColor;
+        ChangeColor(aNamedColor);
+
+        if (sal_Int32 nPalettePos = maPaletteManager.GetPalette();
+            /* theme colors palette */ 
maPaletteManager.IsThemePaletteSelected() ||
+            /* document colors palette */ nPalettePos == 
maPaletteManager.GetPaletteCount() - 1
+            || /* custom palette */ nPalettePos == 0)
+        {
+            for (size_t nItemPos = 0, nItemCount = 
m_xValSetColorList->GetItemCount();
+                 nItemPos < nItemCount; nItemPos++)
+            {
+                auto nItemId = m_xValSetColorList->GetItemId(nItemPos);
+                if (m_xValSetColorList->GetItemColor(nItemId) == aColor)
+                {
+                    m_xValSetColorList->SelectItem(nItemId);
+                    break;
+                }
+            }
+        }
+        else
+        {
+            m_pColorList = 
XPropertyList::AsColorList(XPropertyList::CreatePropertyListFromURL(
+                XPropertyListType::Color, 
maPaletteManager.GetSelectedPalettePath()));
+            if (m_pColorList->Load())
+            {
+                auto nItemPos = FindInPalette(aColor);
+                if (nItemPos != -1)
+                    
m_xValSetColorList->SelectItem(m_xValSetColorList->GetItemId(nItemPos));
+            }
+        }
+    }
 }
 
 IMPL_LINK(SvxColorTabPage, SelectValSetHdl_Impl, ValueSet*, pValSet, void)

Reply via email to