Bug 73386

Summary: EDITING: There is no warning/information when one accidentaly deletes non-visible (zero width) fields (e.g. mail merge "next record" !)
Product: LibreOffice Reporter: Bengt Giger <lo_bugs.5.bigi_gigi>
Component: WriterAssignee: Not Assigned <libreoffice-bugs>
Status: NEW --- QA Contact:
Severity: enhancement    
Priority: medium CC: cno, iplaw67
Version: Inherited From OOo   
Hardware: All   
OS: All   
Whiteboard:
i915 platform: i915 features:
Attachments: Screenshot showing position of hidden character
Test database, 3 records
Test document, as created, print OK
Test document, char deleted, print broken

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
Dear Bug Submitter,

This bug has been in NEEDINFO status with no change for at least 6 months. Please provide the requested information as soon as possible and mark the bug as UNCONFIRMED. Due to regular bug tracker maintenance, if the bug is still in NEEDINFO status with no change in 30 days the QA team will close the bug as INVALID due to lack of needed information.

For more information about our NEEDINFO policy please read the wiki located here: 
https://wiki.documentfoundation.org/QA/FDO/NEEDINFO

If you have already provided the requested information, please mark the bug as UNCONFIRMED so that the QA team knows that the bug is ready to be confirmed.


Thank you for helping us make LibreOffice even better for everyone!


Warm Regards,
QA Team
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
Adding self to CC if not already on

Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.