Bug 63553 - Cross-references are broken, when copied to other document or part of the document
Summary: Cross-references are broken, when copied to other document or part of the doc...
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
3.5.1 release
Hardware: Other All
: medium major
Assignee: Michael Stahl (allotropia)
URL:
Whiteboard: target:4.3.0 target:4.2.1 target:4.1.5
Keywords: regression
Depends on:
Blocks:
 
Reported: 2013-04-15 12:11 UTC by andis.lazdins
Modified: 2016-03-29 10:49 UTC (History)
5 users (show)

See Also:
Crash report or crash signature:


Attachments
Example showing broken cross-references (26.10 KB, application/vnd.oasis.opendocument.text)
2013-04-15 12:11 UTC, andis.lazdins
Details

Note You need to log in before you can comment on or make changes to this bug.
Description andis.lazdins 2013-04-15 12:11:17 UTC
Created attachment 77991 [details]
Example showing broken cross-references

The problem appeared after application of solution for somehow disturbed cross-reference dialogue (https://bugs.freedesktop.org/show_bug.cgi?id=50139, https://bugs.freedesktop.org/show_bug.cgi?id=50144, https://bugs.freedesktop.org/show_bug.cgi?id=45049, https://bugs.freedesktop.org/show_bug.cgi?id=46714, https://bugs.freedesktop.org/show_bug.cgi?id=47042). When creating text document with several captions, it happens from time to time, that cross references are disappearnig, showing instead 'Error: Reference source not found' message; for instance, when new caption is inserted somewhere in the middle of the document, the cross-references to other captions following to the inserted caption disappearor are misplaced. The same happens if part of the document containing captions and cross-references is copied to other document or other part of the same document.

The sample file is attached to this report. Steps to reproduce the problem:
1. open attached file and besides create blank writer file
2. in attached file select text starting from cross-references to Table 2 and Illustration 2 to the end of document
3. press Ctrl+C to copy text block
4. move to blank file and press Ctrl+V

You will see instead of cross-reference to Table 2 and Illustration 2 'Error: Reference source not found' message. If you will select the whole content and copy / paste it to blank, cross-references will survive in this case.

I guess it is quite annoing bug.
Comment 1 mahfiaz 2013-04-25 03:17:40 UTC
This affects me as well. And I have to admit it, it's quite annoying, when I need to copy around parts of my thesis.
Comment 2 andis.lazdins 2013-05-03 05:12:23 UTC
It looks like very few people uses cross-references in LibreOffice or this is very specific issue. I would say it is serious regression in Writer, one of the biggest since moving to OpenOffice.org 3 version.
Comment 3 Andrew Pitonyak 2013-05-25 13:18:22 UTC
The error still exists in 4.0.1.2 on 64-bit Linux. 

I was able to reproduce also by selecting from Table 3 reference to end of document. In other words, even while selecting less text.
Comment 4 andis.lazdins 2013-12-26 20:23:04 UTC
This regression is still in Version: 4.1.4.2, Build ID: 0a0440ccc0227ad9829de5f46be37cfb6edcf72. For me it appears also in Version: 4.2.0.0.beta2, Build ID: 1a27be92e320f97c20d581a69ef1c8b99ea9885d. The problem is not appearing in Apache OpenOffice.org (AOO401m5(Build:9714)  -  Rev. 1524958).

I have Ubuntu 13.04, 32 bit system with Mate desktop environment.

It is one of the worth regressions in writer module since I use StarOffice, which means a bit more 10 years. I'm very suprised for passivity in solving or at least investigating it, because it destroys basic function of text processor and it is nearly impossible to use libreoffice writer in group work without speding huge amount of work to restore cross-references.

It's very copmlicated not to give up to pressure of colleges and to switch to another office suite, if I don't have any idea, when the situation will be solved. At least now it looks like 4.2 also will have this regression.
Comment 5 Cor Nouws 2013-12-27 10:19:14 UTC
Hi Andis,

the version field is to show the _FIRST_ version with the problem.
Do you know if that was from 3.5.x to 3.6.x ?

(I hope to do some testing soon and will set the field accordingly)
Comment 6 andis.lazdins 2013-12-27 13:14:08 UTC
(In reply to comment #5)
> Hi Andis,
> 
> the version field is to show the _FIRST_ version with the problem.
> Do you know if that was from 3.5.x to 3.6.x ?
> 
> (I hope to do some testing soon and will set the field accordingly)

I think it was introduced simultaneously into 3.5.5 and 3.6.x. I don't remember version of 3.6. I guess it was introduced together with some very welcome functions in the insert caption dialogue, like visible reference text for tables and graphics in cross-reference dialogue and solving of problem of non-standard captions, which didn't appeared at all or partially in 3.5-3.5.4 and in first versions of 3.6.
Comment 7 andis.lazdins 2014-01-16 20:00:11 UTC
The regression still exists in 4.2.0.2.
One more major release with broken basic functionality in Writer?
Comment 8 Michael Stahl (allotropia) 2014-01-22 20:57:13 UTC
working in 3.5.0.3, broken in 3.5.1.1

regression from:

commit 44f971506c0ed37928c48e55d8007f24b0c43a5f
Author:     Cédric Bosdonnat <cedric.bosdonnat.ooo@free.fr>
AuthorDate: Wed Feb 8 14:06:09 2012 +0100

    fdo#35669: Update the references even if nothing uses them here
    
    Merge the references with the other document even if there is no field
    using them as this may break the sequence and references in other parts
    of a master document.
Comment 9 andis.lazdins 2014-01-24 06:02:20 UTC
The problem is still in 4.2.0.3. I hope that this  terrible regression will be solved until the major release.
Comment 10 Michael Stahl (allotropia) 2014-01-29 21:46:08 UTC
fixed on master
Comment 11 Commit Notification 2014-01-29 21:46:41 UTC
Michael Stahl committed a patch related to this issue.
It has been pushed to "master":

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

fdo#63553: sw: fix copy/paste of 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 Commit Notification 2014-01-30 08:48:04 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=f72af83f3a68e0683f8d48dd02c90306b8b2d6f8&h=libreoffice-4-2

fdo#63553: sw: fix copy/paste of cross references


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 13 Commit Notification 2014-01-30 08:59:44 UTC
Michael Stahl committed a patch related to this issue.
It has been pushed to "libreoffice-4-1":

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

fdo#63553: sw: fix copy/paste of cross references


It will be available in LibreOffice 4.1.6.

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 14 Commit Notification 2014-01-30 11:31:02 UTC
Michael Stahl committed a patch related to this issue.
It has been pushed to "libreoffice-4-1-5":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=718524619bf8cc96325aed87b72735741fe93912&h=libreoffice-4-1-5

fdo#63553: sw: fix copy/paste of cross references


It will be available already in LibreOffice 4.1.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.
Comment 15 andis.lazdins 2014-02-02 08:52:37 UTC
Excellent!!!

It's solved in 4.1.5.2

Thank you a lot!!!
Comment 16 Björn Michaelsen 2014-03-07 11:16:23 UTC
FWIW, downstream bug at:

 https://bugs.launchpad.net/df-libreoffice/+bug/1284377

claims this still being unfixed in 4.2.1.
Comment 17 Y 2014-04-12 01:42:35 UTC
this bug is still alive and well.  I am on libreoffice 4.2.3.3 and it is completely, utterly broken.  I have text with a footnote. In the footnote I have reference to the footnote number of another footnote. I copy paste the text. It creates a new footnote. The reference in the new footnote is to itself! With a 24 hours deadline looming...
Comment 18 Jean-Sébastien Gosselin 2014-04-12 15:53:45 UTC
Ubuntu 13.10, LibreOffice Version: 4.1.3.2 Build ID: 410m0(Build:2):

The bug seems to be solved.

Ubuntu 14.04 Beta, LibreOffice Version: 4.2.3.3 Build ID: 420m0(Build:3):

The bug is still there. Same situation also on ubuntu 13.10 while I was using the ppa version of LibreOffice.
Comment 19 andis.lazdins 2014-04-12 16:03:27 UTC
I can confirm that in Version: 4.2.3.3, Build ID: 6c3586f855673fa6a1576797f575b31ac6fa0ba3, Ubuntu 13.10 32 bit the bug is still valid and makes trouble; however, this issue is not comparable with original problem reported in this bug report and solved after nearly one year.

Unfortunately developers don't use cross-references and footnotes :(
Comment 20 Michael Stahl (allotropia) 2014-05-05 21:47:22 UTC
footnote/endnote cross-reference regression is tracked in bug 77342
Comment 21 andis.lazdins 2014-05-06 04:43:17 UTC
Thank you for great job! 
This bug is not appearing any more in 4.1.6.2
Comment 22 Commit Notification 2016-03-23 21:58:46 UTC
Varun Dhall committed a patch related to this issue.
It has been pushed to "master":

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

Added Test for tdf#63553 copy/paste of cross references

It will be available in 5.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.