Bug 73162 - TOC/Index: when adding text separators, content (like Entry #) preceding the text separator disappears from the generated text
Summary: TOC/Index: when adding text separators, content (like Entry #) preceding the ...
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
4.2.0.1 rc
Hardware: Other Linux (All)
: medium major
Assignee: Michael Stahl
QA Contact:
URL:
Whiteboard: BSA target:4.3.0 target:4.2.0
Keywords: regression
Depends on:
Blocks: mab4.2
  Show dependency treegraph
 
Reported: 2013-12-30 18:26 UTC by Jose Gómez
Modified: 2016-06-13 11:41 UTC (History)
5 users (show)

See Also:
Crash report or crash signature:


Attachments
Sample documents showing the issue in the TOC (28.82 KB, application/zip)
2013-12-30 18:26 UTC, Jose Gómez
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Jose Gómez 2013-12-30 18:26:46 UTC
Created attachment 91341 [details]
Sample documents showing the issue in the TOC

Problem description: 
In the Insert Index/Tables dialog, the Entry # dissapears from the Entry when adding other characters (for example, in order to separate the entry number and the entry text with a dot or a space).

From the default TOC rendered in a new document:
  1First Heading
  1.1First Second-Level Heading
  1Second Heading
  1Third Heading

Editing the level 1 Entry in order to separate the entry #:
  1. First Heading
  1.1First Second-Level Heading
  1. Second Heading
  1. Third Heading

Actually this is the outcome (the entry # dissapears in the modified level):
  First Heading
  1.1First Second-Level Heading
  Second Heading
  Third Heading

Steps to reproduce:
1. Create a new document and add a few headings and a Table of Content. Enable numbering in the headings. This is the result of the attached "Simple doc with TOC (original, entry # visible).odt".
2. Edit the Table of Contents, and in the Entry tab, add ". " after the E# item.
3. Click OK and back to the document. Not only the ". " text is not added, but the E# item has dissapeared altogether.

Current behavior:
The E# item dissapears when adding text.

Expected behavior:
Both the new text and the E# item stays and are visible in the generated index.
              
Operating System: Ubuntu
Version: 4.2.0.1 rc
Comment 1 Jose Gómez 2013-12-30 18:34:16 UTC
Note that there is a workaround to this specific issue, if instead of adding the static text in the TOC it is added in the Numbering properties of the Heading styles. Of course, in this case the same separator appears in the text and the TOC.
Comment 2 Cor Nouws 2013-12-30 19:25:26 UTC
Hi Jose,

thanks for submitting the issue. I can confirm this..

Cor
Comment 3 Michael Stahl 2014-01-14 23:16:04 UTC
fa78b33a10ceb46b11caa726512a0862b9775b56..1fd4b34a5dcf707a324bb61c1779567d1855ee42

regression from:

commit f4fd558ac9d61fe06aa0f56d829916ef9e5ee7b9
Author:     Matteo Casalin <matteo.casalin@yahoo.com>
AuthorDate: Fri Aug 9 22:11:53 2013 +0200
Commit:     Tor Lillqvist <tml@iki.fi>
CommitDate: Tue Aug 13 08:05:41 2013 +0000

    String to OUString and some reduction of scope
    
    Change-Id: Ia760c5f3f8c158bea30be3102841a66330e5180a
    Reviewed-on: https://gerrit.libreoffice.org/5339
    Reviewed-by: Tor Lillqvist <tml@iki.fi>
    Tested-by: Tor Lillqvist <tml@iki.fi>

fixed on master.
Comment 4 Commit Notification 2014-01-14 23:16:42 UTC
Michael Stahl committed a patch related to this issue.
It has been pushed to "master":

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

fdo#73162: sw: un-break index entries that contain text separators



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 5 Jean-Baptiste Faure 2014-01-15 05:12:44 UTC
Is it possible to backport this fix to 4.2 branch ?

Best regards. JBF
Comment 6 Pierre C 2014-01-15 07:14:35 UTC
It would be great to back-port it to 4.1
Comment 7 Commit Notification 2014-01-16 15:18:55 UTC
Michael Stahl committed a patch related to this issue.
It has been pushed to "libreoffice-4-2":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=1fd6ebac89a83e6ceecd69f0c6c807d8ee8b5c81&h=libreoffice-4-2

fdo#73162: sw: un-break index entries that contain text separators


It will be available in LibreOffice 4.2.1.

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 8 Commit Notification 2014-01-16 20:01:11 UTC
Michael Stahl committed a patch related to this issue.
It has been pushed to "libreoffice-4-2-0":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=fce6a11afa46695d59e0654fd5c81a106073f9b2&h=libreoffice-4-2-0

fdo#73162: sw: un-break index entries that contain text separators


It will be available already in LibreOffice 4.2.0.

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 9 Commit Notification 2016-06-13 11:18:50 UTC
Varun committed a patch related to this issue.
It has been pushed to "master":

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

Added Test for tdf#73162 TOC/Index

It will be available in 5.3.0.

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.