Bug 143413 - LO 7.2.0.1 'AutoField' won't be saved (gtk3)
Summary: LO 7.2.0.1 'AutoField' won't be saved (gtk3)
Status: RESOLVED WORKSFORME
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Base (show other bugs)
Version:
(earliest affected)
7.2.0.1 rc
Hardware: x86-64 (AMD64) Linux (All)
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: GTK3
  Show dependency treegraph
 
Reported: 2021-07-16 17:16 UTC by horstwilli
Modified: 2023-01-15 15:03 UTC (History)
4 users (show)

See Also:
Crash report or crash signature:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description horstwilli 2021-07-16 17:16:18 UTC
Im working with Linux Ubuntu 21.04. The installed version of LibreOffice is: 

Version: 7.2.0.1 / LibreOffice Community Build ID: 32efc3b7f3a71cfa6a7fa3f6c208333df48656cc CPU threads: 4; OS: Linux 5.11; UI render: default; VCL: gtk3 Locale: de-DE (de_DE.UTF-8); UI: de-DE Calc: threaded 

If you build a table with a inserted HSQL-Database, f.e. t_namen with the fields id (fieldtype "integer"), famname (fieldtype "text varchar"), rufname (fieldtype "text varchar"), etc. and you try to set a primary key on id this will be saved. But if you restart the table, Autowert isn't existent any more. 

We tried to fix the problem by going into the directory where LibreOffice is started. On my System is this /opt/libreoffice7.2/program/. The startfile is soffice. We opened a Terminal and tried to start there LibreOffice by the following Terms: 

SAL_USE_VCLPLUGIN=gen ./soffice. 

This would exclude gtk3. 

As result LibreOffice started without gtk3. By starting of BASE and trying to get  'Autowert' again, it wasn't possible, to get it as normal user. When logged in as root, everything was o.k. 'Autowert' did work then, but only then. 

So we think, it is a bug with gtk3. 

By the way, a similar problem exists with LibreOffice on MacOS X 11.4 Big Sur.
Comment 1 Robert Großkopf 2021-07-17 08:58:44 UTC
We have discussed this in https://ask.libreoffice.org/de/question/318103/lo-7x-autowert-funkioniert-nicht/

It will work well in:
 
Version: 7.2.0.1 / LibreOffice Community
Build ID: 32efc3b7f3a71cfa6a7fa3f6c208333df48656cc
CPU threads: 6; OS: Linux 5.3; UI render: default; VCL: kf5 (cairo+xcb)
Locale: de-DE (de_DE.UTF-8); UI: de-DE
Calc: threaded

Seems this is a special gtk3-bug. So I can't confirm.
Comment 2 Buovjaga 2021-07-17 13:34:39 UTC
Does "inserted HSQL-Database" mean an embedded HSQL db? Would it help us in testing, if you attached an example database?
Comment 3 Robert Großkopf 2021-07-17 15:22:57 UTC
(In reply to Buovjaga from comment #2)
> Does "inserted HSQL-Database" mean an embedded HSQL db? Would it help us in
> testing, if you attached an example database?

Yes, it's the embedded database. An example isn't needed.
The database could be an empty file, created by
Base Database → Create a new database 'HSQLDB Embedded'
Don't register the database and open the database for editing.

Steps to reproduce the bug:
Create a table in design view.
First field "ID", Field Type INTEGER
Second field "Name", Filed Type could be Text (default)
Go to first field an set Field Properties → AutoValue → 'Yes'
Field "ID" will show primary key.
Save table and close table.
Open table for input data.

Here with VCL: kf5 it will show in field ID <AutoField>. So I couldn't reproduce the bug here. Width gtk3 is reported: <AutoField> isn't there. Opening the table for editing will show also AutoValue → 'No'
Comment 4 Julien Nabet 2021-07-19 18:20:40 UTC
On pc Debian x86-64 with master sources updated today + gtk3 rendering, here's what I got:
Create a table in design view => OK
First field "ID", Field Type INTEGER  => OK
Second field "Name", Filed Type could be Text (default)  => OK
Go to first field an set Field Properties → AutoValue → 'Yes'  => OK

Field "ID" will show primary key => KO
There's no the key image indicating it's a primary key)

Save table
=> it proposes to create a primary key
1) if Yes: Error
SQL Status: S0011
Error code: -24

Attempt to define a second primary key in statement [CREATE TABLE "Table3" ("ID1" INTEGER NOT NULL,"ID" INTEGER IDENTITY,"Name" VARCHAR(100), PRIMARY KEY  ("ID1")] /home/julien/lo/libreoffice/connectivity/source/drivers/jdbc/Object.cxx:174

2) if No
Table is saved
AutoValue is still at Yes with no primary key

I'll continue with option 2)
Close table => OK
Open table for edition => first field has still the autovalue at Yes but this time it has also primary key indicated

BTW, I'm not sure it's expected LO to set automatically "primary key" when setting autovalue at yes

What a mess...
Comment 5 Eleonora Govallo 2021-07-26 13:53:48 UTC
Reproduced (as mentioned in comment 4) in Version: 7.3.0.0.alpha0+ / LibreOffice Community
Build ID: c5ca46e75e28ba4245d8544ca53c71fea87d1bbd
CPU threads: 8; OS: Linux 5.4; UI render: default; VCL: gtk3
Locale: ru-RU (ru_RU.UTF-8); UI: en-US
TinderBox: Linux-rpm_deb-x86_64@86-TDF, Branch:master, Time: 2021-07-20_00:22:42
Calc: threaded
Comment 6 Caolán McNamara 2022-11-07 20:39:04 UTC
I can't reproduce in trunk or local 7-3, but if its still a problem it might be focus related and it might matter exactly how "go to first field" is done, (keyboard "up" or mouse click, and if click is it click on cell or row indicator itself) and/or what route is used for the "save"
Comment 7 Robert Großkopf 2023-01-15 15:03:59 UTC
Have tested this one with LO 7.3.7.2 on Ubuntu 22.04
Ubuntu package, not direct from LO, VCL: gtk3.

No problem to create an AutoValue.
No problem to see the AutoValue in the table when input data.

I will set this one to WORKSFORME. Feel free to reopen if problem still exists in a current version of LO.