Bug 145092 - Remove option "Word justify" from FontWork toolbar
Summary: Remove option "Word justify" from FontWork toolbar
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: LibreOffice (show other bugs)
Version:
(earliest affected)
Inherited From OOo
Hardware: x86-64 (AMD64) Windows (All)
: medium enhancement
Assignee: Akshit
URL:
Whiteboard: target:7.4.0
Keywords: difficultyBeginner, easyHack, skillCpp, topicUI
Depends on:
Blocks: 144190
  Show dependency treegraph
 
Reported: 2021-10-12 13:38 UTC by Regina Henschel
Modified: 2022-02-15 05:19 UTC (History)
6 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 2021-10-12 13:38:00 UTC
This is a spin off to bug 37808.

Reason for removing: The item "Word Justify" produces expectation, which the actual code cannot fulfill.

1. The code for item "Word Justify" sets the option "Full width", linked with this setting in the "Text attributes"-dialog. That has nothing to do with "justify".

2. The option "Full width" would distinguish for a center-anchored text block, whether the text block size is determined by the content of the text block or by the shape geometry. The current code does not evaluate the option "Full width", but the size of the text block is determined by the custom-shape attribute draw:text-path-scale. This attribute has no UI and no uno-command, but can only be changed by a macro.

3. Individual paragraph alignments are ignored for the paragraphs in a text block of a Fontwork shape. The paragraphs are always aligned in sync with the text block anchor. Changing paragraph alignment is only possible via changing the text block anchor.

4. Paragraphs in Fontwork shapes are not able to "justify". Paragraphs in Fontwork shape have always only one line. It is not possible to have a word wrap. So for "justify" always the rule for "last line" applies. But for paragraph in shapes, there is no choice how the last line can behave. It is always so as if the last line rule "start" is set. Other options are only available for frames in Writer documents.

If at some time in the future a developer will change the behavior of Fontwork shapes, such development will introduce appropriate tools for the UI.
Comment 1 Heiko Tietze 2021-10-21 12:55:47 UTC
The topic was on the agenda of the design meeting but didn't receive further comments - likely since the request is fully elaborated. So let's do it.

svx/uiconfig/ui/fontworkalignmentcontrol.ui
svx/source/tbxctrls/fontworkgallery.cxx

Removing the UI option is an easy hack. But going further and also clean related functions might break existing documents.
Comment 2 Akshit 2021-10-24 11:41:35 UTC
Sorry, I didn't get what we're meant to be doing here, should we just remove that one option in the one file ??
Comment 3 Heiko Tietze 2021-10-25 08:08:39 UTC
Yes, let's temporary remove the option from the UI.
Comment 4 Radhey Parekh 2021-12-30 20:53:01 UTC
I've read the documentation of the bug. So, if it's not affecting the other files, I'm removing that particular option from a file.
Comment 5 Heiko Tietze 2022-02-15 05:19:12 UTC
Thank you, Akshit!
Comment 6 Commit Notification 2022-02-15 05:19:37 UTC
4k5h1t committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/31180cc24f8ff66895c52a2d4aa828ee0dcb34f3

tdf#145092 - Remove option "Word justify" from FontWork toolbar

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