Bug 159405 - [API] Property 'ExtrusionColor' does not exist, need to be named 'Color'
Summary: [API] Property 'ExtrusionColor' does not exist, need to be named 'Color'
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: sdk (show other bugs)
Version:
(earliest affected)
unspecified
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords: needsDevEval
Depends on:
Blocks:
 
Reported: 2024-01-28 00:10 UTC by Regina Henschel
Modified: 2024-03-21 07:38 UTC (History)
2 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 Regina Henschel 2024-01-28 00:10:29 UTC
In the IDL-reference
https://api.libreoffice.org/docs/idl/ref/index.html
search for ExtrusionColor. You will find:

◆ ExtrusionColor
boolean ExtrusionColor 	optional property
This attribute specifies if the "SecondFillColor" is used as extrusion color.

There exist no such property. The actual name of the property is 'Color'. And there is no 'SecondFillColor'. The actual name is 'FillColor2'. But such property is not contained in the IDL-reference.

Draw a custom shape e.g. a 'Frame' from the category 'Basic Shapes'.
Click on 'Toggle Extrusion' to make it 3D.
Rotate it a little bit so that you see the extruded faces.
Open the development tools.
Inspect the shape:
Find the property "CustomShapeGeometry" and open it. It is a sequence.
Find the item with 'Name' 'Extrusion' in the sequence. Open its 'Value'. That is again a sequence.
Open all its items and note their names. In case you see a property 'Color' it should have the value 'false', because that is the default value.

Go back to the shape. In the '3D Settings' toolbar go to the item '3D Color' (right most) and select a color. The extrusion faces will have this color now.

Go back to the developer tools and inspect the "CustomShapeGeometry" of the shape again (don't forget refresh). Now you will have a property 'Color' with value 'true'. There is still no property 'ExtrusionColor'.

In the developer tools look at the properties of the shape. You will find "FillColor" and "FillColor2". The property "FillColor2" contains your chosen color as decimal number. Convert it to hexadecimal to get the RGB values.

The wrong property name is in
https://opengrok.libreoffice.org/xref/core/offapi/com/sun/star/drawing/EnhancedCustomShapeGeometry.idl

The 'FillColor2' is missing in
https://opengrok.libreoffice.org/xref/core/offapi/com/sun/star/drawing/FillProperties.idl

I think it could be an 'easyHack'.
Comment 1 Stéphane Guillou (stragu) 2024-03-21 07:38:13 UTC
Thanks Regina.
So this a documentation issue only, right?
Hossein, what do you think about easyHack?