STYLEREF is a useful field in Word, particularly in headers and footers. It looks for the closest paragraph that's formatted with a style whose name is given as a parameter, and inserts the contents of that paragraph.
This field can not currently be created in Writer. When a Word document containing a STYLEREF field is opened in Writer, the current content is shown but the field functionality seems to be gone. Changing the field definition or updating the content after a change to the paragraph that supplied the content is not possible. Although, through some kind of magic, when the document is saved from Writer and then opened in Word it is still a field.
It would be great if STYLEREF could be fully supported. Thanks.
(In reply to sebalis from comment #0)
> STYLEREF is a useful field in Word,
> It would be great if STYLEREF could be fully supported. Thanks.
Sounds like a reasonable step towards compatibility with Word.
Status -> NEW
Severity- > enhancement
Bug 96559 is somewhat related (or a duplicate?), but the other way around:
The styleref field in word is not supported in writer, the other way around would be really nice, i.e.
Inserting a Field & choosing Document/Chapter in a header (showing the chapter number and name of the chapter if style Title 1 is used, for example)
saving the document in a docx format would reproduce the result of doing :
Header and Footer Tools / Design / Field/ StyleRef -> Heading 1 in Word
Right now, the header shows "Chapter", no field
Interesting thought, but I would really prefer the full flexibility of STYLEREF, where you can use any style to select the paragraph from which the field contents should be derived.
*** Bug 96559 has been marked as a duplicate of this bug. ***
*** Bug 126596 has been marked as a duplicate of this bug. ***
@Regina, any thoughts
Created attachment 153046 [details]
OOXML 126.96.36.199 article - STYLEREF
STYLEREF is an OOXML ISO/IEC 29500-1 (2016) 188.8.131.52 defined content formatting field.
Implementing all, or some portion, of its features would improve interoperability of OOXML exchanges but likely requires LibreOffice extension to ODF 1.2/1.3 to save into an ODF document archive.
in LibreOffice 6.4.1 it's still not work correctly
Still not implemented in:
Version: 184.108.40.206 (x64)
Build ID: d7547858d014d4cf69878db179d326fc3483e082
CPU threads: 4; OS: Windows 6.1 Service Pack 1 Build 7601; UI render: Skia/Raster; VCL: win
Locale: de-DE (de_DE); UI: de-DE
Created attachment 179784 [details]
sample file with STYLEREF
Some existing documents using STYLEREF in the codebase: