Download it now!
Bug 121465 - Impossible to insert a cross reference to paragraph without the content of fields Before and After of the Customize tab of the list style, if field Before is used..
Summary: Impossible to insert a cross reference to paragraph without the content of fi...
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
Inherited From OOo
Hardware: All All
: medium enhancement
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
: 117999 (view as bug list)
Depends on:
Blocks: Fields-Cross-Reference
  Show dependency treegraph
 
Reported: 2018-11-16 15:22 UTC by estesprit-LO
Modified: 2019-07-25 19:18 UTC (History)
5 users (show)

See Also:
Crash report or crash signature:


Attachments
Test case, as asked (10.67 KB, application/vnd.oasis.opendocument.text)
2018-11-18 19:41 UTC, estesprit-LO
Details
2nd Test case, first one was not accurate (11.76 KB, application/vnd.oasis.opendocument.text)
2018-11-19 10:45 UTC, estesprit-LO
Details

Note You need to log in before you can comment on or make changes to this bug.
Description estesprit-LO 2018-11-16 15:22:02 UTC
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:
Comment 1 Oliver Brinzing 2018-11-18 17:41:09 UTC
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.
Comment 2 estesprit-LO 2018-11-18 19:41:29 UTC
Created attachment 146726 [details]
Test case, as asked
Comment 3 estesprit-LO 2018-11-18 19:42:20 UTC
Test case added. Thanks for looking into it !
Comment 4 Dieter 2018-11-19 09:17:25 UTC
(In reply to edwsaintesprit from comment #3)
> Test case added. Thanks for looking into it !

Just choose chapter instead of number
Comment 5 estesprit-LO 2018-11-19 10:45:57 UTC
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.
Comment 6 estesprit-LO 2018-11-19 10:50:08 UTC
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.
Comment 7 Dieter 2018-11-19 18:14:50 UTC
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)
Comment 8 Oliver Brinzing 2018-11-20 18:10:52 UTC
(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
Comment 9 estesprit-LO 2018-12-01 20:18:02 UTC
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.
Comment 10 Cor Nouws 2019-02-05 18:10:51 UTC
*** Bug 117999 has been marked as a duplicate of this bug. ***
Comment 11 lomacar 2019-03-10 11:06:23 UTC
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.
Comment 12 antoniak.piotr 2019-07-16 07:34:35 UTC
(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? ;)
Comment 13 Cor Nouws 2019-07-25 19:18:36 UTC
(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 ;)