summaryrefslogtreecommitdiff
path: root/include/xmloff
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2023-05-11 14:39:19 +0200
committerStephan Bergmann <sbergman@redhat.com>2023-05-11 16:49:00 +0200
commitabd630e81bc150d05e4129cc22752ecf461777c7 (patch)
treefe4438005c8736558bc36378f946749159a1eb0f /include/xmloff
parentdbacaf49ea7f1ed44c5e7a1ec5547d7a165a8c54 (diff)
Allow all hierarchical path segments to be ['...'] quoted
...and not just set elements. <https://gerrit.libreoffice.org/c/core/+/151660> "tdf#104005 Don't allow changing finalized properties" found that some existing property names include "/", which makes them unusable with e.g. getPropertyByHierarchicalName. The most obvious solution is to allow ['...'] quoting (without a leading template name, though) for all kinds of hierarchical path segments. (In theory, that would cause backwards incompatibility, as e.g. a property named ['foo'] could no longer be referenced by a ['foo'] path segment (it would need to be referenced by a ['[&apos;foo&apos;]'] path segment instead). But in practice, that path segment ['foo'] would have been rejected in the past anyway, as it did not reference a set element.) To make this work, the meaning of the setElement out-parameter of configmgr::Data::parseSegment is changed to only be true if the segment uses ['...'] notation including a leading (non-empty) template name. What this change does not (yet) address is writing out such quoted (group or set) names in the hierarchical paths written out in configmgr::writeModFile, where necessary. (It never writes out names of properties as parts of hierarchical names, so this wouldn't be an issue for the existing problematic properties containing "/" in their names, anyway.) Change-Id: I635d823c7bbb6b8ac5869c7e0130ba8cfd329599 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/151673 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Diffstat (limited to 'include/xmloff')
0 files changed, 0 insertions, 0 deletions