Description: OOo's RDF handling had limited support to optional metadata visualization, like custom prefix/suffix of metadata fields. Add a similar solution for bookmark rdf:type metadata. Steps to Reproduce: 1. Open the attached test document. Actual Results: Only colored bookmark boundary marks based on bookmark metadata, enabling View->Field Shading Expected Results: Showing rdf:type content "Chapter" of the bookmark metadata Reproducible: Always User Profile Reset: No Additional Info: Follow-up of Bug 150717
Created attachment 196904 [details] test document with rdf:type bookmark metadata
Created attachment 196908 [details] screenshot of the visualization
Created attachment 196909 [details] alternative patch with RDF prefix/suffix (tag-like) implementation Abandoned because of line ending problems, only for possible future developments... Subject: [PATCH] add RDF visualization for bookmarks with rdf:type RDF metadata, showing rdf:type content as markup around the bookmark with RDF metadata: [tag]bookmark[/tag] The patch uses zero-length SwFieldPortions (no associated character in the text), but this is very fragile with line ends, see suffix of meta-field/TryNewLengthPortion/SetNoLength for possible clean-up. Note: the order/indices are bad: sPrefix and sSuffix comes after it.first->GetName(). Also the recent master needs + rtl::Reference<SwXTextDocument> xModel = rDoc.GetDocShell()->GetBaseModel(); ... + uno::Reference<rdf::XDocumentMetadataAccess> xDocumentMetadataAccess( + rDoc.GetDocShell()->GetBaseModel());
László Németh committed a patch related to this issue. It has been pushed to "master": https://git.libreoffice.org/core/commit/3393e52be0900ad63ceee0a43cd44d473ec8248a tdf#163309 sw: show rdf:type as labels on bookmark boundary marks It will be available in 25.2.0. The patch should be included in the daily builds available at https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More information about daily builds can be found at: https://wiki.documentfoundation.org/Testing_Daily_Builds Affected users are encouraged to test the fix and report feedback.