diff options
author | Michael Stahl <michael.stahl@allotropia.de> | 2022-06-27 19:45:53 +0200 |
---|---|---|
committer | Michael Stahl <michael.stahl@allotropia.de> | 2022-07-08 14:32:03 +0200 |
commit | 463178fef5c22f1a04d10e54491852d56e2038b0 (patch) | |
tree | c8a813bc28fdb2921013d313f10045ad5053562a /include | |
parent | a3e9fede7e998979db7941a527496eb98c822e98 (diff) |
xmloff, sw: ODF import/export of fieldmark separator
Previously there were only the fieldmark-start and fieldmark-end
elements; now add a fieldmark-separator, so that the field command can
be stored as character data (and elements if there is any formatting)
instead of attribute value.
The import is a bit more complicated because there are already existing
documents that are missing the separator; it's not possible to predict
if there will be a separator at the time when the start element is seen,
so add some hack to toggle inserting the SwXFieldmark with separator
at the end (when the document contains a separator, i.e. after the
command) or separator at the start (when the document is missing a
separator, i.e. after the result).
Change-Id: I14d2f50f57d690e75643df5d14fd881ebc759a41
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/136513
Tested-by: Jenkins
Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
Diffstat (limited to 'include')
-rw-r--r-- | include/xmloff/txtimp.hxx | 4 | ||||
-rw-r--r-- | include/xmloff/xmltoken.hxx | 1 |
2 files changed, 4 insertions, 1 deletions
diff --git a/include/xmloff/txtimp.hxx b/include/xmloff/txtimp.hxx index 9259747bd94d..0124bc8eb2c2 100644 --- a/include/xmloff/txtimp.hxx +++ b/include/xmloff/txtimp.hxx @@ -289,7 +289,9 @@ public: css::uno::Reference<css::text::XFormField> popFieldCtx(); void addFieldParam( const OUString& name, const OUString& value ); void setCurrentFieldParamsTo(css::uno::Reference< css::text::XFormField> const &xFormField); - OUString getCurrentFieldType(); + ::std::pair<OUString, OUString> getCurrentFieldType() const; + css::uno::Reference<css::text::XTextRange> getCurrentFieldStart() const; + bool hasCurrentFieldSeparator() const; bool hasCurrentFieldCtx() const; diff --git a/include/xmloff/xmltoken.hxx b/include/xmloff/xmltoken.hxx index 58b6329ec71a..77f9c605b707 100644 --- a/include/xmloff/xmltoken.hxx +++ b/include/xmloff/xmltoken.hxx @@ -3308,6 +3308,7 @@ namespace xmloff::token { // enhanced fields XML_FIELDMARK, XML_FIELDMARK_START, + XML_FIELDMARK_SEPARATOR, XML_FIELDMARK_END, XML_IMAGE_SCALE, |