Bug 142448 - Add custom color shading to RDF metadata fields
Summary: Add custom color shading to RDF metadata fields
Status: VERIFIED 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.2.0
Keywords:
Depends on:
Blocks: Fields
  Show dependency treegraph
 
Reported: 2021-05-23 16:46 UTC by László Németh
Modified: 2022-08-31 11:01 UTC (History)
0 users

See Also:
Crash report or crash signature:


Attachments
screen shot of the enhancement with the attached test file (73.22 KB, image/png)
2021-05-23 16:52 UTC, László Németh
Details
Test document with URIs::LO_EXT_SHADING custom color metadata field shadings (9.06 KB, application/vnd.oasis.opendocument.text)
2021-05-23 16:56 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 2021-05-23 16:46:31 UTC
Enabled View->Field Shadings applies a single shading color for all in-line metadata (text:meta and text:meta-field). For visualization of metadata categories e.g. for quick verification of automatic annotation, add RDF-based custom color field shading to Writer.
Comment 1 László Németh 2021-05-23 16:52:35 UTC
Created attachment 172275 [details]
screen shot of the enhancement with the attached test file
Comment 2 Commit Notification 2021-05-23 16:53:18 UTC
László Németh committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/a8a9b4f4635bff3f1b7ec63b62f661bc15196cd6

tdf#142448 sw offapi: add custom color metadata field shading

It will be available in 7.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.
Comment 3 László Németh 2021-05-23 16:56:31 UTC
Created attachment 172276 [details]
Test document with URIs::LO_EXT_SHADING custom color metadata field shadings
Comment 4 László Németh 2021-05-23 16:57:09 UTC
tdf#142448 sw offapi: add custom color metadata field shading

using the new com::sun::star::rdf::URIs::LO_EXT_SHADING
URI (modelled after odf:prefix and odf:suffix).
Custom color field shading of text:meta annotated text
ranges and text:meta-field metadata fields allows
quick visual check of metadata categories.

For example, RDF triple

content.xml#id1753384014 urn:org:documentfoundation:names:experimental:office:xmlns:loext:1.0odf#shading FF0000

sets red (FF0000) shading color for the text span
with xml:id="id1753384014".

Pressing Ctrl-F8 or View->Field Shadings can disable
custom color metadata field shading on the UI.

Note: neither LO_EXT_SHADING, nor odf:prefix and
odf:suffix changes invalidate the View (MetaPortion),
but run-time update of shading color can be triggered
without save and reload of the document e.g. by using
(temporary) bookmarks on the annotated text spans.

To run unit test with enabled visibility, use

(cd sw && make UITest_sw_styleInspector UITEST_TEST_NAME="styleInspector.styleNavigator.test_metadata_shading_color" SAL_USE_VCLPLUGIN=gen)

in Linux command line.
Comment 5 Stéphane Guillou (stragu) 2021-12-12 15:04:07 UTC
verified as fixed in:

Version: 7.2.4.1 / LibreOffice Community
Build ID: 27d75539669ac387bb498e35313b970b7fe9c4f9
CPU threads: 4; OS: Linux 5.4; UI render: default; VCL: gtk3
Locale: en-AU (en_AU.UTF-8); UI: en-US
Calc: threaded