Bug Hunting Session
Bug 50801 - Wrong cross-reference text when Caption order is Numbering first
Summary: Wrong cross-reference text when Caption order is Numbering first
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
unspecified
Hardware: Other All
: medium normal
Assignee: Uray M. János
URL:
Whiteboard: target:3.7.0 target:3.6.1 target:3.5.6
Keywords:
Depends on:
Blocks:
 
Reported: 2012-06-06 14:56 UTC by Andras Timar
Modified: 2012-07-18 08:38 UTC (History)
0 users

See Also:
Crash report or crash signature:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Andras Timar 2012-06-06 14:56:26 UTC
Start a new Writer document and insert a picture with caption. The Caption order should be Numbering first. So you have something like this: "1. Illustration: Foobar".

Then choose Cross-reference from the Insert menu. The Fields - Cross-reference dialog appears. From Type box select Illustration. From Selection box select the caption that you've just inserted. From Insert reference to box select the following:

Category and Number
Expected text: "1. Illustration"
Actual text: "1"

Caption Text:
Expected text: "Foobar"
Actual text: "Illustration: Foobar"

Of course all works as expected, when Caption order is Category first.

I think the magic happens in SwGetRefField::UpdateField() in sw/source/core/fields/reffld.cxx.
Comment 1 Andras Timar 2012-07-16 09:55:43 UTC

*** This bug has been marked as a duplicate of bug 42573 ***
Comment 2 Not Assigned 2012-07-17 20:05:35 UTC
Uray M. Janos committed a patch related to this issue.
It has been pushed to "master":

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

fdo#50801 fix cross-reference text when Caption order is Numbering first
Comment 3 Not Assigned 2012-07-18 08:24:12 UTC
Uray M. Janos committed a patch related to this issue.
It has been pushed to "libreoffice-3-6":

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

fdo#50801 fix cross-reference text when Caption order is Numbering first


It will be available in LibreOffice 3.6.1.
Comment 4 Not Assigned 2012-07-18 08:38:17 UTC
Uray M. Janos committed a patch related to this issue.
It has been pushed to "libreoffice-3-5":

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

fdo#50801 fix cross-reference text when Caption order is Numbering first


It will be available in LibreOffice 3.5.6.