Description: When inserting a paragraph numbering, with a custom style, I sometimes use separators to add meaning to the numbering like "Figure "+numbering+" - " or "Article "+numbering+" - ". Problem is, using a cross reference to these chapter numbers always include the separators, it is then impossible to use those x-refs in sentences like "look at articles 23 to 30". Steps to Reproduce: 1. insert a paragraph numbering with pre or post separators 2. insert a reference to this numbers Actual Results: The separators are included with the numbering Expected Results: "number (without context)" should only show the numbering without the separators Reproducible: Always User Profile Reset: Yes Additional Info:
Thank you for reporting the bug. Could you please add an example file? I have set the bug's status to 'NEEDINFO'. Please change it back to 'UNCONFIRMED' once the requested info is provided.
Created attachment 146726 [details] Test case, as asked
Test case added. Thanks for looking into it !
(In reply to edwsaintesprit from comment #3) > Test case added. Thanks for looking into it ! Just choose chapter instead of number
Created attachment 146766 [details] 2nd Test case, first one was not accurate Sorry, the first test case was indeed not good enough to showcase my problem, as it could be worked around.
Thanks Dieter for looking into it, and in the test case provided, your solution works, as the reference is also a chapter number. My mistake. My problem refers to paragraph numbering, please see the new test case : my paragraph numbering is prefixed with "paragraph " and suffixed by ".". This time, inserting a chapter is not a solution, as it would place the numbering of the chapter (here, "I") instead of a reference to the number of the article (here, "1"). Inserting a reference to the second paragraph would also show "I" (as it belongs to title 1) instead of "2" which is the number of the paragraph.
I confirm the bug with Version: 6.2.0.0.beta1 (x64) Build ID: d1b41307be3f8c19fe6f1938cf056e7ff1eb1d18 CPU threads: 4; OS: Windows 10.0; UI render: default; VCL: win; Locale: en-US (de_DE); UI-Language: en-GB Calc: threaded and Version: 5.4.7.2 (x64) Build-ID: c838ef25c16710f8838b1faec480ebba495259d0 CPU-Threads: 4; BS: Windows 6.19; UI-Render: GL; Gebietsschema: de-DE (de_DE); Calc: CL I can see no difference between Number Number (no context)
(In reply to Dieter Praas from comment #7) > I can see no difference between > Number > Number (no context) with attached file: seems to be already reproducible with AOO415m1(Build:9789) - Rev. 1817496 2017-12-11 17:25
Looking at https://github.com/LibreOffice/core/blob/542d17d9384cced62db6bcfa45a5f44316409edc/sw/source/core/fields/reffld.cxx#L836, it seems "context" here is not linked to separators but to the hierarchy of the referenced title. If someone can confirm this, i'll mark this as "Not a Bug" and create a feature request to allow for numbers to be displayed without the separators.
*** Bug 117999 has been marked as a duplicate of this bug. ***
This needs to be dealt with. I want to be able to cross-reference examples like (1a), but LO insists on doing it as (1)a, which is wrong. If we could insert the numbers/letters by themselves, then we could possibly get 1a, and then manually add the parentheses.
(In reply to Cor Nouws from comment #10) > *** Bug 117999 has been marked as a duplicate of this bug. *** How could it be a "duplicate" since #117999 was reported half a year earlier? ;)
(In reply to antoniak.piotr from comment #12) > How could it be a "duplicate" since #117999 was reported half a year > earlier? ;) In theory not, but for practical reasons, sometimes we do this ;)
I have just encountered this bug, and through investigation I determined that it is only the top-level items that force display of the "After" separator. Second-level and deeper do not. In my case, I was trying to have an outline structure such as: Section 1. Blah 1.A Blah 1.A.1 Blah 1.A.2 Blah Section 2. Stuff... For the top-level items in the outline, the word "Section" is in the "Before" separator, with a trailing space. Elsewhere in the text, I want it to read "As mentioned in Section 2, blah..." but the reference will make it say "As mentioned in Section 2., blah..." Note the unwanted period! This behavior means I cannot have both the outline itself and the cross-reference look correct. The fact that the reference appearance changes only if I put something in "Before" field makes it inconsistent, and therefore I consider it a bug. I will attach a document showing exact steps to reproduce, and the unwanted behavior.
Created attachment 164220 [details] Outline of exact steps to reproduce the buggy behavior
I need to retract part of my previous comment. It's not only first-level items that exhibit this behavior. In my situation, only the top-level outline item had anything in "Before" separator, so only that one displayed this behavior. My test was flawed, because I only reproduced what I had been trying to get working. Further testing shows that this happens no matter which outline level it is.
Still a problem in version 7. :(
*** Bug 158840 has been marked as a duplicate of this bug. ***