Bug 126533 - FILEOPEN/FILESAVE DOCX: bitmap background image not saved with document
Summary: FILEOPEN/FILESAVE DOCX: bitmap background image not saved with document
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
3.3.0 release
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords: filter:docx
: 134822 143885 (view as bug list)
Depends on:
Blocks: DOCX-Page
  Show dependency treegraph
 
Reported: 2019-07-25 07:25 UTC by Hugo Scott
Modified: 2022-10-11 09:14 UTC (History)
10 users (show)

See Also:
Crash report or crash signature:
Regression By:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Hugo Scott 2019-07-25 07:25:31 UTC
Description:
Hi
I define a full page background image in writer by

1. View->Styles
2. Click on page tab -> create styele and then on bitmap
3. Import bitmap and save with name
4. Apply as a custom size with dimensions of 21 cm x 30 cm 

This adds the image and I can export it as a pdf with the image

When I save, close and reopen the docx file the image has disappeared and I have to re-create the style and import the image etc

Steps to Reproduce:
1. View->Styles
2. Click on page tab -> create styele and then on bitmap
3. Import bitmap and save with name
4. Apply as a custom size with dimensions of 21 cm x 30 cm 
5. save and close
6. reopen

Actual Results:
reopen the docx file the image has disappeared and I have to re-create the style and import the image etc

Expected Results:
ThHe image should still be there as a BG


Reproducible: Always


User Profile Reset: No



Additional Info:
Version: 6.3.0.2 (x64)
Build ID: 728469fa359ba8c83d812146293a0b0aa53945ba
CPU threads: 4; OS: Windows 10.0; UI render: default; VCL: win; 
Locale: en-GB (en_GB); UI-Language: en-GB
Calc: threaded
Comment 1 Dieter 2019-07-26 04:55:40 UTC
I confirm it with

Version: 6.4.0.0.alpha0+ (x64)
Build ID: 8f98a7c4e5b1f0b249c026577805a378b8a533d5
CPU threads: 4; OS: Windows 10.0; UI render: GL; VCL: win; 
TinderBox: Win-x86_64@42, Branch:master, Time: 2019-07-23_00:30:19
Locale: de-DE (de_DE); UI-Language: en-US
Calc: threaded

Also happens with other sizes of the bitmap.
Comment 2 Hugo Scott 2019-07-31 12:34:49 UTC
The background bitmap DOES remain when the doc is saved in .odt format but not in docx format, if that's any help.
If that means that it's not a bug after all, then I'm very sorry!
Comment 3 Timur 2021-05-07 08:55:19 UTC
This is DOCX bug that started with LO 3.3 in which export was added. 
Background of saved DOCX is not read in LO nor in MSO.

DOC is better, background is fine read in MSO meaning that export is fine. If original was saved as Tiled, LO opens it as Stretched. That can be another fileopen bug.
Comment 4 Robert Cabane 2021-05-09 21:25:11 UTC
Same with LO 7.1.3.2.
Agreeing with the two last comments : background is lost when exporting to DOCX, but not to DOC.
Comment 5 Gerald Pfeifer 2021-07-09 21:07:14 UTC
I saw a related report by an openSUSE user. Their report does not require
using a style, simply

 - right click
 - Page Style
 - Area
 - Bitmap

and the same observations: completely lost with DOCX, stretched with DOC.

(Cf. https://bugzilla.suse.com/show_bug.cgi?id=1133169 )
Comment 6 Timur 2021-08-16 08:58:22 UTC
*** Bug 143885 has been marked as a duplicate of this bug. ***
Comment 7 Volga 2021-08-16 16:03:23 UTC
Everyone can reproduce the bug directly with attachment 152249 [details].
Comment 8 Rizal Muttaqin 2022-07-27 04:24:26 UTC Comment hidden (obsolete)
Comment 9 Rizal Muttaqin 2022-07-27 04:26:05 UTC
(In reply to Robert Cabane from comment #4)
> Same with LO 7.1.3.2.
> Agreeing with the two last comments : background is lost when exporting to
> DOCX, but not to DOC.

I have tried also with DOC, and the issue persist (page background lost)

Version: 7.3.4.2 / LibreOffice Community
Build ID: 30(Build:2)
CPU threads: 8; OS: Linux 5.15; UI render: default; VCL: kf5 (cairo+xcb)
Locale: id-ID (id_ID.UTF-8); UI: id-ID
Ubuntu package version: 1:7.3.4~rc2-0ubuntu0.20.04.1~lo1
Calc: threaded
Comment 10 Roman Kuznetsov 2022-09-28 07:21:06 UTC
Still here in 

Version: 7.5.0.0.alpha0+ (x64) / LibreOffice Community
Build ID: 0d3dd0aa54ad792f91d0905f3d46c13df3512d89
CPU threads: 4; OS: Windows 10.0 Build 19043; UI render: Skia/Raster; VCL: win
Locale: ru-RU (ru_RU); UI: en-US
Calc: threaded

and this is very annoying
Comment 11 Roman Kuznetsov 2022-09-28 08:02:37 UTC Comment hidden (obsolete)
Comment 12 Roman Kuznetsov 2022-09-28 08:11:26 UTC Comment hidden (obsolete)
Comment 13 Justin L 2022-09-28 15:32:14 UTC
From bug 135331 comment 6
If my memory is correct, DOCX only has a single place to store the page background. So LO takes the Default Page's background and uses that as the colour. In this multi-coloured page-styled example, the default page style is "none".  [Indeed, this is what happens for both DOC and DOCX when I change the default page style (even though it is unused) to a blue background. The entire DOCX becomes blue.]
Comment 14 Justin L 2022-09-28 15:32:57 UTC
*** Bug 134822 has been marked as a duplicate of this bug. ***