Issue 97725 - Error in recorded macro when lines round cells are defined
Summary: Error in recorded macro when lines round cells are defined
Status: CONFIRMED
Alias: None
Product: Calc
Classification: Application
Component: editing (show other issues)
Version: OOO300m9
Hardware: HP (PA-RISC) Windows XP
: P3 Trivial (vote)
Target Milestone: ---
Assignee: AOO issues mailing list
QA Contact:
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-01-03 13:46 UTC by priccen
Modified: 2013-04-12 12:12 UTC (History)
2 users (show)

See Also:
Issue Type: DEFECT
Latest Confirmation in: 4.0.0
Developer Difficulty: ---


Attachments

Note You need to log in before you can comment on or make changes to this issue.
Description priccen 2009-01-03 13:46:33 UTC
I am trying to record a macro to define lines in a bunch of cells.
eg: I choose B4 - D13. 
I do:
Record macro
Format > Cells
Define lines (In Swedish "Inramning" (I use Swedish))
I define 0.5-lines at every place
OK
Stop recording macro.
Saving the macro in my lib

The result on my screen is just as I wanted: a grid net round each cell

I choose an other bunch of cells and run my recorded macro. Nothing happens

My recorded macro looks like:

Sub Main

End Sub


sub Cell_lines
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(7) as new com.sun.star.beans.PropertyValue
args1(0).Name = "BorderOuter.LeftBorder"
args1(0).Value = Array(0,0,18,0)
args1(1).Name = "BorderOuter.LeftDistance"
args1(1).Value = 0
args1(2).Name = "BorderOuter.RightBorder"
args1(2).Value = Array(0,0,18,0)
args1(3).Name = "BorderOuter.RightDistance"
args1(3).Value = 0
args1(4).Name = "BorderOuter.TopBorder"
args1(4).Value = Array(0,0,18,0)
args1(5).Name = "BorderOuter.TopDistance"
args1(5).Value = 0
args1(6).Name = "BorderOuter.BottomBorder"
args1(6).Value = Array(0,0,18,0)
args1(7).Name = "BorderOuter.BottomDistance"
args1(7).Value = 0

dispatcher.executeDispatch(document, ".uno:BorderOuter", "", 0, args1())

rem ----------------------------------------------------------------------
dim args2(4) as new com.sun.star.beans.PropertyValue
args2(0).Name = "BorderInner.Horizontal"
args2(0).Value = Array(0,0,18,0)
args2(1).Name = "BorderInner.Vertical"
args2(1).Value = Array(0,0,18,0)
args2(2).Name = "BorderInner.Flags"
args2(2).Value = 3
args2(3).Name = "BorderInner.ValidFlags"
args2(3).Value = 127
args2(4).Name = "BorderInner.DefaultDistance"
args2(4).Value = 0

dispatcher.executeDispatch(document, ".uno:BorderInner", "", 0, args2())


end sub

If I define only outer lines, lines round my chosen cells or background color I
got a working macro.
Comment 1 mrelwood 2009-12-28 09:02:05 UTC
Confirmed.

The problem seems to be with borders that are between cells. I would use a 
macro with vertical borders left, right, and in between cells. Only the left 
and right borders are applied.
Comment 2 Edwin Sharp 2013-04-12 12:12:59 UTC
When running macro on a bunch of cells only outer border is applied without inner borders.
Rev. 1466899 Win 7