Bug 75519 - EDITING: CrossReference as Chapter becomes ??
Summary: EDITING: CrossReference as Chapter becomes ??
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
4.2.0.4 release
Hardware: Other All
: medium major
Assignee: Michael Stahl (allotropia)
URL:
Whiteboard: BSA target:4.3.0 target:4.2.5
Keywords: regression
: 77519 (view as bug list)
Depends on:
Blocks: mab4.2
  Show dependency treegraph
 
Reported: 2014-02-26 06:29 UTC by Luiz Angelo Daros de Luca
Modified: 2014-05-08 07:54 UTC (History)
3 users (show)

See Also:
Crash report or crash signature:


Attachments
Check the red line (14.68 KB, application/vnd.oasis.opendocument.text)
2014-02-26 06:29 UTC, Luiz Angelo Daros de Luca
Details
Check the red line: improved version (14.94 KB, application/vnd.oasis.opendocument.text)
2014-03-18 17:38 UTC, Luiz Angelo Daros de Luca
Details
demo doc with index added showing the same fault (21.05 KB, application/vnd.oasis.opendocument.text)
2014-04-17 20:44 UTC, chris.hoe
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Luiz Angelo Daros de Luca 2014-02-26 06:29:36 UTC
Created attachment 94750 [details]
Check the red line

Hello,

Crossreference can select different types of text as page number, number, before/after, and chapter. The chapter one is not working anymore. It just displays as ??.

I'll attach clean file that reproduces the problem. I don't know where this problem appeared but in 4.1.2.3 it was not present.

 
Operating System: Windows 7
Version: 4.2.0.4 release
Last worked in: 4.1.2.3 release
Comment 1 sophie 2014-03-11 09:54:53 UTC
Confirmed with your document and a new one, version Version: 4.2.2.1
Build ID: 3be8cda0bddd8e430d8cda1ebfd581265cca5a0f Ubuntu 13.10 
Set as New, changed plateform - Sophie
Comment 2 Björn Michaelsen 2014-03-15 23:38:32 UTC
crossreference is "??" already in oldest version of bibisect: "Build ID: d6cde02" so unlikely a regression
Comment 3 Luiz Angelo Daros de Luca 2014-03-16 07:30:29 UTC
Björn,

I don't known what procedure you used in bisect but it worked in previous version. Maybe, once present in a doc, it remains even on older versions. If so, bisect should test it from a clean doc.
Comment 4 Björn Michaelsen 2014-03-18 12:21:59 UTC
@Luiz: Please provide an exact version in which it worked then.
Comment 5 Luiz Angelo Daros de Luca 2014-03-18 17:38:03 UTC
Created attachment 96016 [details]
Check the red line: improved version

Hello,

I improved the example doc. Since the previous doc did not used "outline numbering", some refs will become an empty field. Also, I added text after the field in order to have some value for caption refs.

The problem is still the same. Reference for the chapter of the text object will result in "??" in 4.2.2.1.

If you open it with 4.1.5.3, just edit the field and press OK (it will replace it) and it will work. Doc is now fixed.

If you open the fixed doc in 4.2.2.1, the ref is still correct. However, if you edit the field and press OK, the ?? is back.
Comment 6 chris.hoe 2014-04-17 20:41:31 UTC
Interestingly I can verify the bug 77519 using your example doc: just adding a "User-Defined Index" using "Text Body" style as level 1 leads to an index with the same ?? in the index as chapter reference. Updating the index in a 4.0.x or 4.1.x LO gives the correct chapter number, doing so in LO 4.2.x gives ??.

So, maybe 77519 is really a duplicate of 75519? But referencing this (75519) bug to 3.5.0 is misleading I think - I would prefer to attach it to the 4.2.x-line.
Comment 7 chris.hoe 2014-04-17 20:44:25 UTC
Created attachment 97534 [details]
demo doc with index added showing the same fault
Comment 8 chris.hoe 2014-04-23 14:28:50 UTC
Just to reconfirm - 4.2.4rc1 still has this problem.
Comment 9 chris.hoe 2014-05-05 19:18:51 UTC
Just to reconfirm - 4.2.4rc2 still has this problem.

Kind regards, Christian
Comment 10 Michael Stahl (allotropia) 2014-05-07 13:11:20 UTC
regression from commit 6319803762d051c4aa645692cde7245a1bbcf7ee

no idea what that commit was supposed to fix, there is no reproducer document and it seems questionable to re-purpose a chapter reference to refer to plain numbering instead, so i'll just revert it.
Comment 11 Commit Notification 2014-05-07 13:12:19 UTC
Michael Stahl committed a patch related to this issue.
It has been pushed to "master":

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

fdo#75519: fix chapter cross references



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 12 Michael Stahl (allotropia) 2014-05-07 13:23:41 UTC
*** Bug 77519 has been marked as a duplicate of this bug. ***
Comment 13 Commit Notification 2014-05-08 07:54:12 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=17aeb9e1f0922154a1cf342d17a869161b114f65&h=libreoffice-4-2

fdo#75519: fix chapter cross references


It will be available in LibreOffice 4.2.5.

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.