Bug 150717 - Add custom color bookmark boundary marks + handle their overlapping/neighboring
Summary: Add custom color bookmark boundary marks + handle their overlapping/neighboring
Status: RESOLVED FIXED
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: target:7.5.0 inReleaseNotes:7.5
Keywords:
Depends on:
Blocks: Bookmarks
  Show dependency treegraph
 
Reported: 2022-08-31 11:00 UTC by László Németh
Modified: 2024-05-24 13:35 UTC (History)
1 user (show)

See Also:
Crash report or crash signature:


Attachments
test document with custom color bookmark boundary marks (10.35 KB, application/vnd.oasis.opendocument.text)
2022-08-31 11:21 UTC, László Németh
Details

Note You need to log in before you can comment on or make changes to this bug.
Description László Németh 2022-08-31 11:00:20 UTC
Description:
Bookmark boundary marks apply a single color for all bookmarks with metadata. For visualization of metadata categories e.g. for quick verification of automatic annotation, add RDF-based custom color bookmark boundary marks to Writer.

Show all custom colors of boundary marks at the same character position.

Steps to Reproduce:
Open the attached test document.

Actual Results:
No custom color boundary marks

Expected Results:
Custom color boundary marks


Reproducible: Always


User Profile Reset: No



Additional Info:
-
Comment 1 László Németh 2022-08-31 11:21:02 UTC
Created attachment 182111 [details]
test document with custom color bookmark boundary marks
Comment 2 Commit Notification 2022-09-02 12:19:34 UTC
László Németh committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/412e0ab26618c38f548c340f85ef63bbe73ef6b2

tdf#150717 sw RDF metadata: add custom color bookmark boundary marks

It will be available in 7.5.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.
Comment 3 Stéphane Guillou (stragu) 2022-12-04 22:22:30 UTC
verified fixed in:

Version: 7.5.0.0.alpha1+ (X86_64) / LibreOffice Community
Build ID: c50cf1883af26daebdfc9d796ced3c20c222f43b
CPU threads: 8; OS: Linux 5.15; UI render: default; VCL: gtk3
Locale: en-AU (en_AU.UTF-8); UI: en-US
Calc: threaded

Thanks László!
Comment 4 László Németh 2022-12-05 16:47:56 UTC
(In reply to Stéphane Guillou (stragu) from comment #3)
> verified fixed in:
> 
> Version: 7.5.0.0.alpha1+ (X86_64) / LibreOffice Community
> Build ID: c50cf1883af26daebdfc9d796ced3c20c222f43b
> CPU threads: 8; OS: Linux 5.15; UI render: default; VCL: gtk3
> Locale: en-AU (en_AU.UTF-8); UI: en-US
> Calc: threaded
> 
> Thanks László!

@Stéphane: thanks for the verification!
Comment 5 Takenori Yasuda 2024-05-21 11:07:33 UTC
This might not be working.

When I set a bookmark on new documents, on existing documents, or on an attachment document on this page, the bookmark borders didn't turn color.

The only bookmark that did turn color was the existing bookmark on the attachment document on this page.


Version: 24.2.3.2 (X86_64) / LibreOffice Community
Build ID: 433d9c2ded56988e8a90e6b2e771ee4e6a5ab2ba
CPU threads: 8; OS: Windows 10.0 Build 22621; UI render: Skia/Raster; VCL: win
Locale: ja-JP (ja_JP); UI: ja-JP
Calc: CL threaded Jumbo
Comment 6 László Németh 2024-05-22 09:25:40 UTC
@Takenori Yashuda: bookmark coloring works only with RDF metadata. More details:

– add an arbitrary RDF file to the document using the experimental "shading". For example, the attached test file contains the following custom.rdf (added by META-INF/manifest.xml entry
 <manifest:file-entry manifest:full-path="custom.rdf" manifest:media-type="application/rdf+xml"/>):

<?xml version="1.0" encoding="utf-8"?>
<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#">
  <rdf:Description rdf:about="content.xml#ID-24478193-9630-4d03-8976-9e097c843a0b">
    <ns0:shading xmlns:ns0="urn:org:documentfoundation:names:experimental:office:xmlns:loext:1.0odf#">97e1e9</ns0:shading>
  </rdf:Description>
  <rdf:Description rdf:about="content.xml#ID-f1a8a096-7a43-4bda-a462-d73c2800dd9a">
    <ns0:shading xmlns:ns0="urn:org:documentfoundation:names:experimental:office:xmlns:loext:1.0odf#">FFB7E9</ns0:shading>
  </rdf:Description>
</rdf:RDF>

And in content.xml, using the IDs of custom.rdf:

  <office:body>
    <office:text>
      <text:p text:style-name="Standard">Lorem <text:bookmark-start text:name="Bookmark1" xml:id="ID-f1a8a096-7a43-4bda-a462-d73c2800dd9a"/>ipsum dolor et <text:bookmark-start text:name="Bookmark2" xml:id="ID-24478193-9630-4d03-8976-9e097c843a0b"/>ames<text:bookmark-end text:name="Bookmark2"/><text:bookmark-end text:name="Bookmark1"/>.</text:p>
    </office:text>
  </office:body>
Comment 7 Takenori Yasuda 2024-05-24 11:32:50 UTC
(In reply to László Németh from comment #6)
> bookmark coloring works only with RDF metadata.
Oh, I see. So, simply put, a bookmark we just set normally does not make it a color.

Thank you very much!
I am interested, so I will create an RDF file and try it.
Comment 8 László Németh 2024-05-24 13:35:06 UTC
(In reply to Takenori Yasuda from comment #7)
> (In reply to László Németh from comment #6)
> > bookmark coloring works only with RDF metadata.
> Oh, I see. So, simply put, a bookmark we just set normally does not make it
> a color.

Indeed. It's only the default grey in the View->Field shadings mode.

More information about the recent changes in bookmark visualization: https://wiki.documentfoundation.org/ReleaseNotes/7.5#Bookmarks
 
> 
> Thank you very much!
> I am interested, so I will create an RDF file and try it.

Thanks for your feedback!