Bug 166607 - Form Editing: Background totally displaced from positions of control
Summary: Form Editing: Background totally displaced from positions of control
Status: VERIFIED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Base (show other bugs)
Version:
(earliest affected)
25.2.3.2 release
Hardware: x86-64 (AMD64) Linux (All)
: medium normal
Assignee: Armin Le Grand (allotropia)
URL:
Whiteboard: target:25.2.5
Keywords: bibisected, bisected, regression
: 166897 (view as bug list)
Depends on:
Blocks: Database-Forms
  Show dependency treegraph
 
Reported: 2025-05-16 15:00 UTC by Robert Großkopf
Modified: 2025-06-12 12:10 UTC (History)
5 users (show)

See Also:
Crash report or crash signature:


Attachments
Screenshot with displaced background of form controls while editing form (113.26 KB, image/png)
2025-05-16 15:00 UTC, Robert Großkopf
Details
Firebird internal database - will open form automatically when macros enabled (1.13 MB, application/vnd.oasis.opendocument.database)
2025-05-16 15:04 UTC, Robert Großkopf
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Robert Großkopf 2025-05-16 15:00:50 UTC
Created attachment 200843 [details]
Screenshot with displaced background of form controls while editing form

Open the attached screenshot.
Shows a form, opened for editing since LO 25.2.
Backgrounds of many controls are totally displaced, sometimes appear 2 times.

Tested with
Version: 25.2.3.2 (X86_64) / LibreOffice Community
Build ID: bbb074479178df812d175f709636b368952c2ce3
CPU threads: 6; OS: Linux 6.4; UI render: default; VCL: kf5 (cairo+xcb)
Locale: de-DE (de_DE.UTF-8); UI: de-DE
Calc: threaded

Works well with LO 24.8.6.2 and older versions, fails since LO 25.2
Comment 1 Robert Großkopf 2025-05-16 15:04:32 UTC
Created attachment 200844 [details]
Firebird internal database - will open form automatically when macros enabled

Attached internal Firebird database will open the form "frm_Rechnung" automatically when macros are enabled.
Close this form and open it for editing, not for input data.
Looks well in LO 24.8., buggy positioned background in LO 25.2
Comment 2 Robert Großkopf 2025-05-16 15:16:05 UTC
This bug won't appear in
Version: 25.8.0.0.alpha1+ (X86_64) / LibreOffice Community
Build ID: 5c7b3f5dc1f14081eed380999dc029a500784d55
CPU threads: 6; OS: Linux 6.4; UI render: default; VCL: kf5 (cairo+xcb)
Locale: de-DE (de_DE.UTF-8); UI: en-US
Calc: threaded

I remember there had been made a fix, but it hasn't been backported to LO 25.2…
Comment 3 mc 2025-05-16 16:58:27 UTC
all work fine with : 

Version: 7.4.7.2 / LibreOffice Community
Build ID: 40(Build:2)
CPU threads: 12; OS: Linux 6.1; UI render: default; VCL: gtk3
Locale: it-IT (it_IT.UTF-8); UI: it-IT
Debian package version: 4:7.4.7-1+deb12u7
Calc: threaded


Version: 7.4.7.2 / LibreOffice Community
Build ID: 40(Build:2)
CPU threads: 12; OS: Linux 6.1; UI render: default; VCL: gtk3
Locale: it-IT (it_IT.UTF-8); UI: it-IT
Debian package version: 4:7.4.7-1+deb12u8
Calc: threaded


Version: 25.2.2.2 (X86_64) / LibreOffice Community
Build ID: 7370d4be9e3cf6031a51beef54ff3bda878e3fac
CPU threads: 12; OS: Windows 11 X86_64 (10.0 build 26100); UI render: Skia/Raster; VCL: win
Locale: it-IT (it_IT); UI: it-IT
Calc: CL threaded

Version: 25.2.3.2 (X86_64) / LibreOffice Community
Build ID: bbb074479178df812d175f709636b368952c2ce3
CPU threads: 12; OS: Windows 11 X86_64 (10.0 build 26100); UI render: Skia/Raster; VCL: win
Locale: it-IT (it_IT); UI: it-IT
Calc: CL threaded
Comment 4 Robert Großkopf 2025-05-16 17:23:15 UTC
(In reply to mc from comment #3)
> all work fine with : 
> 
> Version: 7.4.7.2 / LibreOffice Community

Please read the description: First appears in LO 25.2

> Skia/Raster; VCL: win

Bug appears under Linux, special KDE and gtk3 - not Windows.

See also bug 165706. Seems the solution isn't completely backported to LO 25.2.3.2
Comment 5 Saburo 2025-06-08 07:48:22 UTC
bibisected with linux-64-25.2

Version: 25.2.3.0.0+ (X86_64) / LibreOffice Community
Build ID: f2305b96b797c2084426eb2395d3ebd3b7d1fec5
CPU threads: 4; OS: Linux 6.8; UI render: default; VCL: gtk3
Locale: ja-JP (ja_JP.UTF-8); UI: en-US
Calc: threaded

author	Armin Le Grand (Collabora)
commit f2305b96b797c2084426eb2395d3ebd3b7d1fec5

tdf#165706: Fix visualization of MultiFirmControls in EditMode
'Simple' FormControls were rendered correctly with SDPR
active, but 'Multi' FormControls did not. Found an error
regarding use of MapModes in that drawing code below in
vcl that did not handle an evtl. set MapMode, corrected
that.

Change-Id: I51d7318c2950b7d70e3064ba628909cb17416bae
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/183196
Comment 6 Saburo 2025-06-08 07:50:57 UTC
*** Bug 166897 has been marked as a duplicate of this bug. ***
Comment 7 J-Paul 2025-06-10 10:12:26 UTC
Same problem for me since upgrade to LO 25.2.3.2 in Ubuntu 25.04.
Forms look normal but if you try to edit them, every object is displaced
(Database : MySQL)
Comment 8 Armin Le Grand (allotropia) 2025-06-11 11:30:04 UTC
@Xisco: What version exactly has/would this need to go to? Maybe you are faster, it's https://bugs.documentfoundation.org/show_bug.cgi?id=165706. There was a commit to 25.2.3, is that correct...?
Comment 9 Armin Le Grand (allotropia) 2025-06-11 11:48:50 UTC
@Xisco: Something went wrong here. Trying to sort out...

As I described in https://gerrit.libreoffice.org/c/core/+/183202 the needed change for 25.2. is https://gerrit.libreoffice.org/c/core/+/183202, and that is what I see was added. Not needed is https://gerrit.libreoffice.org/c/core/+/183204. have to get version and check what is going on...
Comment 10 Xisco Faulí 2025-06-11 12:11:35 UTC
Hi Armin,
I'm trying to reproduce the issue in 

Version: 25.2.5.0.0+ (X86_64) / LibreOffice Community
Build ID: 1533b7de758d28ec08f4859f921b2edf894e87e4
CPU threads: 8; OS: Linux 6.1; UI render: default; VCL: gtk3
Locale: es-ES (es_ES.UTF-8); UI: en-US
Calc: threaded

but I can't reproduce it
Comment 11 Xisco Faulí 2025-06-11 12:12:42 UTC
Nevermind, i've just realized I have to Edit the Form...
Comment 12 Xisco Faulí 2025-06-11 12:16:30 UTC
Hi Armin,
I do confirm the issue is not reproduced in master and in LibreOffice 25.2 it started to happen after f2305b96b797c2084426eb2395d3ebd3b7d1fec5 so probably 7a1de78ec2e58d2cceded3bf03c0c3c3cccc675a has to be backported
Comment 13 Xisco Faulí 2025-06-11 12:21:22 UTC
(In reply to Xisco Faulí from comment #12)
> Hi Armin,
> I do confirm the issue is not reproduced in master and in LibreOffice 25.2
> it started to happen after f2305b96b797c2084426eb2395d3ebd3b7d1fec5 so
> probably 7a1de78ec2e58d2cceded3bf03c0c3c3cccc675a has to be backported

@Armin, if I revert 7a1de78ec2e58d2cceded3bf03c0c3c3cccc675a in master then the issue is reproducible
Comment 14 Xisco Faulí 2025-06-11 12:30:56 UTC
backported in https://gerrit.libreoffice.org/c/core/+/186371
Comment 15 Armin Le Grand (allotropia) 2025-06-11 13:09:29 UTC
Have build a version

Version: 25.2.3.2.0+ (X86_64) / LibreOffice Community
Build ID: 179b8ccfd89ca8b613750e459570c54e723b2ce0
CPU threads: 16; OS: Linux 6.8; UI render: default; VCL: gtk3
Locale: en-US (en_US.UTF-8); UI: en-US
Calc: threaded

and checked https://bugs.documentfoundation.org/show_bug.cgi?id=165706 which is *fixed* with https://gerrit.libreoffice.org/c/core/+/183202.

I then opened the attachment from Comment 1 (XRechnung_V2502_025.odb), enabled macros (security very low) and opened it.

I see *no* errors in that visualization.
Comment 16 Armin Le Grand (allotropia) 2025-06-11 13:11:25 UTC
@Xisco: Fine if backport is OK for you - see comment 15, I could *not* repro that issue in freshly built 25.2.3.2. Maybe I need to use kf5 (?) Will try...
Comment 17 Armin Le Grand (allotropia) 2025-06-11 13:15:44 UTC
@Xisco: Also no error with kf5 (cairo + wayland)...?
Whatever - if that backport is easy lets take it - just strange that I cannot repro it and vave not seen it...
Comment 18 Xisco Faulí 2025-06-11 14:02:55 UTC
(In reply to Armin Le Grand (allotropia) from comment #17)
> @Xisco: Also no error with kf5 (cairo + wayland)...?
> Whatever - if that backport is easy lets take it - just strange that I
> cannot repro it and vave not seen it...

I think you are facing the same problem as me. You have to edit the form in order to see the issue, double-clicking on the form does not make the issue to happen
Comment 19 Robert Großkopf 2025-06-11 14:05:06 UTC
(In reply to Armin Le Grand (allotropia) from comment #15)
> 
> I then opened the attachment from Comment 1 (XRechnung_V2502_025.odb),
> enabled macros (security very low) and opened it.

Did you open it for editing, not for input data. Issue appears only when editing the form to add controls for example…
Comment 20 Armin Le Grand (allotropia) 2025-06-11 14:44:59 UTC
(In reply to Robert Großkopf from comment #19)
> (In reply to Armin Le Grand (allotropia) from comment #15)
> > 
> > I then opened the attachment from Comment 1 (XRechnung_V2502_025.odb),
> > enabled macros (security very low) and opened it.
> 
> Did you open it for editing, not for input data. Issue appears only when
> editing the form to add controls for example…

@Xisco; Yes, that's it! Thanks, can see it now :)
Comment 21 tigerdev 2025-06-11 19:04:34 UTC
@Armin Thanks for giving this bug some love. Could you or someone please post here if or when the fix is in a .deb package avail for download from main site?

Also saw your previous explanation of cause but not sure if this is same or different as it sounds like it was fixed before. What happened? It's a very strange bug.

Thanks again.
Comment 22 tigerdev 2025-06-11 21:40:31 UTC
ah found fix from March but unclear how it got back in.
Don't understand MapModes
https://git.libreoffice.org/core/+/f2305b96b797c2084426eb2395d3ebd3b7d1fec5%5E%21
Comment 23 Commit Notification 2025-06-12 08:34:45 UTC
Armin Le Grand (Collabora) committed a patch related to this issue.
It has been pushed to "libreoffice-25-2":

https://git.libreoffice.org/core/commit/2f108c6a2bed0557ddf625f82c6d548645b24599

tdf#166607, tdf#165706 additional taking care in CairoSDPR

It will be available in 25.2.5.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 24 Armin Le Grand (allotropia) 2025-06-12 09:12:22 UTC
Just to make sure will build a current 25-2 and check/ensure...

@tigerdev: It did not get back in, it just was not part of 25-2 branch jet. When fixing I split in 2 parts, see orig task. 1st small fix in vcl already did fix that task, so - to be careful with 25-2 branch (the less you do the less probability to break something else), only that one went there - from upstream. HTH!
Comment 25 Xisco Faulí 2025-06-12 09:22:36 UTC
Hi Armin,
I do confirm the issue is fixed in

Version: 25.2.5.0.0+ (X86_64) / LibreOffice Community
Build ID: 2f108c6a2bed0557ddf625f82c6d548645b24599
CPU threads: 8; OS: Linux 6.1; UI render: default; VCL: gtk3
Locale: es-ES (es_ES.UTF-8); UI: en-US
Calc: threaded

which includes the backport.
Comment 26 Armin Le Grand (allotropia) 2025-06-12 12:00:29 UTC
Checked, looks good :)