Bug 73386 - EDITING: There is no warning/information when one accidentaly deletes non-visible (zero width) fields (e.g. mail merge "next record" !)
Summary: EDITING: There is no warning/information when one accidentaly deletes non-vis...
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
Inherited From OOo
Hardware: All All
: medium enhancement
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: Mail-Merge
  Show dependency treegraph
 
Reported: 2014-01-08 09:22 UTC by Bengt Giger
Modified: 2021-12-10 14:01 UTC (History)
2 users (show)

See Also:
Crash report or crash signature:


Attachments
Screenshot showing position of hidden character (2.48 KB, image/png)
2014-01-08 09:22 UTC, Bengt Giger
Details
Test database, 3 records (4.62 KB, application/vnd.oasis.opendocument.database)
2014-01-08 09:23 UTC, Bengt Giger
Details
Test document, as created, print OK (9.15 KB, application/vnd.oasis.opendocument.text)
2014-01-08 09:23 UTC, Bengt Giger
Details
Test document, char deleted, print broken (9.12 KB, application/vnd.oasis.opendocument.text)
2014-01-08 09:24 UTC, Bengt Giger
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Bengt Giger 2014-01-08 09:22:21 UTC
Created attachment 91640 [details]
Screenshot showing position of hidden character

Label print templates have a hidden character at the end of the template. If this character is accidentially deleted, printing a database with i.e. 9 records produces 9 pages, each page full with labels from one record, instead of 9 labels. After having synchronized the label templates, there is no more undo for this delete operation, if you cannot revert to a previously saved version, the document has to be created again.


Steps to reproduce:

1. Create simple DB table or use example provided (3 rows of data)
2. Create New -> Labels
3. Add some data fields, "synchronize" content in Options tab (*)
5. Create document
6. Place cursor at the end of the 1st label template

You can check: <arrow left> seems not to move, cursor is still to the right of the data field. One more <arrow left> moves the cursor to the left of the data field. See screenshot where I marked the location if unclear.

7. Go back to the end of the template and use backspace to delete the hidden character to the left of the cursor
8. Synchronize label templates
9. Print labels, confirm printout to use data from database.


Actual results:

The print dialog shows (based on the example) 6 pages to be printed. First page has all labels filled with data from row 1, page 3 all from row 2 and page 5 all from row 3; even pages are empty.

(*) when not synchronizing, a similar but less visible error happens: a record with end character deleted will be printed twice.


Expected results:

With example DB: three labels on the first page.

Tested on Windows (4.1.3.2, 4.2.0.1 rc) and Linux (4.1.4.2), also occurs in OpenOffice 4.0.1
Comment 1 Bengt Giger 2014-01-08 09:23:01 UTC
Created attachment 91641 [details]
Test database, 3 records
Comment 2 Bengt Giger 2014-01-08 09:23:30 UTC
Created attachment 91642 [details]
Test document, as created, print OK
Comment 3 Bengt Giger 2014-01-08 09:24:11 UTC
Created attachment 91643 [details]
Test document, char deleted, print broken
Comment 4 Cor Nouws 2014-01-08 09:54:04 UTC
Hi Brengt,

thanks for the extensie report. Isn't it just that with deleting the last character you deleted a field too ?

To test:
  - Go to the first label, 
  - Ctrl+A / Ctrl+C
  - New document / Ctrl+V
from both label documents in one
  - Ctrl+F9
    showing the field names ..

See the difference.
Regards,
Cor
Comment 5 Bengt Giger 2014-01-08 11:11:00 UTC
Yes, the deleted item was a field, as I can see now. The field is named "Next record:<DB-Name.DB-Table", which makes its use obvious to me. Something like a newline for DB records I guess.

To me it's now clear what happens and how to work around the effect if it happens. Still: if possible, hiding this field completely would protect users from accidentially deleting it and running into troubles. 

Or if the field could get a visible label, similar to the data fields. A caption like "<Next record>" which would make it obvious that here is something important to functionality. And could point to the fact that it is something that can be reinserted (Insert / Fields / Other... -> Next record). Which I found out now.

Regards
Bengt
Comment 6 Cor Nouws 2014-01-08 15:29:31 UTC
So you could make a request for enhancement out of this? 
Such as:
   "there is no warning/information when one accidentaly deletes non-visible (zero width) fields "
? OK?
Comment 7 Bengt Giger 2014-01-08 15:32:21 UTC
Hi Cor

a more generalized approach. Yes, sounds good.

Regards
Bengt
Comment 8 Cor Nouws 2014-01-09 00:07:16 UTC
OK Bengt, here we go!
Comment 9 QA Administrators 2014-08-04 16:17:36 UTC Comment hidden (obsolete)
Comment 10 Bengt Giger 2014-08-05 06:20:59 UTC
Enhancement request set back to UNCONFIRMED to prevent invalidation. Same behaviour in 4.2.5.2.
Comment 11 Alex Thurgood 2014-10-20 06:35:17 UTC
Confirmed, for me this is a  request for enhancement
Comment 12 Alex Thurgood 2014-10-20 06:36:46 UTC
The same could said of all inserted fields that only contain an instruction as opposed to data inserted from some other source
Comment 13 Alex Thurgood 2015-01-03 17:38:36 UTC Comment hidden (no-value)
Comment 14 Carl Pettit 2021-12-10 14:01:50 UTC
I can confirm that this is still needed as of 7.1.8.1 on Mac. It's and absolute pain and a real gotcha for the newbie.