Issue 94995 - Number format of cross reference to numbered paragraph
Summary: Number format of cross reference to numbered paragraph
Status: CONFIRMED
Alias: None
Product: Writer
Classification: Application
Component: formatting (show other issues)
Version: OOo 3.0
Hardware: All All
: P3 Trivial with 12 votes (vote)
Target Milestone: ---
Assignee: AOO issues mailing list
QA Contact:
URL:
Keywords: oooqa
: 112636 116340 (view as issue list)
Depends on:
Blocks:
 
Reported: 2008-10-16 10:46 UTC by diemer
Modified: 2017-05-20 11:15 UTC (History)
5 users (show)

See Also:
Issue Type: PATCH
Latest Confirmation in: ---
Developer Difficulty: ---


Attachments
Failed attempts to insert plain item number. (11.85 KB, application/vnd.oasis.opendocument.text)
2010-10-16 09:17 UTC, vsevolod_krishchenko
no flags Details
Patch to implement same behaviour as MS Word (1.00 KB, patch)
2010-12-10 23:11 UTC, troy_rollo
no flags Details | Diff
Another test file. (8.84 KB, application/vnd.oasis.opendocument.text)
2010-12-10 23:14 UTC, troy_rollo
no flags Details

Note You need to log in before you can comment on or make changes to this issue.
Description diemer 2008-10-16 10:46:55 UTC
Hello,

it should be possible to change the number format of a cross reference to a
numbered paragraph independent to the number format of the paragraphs
themselves. I.e. if I have paragraphs numbered "1.", "1.1.", "2." etc, I would
like the cross references to only show the numbers, but not the trailing ".",
i.e. "1", "1.1", "2".

Best regards
Comment 1 michael.ruess 2008-10-16 11:35:42 UTC
Reassigned to ES.
Comment 2 eric.savary 2009-04-03 17:07:05 UTC
Reassigned
Comment 3 rjdrost 2010-04-25 00:07:57 UTC
In addition, if I have a numbered paragraph such as  "Fig. 2:" I would like to be able to strip out the 
preceding and trailing text. For example in that case cross-reference only the "2"
This is helpful in many cases. For instance, to strip out the ":" or to insert it into the text without the 
abbreviation by typing the desired form of the number prefix into the text body and then follow it with the 
cross-referenced number, e.g. 'Figure 2'
Comment 4 Regina Henschel 2010-04-25 12:06:40 UTC
The insert dialog has a part "Insert reference to". There choose "Chapter" to
get only the number, without the text you have set in "Seperator" in the
"Outline Numbering" dialog.
For me this is a "worksforme".
Comment 5 eric.savary 2010-06-23 19:28:29 UTC
*** Issue 112636 has been marked as a duplicate of this issue. ***
Comment 6 vsevolod_krishchenko 2010-10-16 09:12:53 UTC
The workaround above works for paragraph but it does not solve the items number
problem because item cross-reference cannot be inserted as "chapter".
Comment 7 vsevolod_krishchenko 2010-10-16 09:17:36 UTC
Created attachment 72071 [details]
Failed attempts to insert plain item number.
Comment 8 troy_rollo 2010-11-25 01:49:21 UTC
The original specification for this feature showed trailing dots being removed.

Checking the behaviour of Microsoft Word, it seems the rule for eliminating dots
is as follows:

1. If the trailing character of the entire cross reference is a dot, remove it;
2. When the trailing number of a part of a level in the cross reference is a
dot, the next level is included in the cross reference, and the next level has a
left parenthisis as its first character, remove the dot;
3. otherwise, leave the dot in.

Notably, it does not remove leading dots. It does not matter what is in front of
the portion having the dot removed. It does not move more than one trailing dot.
It does not remove the "separator" dot where the next level begins with anything
other than a left parenthisis.

This behaviour seems to have survived long enough in Word that it seems
appropriate for OpenOffice too. I cannot imagine any case where the current
behaviour (displaying the dots in the circumstances in paragraphs 1 and 2 above)
is what the user would want.
Comment 9 troy_rollo 2010-11-25 01:50:28 UTC
*** Issue 94995 has been confirmed by votes. ***
Comment 10 troy_rollo 2010-12-10 23:11:52 UTC
Created attachment 75316 [details]
Patch to implement same behaviour as MS Word
Comment 11 troy_rollo 2010-12-10 23:14:07 UTC
Created attachment 75317 [details]
Another test file.
Comment 12 troy_rollo 2010-12-10 23:18:27 UTC
The patch provided is simple and I believe safe - if there ends up being 
another RC for 3.2 is there any chance of getting this in?

According to the original specification, this behaviour (or something similar) 
should have been part of the initial implementation.
Comment 13 troy_rollo 2010-12-10 23:20:01 UTC
I mean another RC for 3.3, of course.
Comment 14 michael.ruess 2011-01-07 08:25:43 UTC
MRU->OS: please evaluate the Patch of this issue. Thanks!
Comment 15 michael.ruess 2011-01-07 08:26:24 UTC
*** Issue 116340 has been marked as a duplicate of this issue. ***
Comment 16 Martin Hollmichel 2011-03-16 11:42:27 UTC
set target 3.x since not relevant for 3.4 release.
Comment 17 Rob Weir 2013-03-11 15:02:50 UTC
I'm adding this comment to all open issues with Issue Type == PATCH.  We have 220 such issues, many of them quite old.  I apologize for that.  

We need your help in prioritizing which patches should be integrated into our next release, Apache OpenOffice 4.0.

If you have submitted a patch and think it is applicable for AOO 4.0, please respond with a comment to let us know.

On the other hand, if the patch is no longer relevant, please let us know that as well.

If you have any general questions or want to discuss this further, please send a note to our dev mailing list:  dev@openoffice.apache.org

Thanks!

-Rob
Comment 18 Marcus 2017-05-20 11:15:24 UTC
Reset assigne to the default "issues@openoffice.apache.org".