Bug 158305

Summary: Convert to polygon dialogs settings are not loaded after LO restart
Product: LibreOffice Reporter: Gabor Kelemen (allotropia) <kelemeng>
Component: ImpressAssignee: Not Assigned <libreoffice-bugs>
Status: RESOLVED FIXED    
Severity: normal CC: mentoring
Priority: medium Keywords: easyHack
Version: Inherited From OOo   
Hardware: All   
OS: All   
See Also: https://bugs.documentfoundation.org/show_bug.cgi?id=158304
Whiteboard: target:24.8.0
Crash report or crash signature: Regression By:
Bug Depends on:    
Bug Blocks: 109265    
Attachments: The Convert To Polygon dialog with non-default settings
Settings changed in the dialog
Changes are not remembered

Description Gabor Kelemen (allotropia) 2023-11-21 21:48:52 UTC
Created attachment 190946 [details]
The Convert To Polygon dialog with non-default settings

Impress/Draw has a "Convert to polygon" feature for bitmap images. This has some settings in its dialog, but these are not saved / loaded properly between different runs of Draw, despite the code making efforts to save them.

1. Open a new Impress document
2. Insert - Image - select a bitmap (e.g. .png) file
3. Right click on the image, select Convert - To Polygon
4. In the Convert To Polygon dialog try to change some options.
5. Press OK. The conversion is executed.
6. Close LO, start Impress again.
7. Do steps 2-3 again
-> the changes you did in step 4 are back to their defaults.

Code pointers:
sd/source/ui/dlg/vectdlg.cxx 
This tries to load/save settings as a SotStorageStream object, this is an obsolete approach
officecfg/registry/schema/org/openoffice/Office/Common.xcs
-> Vectorize group of settings

(I found this issue because my bin/find-unused-configkeys.sh script reported this group as unused.)

Version: 24.2.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: a91892ec4942fc875820ea02dfbe74e986548142
CPU threads: 16; OS: Linux 5.15; UI render: default; VCL: gtk3
Locale: hu-HU (hu_HU.UTF-8); UI: en-US
Calc: threaded
Comment 1 Gabor Kelemen (allotropia) 2023-11-21 21:50:00 UTC Comment hidden (obsolete)
Comment 2 Gabor Kelemen (allotropia) 2023-11-21 21:51:17 UTC
Created attachment 190950 [details]
Changes are not remembered
Comment 3 Buovjaga 2023-11-30 12:59:10 UTC
Repro.

If possible, add keyword for easy hack difficulty level and skill.

Arch Linux 64-bit, X11
Version: 24.2.0.0.alpha1+ (X86_64) / LibreOffice Community
Build ID: baf36dc7caa10365f3dda87bc2dd6e85e0333e98
CPU threads: 8; OS: Linux 6.6; UI render: default; VCL: kf5 (cairo+xcb)
Locale: fi-FI (fi_FI.UTF-8); UI: en-US
Calc: threaded
Built on 30 November 2023
Comment 4 Gabor Kelemen (allotropia) 2024-04-25 14:53:59 UTC
Proposed patch: https://gerrit.libreoffice.org/c/core/+/166631
Comment 5 Commit Notification 2024-04-26 07:42:39 UTC
Gabor Kelemen committed a patch related to this issue.
It has been pushed to "master":

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

tdf#158305 Store Convert to Polygon dialog settings correctly

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.