Bug 153957 - not all share/gallery/backgrounds bitmaps are available in area image fill dialog
Summary: not all share/gallery/backgrounds bitmaps are available in area image fill di...
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: LibreOffice (show other bugs)
(earliest affected) release
Hardware: All All
: low minor
Assignee: Not Assigned
Depends on:
Blocks: Area-Fill-Tab-Image
  Show dependency treegraph
Reported: 2023-03-04 09:54 UTC by Stéphane Guillou (stragu)
Modified: 2023-03-06 09:17 UTC (History)
5 users (show)

See Also:
Crash report or crash signature:


Note You need to log in before you can comment on or make changes to this bug.
Description Stéphane Guillou (stragu) 2023-03-04 09:54:15 UTC
1. Look in LibreOffice's install directory's /share/gallery/backgrounds (on Linux), or go to https://opengrok.libreoffice.org/xref/core/extras/source/gallery/backgrounds/ : see number of pictures (45)
2. Open Writer, right-click on page -> Page style... > Area > Image

Results: in LO 7.6, only 30 images are shown.

Not sure if there's a reason for it? And if they are not supposed to be used, why are we shipping them?

Version: (X86_64) / LibreOffice Community
Build ID: 687b950702c49c90cff9a43655ea97a0343799a0
CPU threads: 8; OS: Linux 5.15; UI render: default; VCL: gtk3
Locale: en-AU (en_AU.UTF-8); UI: en-US
Calc: threaded

Back in 6.1, there were 62 raster files in share/gallery/www-back, but only 15 were displayed.

Build ID: efb621ed25068d70781dc026f7e9c5187a4decd1
CPU threads: 8; OS: Linux 5.15; UI render: default; VCL: gtk2; 
Locale: en-AU (en_AU.UTF-8); Calc: group threaded

Same set is visible in the UI on Windows.

The 45 files are in https://opengrok.libreoffice.org/xref/core/extras/source/gallery/backgrounds/

There are only 36 matches between those and the 38 files listed in: https://opengrok.libreoffice.org/xref/core/extras/source/palettes/standard.sob?r=b680547a

Bitmap strings are defined in:
Comment 1 Julien Nabet 2023-03-05 09:26:38 UTC
On pc Debian x86-64 with master sources updated today, I could reproduce this.

Here's an example to use some already existing images in extras/source/gallery/backgrounds:

copy extras/source/palettes/standard.sob in a temporary directory and rename it as a zip.
- unzip the file
- add image file in subdir Pictures
- declare the image file in Content.xml
- zip the file
- rename it with sob extension
- put it back into extras/source/palettes/

- add line include/svx/strings.hrc RID_SVXSTR_BMPXX
- add line in svx/inc/strings.hxx RID_SVXSTR_BMPXX_DEF
- add the previously added line in arrays RID_SVXSTR_BMP_DEF and RID_SVXSTR_BMP in svx/source/unodraw/unoprov.cxx 

I can do this but I just need to know:
1) what images include (perhaps we don't want them all)
2) which order I use (for example, perhaps we want "sand-light" next to "sand" for example

1) I suppose it would be better to have complete rows (meaning at the end, we'd have a number of images which we can divide by 3 so there's no incomplete row)
2) I hope we can use a number greater than 99 without bringing some havoc.

Andreas: I put you in cc because perhaps there was good reason we stopped to 30 images.
Comment 2 Julien Nabet 2023-03-05 11:25:58 UTC
Just for the record, for the test I saved a file using "fence", then I added "sand" before fence in sob file. When I open the test file "fence", fence image displays well and when trying to select another image, LO retrieves the right fence image (which has moved from center of a row to the right of the same row) so it means file doesn't record an absolute pos in the image list and we can reorder the whole list in sob file if needed.

Now I wonder why there are png and jpg files, is it on purpose (to show we can use both formats?).
Also, if finally we don't want to use all image files, perhaps we should remove the unused ones?
Comment 3 Heiko Tietze 2023-03-06 09:17:51 UTC
This work has been done for bug 103223 with the list of initial patches https://gerrit.libreoffice.org/q/owner:kris.kr296%2540yahoo.in.

Don't remember the reason to not trust the Gallery anymore but could imagine it was the customization. In-built Gallery categories are not located in the user-space and neither adding nor deleting items is possible (there should be a bug to make this happen). But the crucial point of the redesign was to have an extendable list of presets.

=> NAB