Bug 130445 - Toolbar created at Document Scope does not save associated icons.
Summary: Toolbar created at Document Scope does not save associated icons.
Status: VERIFIED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: LibreOffice (show other bugs)
Version:
(earliest affected)
6.4.2.2 release
Hardware: x86-64 (AMD64) All
: medium normal
Assignee: Maxim Monastirsky
URL:
Whiteboard: target:7.1.0 target:7.0.3
Keywords:
: 126849 129325 132060 132992 133210 135685 (view as bug list)
Depends on:
Blocks: Customize-Dialog-Toolbars
  Show dependency treegraph
 
Reported: 2020-02-05 00:37 UTC by David
Modified: 2023-01-13 15:40 UTC (History)
8 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 David 2020-02-05 00:37:34 UTC
Description:
Creating a toolbar at the document scope and associating icons with custom macros does not save with the icons. Icons are present after having created tool bar and document, however closing the document are re-opening results in text-only toolbars and no saved icons. I have only tested and replicated this using Calc.

I did some poking around and found that the icon file saved in Configurations2/images/Bitmaps is corrupt. Replacing this file with a file created when building the toolbar at the Libreoffice Calc scope from the soffice.cfg/modules/scalc/images/Bitmaps will result in the images being loaded properly. 

This problem is reproducible in Safe-Mode and with OpenGL both enabled and disabled.


Steps to Reproduce:
1.Tools --> Customize
2.Scope --> <some document> (not LibreOffice Calc)
3.Add new Toolbar (Option selected is Icon and Text)
4.Assign some macro to the toolbar.
5.Associate an icon with that Macro
6.Save the document.
7.Close the document.
8.Reopen the document.


Actual Results:
Newly created toolbar shows with text only and no icon.

Expected Results:
Newly created toolbar with Icon and text tips.


Reproducible: Always


User Profile Reset: Yes


OpenGL enabled: Yes

Additional Info:
Version: 6.3.4.2 (x64)
Build ID: 60da17e045e08f1793c57c00ba83cdfce946d0aa
CPU threads: 12; OS: Windows 10.0; UI render: GL; VCL: win; 
Locale: en-US (en_US); UI-Language: en-US
Calc: CL
Comment 1 TISSENDIER Pierre 2020-04-17 08:05:03 UTC
Same problem for me in version 6.4.2.2
Comment 2 TISSENDIER Pierre 2020-04-17 08:07:46 UTC
Sorry, more info in my case

Version : 6.4.2.2
Build ID : 4e471d8c02c9c90f512f7f9ead8875b57fcb1ec3
Threads CPU : 4; OS : Linux 4.15; UI Render : par défaut; VCL: gtk3; 
Locale : fr-FR (fr_FR.UTF-8); Langue IHM : fr-FR
Calc: threaded
Comment 3 TISSENDIER Pierre 2020-04-19 09:21:48 UTC
Someone can pass the bug to major importance ! Thanks
same problem in snap version 6.4.2.2 in calc or writer
Comment 4 Jean-Michel COSTE 2020-05-22 21:11:51 UTC
Me too on version 6.3.6.2
Comment 5 TISSENDIER Pierre 2020-05-27 15:12:50 UTC
*** Bug 133210 has been marked as a duplicate of this bug. ***
Comment 6 TISSENDIER Pierre 2020-05-27 15:13:53 UTC
*** Bug 132992 has been marked as a duplicate of this bug. ***
Comment 7 TISSENDIER Pierre 2020-05-27 15:16:48 UTC
*** Bug 126849 has been marked as a duplicate of this bug. ***
Comment 8 pjw 2020-05-27 15:39:18 UTC
FWIW, I see this bug AND I see that icons for new toolbars created at the 'Writer' level are also not remembered.
Comment 9 Johnny Rosenberg 2020-07-05 12:30:22 UTC
(In reply to David from comment #0)
> 2.Scope --> <some document> (not LibreOffice Calc)

I selected LibreOffice Calc and the result is the following (pretty much the same as already described): 
● Open yet another spreadsheet while LibreOffice is still running → Icons are fine.
● Close LibreOffice and then open any spreadsheet → Icons are gone.

LibreOffice 6.4.4.1
Manjaro Linux 20.0.3
Comment 10 Johnny Rosenberg 2020-07-05 13:24:13 UTC
(In reply to David from comment #0)
> I did some poking around and found that the icon file saved in
> Configurations2/images/Bitmaps is corrupt.

I can't find a directlry like that on my whole system. where is yours located exactly?

> Replacing this file with a file
> created when building the toolbar at the Libreoffice Calc scope from the
> soffice.cfg/modules/scalc/images/Bitmaps will result in the images being
> loaded properly. 

All I find there is an 8 byte file called sc_userimages.png, and the 8 bytes are:
89	CHARACTER TABULATION WITH JUSTIFICATION
50	P
4E	N
47	G
0D	CR
0A	LF
1A	SUBSTITUTE
0A	LF

Looks weird to me.
Comment 11 David 2020-07-07 14:29:32 UTC
(In reply to Johnny Rosenberg from comment #10)
> (In reply to David from comment #0)
> > I did some poking around and found that the icon file saved in
> > Configurations2/images/Bitmaps is corrupt.
> 
> I can't find a directlry like that on my whole system. where is yours
> located exactly?


When I first reported the bug, I was using LibreOffice portable in a windows environment and should have provided the whole path which is as follows:

<libreofficeportable root>\Data\settings\user\config\soffice.cfg\modules\scalc\images\Bitmaps

On a windows installed version of Libreoffice, I believe that the path for this directory would be:


C:\Users\<username>\AppData\Roaming\LibreOffice\4\user\config\soffice.cfg\modules\scalc\images\Bitmaps




> > Replacing this file with a file
> > created when building the toolbar at the Libreoffice Calc scope from the
> > soffice.cfg/modules/scalc/images/Bitmaps will result in the images being
> > loaded properly. 
> 
> All I find there is an 8 byte file called sc_userimages.png, and the 8 bytes
> are:
> 89	CHARACTER TABULATION WITH JUSTIFICATION
> 50	P
> 4E	N
> 47	G
> 0D	CR
> 0A	LF
> 1A	SUBSTITUTE
> 0A	LF
> 
> Looks weird to me.

This is the header/signature of a ".png" file. Effectively, you are looking at a "png" file with no images.
Comment 12 Jean-Michel COSTE 2020-08-17 13:10:55 UTC
Same as :
Bug 129325
Bug 132060  
Bug 135685
Comment 13 TISSENDIER Pierre 2020-09-06 09:31:17 UTC
it seems this is fixed in 

Version : 6.4.5.2
Build ID : 1:6.4.5-0ubuntu0.20.04.1
Threads CPU : 4; OS : Linux 5.4; UI Render : par défaut; VCL: gtk3; 
Locale : fr-FR (fr_FR.UTF-8); Langue IHM : fr-FR
Calc: threaded
Comment 14 Jean-Michel COSTE 2020-09-07 15:11:27 UTC
*** Bug 129325 has been marked as a duplicate of this bug. ***
Comment 15 Jean-Michel COSTE 2020-09-07 15:12:26 UTC
*** Bug 132060 has been marked as a duplicate of this bug. ***
Comment 16 Jean-Michel COSTE 2020-09-07 15:13:27 UTC
*** Bug 135685 has been marked as a duplicate of this bug. ***
Comment 17 Buovjaga 2020-09-07 15:15:06 UTC
(In reply to TISSENDIER Pierre from comment #13)
> it seems this is fixed in 
> 
> Version : 6.4.5.2
> Build ID : 1:6.4.5-0ubuntu0.20.04.1
> Threads CPU : 4; OS : Linux 5.4; UI Render : par défaut; VCL: gtk3; 
> Locale : fr-FR (fr_FR.UTF-8); Langue IHM : fr-FR
> Calc: threaded

Not so based on the duplicate bug 135685
Comment 18 Maxim Monastirsky 2020-09-08 10:00:19 UTC
I gave it a try:

https://gerrit.libreoffice.org/c/core/+/102224
https://gerrit.libreoffice.org/c/core/+/102225

Let's see if that works.
Comment 19 Commit Notification 2020-09-08 14:48:07 UTC
Maxim Monastirsky committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/8ef781e68f66a9bf7501ef82ee5625b3758b6c88

tdf#130445 Use actual icon size

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.
Comment 20 Commit Notification 2020-09-08 20:25:58 UTC
Maxim Monastirsky committed a patch related to this issue.
It has been pushed to "master":

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

Related: tdf#130445 Fix custom icon scale check

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.
Comment 21 pjw 2020-09-26 07:09:06 UTC
I don't suppose that there's any chance to back-fort this fix to 7.0?
Comment 22 Maxim Monastirsky 2020-09-27 15:06:31 UTC
I hope to look into backporting to 7-0 later this week.
Comment 23 pjw 2020-09-28 05:11:17 UTC
That would be WONDERFUL! Thank you!
Comment 24 Maxim Monastirsky 2020-09-29 13:47:03 UTC
Backport request to 7-0 is in gerrit, so let's call this fixed. I attempted to fix to following bugs here:

- Custom icons set for toolbar buttons were not saved (for both application and document scope), and showed as text only on next launch. That's the case with the empty *c_userimages.png files.

- User imported icons were always scaled to 16x16, even if the toolbar had bigger icons.

- For the large toolbar button size, both internal and user imported icons were scaled to 16x16 (reported also in Bug 79188).

For any other problem, please open new reports.
Comment 25 Commit Notification 2020-09-30 02:35:04 UTC
Maxim Monastirsky committed a patch related to this issue.
It has been pushed to "libreoffice-7-0":

https://git.libreoffice.org/core/commit/80e3ad82b1cfaa9e8de24cea6f118193d5a59621

tdf#130445 Use actual icon size

It will be available in 7.0.3.

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 26 Commit Notification 2020-09-30 02:42:17 UTC
Maxim Monastirsky committed a patch related to this issue.
It has been pushed to "libreoffice-7-0":

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

Related: tdf#130445 Fix custom icon scale check

It will be available in 7.0.3.

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 27 pjw 2020-10-27 07:31:51 UTC
This is not fixed in 7.0.3.1.

Pick a toolbar icon, right-click to customize. Change icon to something weird. Close and reopen doc. Icon not displayed, and text of command displayed instead.

Do same with custom toolbar. Same results. Icon not remembered.
Comment 28 Maxim Monastirsky 2020-10-27 10:34:49 UTC
(In reply to pjw from comment #27)
> This is not fixed in 7.0.3.1.
> 
> Pick a toolbar icon, right-click to customize. Change icon to something
> weird. Close and reopen doc. Icon not displayed, and text of command
> displayed instead.
> 
> Do same with custom toolbar. Same results. Icon not remembered.

It works for me in:

Version: 7.0.3.1
Build ID: d7547858d014d4cf69878db179d326fc3483e082
CPU threads: 4; OS: Linux 5.8; UI render: default; VCL: gtk3
Locale: en-US (en_US.UTF-8); UI: en-US
Calc: threaded

Please copy full version information from Help > About, and give exact step by step instruction to reproduce the problem.
Comment 29 pjw 2020-10-27 10:56:31 UTC
1. Start LibreOffice Writer

Version: 7.0.3.1 (x64)
Build ID: d7547858d014d4cf69878db179d326fc3483e082
CPU threads: 12; OS: Windows 10.0 Build 19041; UI render: Skia/Raster; VCL: win
Locale: en-AU (en_AU); UI: en-US
Calc: threaded

2. Right-click on icon in toolbar for "Bold"

3. Select "Customize toolbar"

4. Click on "Bold" in the "Assigned commands" list

5. Select "Change Icon..." from the "Modify" drop-down

6. Pick the first icon in the list (in my case .Uno:Arc, and click "OK"

7. Notice icon is changed in main window

8. Click OK in customize dialog

9. Close the (empty) document

10. Restart LibreOffice Writer

11. Note that the place where the "Bold" icon should be now says the word "Bold".
Comment 30 Maxim Monastirsky 2020-10-27 15:38:02 UTC
Still can't reproduce. Also tested the Windows build (like you have), but could not reproduce the bug there either.
Comment 31 Buovjaga 2020-10-28 15:55:07 UTC
It's fixed for me

Version: 7.1.0.0.alpha1+ (x64)
Build ID: b61bf7c7cfcf97a5ade6d130873af146670bc2ee
CPU threads: 4; OS: Windows 10.0 Build 19041; UI render: Skia/Raster; VCL: win
Locale: fi-FI (fi_FI); UI: en-US
Calc: threaded

Arch Linux 64-bit
Version: 7.1.0.0.alpha1+
Build ID: 38dd55f6022a6ec217a2a54459a2875f1bef1f5e
CPU threads: 8; OS: Linux 5.9; UI render: default; VCL: kf5
Locale: fi-FI (fi_FI.UTF-8); UI: en-US
Calc: threaded
Built on 28 October 2020
Comment 32 TISSENDIER Pierre 2020-10-28 16:34:34 UTC
Sorry Don't fix for me

Version: 7.0.2.2
Build ID: 00(Build:2)
CPU threads: 4; OS: Linux 5.4; UI render: default; VCL: gtk3
Locale: fr-FR (fr_FR.UTF-8); Langue IHM : fr-FR
Ubuntu package version: 1:7.0.2_rc2-0ubuntu0.20.04.2
Calc: threaded
Built on 28 oct 2020
Comment 33 Buovjaga 2020-10-28 16:41:43 UTC
(In reply to TISSENDIER Pierre from comment #32)
> Sorry Don't fix for me
> 
> Version: 7.0.2.2
> Build ID: 00(Build:2)
> CPU threads: 4; OS: Linux 5.4; UI render: default; VCL: gtk3
> Locale: fr-FR (fr_FR.UTF-8); Langue IHM : fr-FR
> Ubuntu package version: 1:7.0.2_rc2-0ubuntu0.20.04.2
> Calc: threaded
> Built on 28 oct 2020

You are testing with an old version
Comment 34 TISSENDIER Pierre 2020-10-28 17:48:09 UTC
Oups ;o)  sorry
Comment 35 pjw 2020-10-30 12:21:55 UTC
After deleting my LibreOffice profile and restarting, I can customize icons.