Bug 139529 - Displayname property does not exist for some Writer styles
Summary: Displayname property does not exist for some Writer styles
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
7.0.4.2 release
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard: target:7.2.0 target:7.1.1
Keywords:
: 139528 (view as bug list)
Depends on:
Blocks:
 
Reported: 2021-01-11 00:16 UTC by Jean-Michel COSTE
Modified: 2023-07-27 10:04 UTC (History)
3 users (show)

See Also:
Crash report or crash signature:


Attachments
Macro to list styles (12.42 KB, application/vnd.oasis.opendocument.text)
2021-01-11 00:19 UTC, Jean-Michel COSTE
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Jean-Michel COSTE 2021-01-11 00:16:15 UTC
Description:
There is an error with some Writer styles, for which the DisplayName property is missing. These are the styles of the TableStyles and CellStyles families.
In addition, these styles are considered userStyles, whereas they are not editable.
The attached document contains a macro that lists all of the custom user styles in the document.

Steps to Reproduce:
1.In a macro, try to get DiplayName of a style (TableStyle or CellStyle)
2.
3.

Actual Results:
Basic runTime error
Property or method not found

Expected Results:
localized name of the style


Reproducible: Always


User Profile Reset: No



Additional Info:
Version: 7.0.4.2
Build ID: dcf040e67528d9187c66b2379df5ea4407429775
CPU threads: 2; OS: Linux 5.4; UI render: default; VCL: gtk3
Locale: fr-FR (fr_FR.UTF-8); UI: en-US
Calc: threaded
Comment 1 Jean-Michel COSTE 2021-01-11 00:19:51 UTC
Created attachment 168809 [details]
Macro to list styles

Run the macro ListerStyles() to see the styles that have no DisplayName property....
Comment 2 Jean-Michel COSTE 2021-01-11 00:23:05 UTC
And no description in the API
Comment 3 Xisco Faulí 2021-01-11 13:15:53 UTC
*** Bug 139528 has been marked as a duplicate of this bug. ***
Comment 4 Commit Notification 2021-02-06 21:40:08 UTC
Maxim Monastirsky committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/9933c3631b5bd9d7b47d0d12c5a7dd292cf1944f

tdf#139529 Fix incomplete DisplayName property for table styles

It will be available in 7.2.0.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 5 Maxim Monastirsky 2021-02-06 21:59:33 UTC
The above commit should fix the DisplayName property of table styles. As for cell styles, I don't think they need DisplayName. Those styles are used only as part of table styles, not as standalone styles (i.e. you can't assign a cell style to a table cell), and not supposed to be shown in the UI.
Comment 6 Commit Notification 2021-02-10 09:33:40 UTC
Maxim Monastirsky committed a patch related to this issue.
It has been pushed to "libreoffice-7-1":

https://git.libreoffice.org/core/commit/d803e27ab9fd779720bcf970834d74b41ab90f65

tdf#139529 Fix incomplete DisplayName property for table styles

It will be available in 7.1.1.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 7 QA Administrators 2023-02-11 03:24:03 UTC Comment hidden (obsolete)
Comment 8 BogdanB 2023-07-26 16:16:45 UTC
Maxim Monastirsky, is this bug solved (by your commits), or is still something to do?
Comment 9 Maxim Monastirsky 2023-07-27 10:04:36 UTC
Yes, let's close.