diff options
author | Michael Stahl <Michael.Stahl@cib.de> | 2020-04-22 15:47:43 +0200 |
---|---|---|
committer | Jan Holesovsky <kendy@collabora.com> | 2021-01-07 16:32:51 +0100 |
commit | ecd472e4a5403df8e6d55aa2fec536af98042686 (patch) | |
tree | a321e6651ce4dc203bbb489765e4b039751139a6 /include | |
parent | ae901aa5d39a1aae733ab77795f4e1800027169c (diff) |
replace ODFDefaultVersion usage with ODFSaneDefaultVersion...
... in SvXMLExportPropertyMapper.
The condition nCurrentVersion == SvtSaveOptions::ODFVER_UNKNOWN
is impossible since d571a509aa324db9a425110a67ea142d157256b2.
ODFVER_UNKNOWN isn't a value of ODFSaneDefaultVersion so use
std::optional to handle the remaining usage.
Change-Id: I1e33cb707c289224664a385b4e4425e6788b2943
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/92728
Reviewed-by: Michael Stahl <michael.stahl@cib.de>
Tested-by: Jenkins
Diffstat (limited to 'include')
-rw-r--r-- | include/xmloff/maptype.hxx | 3 | ||||
-rw-r--r-- | include/xmloff/xmlprmap.hxx | 3 |
2 files changed, 4 insertions, 2 deletions
diff --git a/include/xmloff/maptype.hxx b/include/xmloff/maptype.hxx index 0e944656f716..561f806048a9 100644 --- a/include/xmloff/maptype.hxx +++ b/include/xmloff/maptype.hxx @@ -86,7 +86,8 @@ struct XMLPropertyMapEntry sal_uInt32 mnType; sal_Int16 mnContextId; /// User defined id for context filtering - SvtSaveOptions::ODFDefaultVersion mnEarliestODFVersionForExport;// no export when the used ODF version is lower than this + /// no export when the used ODF version is lower than this + SvtSaveOptions::ODFSaneDefaultVersion mnEarliestODFVersionForExport; /** Flag to specify whether entry is only used during import. diff --git a/include/xmloff/xmlprmap.hxx b/include/xmloff/xmlprmap.hxx index baf01aa2eadd..8c31c1d940ad 100644 --- a/include/xmloff/xmlprmap.hxx +++ b/include/xmloff/xmlprmap.hxx @@ -25,6 +25,7 @@ #include <rtl/ustring.hxx> #include <salhelper/simplereferenceobject.hxx> +#include <optional> #include <memory> namespace rtl { template <class reference_type> class Reference; } @@ -82,7 +83,7 @@ public: sal_Int16 GetEntryContextId( sal_Int32 nIndex ) const; /** returns the earliest odf version for which this property should be exported. */ - SvtSaveOptions::ODFDefaultVersion GetEarliestODFVersionForExport( sal_Int32 nIndex ) const; + std::optional<SvtSaveOptions::ODFSaneDefaultVersion> GetEarliestODFVersionForExport(sal_Int32 nIndex) const; /** Returns the index of an entry with the given XML-name and namespace If there is no matching entry the method returns -1 */ |