Bug 168410 - WRITER: unexpected z-order across backgrounds (page, paragraph, frame, character)
Summary: WRITER: unexpected z-order across backgrounds (page, paragraph, frame, charac...
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
6.4.7.2 release
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2025-09-14 14:26 UTC by ajlittoz
Modified: 2026-01-21 18:54 UTC (History)
1 user (show)

See Also:
Crash report or crash signature:


Attachments
Incorrect (?) precedence of background components (32.75 KB, application/vnd.oasis.opendocument.text)
2025-09-14 14:26 UTC, ajlittoz
Details

Note You need to log in before you can comment on or make changes to this bug.
Description ajlittoz 2025-09-14 14:26:00 UTC
Created attachment 202830 [details]
Incorrect (?) precedence of background components

Using LO 25.2.6.2, I want to implement a sophisticated watermark to simulate specifically-made stationery. My goal is to have an image in the far background with ghost-text (not part of the image) over it: this will be my "sheet" of paper. Text is expected to be painted on this sheet with all properties configured in the styles visible and effective.

The attached document has 3 pages.

Page 1 is the "reference" page with a page background, a paragraph with background and a paragraph with only character highlighting.

This "reference" page displays as expected.

A frame for the watermark is added in page 2. For simplicity, this watermark is done with frame background (Area attribute as a pattern). The frame has wrap properties "in background" and "can overlap" (this latter one irrelevant in the present case).

As can be seen, the frame is not at all in the background. Z-ordering is as follows (from back to front):
1. page background
2. paragraph background
3. frame background
4. character highlighting

My expectation is 1-3-2-4 based on my understanding of "in background".

The present z-ordering interferes badly with paragraph properties, masking paragraph background, thus breaking intended formatting (a paragraph is an "atomic" object made of its geometric rectangular shape and its text; inserting an alien object which can be larger than the paragraph between the shape and its text is logically wrong -- at least when not documented).

Just to check, I tried to create a "transparent" frame with Area "None". This is page 3. Unfortunately, a frame with Area "None" is not transparent but inherits the Area property of the page it is in, which is even more problematic.

Please clarify the precedence rule in background ordering.

-- I just mention here for the record a behaviour which will be the topic of an independent bug report when I have time: I first prepared my frames manually before creating the dedicated frame styles. The usual stance of applying another style to get rid of direct formatting before reapplying the target style does not work on Area attribute. It is totally impossible to clear it and it always overrides Area in the style --
Comment 1 LeroyG 2025-10-06 12:34:49 UTC
Reproducible with:

Versión: 6.4.7.2 (x64)
Id. de compilación: 639b8ac485750d5696d7590a72ef1b496725cfb5
Subprocs. CPU: 12; SO: Windows 10.0 Build 17763; Repres. IU: GL; VCL: win; 
Configuración regional: es-AR (es_AR); Idioma de IU: es-ES
Calc: threaded