Issue 18035 - macro recorder in scalc not recording all border selections correctly
Summary: macro recorder in scalc not recording all border selections correctly
Status: ACCEPTED
Alias: None
Product: Calc
Classification: Application
Component: code (show other issues)
Version: OOo 1.1 RC2
Hardware: All All
: P3 Trivial with 1 vote (vote)
Target Milestone: ---
Assignee: AOO issues mailing list
QA Contact:
URL:
Keywords:
Depends on:
Blocks: 20046 81535
  Show dependency tree
 
Reported: 2003-08-08 16:01 UTC by Unknown
Modified: 2017-05-20 11:13 UTC (History)
2 users (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this issue.
Description Unknown 2003-08-08 16:01:04 UTC
I recorded a macro for the purpose of defining a border around a group of 
cells, as well as, a vertical line between the cells. I then cleared the 
border format and ran the macro. The border around the cells got created but 
the vertical between the cells did not. It does appear that coding was put in 
the macro to do the vertical line between the cells, it just does not do 
anything. 
 
I include the macro as created by the recorder for your reference. 
 
Thanks for your help, 
david 
 
sub Main 
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 = "$A$6:$P$8" 
 
dispatcher.executeDispatch(document, ".uno:GoToCell", "", 0, args1()) 
 
rem ---------------------------------------------------------------------- 
dim args2(7) as new com.sun.star.beans.PropertyValue 
args2(0).Name = "BorderOuter.LeftBorder" 
args2(0).Value = Array(0,0,2,0) 
args2(1).Name = "BorderOuter.LeftDistance" 
args2(1).Value = 0 
args2(2).Name = "BorderOuter.RightBorder" 
args2(2).Value = Array(0,0,2,0) 
args2(3).Name = "BorderOuter.RightDistance" 
args2(3).Value = 0 
args2(4).Name = "BorderOuter.TopBorder" 
args2(4).Value = Array(0,0,2,0) 
args2(5).Name = "BorderOuter.TopDistance" 
args2(5).Value = 0 
args2(6).Name = "BorderOuter.BottomBorder" 
args2(6).Value = Array(0,0,2,0) 
args2(7).Name = "BorderOuter.BottomDistance" 
args2(7).Value = 0 
 
dispatcher.executeDispatch(document, ".uno:BorderOuter", "", 0, args2()) 
 
rem ---------------------------------------------------------------------- 
dim args3(4) as new com.sun.star.beans.PropertyValue 
args3(0).Name = "BorderInner.Horizontal" 
args3(0).Value = Array(0,0,0,0) 
args3(1).Name = "BorderInner.Vertical" 
args3(1).Value = Array(0,0,2,0) 
args3(2).Name = "BorderInner.Flags" 
args3(2).Value = 1 
args3(3).Name = "BorderInner.ValidFlags" 
args3(3).Value = 127 
args3(4).Name = "BorderInner.DefaultDistance" 
args3(4).Value = 0 
 
dispatcher.executeDispatch(document, ".uno:BorderInner", "", 0, args3()) 
 
rem ---------------------------------------------------------------------- 
dim args4(0) as new com.sun.star.beans.PropertyValue 
args4(0).Name = "ToPoint" 
args4(0).Value = "$D$10" 
 
dispatcher.executeDispatch(document, ".uno:GoToCell", "", 0, args4()) 
 
 
end sub
Comment 1 oc 2003-08-11 09:43:36 UTC
Hi Joerg, please have a look
Comment 2 joerg.skottke 2003-09-16 13:58:47 UTC
Confirmed.
BorderInner is not recorded/replayed correctly.

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

dispatcher.executeDispatch(document, ".uno:BorderInner", "", 0, args8())
Comment 3 joerg.skottke 2003-09-16 14:11:54 UTC
Reassign to NN

Comment 4 niklas.nebel 2003-09-18 12:35:18 UTC
note: later?
Comment 5 niklas.nebel 2003-09-19 15:06:11 UTC
Accepting, but don't expect any quick progress. There are currently no
plans to extend the coverage of the macro recorder.
Comment 6 oc 2003-09-22 11:14:06 UTC
According to the OpenOffice.org roadmap
(http://tools.openoffice.org/releases) this issue was retargeted to
OOo Later.
Comment 7 ooo 2005-07-24 17:25:59 UTC
In swriter-tables (OOo 1.1.4) there seems to be the same problem with BorderInner.

The macro-recorder in swriter produces the same code when recording the changes
to border attributes of a seleceted group of cells in a table.

But when replaying the macro, only the outer borders are changed correctly,
while the inner borders are erased completely !

@jsk: why do you rewrite the code to 
args8(0).Name = "BorderInner.Horizontal"
args8(0).Value = Array(0,0,88,0)
args8(1).Name = "BorderInner.Vertical"
args8(1).Value = Array(0,0,2,0)
while dwoody1 only wanted to have a vertical line ?

@all: what would a code look like which can make inner borders thicker ? 

Gisbert

Comment 8 mroe 2007-04-03 10:06:45 UTC
Now there is OOo 2.2 out - and this bug exists furthermore.

A interesting thing is that the recorder create other code if you record the
using of the icon for the border formatting.

So you can rewrite the above code as

sub Main 
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 args2(12) as new com.sun.star.beans.PropertyValue 
args2(0).Name = "OuterBorder.LeftBorder" 
args2(0).Value = Array(0,0,2,0) 
args2(1).Name = "OuterBorder.LeftDistance" 
args2(1).Value = 0 
args2(2).Name = "OuterBorder.RightBorder" 
args2(2).Value = Array(0,0,2,0) 
args2(3).Name = "OuterBorder.RightDistance" 
args2(3).Value = 0 
args2(4).Name = "OuterBorder.TopBorder" 
args2(4).Value = Array(0,0,2,0) 
args2(5).Name = "OuterBorder.TopDistance" 
args2(5).Value = 0 
args2(6).Name = "OuterBorder.BottomBorder" 
args2(6).Value = Array(0,0,2,0) 
args2(7).Name = "OuterBorder.BottomDistance" 
args2(7).Value = 0 
args2(8).Name = "InnerBorder.Horizontal" 
args2(8).Value = Array(0,0,0,0) 
args2(9).Name = "InnerBorder.Vertical" 
args2(9).Value = Array(0,0,2,0) 
args2(10).Name = "InnerBorder.Flags" 
args2(10).Value = 1 
args2(11).Name = "InnerBorder.ValidFlags" 
args2(11).Value = 127 
args2(12).Name = "InnerBorder.DefaultDistance" 
args2(12).Value = 0 
 
dispatcher.executeDispatch(document, ".uno:SetBorderStyle", "", 0, args2()) 
 
end sub

This works.


Is there a explanation for the difference between the use of
".uno:BorderOuter"/".uno:BorderInner" and ".uno:SetBorderStyle" with the
definitions of "InnerBorder" and "OuterBorder"?
Where can i find the specifications for the dispatch parameters, especially for
the ".uno:"-constructs and their accepted properties?


Mathias
Comment 9 Marcus 2017-05-20 11:13:56 UTC
Reset assigne to the default "issues@openoffice.apache.org".