sfx2/source/control/unoctitm.cxx |    1 
 sw/inc/docsh.hxx                 |    3 +
 sw/source/uibase/app/docst.cxx   |  108 ++++++++++++++++++++-------------------
 3 files changed, 61 insertions(+), 51 deletions(-)

New commits:
commit 555de3492b063da8cb45ed63709c54e5f6e9f04b
Author:     Caolán McNamara <[email protected]>
AuthorDate: Mon Jan 19 10:52:25 2026 +0000
Commit:     Caolán McNamara <[email protected]>
CommitDate: Thu Feb 12 12:27:21 2026 +0100

    split out a ApplyStyleSheetRequest
    
    Change-Id: Iba45dc045805fe7cf0b71bf97ec9ed76f16ed88e
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/197569
    Reviewed-by: Miklos Vajna <[email protected]>
    Tested-by: Jenkins CollaboraOffice <[email protected]>
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/199259
    Tested-by: Caolán McNamara <[email protected]>
    Reviewed-by: Caolán McNamara <[email protected]>

diff --git a/sw/inc/docsh.hxx b/sw/inc/docsh.hxx
index 189f6296bfef..fcaedd5c3577 100644
--- a/sw/inc/docsh.hxx
+++ b/sw/inc/docsh.hxx
@@ -141,6 +141,9 @@ class SW_DLLPUBLIC SwDocShell
         SfxRequest* pRequest = nullptr,
         sal_uInt16 nSlot = 0);
 
+    SAL_DLLPRIVATE void ApplyStyleSheetRequest(const OUString& aParam, 
sal_uInt16 nSlot, SfxRequest& rReq, SfxStyleFamily nFamily,
+                                               SfxStyleSearchBits nMask, 
SwWrtShell* pActShell);
+
     SAL_DLLPRIVATE void                  Delete(const OUString &rName, 
SfxStyleFamily nFamily);
     SAL_DLLPRIVATE void                  Hide(const OUString &rName, 
SfxStyleFamily nFamily, bool bHidden);
     SAL_DLLPRIVATE bool                  MakeInlineHeading(SwWrtShell *pSh, 
SwTextFormatColl* pColl,
diff --git a/sw/source/uibase/app/docst.cxx b/sw/source/uibase/app/docst.cxx
index e674e5989f1c..9670cee9b957 100644
--- a/sw/source/uibase/app/docst.cxx
+++ b/sw/source/uibase/app/docst.cxx
@@ -323,6 +323,62 @@ void  SwDocShell::StateStyleSheet(SfxItemSet& rSet, 
SwWrtShell* pSh)
     }
 }
 
+void SwDocShell::ApplyStyleSheetRequest(const OUString& aParam, sal_uInt16 
nSlot, SfxRequest& rReq, SfxStyleFamily nFamily, SfxStyleSearchBits nMask, 
SwWrtShell* pActShell)
+{
+    if (!aParam.isEmpty() || nSlot == SID_STYLE_WATERCAN )
+    {
+        sal_uInt16 nRet = 0xffff;
+        bool bReturns = false;
+
+        switch(nSlot)
+        {
+            case SID_STYLE_EDIT:
+            case SID_STYLE_FONT:
+                Edit(rReq.GetFrameWeld(), UIName(aParam), {}, nFamily, nMask, 
false, (nSlot == SID_STYLE_FONT) ? u"font"_ustr : OUString(), pActShell);
+                break;
+            case SID_STYLE_DELETE:
+                Delete(aParam, nFamily);
+                break;
+            case SID_STYLE_HIDE:
+            case SID_STYLE_SHOW:
+                Hide(aParam, nFamily, nSlot == SID_STYLE_HIDE);
+                break;
+            case SID_STYLE_APPLY:
+                // Shell-switch in ApplyStyles
+                nRet = static_cast<sal_uInt16>(ApplyStyles(aParam, nFamily, 
pActShell, rReq.GetModifier() ));
+                bReturns = true;
+                break;
+            case SID_STYLE_WATERCAN:
+                nRet = static_cast<sal_uInt16>(DoWaterCan(aParam, nFamily));
+                bReturns = true;
+                break;
+            case SID_STYLE_UPDATE_BY_EXAMPLE:
+                UpdateStyle(UIName(aParam), nFamily, pActShell);
+                break;
+            case SID_STYLE_NEW_BY_EXAMPLE:
+                MakeByExample(UIName(aParam), nFamily, nMask, pActShell);
+                break;
+
+            default:
+                OSL_FAIL("Invalid SlotId");
+        }
+
+        // Update formatting toolbar buttons status
+        if (GetWrtShell()->GetSelectionType() == SelectionType::PostIt)
+            GetView()->GetViewFrame().GetBindings().InvalidateAll(false);
+
+        if (bReturns)
+        {
+            if(rReq.IsAPI()) // Basic only gets TRUE or FALSE
+                rReq.SetReturnValue(SfxUInt16Item(nSlot, sal_uInt16(nRet 
!=0)));
+            else
+                rReq.SetReturnValue(SfxUInt16Item(nSlot, nRet));
+        }
+
+        rReq.Done();
+    }
+}
+
 // evaluate StyleSheet-Requests
 void SwDocShell::ExecStyleSheet( SfxRequest& rReq )
 {
@@ -523,58 +579,8 @@ void SwDocShell::ExecStyleSheet( SfxRequest& rReq )
                     rReq.AppendItem(SfxStringItem(nSlot, aParam));
                 }
             }
-            if (!aParam.isEmpty() || nSlot == SID_STYLE_WATERCAN )
-            {
-                sal_uInt16 nRet = 0xffff;
-                bool bReturns = false;
 
-                switch(nSlot)
-                {
-                    case SID_STYLE_EDIT:
-                    case SID_STYLE_FONT:
-                        Edit(rReq.GetFrameWeld(), UIName(aParam), {}, nFamily, 
nMask, false, (nSlot == SID_STYLE_FONT) ? u"font"_ustr : OUString(), pActShell);
-                        break;
-                    case SID_STYLE_DELETE:
-                        Delete(aParam, nFamily);
-                        break;
-                    case SID_STYLE_HIDE:
-                    case SID_STYLE_SHOW:
-                        Hide(aParam, nFamily, nSlot == SID_STYLE_HIDE);
-                        break;
-                    case SID_STYLE_APPLY:
-                        // Shell-switch in ApplyStyles
-                        nRet = static_cast<sal_uInt16>(ApplyStyles(aParam, 
nFamily, pActShell, rReq.GetModifier() ));
-                        bReturns = true;
-                        break;
-                    case SID_STYLE_WATERCAN:
-                        nRet = static_cast<sal_uInt16>(DoWaterCan(aParam, 
nFamily));
-                        bReturns = true;
-                        break;
-                    case SID_STYLE_UPDATE_BY_EXAMPLE:
-                        UpdateStyle(UIName(aParam), nFamily, pActShell);
-                        break;
-                    case SID_STYLE_NEW_BY_EXAMPLE:
-                        MakeByExample(UIName(aParam), nFamily, nMask, 
pActShell);
-                        break;
-
-                    default:
-                        OSL_FAIL("Invalid SlotId");
-                }
-
-                // Update formatting toolbar buttons status
-                if (GetWrtShell()->GetSelectionType() == SelectionType::PostIt)
-                    
GetView()->GetViewFrame().GetBindings().InvalidateAll(false);
-
-                if (bReturns)
-                {
-                    if(rReq.IsAPI()) // Basic only gets TRUE or FALSE
-                        rReq.SetReturnValue(SfxUInt16Item(nSlot, 
sal_uInt16(nRet !=0)));
-                    else
-                        rReq.SetReturnValue(SfxUInt16Item(nSlot, nRet));
-                }
-
-                rReq.Done();
-            }
+            ApplyStyleSheetRequest(aParam, nSlot, rReq, nFamily, nMask, 
pActShell);
 
             break;
         }
commit a0d199b9cb3b49c97d9d9ec75595666807e6973b
Author:     Caolán McNamara <[email protected]>
AuthorDate: Fri Jan 16 17:26:06 2026 +0000
Commit:     Caolán McNamara <[email protected]>
CommitDate: Thu Feb 12 12:27:10 2026 +0100

    kit integration, explicitly list uno:EditStyle
    
    this is already indirectly available from the (para) sidebar when
    clicking on the dialog launch button.
    
    Change-Id: If03d3b49deae4a7248af7902867c0802cdf55ffe
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/197469
    Tested-by: Jenkins CollaboraOffice <[email protected]>
    Reviewed-by: Miklos Vajna <[email protected]>
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/199241
    Reviewed-by: Caolán McNamara <[email protected]>
    Tested-by: Jenkins

diff --git a/sfx2/source/control/unoctitm.cxx b/sfx2/source/control/unoctitm.cxx
index 74973e2f8cec..9c25612eae72 100644
--- a/sfx2/source/control/unoctitm.cxx
+++ b/sfx2/source/control/unoctitm.cxx
@@ -1458,6 +1458,7 @@ const std::map<std::u16string_view, KitUnoCommand>& 
GetKitUnoCommandList()
         { u"ChangeTheme", { PayloadType::None, true } },
         { u"DeleteSlide", { PayloadType::None, true } },
         { u"DuplicateSlide", { PayloadType::None, true } },
+        { u"EditStyle", { PayloadType::None, true } },
         { u"InsertSlide", { PayloadType::None, true } },
         { u"JumpToMark", { PayloadType::None, true } },
         { u"MoveKeepInsertMode", { PayloadType::None, true } },

Reply via email to