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: Calc (show other bugs)
Version:
(earliest affected)
4.1.2.3 release
Hardware: x86 (IA32) Windows (All)
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: Macro-Recording
  Show dependency treegraph
 
Reported: 2013-10-11 16:07 UTC by ZioTibia81
Modified: 2023-04-20 03:31 UTC (History)
3 users (show)

See Also:
Crash report or crash signature:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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
Comment 3 QA Administrators 2015-07-18 17:44:44 UTC Comment hidden (obsolete)
Comment 4 ZioTibia81 2015-07-18 18:10:05 UTC
Still on 5.0.0.3
Comment 5 QA Administrators 2016-09-20 10:18:47 UTC Comment hidden (obsolete)
Comment 6 ZioTibia81 2016-09-20 10:43:12 UTC
Still in 5.2.1.2
Comment 7 ZioTibia81 2017-02-17 17:27:35 UTC
In version 5.3.0.3 the following macro do result as expected:

    dim myLine as new com.sun.star.table.BorderLine
    myDoc = thisComponent
    myCell = myDoc.CurrentSelection
    myLine.Color = RGB(0,0,0)
    myLine.OuterLineWidth = 26
    myCell.DiagonalBLTR = myLine  'Bottom Left Top Right
    myCell.DiagonalTLBR = myLine  'Top Left Bottom Right


macro registration still producing wrong code.
Comment 8 QA Administrators 2018-02-18 03:38:15 UTC Comment hidden (obsolete)
Comment 9 ZioTibia81 2018-02-19 13:16:55 UTC
Versione: 6.0.1.1 (x64)
Build ID: 60bfb1526849283ce2491346ed2aa51c465abfe6
Thread CPU: 12; SO: Windows 10.0; Resa interfaccia: predefinito; 
Versione locale: it-IT (it_IT); Calc: group

Macro recording still producing wrong code.
Comment 10 QA Administrators 2019-02-20 03:47:51 UTC Comment hidden (obsolete)
Comment 11 ZioTibia81 2019-02-20 10:53:51 UTC
Versione: 6.2.0.3 (x64)
Build ID: 98c6a8a1c6c7b144ce3cc729e34964b47ce25d62
Thread CPU: 12; SO: Windows 10.0; Resa interfaccia: predefinito; VCL: win; 
Versione locale: it-IT (it_IT); Lingua interfaccia: it-IT
Calc: threaded

Macro recording still producing wrong code.
Comment 12 QA Administrators 2021-04-18 03:48:47 UTC Comment hidden (obsolete)
Comment 13 ZioTibia81 2021-04-19 07:54:07 UTC
Version: 7.1.2.2 (x64) / LibreOffice Community
Build ID: 8a45595d069ef5570103caea1b71cc9d82b2aae4
CPU threads: 24; OS: Windows 10.0 Build 19042; UI render: Skia/Raster; VCL: win
Locale: it-IT (it_IT); UI: it-IT
Calc: threaded

Macro recording still producing wrong code.
Comment 14 QA Administrators 2023-04-20 03:31:15 UTC
Dear ZioTibia81,

To make sure we're focusing on the bugs that affect our users today, LibreOffice QA is asking bug reporters and confirmers to retest open, confirmed bugs which have not been touched for over a year.

There have been thousands of bug fixes and commits since anyone checked on this bug report. During that time, it's possible that the bug has been fixed, or the details of the problem have changed. We'd really appreciate your help in getting confirmation that the bug is still present.

If you have time, please do the following:

Test to see if the bug is still present with the latest version of LibreOffice from https://www.libreoffice.org/download/

If the bug is present, please leave a comment that includes the information from Help - About LibreOffice.
 
If the bug is NOT present, please set the bug's Status field to RESOLVED-WORKSFORME and leave a comment that includes the information from Help - About LibreOffice.

Please DO NOT

Update the version field
Reply via email (please reply directly on the bug tracker)
Set the bug's Status field to RESOLVED - FIXED (this status has a particular meaning that is not 
appropriate in this case)


If you want to do more to help you can test to see if your issue is a REGRESSION. To do so:
1. Download and install oldest version of LibreOffice (usually 3.3 unless your bug pertains to a feature added after 3.3) from https://downloadarchive.documentfoundation.org/libreoffice/old/

2. Test your bug
3. Leave a comment with your results.
4a. If the bug was present with 3.3 - set version to 'inherited from OOo';
4b. If the bug was not present in 3.3 - add 'regression' to keyword


Feel free to come ask questions or to say hello in our QA chat: https://web.libera.chat/?settings=#libreoffice-qa

Thank you for helping us make LibreOffice even better for everyone!

Warm Regards,
QA Team

MassPing-UntouchedBug