Bug 141545 - New feature "background covers margin" is applied to master although set on single slide
Summary: New feature "background covers margin" is applied to master although set on s...
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Impress (show other bugs)
Version:
(earliest affected)
7.2.0.0.alpha0+
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: Slide-Background
  Show dependency treegraph
 
Reported: 2021-04-07 17:21 UTC by Regina Henschel
Modified: 2023-05-19 18:59 UTC (History)
4 users (show)

See Also:
Crash report or crash signature:


Attachments
Document to reproduce the error (11.50 KB, application/vnd.oasis.opendocument.presentation)
2021-04-07 17:21 UTC, Regina Henschel
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Regina Henschel 2021-04-07 17:21:00 UTC
Created attachment 171012 [details]
Document to reproduce the error

Open attached document. It has set a hatch-filling on master and a bitmap filling on the first slide. The document has got a 5cm left margin to make the problem visible.

Goto first slide. Menu > Slide > Slide Properties. Goto dialog page "Slide" and set checkbox "Background covers margins".

Expected: Only on the first slide, the bitmap covers the entire slide.

Error seen: On the second slide the hatching covers the entire slide too.

Because the setting "Background covers margins" was not made on the master but on a single slide, the setting should only be applied to this slide.
Comment 1 Michael Stahl (allotropia) 2021-04-08 08:50:51 UTC
yes this is very odd, but also very deliberate, see how ViewShell::SetPageSizeAndBorder calls GetDoc()->AdaptPageSizeForAllPages()

this is already the case in initial import commit f47a9d9db3d06927380bb79b04bb6d4721a92d2b

so i'm not sure what the intention is here, why do all pages and master pages have to have the same size and margins?

maybe that's a question for UX?
Comment 2 Regina Henschel 2021-04-08 12:54:57 UTC
The background fill settings are written into the <style:drawing-page-properties> element in a <style:style> element in the <office:automatic-styles> element. 
If the background is set for a single slide, this is written into sub-file content.xml. In case of master it is written into sub-file styles.xml.

I have expected that the attribute draw:background-size is written into the same element as the draw:fill attribute. That means for single slides into content.xml and for master into styles.xml.
 
If this will not be fixed now, then the checkbox should be disabled, if the dialog is called for a single slide. This is needed especially in Draw, where the master has non-zero margins in default settings.
Comment 3 Regina Henschel 2021-04-08 13:13:00 UTC
(In reply to Michael Stahl (allotropia) from comment #1)

> maybe that's a question for UX?

Yes. It is indeed nothing to do for you here.

Perhaps it is even better to have an info on that dialog tab, that all settings on that tab are applied to all master pages.
Comment 4 Heiko Tietze 2021-04-09 12:50:51 UTC
AFAICS, slide properties affect the whole presentation. You cannot set different height/width per slide. All settings apply affect both master and slides.

This behavior aligns with the use case where you define a general slide property - and margin as well as background are part of it.
Comment 5 Regina Henschel 2021-04-09 13:37:29 UTC
(In reply to Heiko Tietze from comment #4)
> AFAICS, slide properties affect the whole presentation. You cannot set
> different height/width per slide. All settings apply affect both master and
> slides.
> 
> This behavior aligns with the use case where you define a general slide
> property - and margin as well as background are part of it.

The background itself (color, gradient, bitmap, hatch) from dialog tab 'Background' is a property of the individual slide or individual master. Only the settings on the dialog tab 'Page'/'Slide' in the 'Page/Slide settings...' dialog are applied to _all_ slides/pages/. Therefor my suggestion to add an info to that tab.

Bug 49787 is about the missing feature of different page/slide sizes. As long as that is not implemented, I think a hint is useful.
Comment 6 Heiko Tietze 2021-05-25 09:46:03 UTC
No info on the tab, this static text just clutters the UI and actually the user will face the limitation immediately.

But this reminds me on bug 112650 where we removed code that obtrusively asked whether to apply for all and iterated over pages then. The idea is to set a background always per slide.
Comment 7 Heiko Tietze 2021-09-13 13:19:59 UTC
On option is to disable the checkbox when coming from a single slide (and show the reason in a tooltip maybe). We could alternatively drop the whole slide attributes  thing and show just background properties. Sounds like the better approach to me.
Comment 8 BogdanB 2023-05-19 18:59:51 UTC
Also in
Version: 7.6.0.0.alpha1+ (X86_64) / LibreOffice Community
Build ID: 8dfceb4e0b05b9d531e27e38b954f18e33091f8a
CPU threads: 16; OS: Linux 5.19; UI render: default; VCL: gtk3
Locale: ro-RO (ro_RO.UTF-8); UI: en-US
Calc: threaded