sc/source/ui/view/formatsh.cxx |   30 +++++++++++++++++++++++++++---
 svx/sdi/svx.sdi                |    2 +-
 2 files changed, 28 insertions(+), 4 deletions(-)

New commits:
commit 0357d749487ad540a3779d2c3af23357c942620b
Author:     Pranam Lashkari <[email protected]>
AuthorDate: Wed Aug 13 21:55:40 2025 +0530
Commit:     Szymon Kłos <[email protected]>
CommitDate: Thu Aug 14 08:13:08 2025 +0200

    uno: added parameters to LineStyle (SID_FRAME_LINESTYLE)
    
    Change-Id: I0993bd10da42bfc29dedce3d50524889bc7a3447
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/189518
    Tested-by: Jenkins CollaboraOffice <[email protected]>
    Reviewed-by: Szymon Kłos <[email protected]>

diff --git a/sc/source/ui/view/formatsh.cxx b/sc/source/ui/view/formatsh.cxx
index e0bf6c0aa445..6e50656a13e6 100644
--- a/sc/source/ui/view/formatsh.cxx
+++ b/sc/source/ui/view/formatsh.cxx
@@ -1065,9 +1065,32 @@ void ScFormatShell::ExecuteAttr( SfxRequest& rReq )
             case SID_FRAME_LINESTYLE:
                 {
                     // Update default line
-                    const ::editeng::SvxBorderLine* pLine =
-                                pNewAttrs->Get( SID_FRAME_LINESTYLE ).
-                                GetLine();
+                    const ::editeng::SvxBorderLine* pLine = new 
::editeng::SvxBorderLine();
+                    const SfxInt16Item* lineStyleItem = 
rReq.GetArg<SfxInt16Item>(FN_PARAM_1);
+
+                    if (lineStyleItem)
+                    {
+                        const SfxInt16Item* InnerLineWidthItem
+                            = rReq.GetArg<SfxInt16Item>(FN_PARAM_2);
+                        const SfxInt16Item* OuterLineWidthItem
+                            = rReq.GetArg<SfxInt16Item>(FN_PARAM_3);
+                        const SfxInt16Item* LineDistanceItem
+                            = rReq.GetArg<SfxInt16Item>(FN_PARAM_4);
+
+                        sal_uInt16 InnerLineWidth, OuterLineWidth, 
LineDistance;
+                        SvxBorderLineStyle lineStyle
+                            = 
static_cast<SvxBorderLineStyle>(lineStyleItem->GetValue());
+                        InnerLineWidth = InnerLineWidthItem ? 
InnerLineWidthItem->GetValue() : 0;
+                        OuterLineWidth = OuterLineWidthItem ? 
OuterLineWidthItem->GetValue() : 0;
+                        LineDistance = LineDistanceItem ? 
LineDistanceItem->GetValue() : 0;
+
+                        
const_cast<::editeng::SvxBorderLine*>(pLine)->GuessLinesWidths(
+                            lineStyle, InnerLineWidth, OuterLineWidth, 
LineDistance);
+                    }
+                    else
+                    {
+                        pLine = pNewAttrs->Get(SID_FRAME_LINESTYLE).GetLine();
+                    }
 
                     if ( pLine )
                     {
@@ -1095,6 +1118,7 @@ void ScFormatShell::ExecuteAttr( SfxRequest& rReq )
                         pTabViewShell->SetDefaultFrameLine( &aDefLine );
                         pTabViewShell->SetSelectionFrameLines( nullptr, false 
);
                     }
+                    rReq.Done();
                 }
                 break;
 
diff --git a/svx/sdi/svx.sdi b/svx/sdi/svx.sdi
index a298f6f9a882..efc7c45b990d 100644
--- a/svx/sdi/svx.sdi
+++ b/svx/sdi/svx.sdi
@@ -5843,7 +5843,7 @@ SvxULSpaceItem BelowSpacing SID_ATTR_PARA_BELOWSPACE
 
 
 SvxLineItem LineStyle SID_FRAME_LINESTYLE
-
+(SfxInt16Item LineStyle FN_PARAM_1, SfxInt16Item InnerLineWidth FN_PARAM_2, 
SfxInt16Item OuterLineWidth FN_PARAM_3, SfxInt16Item LineDistance FN_PARAM_4)
 [
     AutoUpdate = FALSE,
     FastCall = FALSE,

Reply via email to