Download it now!
Bug 67615 - Fields in table-control of a form show '0' instead of text, when GUI-language isn't English
Summary: Fields in table-control of a form show '0' instead of text, when GUI-language...
Status: VERIFIED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Base (show other bugs)
Version:
(earliest affected)
3.3.0 release
Hardware: All All
: medium major
Assignee: Not Assigned
URL:
Whiteboard: target:4.4.0 target:4.3.2
Keywords:
: 74400 77672 (view as bug list)
Depends on:
Blocks:
 
Reported: 2013-08-01 09:43 UTC by mkuzmin
Modified: 2014-12-21 16:02 UTC (History)
5 users (show)

See Also:
Crash report or crash signature:


Attachments
Database example and screenshots of bug (81.13 KB, image/png)
2013-08-07 08:40 UTC, mkuzmin
Details
Example database (23.01 KB, application/vnd.oasis.opendocument.database)
2013-08-07 08:40 UTC, mkuzmin
Details
LO windows version (27.28 KB, image/png)
2013-08-07 08:41 UTC, mkuzmin
Details
LO Mac without bug (102.61 KB, image/png)
2013-08-07 08:41 UTC, mkuzmin
Details
LO Mac version (154.37 KB, image/png)
2013-08-07 08:42 UTC, mkuzmin
Details

Note You need to log in before you can comment on or make changes to this bug.
Description mkuzmin 2013-08-01 09:43:18 UTC
I have database created in LO 4.0.3 It containes several tables and queries.
In tables I have several varchar fields (e.g. "Name" field VARCHAR 255)

Then I upgraded to LibreOffice 4.1.0.4 on Windows and Mac (Win XP, Win 7, OS X Lion) and encountered a bug. 

I created form based on table (using wizard) and added control table (grid) control on form. In control table fields that contain varchar values DO NOT DISPLAY correct values. Instead of displaying varchar value (e.g. "John") they display integer value (e.g. "0").  Please note that text box control on the same form display varchar values correctly, so problem is in control table.

In LO 4.0 that form and control table worked correctly.

Thanx,
Mladen
mkuzmin@open.hr
Comment 1 Robert Großkopf 2013-08-06 05:51:18 UTC
Could you please add an example for this bug? Don't know who has confirmed this bug. I can't confirm it with any database.
Comment 2 mkuzmin 2013-08-07 08:40:10 UTC
Created attachment 83762 [details]
Database example and screenshots of bug

In ziped file you will find:
1. MladenCRM example of database in which bug is occuring
2. screenshot from LO 4.1.0.4 Windows in which bug is occuring
3. screenshot from LO 4.1.0.4 Macin which bug is not occuring

Please have a look at fPartner form and look at "Poduzece" field in control table in lower part of form. You will see that instead of displaying the name of company (e.g. "company 1"), it is displaying Zeros.

Mladen
Comment 3 mkuzmin 2013-08-07 08:40:38 UTC
Created attachment 83763 [details]
Example database
Comment 4 mkuzmin 2013-08-07 08:41:22 UTC
Created attachment 83764 [details]
LO windows version
Comment 5 mkuzmin 2013-08-07 08:41:46 UTC
Created attachment 83765 [details]
LO Mac without bug
Comment 6 mkuzmin 2013-08-07 08:42:03 UTC
Created attachment 83766 [details]
LO Mac version
Comment 7 mkuzmin 2013-08-07 08:43:06 UTC
Hi :)

I added example and screenshots that ilustrate the bug.
Mladen

(In reply to comment #1)
> Could you please add an example for this bug? Don't know who has confirmed
> this bug. I can't confirm it with any database.
Comment 8 Robert Großkopf 2013-08-07 10:29:24 UTC
I have found the mistake in the tables - but we have to search, how it happend.
Open the table "PARTNER" for editing. Get one Varchar-field. Have a look at format-example. There appears "0", when it is opened in a tablecontrol with "0". Don't know, why. But it is not the first time this bug appears.

No have a look at this format-example. Press the button beside the field [...]. Change the language to "Default" (you must search through the languages, because it is sorted by the language of your GUI - in Germany I found it as "Standard" directly after "Spanish"). Press "OK". Hope, that the format-example has changed also to "@". Save the table and have a look at the form.

I have first opened the database with LO 4.1.0.4 - the error occurred. Then opened it with LO 3.3.4. Same error. With some other versions (for example 4.0.5.1 rc or 3.6.6.2 or 4.1.1.1 ) I could open the database and it works without any problems. Difference is, that I haven't installed a German langpack for these versions.

I will have a look, if I could reproduce the bug with a new database.
Comment 9 Robert Großkopf 2013-08-17 17:53:31 UTC
I have just found the difference. When I open your example with LO, where I haven't added my normal language-pack (German for my system) the content of the fields is shown. 
When I open the same with any LO-version, which I have installed with the German langpack, there is shown '0' instead of text.

It's the same difference what I can see when having a look at the versions you use: It works with the English version (no langpack installed on MAC) and doesn't work with the Croatia version (installed on Windows).

I will see, how I could change the title a little bit to show the problem.
Comment 10 Robert Großkopf 2014-04-23 07:26:59 UTC
*** Bug 77672 has been marked as a duplicate of this bug. ***
Comment 11 Julien Nabet 2014-08-27 21:24:54 UTC
Just for the record, I could reproduce this on pc Debian x86-64 with master sources updated today.
I confirm Robert's comment, ok with English UI, ko with other UI (I tested French UI).
Comment 12 mhonline 2014-08-28 01:28:54 UTC
if I remember it right, I had these problems too, but it stopped with 
newer versions of LO (4.2.x) and when updating java (7-55 or higher).

m. 

(Win7 + XP, LO-DE)
Comment 13 Julien Nabet 2014-08-28 05:29:47 UTC
Just for the record, here's my Java version:
java version "1.7.0_65"
OpenJDK Runtime Environment (IcedTea 2.5.1) (7u65-2.5.1-4)
OpenJDK 64-Bit Server VM (build 24.65-b04, mixed mode)

mhonline: which language UI do you use?
Comment 14 Lionel Elie Mamane 2014-08-29 10:30:30 UTC
The text control takes the format to use from the table's field. In your case, the columns (fields) that display "0" have (under the hood) a numeric format. Since they contain e.g. "person 5" which does not parse to a number, it is replaced by 0. How you go to this situation, I'm not sure.

Here is how to fix it:
 * edit the table
 * select an affected field (e.g. IME)
 * change the format:
    - click on the "..." next to "format example"
      (which, you'll notice, says "0")
    - since you have only one choice (text),
       a convenient way to change it is to change the language.
    - Click "OK"
 * save the table

Your problem is fixed.
Comment 15 Robert Großkopf 2014-08-29 14:06:47 UTC
(In reply to comment #14)
> The text control takes the format to use from the table's field. In your
> case, the columns (fields) that display "0" have (under the hood) a numeric
> format. Since they contain e.g. "person 5" which does not parse to a number,
> it is replaced by 0. How you go to this situation, I'm not sure.

The '0' appears not only in this bug. It's a problem, which could be found often in mailinglists, forum and other. Nobody knows where the '0' comes from. It hasn't been set by the user.

And this is the problem and the bug: Everybody, who had this problem, doesn't know where it came from.

Why should such a bug-description be invalid?

I will reopen this bug.
Comment 16 Lionel Elie Mamane 2014-08-29 16:24:51 UTC
Hmm...I missed that text fields not in a table control do not use the format when bound to text fields. Which rather makes sense, and avoids the issue entirely.

Note to self: see if DbTextField could use the same method as free-float text control to get the formatted value (value as a string), namely a dbtools::FormattedColumnValue, instead of svxform::OTypeConversionClient (which delegates to connectivity::ODataAccessStaticTools).

Or maybe svxform::OTypeConversionClient can be "configured" (changed?) to use dbtools::FormattedColumnValue instead.
Comment 17 Commit Notification 2014-08-29 19:09:43 UTC
Lionel Elie Mamane committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=86bdb13704d9d85a247339071a86d301ce86cd7f

fdo#67615 TextField in table should use same formatting as floating TextField



The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds
Affected users are encouraged to test the fix and report feedback.
Comment 18 mhonline 2014-08-29 20:04:26 UTC
@ Julian - comment 13: UI is "de" - I am using portable versions only (W7+XP)

I looked up my screenshots from 4-2014, they are exactly as reported, I can see and remember the mistakes (LO crashed half of my data), but I do not know, which LO-version it was.

However, my observation was, that having a grid-control in a form and starting the grid-table-view, do some edit-word in the records and save it, this crashed LO and on restart ("repair"(?)) the table was broken.

I just give it a try with an old (defekt) odb in a current LO (4.3.0), and it seems to work, pointers in grid-control and grid-table-view are well synchonised and record-changed are well saved, so recent versions seem to work (for me) ..., so something had changed, but I have no Idea what it was.

m.



(Bytheway: when I did this testings, I found a way to immidiatly crash LO: right-click in header of grid-control or -table-view for the properties/format it will crash LO - works with this sample-odb aswell)
Comment 19 Robert Großkopf 2014-08-30 07:26:58 UTC
(In reply to comment #18)

> (Bytheway: when I did this testings, I found a way to immidiatly crash LO:
> right-click in header of grid-control or -table-view for the
> properties/format it will crash LO - works with this sample-odb aswell)

This is:
https://bugs.freedesktop.org/show_bug.cgi?id=82413
Fixed for 4.3.1
Comment 20 Robert Großkopf 2014-08-31 16:20:07 UTC
I have tested now with LO 4.4.0.0alpha 2014-08-30. Have opened a database with a table, which shows '0' instead of text under LO 4.1. Works with now right with the daily build from 2014-08-30.

Was the best way to switch the format from the tablecontrol-textfield to the format of a standalone textfield. Haven't seen any other table or query where the '0' instead of '@' in the format of a table makes a difference.

Many thanks, Lionel.

I will set this bug to "Verified".
Comment 21 Commit Notification 2014-09-03 10:43:32 UTC
Lionel Elie Mamane committed a patch related to this issue.
It has been pushed to "libreoffice-4-3":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=9a69d111c1f563b5a4f484154d1be36a5a92f3e6&h=libreoffice-4-3

fdo#67615 TextField in table should use same formatting as floating TextField


It will be available in LibreOffice 4.3.2.

The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds
Affected users are encouraged to test the fix and report feedback.
Comment 22 Lionel Elie Mamane 2014-09-03 12:31:43 UTC
*** Bug 74400 has been marked as a duplicate of this bug. ***