- 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.
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?
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.