poor mans tool: record a macro …
would that snippet help?
sub double_line_border
rem ----------------------------------------------------------------------
rem define variables
dim document as object
dim dispatcher as object
rem ----------------------------------------------------------------------
rem get access to the document
document = ThisComponent.CurrentController.Frame
dispatcher = createUnoService("com.sun.star.frame.DispatchHelper")
rem ----------------------------------------------------------------------
dim args1(0) as new com.sun.star.beans.PropertyValue
args1(0).Name = "ToPoint"
args1(0).Value = "$B$3"
dispatcher.executeDispatch(document, ".uno:GoToCell", "", 0, args1())
rem ----------------------------------------------------------------------
dim args2(0) as new com.sun.star.beans.PropertyValue
args2(0).Name = "By"
args2(0).Value = 1
dispatcher.executeDispatch(document, ".uno:GoRightSel", "", 0, args2())
rem ----------------------------------------------------------------------
dim args3(0) as new com.sun.star.beans.PropertyValue
args3(0).Name = "By"
args3(0).Value = 1
dispatcher.executeDispatch(document, ".uno:GoDownSel", "", 0, args3())
rem ----------------------------------------------------------------------
dim args4(0) as new com.sun.star.beans.PropertyValue
args4(0).Name = "By"
args4(0).Value = 1
dispatcher.executeDispatch(document, ".uno:GoDownSel", "", 0, args4())
rem ----------------------------------------------------------------------
dispatcher.executeDispatch(document, ".uno:BorderTLBR", "", 0, Array())
rem ----------------------------------------------------------------------
dispatcher.executeDispatch(document, ".uno:BorderBLTR", "", 0, Array())
rem ----------------------------------------------------------------------
dim args7(7) as new com.sun.star.beans.PropertyValue
args7(0).Name = "BorderOuter.LeftBorder"
args7(0).Value = Array(0,0,0,0,0,0)
args7(1).Name = "BorderOuter.LeftDistance"
args7(1).Value = 0
args7(2).Name = "BorderOuter.RightBorder"
args7(2).Value = Array(0,0,0,0,0,0)
args7(3).Name = "BorderOuter.RightDistance"
args7(3).Value = 0
args7(4).Name = "BorderOuter.TopBorder"
args7(4).Value = Array(0,0,0,0,0,0)
args7(5).Name = "BorderOuter.TopDistance"
args7(5).Value = 0
args7(6).Name = "BorderOuter.BottomBorder"
args7(6).Value = Array(16711680,18,18,53,15,88)
args7(7).Name = "BorderOuter.BottomDistance"
args7(7).Value = 0
dispatcher.executeDispatch(document, ".uno:BorderOuter", "", 0, args7())
end sub 'double_line_border
[edit] edited acc. @Lupp’s hint, (sorry, still not learned how to insert code,) [/edit],
sorry, it’s not exact your solution, but something you can start with,
sorry, would have posted it as comment, but too long,
sorry, macro recorder produces cruel cote with ‘uno’ and ‘dispatcher’ …
@Lupp: thanks, good tip, totally intuitive once you know it,
i’m quite sure it’s somewhere in the FAQ, i’m absolutely sure nobody reads it …
[edit]] @Lupp (written here because too long for a comment) ‘never say never’,
OP said he could do that in Excel, tried, works, recorded macro - cave! ex$el, not! calc:
Sub Macro1()
'
' Macro1 Macro
' format borders
'
- cave! ex$el, not! calc
'
Range("B3:D6").Select
Selection.Borders(xlDiagonalDown).LineStyle = xlNone
Selection.Borders(xlDiagonalUp).LineStyle = xlNone
With Selection.Borders(xlEdgeLeft)
.LineStyle = xlContinuous
.Color = -16776961
.TintAndShade = 0
.Weight = xlMedium
End With
With Selection.Borders(xlEdgeTop)
.LineStyle = xlContinuous
.Color = -16776961
.TintAndShade = 0
.Weight = xlMedium
End With
With Selection.Borders(xlEdgeBottom)
.LineStyle = xlDouble
.Color = -16776961
.TintAndShade = 0
.Weight = xlThick
End With
With Selection.Borders(xlEdgeRight)
.LineStyle = xlContinuous
.Color = -16776961
.TintAndShade = 0
.Weight = xlMedium
End With
With Selection.Borders(xlInsideVertical)
.LineStyle = xlContinuous
.Color = -16776961
.TintAndShade = 0
.Weight = xlThin
End With
With Selection.Borders(xlInsideHorizontal)
.LineStyle = xlContinuous
.Color = -16776961
.TintAndShade = 0
.Weight = xlThin
End With
Range("E15").Select
End Sub
[/edit]