Bug 135115

Summary: Styles Inspector: show Paragraph direct formatting
Product: LibreOffice Reporter: Mike Kaganski <mikekaganski>
Component: WriterAssignee: Aron Budea <aron.budea>
Status: RESOLVED FIXED    
Severity: normal CC: aron.budea, heiko.tietze, quikee
Priority: medium    
Version: 7.1.0.0.alpha0+   
Hardware: All   
OS: All   
See Also: https://bugs.documentfoundation.org/show_bug.cgi?id=137105
Whiteboard: target:7.1.0
Crash report or crash signature: Regression By:
Bug Depends on:    
Bug Blocks: 134554    
Attachments: A simple FODT with direct formatting on character and paragraph levels

Description Mike Kaganski 2020-07-24 20:32:06 UTC
Created attachment 163492 [details]
A simple FODT with direct formatting on character and paragraph levels

In attached document, the range from last part of first paragraph to first part of third paragraph is manually set *bold*. additionally, second word of second paragraph is manually set not bold.

Using Styles Inspector, putting cursor to first (normal) part of first paragraph shows exactly the same data as putting the cursor to bold parts of the second paragraph. That is because the direct properties that are set on paragraph level are not shown.

They must be shown after paragraph styles, before character styles. To get them, we need to obtain a reference to the paragraph (also a XTextRange) that is parent to current XTextRange, and query its direct properties the same way as we do for XTextRange.

To obtain the paragraph reference, query css::container::XEnumerationAccess from the xRange; then get enumeration, and use its first element.
Comment 1 Commit Notification 2020-09-19 21:00:37 UTC
Aron Budea committed a patch related to this issue.
It has been pushed to "master":

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

tdf#135115: show paragraph direct formatting in Styles Inspector

It will be available in 7.1.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.