Bug 33960 - cross reference to a list number, dot bug
Summary: cross reference to a list number, dot bug
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
3.3.0 release
Hardware: All All
: high normal
Assignee: Not Assigned
URL:
Whiteboard: target:3.7.0 target:3.6.0.1 target:4....
Keywords: difficultyBeginner, easyHack, skillCpp
: 33961 (view as bug list)
Depends on:
Blocks: subsequenttest-failures
  Show dependency treegraph
 
Reported: 2011-02-06 02:02 UTC by John Gustavsson
Modified: 2015-12-15 16:46 UTC (History)
8 users (show)

See Also:
Crash report or crash signature:


Attachments
Patch to implement same behaviour as MS Word (1006 bytes, patch)
2011-04-12 03:03 UTC, Troy Rollo
Details
Patch to fix on master, including new test (8.72 KB, patch)
2013-07-21 12:36 UTC, Troy Rollo
Details
ODT file for new cross-references tests (17.21 KB, application/vnd.oasis.opendocument.text)
2013-07-21 12:37 UTC, Troy Rollo
Details

Note You need to log in before you can comment on or make changes to this bug.
Description John Gustavsson 2011-02-06 02:02:16 UTC
Hello,

I have a problem when using cross references. If I make a cross reference to the number in a list it looks like this:

Birds can fly [2.]

It should look like:

Birds can fly [2]

It's just wrong to use dots after the number when referring to your literature list. Libreoffice does that automatically and the dot is not removable without removing the reference. Can you make so that the dot is not included in the cross reference? Students handing in a paper with the dots in the wrong places can get a lower grade...
Comment 1 Cor Nouws 2011-02-06 06:40:34 UTC
*** Bug 33961 has been marked as a duplicate of this bug. ***
Comment 2 Cor Nouws 2011-02-06 06:44:01 UTC
I confirm the behaviour
Comment 3 Cor Nouws 2011-02-07 04:01:02 UTC
to reproduce:
1. new document
2. F12, type word, enter, bla bla, enter, bla bla enter, enter, enter
3. Ctrl-F2 > Cross references
4. choose 
   Type 'Numbered paragraphs' 
   Selection ..
   Reference to 'Number ..'
Comment 4 Troy Rollo 2011-04-12 03:03:52 UTC
Created attachment 45508 [details]
Patch to implement same behaviour as MS Word
Comment 5 Cédric Bosdonnat 2011-08-10 01:27:07 UTC
Fixed by this commit in master (target 3.5):
http://cgit.freedesktop.org/libreoffice/core/commit/?id=7e631b61607ddd821d9b3a688ff769bde45a4b2c

Thanks again Troy for the patches ;)
Comment 6 Stephan Bergmann 2011-09-13 00:40:38 UTC
The fix causes the checkCrossReferences test in sw/qa/complex/writer/CheckCrossReferences.java to fail, as instead of the expected results "1." (FldResult4), " 1.", (FldResult5), and "A. 1." (FldResult6) it now gets "1", " 1", and "A 1", respectively (i.e., without the dots).

This has been discussed in the thread starting at <http://lists.freedesktop.org/archives/libreoffice/2011-September/017797.html> "[Libreoffice] fix for fdo#33960 'cross reference to a list number, dot bug' makes sw/qa/complex/writer fail."  The outcome was that the code needs further fixing, see <http://lists.freedesktop.org/archives/libreoffice/2011-September/017806.html> further down in that thread.

For now, the failing tests are disabled in sw/qa/complex/writer/CheckCrossReferences.java, see <http://cgit.freedesktop.org/libreoffice/core/commit/?id=e849071acc91cafd05d52326e6a5cccf750836c1> "fdo#33960#, fdo#35690#: Disabled failing checkCrossReferences tests for now."  Please re-enable once this issue is fixed.
Comment 7 Björn Michaelsen 2011-11-15 15:28:02 UTC
limited scope, testcase available, good description on the mailing list => Easy Hack

CC'ing as commiter of the patch.
Comment 8 Florian Reisinger 2012-05-18 09:31:20 UTC
Deleted "Easyhack" from summary.
Comment 9 Michael Stahl (CIB) 2012-07-06 07:19:45 UTC
argh... why don't people run unit tests before committing...

anyway hopefully i've hacked up something that works now.
Comment 10 Not Assigned 2012-07-06 07:22:31 UTC
Michael Stahl committed a patch related to this issue.
It has been pushed to "master":

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

fdo#33960: fix cross reference number test failure
Comment 11 Not Assigned 2012-07-06 07:53:48 UTC
Michael Stahl committed a patch related to this issue.
It has been pushed to "libreoffice-3-6":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=a8651a4bf3031bdf16a84ddf774eaf699a617426&g=libreoffice-3-6

fdo#33960: fix cross reference number test failure


It will be available in LibreOffice 3.6.
Comment 12 Cor Nouws 2012-10-22 09:01:52 UTC
verfied in 3.6.2 and master > close
Comment 13 Troy Rollo 2013-07-21 12:33:45 UTC
The fix for this was never correct, re-opening. Patch to follow
Comment 14 Troy Rollo 2013-07-21 12:36:19 UTC
Created attachment 82777 [details]
Patch to fix on master, including new test
Comment 15 Troy Rollo 2013-07-21 12:37:56 UTC
Created attachment 82778 [details]
ODT file for new cross-references tests
Comment 16 Commit Notification 2013-08-26 13:24:05 UTC
Troy Rollo committed a patch related to this issue.
It has been pushed to "master":

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

fdo#33960: sw: fix cross reference fields some more



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 17 Commit Notification 2013-08-26 13:24:38 UTC
Michael Stahl committed a patch related to this issue.
It has been pushed to "master":

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

fdo#33960: simplify SwNumRule::MakeRefNumString further



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 18 Commit Notification 2013-08-26 13:34:49 UTC
Troy Rollo committed a patch related to this issue.
It has been pushed to "libreoffice-4-1":

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

fdo#33960: sw: fix cross reference fields some more


It will be available in LibreOffice 4.1.2.

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 19 Michael Stahl (CIB) 2013-08-26 20:23:48 UTC
fixed on master and libreoffice-4-1 now
Comment 20 Cor Nouws 2013-11-13 21:59:19 UTC
Set the version to the FIRST one in which the bug is present :)
Comment 21 Robinson Tryon (qubit) 2015-12-15 16:46:50 UTC
Migrating Whiteboard tags to Keywords: (EasyHack DifficultyBeginner SkillCpp )
[NinjaEdit]