Apache OpenOffice (AOO) Bugzilla – Issue 2817
Long texts disappear when selected in grid
Last modified: 2006-05-31 14:29:06 UTC
On my grid form based on select * from Filme (5.2 db sample), when I open the form and put the cursor into a cell in the FTEXT column, the column text disappears. Now, when I enter a new line with a short FTEXT and save it by clicking the diskette icon on the form footer, every other FTEXT cell I select from now on always shows the newly entered FTEXT. This only happens in a grid, not in a normal text field. FTEXT is a VARCHAR(500), Adabas cannot order by it. Maybe this has to do with the field length.
I will check this
Hi, I can't reproduce this. The field content doesn't disappear when click in the column. Can you reproduce it with any other table? Ciao Marc
Yes, I defined a new table "Test" in SOFFICE, the datasource for the 5.2 database example. create table ("TID" Integer , "TText" Varchar(500)) Then I copied the text from the field FTEXT in Filme that belongs to Terminator into my new field TText in the new table. Finally I used the Autopilot to create a form with a grid control containing both columns. Same effect - whenever I set the cursor into the TText field, the TText content disappears. See attached screenshots.
Created attachment 1017 [details] shows disappearing long varchar text
Yes, now I can see the problem. The problem is that the length of the column is limit to 30 chars per default. If you change the max text length of the control to the length of the database table field length, than everythings works fine. But that there is nothing displayed in the textfield is still a "small" bug.
accepting the issue, though I'm not yet sure what the best solution would be
From a investigation of bug 6118, it rose that we need to care not only for the grid columns (where we already changed something), but also for other text fields (simple ones and formatted fields). We need a defined behaviour for a situation where a control (no matter if in a grid, or a "normal" control) is filled with a text which is longer than the max text len property. Current state: * normal text fields: either the text is accepted (which is bug 8399 deep in VCL), or the old text, means from the previous record, is kept (which is definately wrong) * grid controls: - before the recent fix: the text vanished - after the recent fix: the text is cut to the proper len We should implement the latter for normal text controls, too.
Ocke, please care for this. We need, for normal text controls (forms/source/component/Edit.cxx) a behaviour similar to what you already implemented for grid columns. Please feel free to ask for details if necessary.
now really assigning to Ocke ...
I'll take care about.
Fixed.
close
change subcomponent to 'none'