summaryrefslogtreecommitdiff
path: root/unoxml
diff options
context:
space:
mode:
authorLászló Németh <nemeth@numbertext.org>2021-05-23 12:46:09 +0200
committerLászló Németh <nemeth@numbertext.org>2021-05-23 18:51:58 +0200
commita8a9b4f4635bff3f1b7ec63b62f661bc15196cd6 (patch)
tree03b0f7ce90c36b5fce9e73015f5c951cc936e444 /unoxml
parenta04ac0ecea9468cedea3bba85fb65cad5f911a2a (diff)
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. Change-Id: I5de93cfa32ac6793d7dbdc7b64e6f4beacb2e8d7 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/116015 Tested-by: László Németh <nemeth@numbertext.org> Reviewed-by: László Németh <nemeth@numbertext.org>
Diffstat (limited to 'unoxml')
-rw-r--r--unoxml/source/rdf/CURI.cxx7
1 files changed, 7 insertions, 0 deletions
diff --git a/unoxml/source/rdf/CURI.cxx b/unoxml/source/rdf/CURI.cxx
index 0a154d037f8e..9a5a5b677831 100644
--- a/unoxml/source/rdf/CURI.cxx
+++ b/unoxml/source/rdf/CURI.cxx
@@ -94,6 +94,8 @@ const char s_nsPkg [] =
"http://docs.oasis-open.org/ns/office/1.2/meta/pkg#";
const char s_nsODF [] =
"http://docs.oasis-open.org/ns/office/1.2/meta/odf#";
+const char s_nsLO_EXT [] =
+ "urn:org:documentfoundation:names:experimental:office:xmlns:loext:1.0odf#";
void CURI::initFromConstant(const sal_Int16 i_Constant)
{
@@ -697,6 +699,11 @@ void CURI::initFromConstant(const sal_Int16 i_Constant)
ln = "StylesFile";
break;
+ case css::rdf::URIs::LO_EXT_SHADING:
+ ns = s_nsLO_EXT;
+ ln = "shading";
+ break;
+
default:
throw css::lang::IllegalArgumentException(
"CURI::initialize: invalid URIs constant argument", *this, 0);