Created attachment 181653 [details]
Fontwork shapes for testing
Open attached file. It contains two Fontwork shapes. Click on such shape. That should open the "Fontwork" toolbar. Click on icon "SameLetterHeights" (=.uno:FontworkSameLetterHeights).
Error: Nothing happens
Expected: The shape shows the characters vertical stretched to fit the place between the paths.
The property SameLetterHeights corresponds to the ODF attribute draw:text-path-same-letter-heights. If you add the attribute in the file markup, the command works as expected. But the ODF attribute is optional, so it is valid, that it is missing.
The error is in case SID_FONTWORK_SAME_LETTER_HEIGHTS in impl_execute method in https://opengrok.libreoffice.org/xref/core/svx/source/toolbars/fontworkbar.cxx?r=4c0b033e#242
The else part is missing.
Since the icon has a .uno command, a unit test is possible using the dispatcher.
@Hossein: I think, this can be an EasyHack. Do you agree?
Reproduced with the latest LO 7.5 dev master:
Version: 22.214.171.124.alpha0+ / LibreOffice Community
Build ID: cc3e2e7efa35dea85eecdd163de1ca1e71ce01f7
CPU threads: 8; OS: Linux 5.15; UI render: default; VCL: gtk3
Locale: en-US (en_US.UTF-8); UI: en-US
(In reply to Regina Henschel from comment #1)
> The error is in case SID_FONTWORK_SAME_LETTER_HEIGHTS in impl_execute method
> The else part is missing.
> Since the icon has a .uno command, a unit test is possible using the
> @Hossein: I think, this can be an EasyHack. Do you agree?
Yes! And thanks for suggesting this issue for an EasyHack.
I've tested your code pointer, and the fix is straightforward. On the other hand, I think it should be marked as difficultyMedium, because one needs to gain a basic understanding of ODF and the draw:text-path-same-letter-heights attribute and change it manually inside <draw:enhanced-geometry> to see its effect, then fix the code and write a test similar to some of those in sd/qa/unit/uiimpress.cxx.
This is the related part of the ODF 1.3 standard for the above attribute:
Open Document Format for Office Applications (OpenDocument) Version 1.3. Part 3: OpenDocument Schema
OASIS Standard - 27 April 2021
I've written a blog post around this issue that can be useful for the EasyHackers:
ODF standard and the code – EasyHack