Bug 145081 - Line spacing style type "Fixed" is exposed on the property side bar but not on the style sheet dialog
Summary: Line spacing style type "Fixed" is exposed on the property side bar but not o...
Status: VERIFIED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Draw (show other bugs)
Version:
(earliest affected)
4.4.0.3 release
Hardware: x86-64 (AMD64) All
: medium normal
Assignee: Glen Campbell
URL:
Whiteboard: target:24.8.0
Keywords: difficultyBeginner, easyHack, skillCpp
Depends on:
Blocks: Textbox Paragraph-Dialog Styles-Dialog Paragraph-Line-Spacing
  Show dependency treegraph
 
Reported: 2021-10-11 18:53 UTC by xordevoreaux
Modified: 2024-04-02 06:41 UTC (History)
10 users (show)

See Also:
Crash report or crash signature:


Attachments
screenshot (43.89 KB, image/png)
2021-10-11 18:55 UTC, xordevoreaux
Details

Note You need to log in before you can comment on or make changes to this bug.
Description xordevoreaux 2021-10-11 18:53:02 UTC
Description:
In applying styles to a text box so that its style is consistent throughout my Windows LO document, I noticed that the line spacing style "Fixed" shows up in the property side bar drop-down, but not on the line spacing drop-down on the style sheet dialog box.

Steps to Reproduce:
Part 1:

1. Launch Windows LO Draw
2. Create a standard text box
3. Type something in the text box
4. From the Properties side bar, select Set Line Spacing
5. Click the Custom Value Line Spacing drop-down to show its options
6. Observe that the "Fixed" option is available in the drop-down

Part 2:
1. Change the side bar from Properties to Styles by clicking the Styles icon on the property side bar. The "Default Drawing Style" will be highlighted by default and that's fine.
2. Right-click the highlighted style and select Modify...
   The Graphic Styles: Default Drawing Style dialog appears.
3. Select the Indents & Spacing Tab
4. Click the Line Spacing drop-down
5. Notice that there are 7 available choices, not 8. "Fixed" is missing.

Actual Results:
"Fixed" isn't showing up on both drop-downs.

Expected Results:
"Fixed" should show up on both drop-downs, especially since the "Fixed" property and its custom value will affect text on a box with text. It's a viable option so should be exposed on the style sheet dialog.


Reproducible: Always


User Profile Reset: No



Additional Info:
Version: 7.3.0.0.alpha0+ (x64) / LibreOffice Community
Build ID: 21b2c6b7d8f4661dcbd40df4f8b9126d331cbd7f
CPU threads: 8; OS: Windows 10.0 Build 19043; UI render: Skia/Vulkan; VCL: win
Locale: en-US (en_US); UI: en-US
Calc: CL
Comment 1 xordevoreaux 2021-10-11 18:55:43 UTC
Created attachment 175677 [details]
screenshot

Side-by-side screen captures showing the Fixed line spacing style exposed on the custom line spacing drop-down on the property side bar and, on the right, the same setting on the style dialog, but missing "Fixed"
Comment 2 xordevoreaux 2022-05-17 02:37:17 UTC
Still a problem in

Version: 7.4.0.0.alpha1 (x64) / LibreOffice Community
Build ID: b871abad383583f02eb49c7e49aeae01f6941072
CPU threads: 8; OS: Windows 10.0 Build 19044; UI render: Skia/Raster; VCL: win
Locale: en-US (en_US); UI: en-US
Calc: CL
Comment 3 raal 2022-08-09 20:30:58 UTC
confirm with Version: 7.5.0.0.alpha0+ / LibreOffice Community
Build ID: 3ccbfaaf95005a34ca64ad250463ef5ce8842f43
CPU threads: 4; OS: Linux 5.15; UI render: default; VCL: gtk3
Locale: cs-CZ (cs_CZ.UTF-8); UI: en-US
Calc: threaded
Comment 4 xordevoreaux 2023-05-16 00:13:14 UTC
Still a problem in 

Version: 7.6.0.0.alpha1 (X86_64) / LibreOffice Community
Build ID: 9366f83c88fc93d40ea0c0035508f24ad5dcb144
CPU threads: 8; OS: Windows 10.0 Build 19045; UI render: Skia/Vulkan; VCL: win
Locale: en-US (en_US); UI: en-US
Calc: CL threaded
Comment 5 Stéphane Guillou (stragu) 2023-07-17 15:41:00 UTC
The "fixed" setting started being listed in the sidebar in LO 4.4, likely from the rework of the dropdown in http://cgit.freedesktop.org/libreoffice/core/log/?qt=range&q=c7ba28eaa766f2c1d4f0d3b25b40dd40777bc66b..695d29e17feefb33ff54e7263ba2d322e665d176 (referenced in bug 83076).

Not just in Draw, also in Writer.

Hossein, is this an easyHack?
Comment 6 Hossein 2023-07-20 14:15:12 UTC
(In reply to Stéphane Guillou (stragu) from comment #5)
> The "fixed" setting started being listed in the sidebar in LO 4.4, likely
> from the rework of the dropdown in
> http://cgit.freedesktop.org/libreoffice/core/log/
> ?qt=range&q=c7ba28eaa766f2c1d4f0d3b25b40dd40777bc66b..
> 695d29e17feefb33ff54e7263ba2d322e665d176 (referenced in bug 83076).
> 
> Not just in Draw, also in Writer.
> 
> Hossein, is this an easyHack?
Yes, I've added the relevant tags. Thanks.
Comment 7 Kira Tubo 2023-12-21 00:23:10 UTC
I've found some issues with attempting to fix this bug. Based on my findings, I don't know if this can still be classified as a "beginner" hack anymore. 

I found that cui/uiconfig/ui/paraindentspacing.ui, was missing the "Fixed" value. Adding the value seems to fix Draw and Impress, however, it creates a duplicate "Fixed" value to Writer. I'm guessing paraindentspacing.ui is a global setting, and something else is affecting either Writer or Draw/Impress separately. 

I also found svx/uiconfig/ui/paralinespacingcontrol.ui, but this only seems to affect the Line Spacing dropdown on the Properties side bar. 

I'll be unassigning this from myself for anyone else that may be interested in picking this up. 

Some more information from Buovjaga that may be useful (thanks Buovjaga!):

> For svx/uiconfig/ui/paralinespacingcontrol.ui the corresponding .cxx
> file is svx/source/sidebar/paragraph/ParaLineSpacingControl.cxx where
> you see
>
> , mxLineDist(m_xBuilder->weld_combo_box("line_dist"))
>
> For cui/uiconfig/ui/paraindentspacing.ui the .cxx is
> cui/source/tabpages/paragrph.cxx where you see
>
> , m_xLineDist(m_xBuilder->weld_combo_box("comboLB_LINEDIST"))
>
> It seems these are the relevant ones and there are no others controlling
> how the dropdown appears in Edit Styles. I searched for LLINESPACE_DURCH
> (German for Leading) and there were no hits in other .cxx files than
> these two.
>
> It might be some clue that there is logic for LLINESPACE_FIX in both
> .cxx files.
>
> I wonder if SvxStdParagraphTabPage::FillItemSet() in
> cui/source/tabpages/paragrph.cxx is responsible for the "magical"
> appearance of Fixed in Writer.
Comment 8 Glen Campbell 2024-03-21 13:27:51 UTC
kira.tubo was correct - the entry for "Fixed" needed to go in cui/uiconfig/ui/paraindentspacing.ui, but the trick was finding the "magic" that added and additional "Fixed" to the Writer app. I tracked this down and found the cryptic code in cui/source/tabpages/paragraph.cxx.

 if(pLineDistItem)
     EnableAbsLineDist(pLineDistItem->GetValue());

Getting rid of this code and adding "Fixed" to paraindentspacing.ui fixes this bug.
Comment 9 V Stuart Foote 2024-03-21 17:54:43 UTC
Handling LLINESPACE_FIX case as style paragraph-properties and fo:line-height.

In function, ODF does support paragraph styling in drawing objects, and I can copy the Fixed fo:line-height value from another ODF document and it is recognized for the drawing object text. E.g. if a

<style:paragraph-properties fo:line-height="0.3402in"/>

stanza is written for Fixed line spacing in Flat ODF. The style is valid and parsed and persists in a graphics style applied to other drawing objects with text within the ODG.

There just is no UI to do manipulate it in the drawing style.
Comment 10 Glen Campbell 2024-03-29 15:31:35 UTC
Reviewed On: https://gerrit.libreoffice.org/c/core/+/165400
Comment 11 Commit Notification 2024-03-30 15:00:04 UTC
Glen Campbell committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/9d28e7964bf0730dc03d40adfbab95dd9b5d087c

tdf#145081 Line spacing style type "Fixed" is not on the style sheet dialog

It will be available in 24.8.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 12 V Stuart Foote 2024-03-31 11:43:40 UTC
Fixed entry for line spacing is now available working from SB <F11> Styles deck. And in other UI where the Line Spacing control includes a listbox selector.

Thanks Glen, great first patch--keep going!


=-testing-=
TB77 nightly 20240331
Version: 24.8.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: c9d4f99b2bb54ac7735b3e0d0cadbafbd0279518
CPU threads: 8; OS: Windows 10.0 Build 19045; UI render: Skia/Vulkan; VCL: win
Locale: en-US (en_US); UI: en-US
Calc: CL threaded
Comment 13 Stéphane Guillou (stragu) 2024-04-02 06:41:11 UTC
Fix verified in:

Version: 24.8.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: 069bf61cea5e3aea07ffd5a1bb9f55324651cb35
CPU threads: 8; OS: Linux 6.5; UI render: default; VCL: gtk3
Locale: en-AU (en_AU.UTF-8); UI: en-US
Calc: CL threaded

Thanks Glen!