Bug 152614 - Database Form Creation Wizard incorrectly distributes form controls in document.
Summary: Database Form Creation Wizard incorrectly distributes form controls in document.
Status: VERIFIED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Base (show other bugs)
Version:
(earliest affected)
7.5.0.0 alpha1+
Hardware: All All
: high normal
Assignee: Not Assigned
URL:
Whiteboard: target:7.6.0 target:7.5.3
Keywords: bibisected, bisected, regression
: 153965 154914 (view as bug list)
Depends on:
Blocks: Database-Forms Database-Wizard
  Show dependency treegraph
 
Reported: 2022-12-20 10:38 UTC by Alex Thurgood
Modified: 2023-05-02 22:44 UTC (History)
7 users (show)

See Also:
Crash report or crash signature:


Attachments
Screenshot of form when it opens after wizard completes (40.66 KB, image/png)
2022-12-20 10:41 UTC, Alex Thurgood
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Alex Thurgood 2022-12-20 10:38:20 UTC
Description:
1) Start LibreOffice daily alpha 7.6
2) Create Firebird database

3) Add a simple table using the table creation wizard, e.g. Names, having 3 fields ID (INT PRIMARY KEY AUTOINCREMENT), Fname (VARCHAR), Lname (VARCHAR), all with default character length.

4) Create a form using Form Creation Wizard. Add all fields from table Names. Click on Next.

5) Ignore Subform creation step, click on Next.

6) At the control layout step, Choose In blocks - Labels Above, then click on Next.

7) Accept the defaults for data entry, click on Next.

8) Choose default background and field border, click on Next.

9) Accept default name, default "Work with form" setting" and click on Finish.

10) Form is displayed with the first 2 controls overlaid one on top of the other, and the third control set to the right and offset vertically downwards.






Steps to Reproduce:
See above

Actual Results:
Regression over actual behaviour of production release.

Expected Results:
Controls should be distributed correctly across the page width


Reproducible: Always


User Profile Reset: Yes

Additional Info:
Version: 7.6.0.0.alpha0+ (AARCH64) / LibreOffice Community
Build ID: ad387d5b984c6666906505d25685065f710ed55d
CPU threads: 8; OS: Mac OS X 13.0.1; UI render: default; VCL: osx
Locale: fr-FR (fr_FR.UTF-8); UI: en-US
Calc: threaded
Comment 1 Alex Thurgood 2022-12-20 10:41:50 UTC
Created attachment 184262 [details]
Screenshot of form when it opens after wizard completes
Comment 2 Julien Nabet 2022-12-20 11:13:03 UTC
On pc Debian x86-64 with master sources updated today, I could reproduce this.
Now no idea what could be the root cause.

Let's increase priority since it's a regression and impacts all envs.
Comment 3 Alex Thurgood 2022-12-20 12:00:22 UTC
(In reply to Julien Nabet from comment #2)
> On pc Debian x86-64 with master sources updated today, I could reproduce
> this.
> Now no idea what could be the root cause.
> 
> Let's increase priority since it's a regression and impacts all envs.

Hi Julien,
Thanks for confirming.

In the past, when similar issues like this have occurred/been reported, the problem was somewhere within the layout code taking the left upper corner as the reference point for the layout, and the calculations.

Perhaps something has changed in this layout code recently. e.g. with respect to form objects more generally (and not specifically database controls) ?

The only recent form object code changes I can think of, are the ones relating to identifying and positioning of form objects, e.g. some of the commits in bug 151548.
Comment 4 marticanmet 2023-03-03 13:10:55 UTC
Hi,

This bug is also happening to me, but in LibreOffice 7.5.1.2 under Debian 11 (deb package from LibreOffice website). It also happened in LibreOffice 7.5.0 (deb package from LibreOffice website)

It does not happen under 7.4.5.1 (Debian Backports version).

I disabled hardware acceleration for testing.
Comment 5 Alex Thurgood 2023-03-16 14:07:03 UTC
Confirming that this also happens in the production release

Version: 7.5.1.2 (AARCH64) / LibreOffice Community
Build ID: fcbaee479e84c6cd81291587d2ee68cba099e129
CPU threads: 8; OS: Mac OS X 13.2.1; UI render: Skia/Raster; VCL: osx
Locale: fr-FR (fr_FR.UTF-8); UI: fr-FR
Calc: threaded
Comment 6 Stéphane Guillou (stragu) 2023-04-20 20:18:28 UTC
(moving the info from duplicate bug 154914)


Reproduced in 7.5.2.2 and a recent master build:

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

Bibisected the issue with the linux-64-7.5 repo to the first bad commit 6f10bfc3f53a7d88037a32deadcc7f3be94c061e which points to the core commit:

commit 8611f6e259b807b4f19c8dc0eab86ca648891ce3
author	Noel Grandin <noel.grandin@collabora.co.uk>	Thu May 27 10:27:46 2021 +0200
committer	Noel Grandin <noel.grandin@collabora.co.uk>	Mon Aug 29 13:44:02 2022 +0200
ref-count SdrObject
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/138837

Steps to reproduce:
1. Open database with some fields
2. Forms > Use wizard to create form
3. Field selection: all fields
4. Arrange controls: "Columnar - labels on top" (same with "Columnar - labels left" and "In block - labels above")
5. Click Finish

Results: elements overlap. gen and kf5 VCLs not affected.
Attachment 186800 [details] shows the difference before and after the commit.

Noel, can you please have a look? Same commit caused bug 154827 and bug 154428.
Comment 7 Stéphane Guillou (stragu) 2023-04-20 20:19:42 UTC
*** Bug 154914 has been marked as a duplicate of this bug. ***
Comment 8 Noel Grandin 2023-04-21 08:41:37 UTC
On current master, I can't reproduce this?

Version: 7.6.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: f6dbfbd2bfbd8a245bf42164bcb125528432cc38
CPU threads: 24; OS: Linux 5.19; UI render: default; VCL: gtk3
Locale: en-ZA (en_ZA.UTF-8); UI: en-US
Calc: threaded
Comment 9 Stéphane Guillou (stragu) 2023-04-21 18:00:18 UTC
(In reply to Noel Grandin from comment #8)
> On current master, I can't reproduce this?

You're right, I can't see it in today's master build.
Something in this ranged must have fixed it:

https://git.libreoffice.org/core/+log/61b41646c5a93ca24f2c9f143cdb0da2c9258989..f6dbfbd2bfbd8a245bf42164bcb125528432cc38

Probably your 40babcfa637957bf7b59caa3cd12a630189e3e63 fix for bug 154827 and bug 154827, given that all 3 are regressions from the same commit.

Could you please confirm and mark as fixed by you if that's the case?
Comment 10 Noel Grandin 2023-04-22 08:28:32 UTC
I can confirm that 40babcfa637957bf7b59caa3cd12a630189e3e63 fixed this
Comment 11 Stéphane Guillou (stragu) 2023-05-02 22:44:41 UTC
*** Bug 153965 has been marked as a duplicate of this bug. ***