Bug 70380 - [1] BASIC: Unable to set cell cross border using macro
Summary: [1] BASIC: Unable to set cell cross border using macro
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Spreadsheet (show other bugs)
Version: 4.1.2.3 release
Hardware: x86 (IA32) Windows (All)
: medium normal
Assignee: Not Assigned
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-10-11 16:07 UTC by ZioTibia81
Modified: 2014-06-25 17:50 UTC (History)
2 users (show)

See Also:
i915 platform:
i915 features:


Attachments

Description ZioTibia81 2013-10-11 16:07:01 UTC
- Open an empty spreadsheet
- Select a cell
- Start a macro recording
- open cell format and add a cross border
- apply, stop recording macro and save macro.

Generated code is:

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(3) as new com.sun.star.beans.PropertyValue
args1(0).Name = "BorderBLTR.LineFGColor"
args1(0).Value = 0
args1(1).Name = "BorderBLTR.LineOutWidth"
args1(1).Value = 1
args1(2).Name = "BorderBLTR.LineInWidth"
args1(2).Value = 0
args1(3).Name = "BorderBLTR.LineDistance"
args1(3).Value = 0

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


end sub


Now select another cell, execute macro and the cross border is not set.
Executing the same procedure with any other border (top, bottom....) the resulting macro is functionally.
Comment 1 afonit 2014-06-25 13:42:15 UTC
setting status:New,
As I was able to reproduce this on
4.2.5.2
Fedora 20


Comparing the code to the original posters, a regular border follows this pattern:
args1(0).Name = "BorderOuter.LeftBorder"
args1(0).Value = Array(0,0,2,0,0,2)


however in the cross border macro the .Value is a single integer - does it need some array to work?
Comment 2 afonit 2014-06-25 15:00:04 UTC
I see the array is necessary in the outer border because of the way the attributes are being laid out, however for the cross border it is calling these out individually, so I assume that is why it does not need an array:
args1(0).Name = "BorderBLTR.LineFGColor"
args1(0).Value = 0
args1(1).Name = "BorderBLTR.LineOutWidth"
args1(1).Value = 1
args1(2).Name = "BorderBLTR.LineInWidth"
args1(2).Value = 0
args1(3).Name = "BorderBLTR.LineDistance


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.