Download it now!
Bug 34872 - In Writer when inserting crossreference to formula, dialog looks somewhat strange
Summary: In Writer when inserting crossreference to formula, dialog looks somewhat str...
Status: RESOLVED DUPLICATE of bug 50144
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
3.3.1 release
Hardware: All All
: medium enhancement
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-03-01 07:31 UTC by sasha.libreoffice
Modified: 2012-06-06 14:40 UTC (History)
0 users

See Also:
Crash report or crash signature:


Attachments
dialog Crossreference looks strange (51.77 KB, application/vnd.oasis.opendocument.text)
2011-03-01 07:31 UTC, sasha.libreoffice
Details
Patch to solve the problem (1012 bytes, patch)
2011-05-29 04:54 UTC, Rob Snelders
Details

Note You need to log in before you can comment on or make changes to this bug.
Description sasha.libreoffice 2011-03-01 07:31:20 UTC
Created attachment 43968 [details]
dialog Crossreference looks strange

In Writer when inserting crossreference to formula, dialog looks somewhat strange.
Formula appears:
(1
(2
(3
But I expect or nether parenthes or both
Comment 1 Cédric Bosdonnat 2011-03-01 08:55:11 UTC
Indeed the text name is somewhat strange. I'll need to investigate a bit more into the code as this may even be an EasyHack.
Comment 2 Rob Snelders 2011-05-29 04:53:29 UTC
I have already committed a patch to the developers-list that solves this problem.
Comment 3 Rob Snelders 2011-05-29 04:54:01 UTC
Created attachment 47268 [details]
Patch to solve the problem
Comment 4 Rob Snelders 2011-06-08 14:05:23 UTC
The patch is in the master, so closing the ticket
Comment 5 Andras Timar 2012-06-05 13:09:45 UTC
Sorry Rob, your patch had devastating effect on the cross-reference handling, see bug #50139 and many duplicates. ;-) I had to revert it. 

In fact the code is very stupid. It is not enough to cut the first character. You see that all characters before the number are printed, so in fact it should be solved by editing the sample document, e.g. put parentheses into separate table cells, so we have the same visual effect, but don't have the "strange" entries in Cross reference dialog.
E.g. | E = mc^2 | (|1|) |

That being said, there is still room for improvement in sw core, because the code there assumes that captions are always in the form of "Type" + "Number" (e.g. Illustration 1), while it is not true. It is possible to number first (e.g. 1. ábra in Hungarian), and then the code cannot handle it, it will display the number only.
Comment 6 Andras Timar 2012-06-06 14:40:49 UTC
Fix for bug #50144 also fixes this bug. You'll see (1) in the Selection box.

*** This bug has been marked as a duplicate of bug 50144 ***