Bug 167028 - [FormControls-TableControl] BorderColor cannot be set directly with a Macro, without setPropertyValue
Summary: [FormControls-TableControl] BorderColor cannot be set directly with a Macro, ...
Status: UNCONFIRMED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
24.2.2.2 release
Hardware: All Windows (All)
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2025-06-15 14:36 UTC by Don
Modified: 2025-07-14 00:34 UTC (History)
0 users

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 Don 2025-06-15 14:36:15 UTC
Description:
When setting a Table Control’s BorderColor setting directly, using a Macro, instead of using “setPropertyValue”, the following error is triggered: “Inadmissible value or data type. Overflow.”
However while setting the Table Control’s Border color using “setPropertyValue” the BorderColor is set without issue, using the same data value.  
All other applicable Form controls allow the BorderColor to be set directly, without needing to resort to “setPropertyValue”.


Steps to Reproduce:
Steps to reproduce:
1. Open a Writer document
2. Insert a TableControl Form Control. 
3. Run the following Macro: (Note this Macro assumes there is only ONE CONTROL, (the Table Control).
4. The error will occur as it is listed above. You may comment the direct setting, and uncomment the “setPropertyValue” method to demonstrate that no error occurs.

Macro:
Sub Main
Dim oShape1
Dim Color As Long
Dim FlatBorder

FlatBorder = 2

Color = 1000334

oShape1 = ThisComponent.DrawPage.getbyIndex(0)

msgbox(oShape1.Control.BorderColor)

oShape1.Control.Border = FlatBorder

oShape1.Control.BorderColor = Color

REM oShape1.Control.setPropertyValue("BorderColor", 1000334)

msgbox(oShape1.Control.BorderColor)
End Sub

Actual Results:
What occurs instead is there is a error triggered when trying to set the value directly.

Expected Results:
What I expect should happen is the value should be settable without error using either method. 


Reproducible: Always


User Profile Reset: No

Additional Info:
In case it helps shed any light on things, when attempting to set the BorderColor value using another language (AutoIt), the following error is reported:
Description: Exception occurred.
Source: [automation bridge] 
Error Description: InterfaceOleWrapper::Invoke : 
[automation bridge]UnoConversionUtilities<T>:variantToAny
The provided VARIANT of type" 3" is unappropriate for conversion! at C:\cygwin64\home\buildslave\source\libo-core\extensions\source\ole\unoconversionutilities.hxx:599


Version: 24.2.2.2 (X86_64) / LibreOffice Community
Build ID: d56cc158d8a96260b836f100ef4b4ef25d6f1a01
CPU threads: 2; OS: Windows 6.1 Service Pack 1 Build 7601; UI render: Skia/Raster; VCL: win
Locale: en-US (en_US); UI: en-US
Calc: CL threaded
Comment 1 Don 2025-07-14 00:34:56 UTC
This probably belongs in Writer rather than Basic. Apologies.