Bug Hunting Session
Bug 44410 - Soft Hyphens Ignored in Cross-References
Summary: Soft Hyphens Ignored in Cross-References
Status: RESOLVED WORKSFORME
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: LibreOffice (show other bugs)
Version:
(earliest affected)
3.3.2 release
Hardware: Other All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard: BSA
Keywords:
Depends on:
Blocks:
 
Reported: 2012-01-02 21:52 UTC by Richard Wordingham
Modified: 2015-04-22 13:52 UTC (History)
4 users (show)

See Also:
Crash report or crash signature:


Attachments
Example of soft hyphen being ignored in cross-reference in paragraph 2 but ZWSP being honoured in cross-reference in Paragraph 4. (9.55 KB, application/vnd.oasis.opendocument.text)
2012-01-02 21:52 UTC, Richard Wordingham
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Richard Wordingham 2012-01-02 21:52:42 UTC
Created attachment 55064 [details]
Example of soft hyphen being ignored in cross-reference in paragraph 2 but ZWSP being honoured in cross-reference in Paragraph 4.

This bug is also present in 3.5.0 Beta2.

Problem description: 
When a cross-reference is inserted as a reference, soft hyphens in the text being referenced are ignored.

Steps to reproduce:
1. In a new paragraph, enter string of letters and digits long enough to cause a line wrap.
2. Insert a soft-hyphen, e.g. by ctrl/-, so that the text only breaks at that point.
3. Create a new, empty paragraph with the same styling as the paragraph at Step 1.
4. Select text entered at steps 1 and 2, and create a reference by insert, cross-reference, set-reference, entering a name, and clicking insert in the dialogue box.
5. Create a cross-reference in the new, empty paragraph by insert, cross-reference, choosing Reference in 'Insert reference to', selecting the name from Step 4 and clicking insert in the dialogue box.

Observed behaviour:
The cross-reference text breaks not at the location of the optional hyphen, but when the cross-reference text reaches the end of line.  This is observed in both the writer display and in exported PDF.

An example of what is saved in content.xml is the following:

<text:p text:style-name="P1"><text:reference-mark-start text:name="testing"/>verylongstringpt1­verylongstringpt2<text:reference-mark-end text:name="testing"/></text:p>
<text:p text:style-name="P1"><text:reference-ref text:reference-format="text" text:ref-name="testing">verylongstringpt1verylongstringpt2</text:reference-ref></text:p>

There is a soft hyphen in the reference definition (between 'pt1' and 'very'), in the first paragraph, but not in the cross reference (the second paragraph). 

Correct behaviour:
The text of the cross-reference should both break at the point of the soft hyphen rather than between letters and digits.

Remark:
This problem does not occur with zero-width spaces.  They are stored in their own text:span elements, and the ZWSP (U+200B) character occurs within a text:span element in the cross-reference. (This partial work-around is more difficult to apply in 3.5.0 beta2 because ZWSP no longer appears on the insert, formatting mark menu.  Not all keyboards include ZWSP.)

Platform (if different from the browser): 
              
Browser: Mozilla/5.0 (X11; U; Linux i686; en-GB; rv:1.9.2.24) Gecko/20111107 Ubuntu/10.04 (lucid) Firefox/3.6.24
Comment 1 sasha.libreoffice 2012-02-16 03:10:28 UTC
reproduced in 3.6.0 master on Fedora 64 bit
Comment 2 tommy27 2013-08-30 09:44:23 UTC
do you still see this bug in recent 4.0.5 or 4.1.1 LibO releases?
Comment 3 Richard Wordingham 2013-09-01 17:05:48 UTC
Bug is still present in Version 4.1.1.2 Build ID: 410m0(Build:2) on Ubuntu 12.04.

The misbehaviour is unchanged from the original bug report, even in a freshly created document.  The ZWSP partial work-around continues to work.
Comment 4 QA Administrators 2015-04-01 14:40:46 UTC
** Please read this message in its entirety before responding **

To make sure we're focusing on the bugs that affect our users today, LibreOffice QA is asking bug reporters and confirmers to retest open, confirmed bugs which have not been touched for over a year.

There have been thousands of bug fixes and commits since anyone checked on this bug report. During that time, it's possible that the bug has been fixed, or the details of the problem have changed. We'd really appreciate your help in getting confirmation that the bug is still present.

If you have time, please do the following:

   *Test to see if the bug is still present on a currently supported version of LibreOffice (4.4.1 or later)
   https://www.libreoffice.org/download/

   *If the bug is present, please leave a comment that includes the version of LibreOffice and your operating system, and any changes you see in the bug behavior
 
   *If the bug is NOT present, please set the bug's Status field to RESOLVED-WORKSFORME and leave a short comment that includes your version of LibreOffice and Operating System

Please DO NOT

   *Update the version field
   *Reply via email (please reply directly on the bug tracker)
   *Set the bug's Status field to RESOLVED - FIXED (this status has a particular meaning that is not appropriate in this case)


If you want to do more to help you can test to see if your issue is a REGRESSION. To do so: 

1. Download and install oldest version of LibreOffice (usually 3.3 unless your bug pertains to a feature added after 3.3)

http://downloadarchive.documentfoundation.org/libreoffice/old/

2. Test your bug 
3. Leave a comment with your results. 
4a. If the bug was present with 3.3 - set version to "inherited from OOo"; 
4b. If the bug was not present in 3.3 - add "regression" to keyword


Feel free to come ask questions or to say hello in our QA chat: http://webchat.freenode.net/?channels=libreoffice-qa

Thank you for your help!

-- The LibreOffice QA Team This NEW Message was generated on: 2015-04-01
Comment 5 Buovjaga 2015-04-22 13:52:38 UTC
When I tried reproducing from scratch, the cross-ref did break at the soft hyphen. Setting to WFM, please correct me if I'm wrong.

Win 7 Pro 64-bit Version: 5.0.0.0.alpha0+ (x64)
Build ID: 211c12b9c64facd1c12f637a5229bd6a6feb032a
TinderBox: Win-x86_64@42, Branch:master, Time: 2015-04-18_01:51:17
Locale: fi_FI