Bug 152518 - With an image set as a page background with specific size, changing page properties (e.g., margins) changes the image size unexpectedly
Summary: With an image set as a page background with specific size, changing page prop...
Status: RESOLVED WORKSFORME
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
7.2.7.2 release
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: Writer-Styles-Page
  Show dependency treegraph
 
Reported: 2022-12-15 11:15 UTC by Mike Kaganski
Modified: 2024-09-17 17:43 UTC (History)
4 users (show)

See Also:
Crash report or crash signature:


Attachments
An image as the page background (13.34 KB, application/vnd.oasis.opendocument.text)
2022-12-15 11:15 UTC, Mike Kaganski
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Mike Kaganski 2022-12-15 11:15:06 UTC
Created attachment 184154 [details]
An image as the page background

The ODT attachment is created as a new text document, with Default Page Style changed to be 14 x 21 cm, and its area set to a PNG image (1400x2100, representing colored border), "Custom position/size", 14x21 cm, Center (the "Background covers margins" on Page tab is active by default).

Open it, and in the page style properties, try to change any margin (say, to 3 cm). Applying the change makes the border "disappear", and visiting the Area properties shows that the size has changed unexpectedly to 65.34x98.01 cm.
Comment 1 Stéphane Guillou (stragu) 2022-12-15 18:33:11 UTC
I found it difficult to reproduce, but I think I have found a consistent way:

1. Open attachment 184154 [details]
2. Format > Page Style
3. In Page tab, change a margin size (e.g. from 2 cm to 3 cm)
4. Also open the Area tab, but don't change anything in there
5. Click OK or Apply

Notes that I could not reproduce if I had not opened the Area tab as well (step 4). Also works if the Area tab was first focused, before changing margins in the Page tab. 

Is that correct, Mike?

Repro in:

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

and:

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

(Full background fills were introduced in 7.2, could be an implementation error? Michael?)
Comment 2 Mike Kaganski 2022-12-16 04:59:10 UTC
(In reply to Stéphane Guillou (stragu) from comment #1)
> Is that correct, Mike?

Yes you are correct - now testing it, I see that unless I activate the area tab, it works OK. I must accidentally have activated it always in my prior testing. Thanks!

> (Full background fills were introduced in 7.2, could be an implementation
> error? Michael?)

... but actually, the error is not specific to that mode - also if you disable the full page background (and decrease the size accordingly to 10x17 cm), it also behaves like this. Not saying it necessarily is unrelated to that implementation, everything is possible, just mentioning.
Comment 3 Buovjaga 2024-09-17 17:43:49 UTC
Repro in 7.6, not in master.

Arch Linux 64-bit
Version: 25.2.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: 45399721e1497bc9731eacc1b001335ef4314579
CPU threads: 8; OS: Linux 6.10; UI render: default; VCL: kf6 (cairo+wayland)
Locale: fi-FI (fi_FI.UTF-8); UI: en-US
Calc: CL threaded
Built on 17 September 2024