Apache OpenOffice (AOO) Bugzilla – Issue 94995
Number format of cross reference to numbered paragraph
Last modified: 2017-05-20 11:15:24 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
Reassigned to ES.
Reassigned
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'
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".
*** Issue 112636 has been marked as a duplicate of this issue. ***
The workaround above works for paragraph but it does not solve the items number problem because item cross-reference cannot be inserted as "chapter".
Created attachment 72071 [details] Failed attempts to insert plain item number.
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.
*** Issue 94995 has been confirmed by votes. ***
Created attachment 75316 [details] Patch to implement same behaviour as MS Word
Created attachment 75317 [details] Another test file.
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.
I mean another RC for 3.3, of course.
MRU->OS: please evaluate the Patch of this issue. Thanks!
*** Issue 116340 has been marked as a duplicate of this issue. ***
set target 3.x since not relevant for 3.4 release.
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
Reset assigne to the default "issues@openoffice.apache.org".