Bug 151847 - Invalid XPropertySet for several properties and queryInterface() returns
Summary: Invalid XPropertySet for several properties and queryInterface() returns
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: LibreOffice (show other bugs)
Version:
(earliest affected)
7.3.6.2 release
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords: needsDevAdvice
Depends on:
Blocks: UNO
  Show dependency treegraph
 
Reported: 2022-10-31 20:27 UTC by vibrationoflife
Modified: 2022-12-06 07:36 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 vibrationoflife 2022-10-31 20:27:37 UTC
Tested in LibreOffice 7.3. Unable to test in 7.4 due to bug 151846

These are just the ones I found.

----------------------------------------------------------
Several methods in the chart2 namespace are missing methods on the XPropertySet interface.

I am pointing to my OOO Development Tools project so show examples of these bugs.
see: https://github.com/Amourspirit/python_ooo_dev_tools

----------------------------------------------------------
XChartDocument.getPageBackground() is a XProperySet however is missing setPropertyValue() and getPropertySetInfo() methods and raises an attribute error when trying to access.

See: Chart2 code
https://github.com/Amourspirit/python_ooo_dev_tools/blob/f47c63aa2f179abee2f3e9b81548933f95091be1/ooodev/office/chart2.py#L1294

----------------------------------------------------------
XChartDocument.getFirstDiagram().getWall() is a XProperySet however is missing setPropertyValue() and getPropertySetInfo() methods and raises an attribute error when trying to access.

See: Chart2 code
https://github.com/Amourspirit/python_ooo_dev_tools/blob/f47c63aa2f179abee2f3e9b81548933f95091be1/ooodev/office/chart2.py#L1329

----------------------------------------------------------
Service CandleStickChartType
CandleStickChartType.WhiteDay is a XProperySet however is missing setPropertyValue() and getPropertySetInfo() methods and raises an attribute error when trying to access.
Same is true for CandleStickChartType.BlackDay

See Chart2 code
https://github.com/Amourspirit/python_ooo_dev_tools/blob/f47c63aa2f179abee2f3e9b81548933f95091be1/ooodev/office/chart2.py#L1885

----------------------------------------------------------
Current work around is to set the properties directly and not use the XPropertySet.
Such as:
white_day_dpp.FillColor = int(w_day_color)
from https://github.com/Amourspirit/python_ooo_dev_tools/blob/f47c63aa2f179abee2f3e9b81548933f95091be1/ooodev/office/chart2.py#L1912
or
Using pythons hasattr() and setattr()
See https://github.com/Amourspirit/python_ooo_dev_tools/blob/f47c63aa2f179abee2f3e9b81548933f95091be1/ooodev/utils/props.py#L504
Comment 1 Stéphane Guillou (stragu) 2022-12-04 11:29:24 UTC
@Noel: could you comment on this one as well by any chance? Thank you!
Comment 2 Noel Grandin 2022-12-05 13:55:39 UTC
this should help: https://gerrit.libreoffice.org/c/core/+/143675