diff options
author | Michael Stahl <Michael.Stahl@cib.de> | 2020-04-22 16:18:10 +0200 |
---|---|---|
committer | Michael Stahl <michael.stahl@cib.de> | 2020-05-08 18:38:01 +0200 |
commit | e43ad1a8ae20cbd00c5c3346e1810196af6669a6 (patch) | |
tree | 6d4a7134edec7f4f302cbbbf546443aaabcf4d06 /xmloff/source/style/xmlexppr.cxx | |
parent | 3a0a88083dc992015a64216bac94822af8eef6c1 (diff) |
xmloff: GetEarliestODFVersionForExport(-1) is impossible
Remove defensive programming nonsense to deal with situation that has
apparently never been possible in git history.
Change-Id: I3788cdcec5e1b4afa27e294ed91825bb33e8e633
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/92729
Reviewed-by: Michael Stahl <michael.stahl@cib.de>
Tested-by: Jenkins
Diffstat (limited to 'xmloff/source/style/xmlexppr.cxx')
-rw-r--r-- | xmloff/source/style/xmlexppr.cxx | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/xmloff/source/style/xmlexppr.cxx b/xmloff/source/style/xmlexppr.cxx index 2ca0e49df077..e94f6744b12d 100644 --- a/xmloff/source/style/xmlexppr.cxx +++ b/xmloff/source/style/xmlexppr.cxx @@ -586,10 +586,9 @@ vector<XMLPropertyState> SvXMLExportPropertyMapper::Filter_( ( (0 != (nFlags & MID_FLAG_MUST_EXIST)) || xInfo->hasPropertyByName( rAPIName ) ) ) { - const std::optional<SvtSaveOptions::ODFSaneDefaultVersion> oEarliestODFVersionForExport( + const SvtSaveOptions::ODFSaneDefaultVersion nEarliestODFVersionForExport( mpImpl->mxPropMapper->GetEarliestODFVersionForExport(i)); - if (!oEarliestODFVersionForExport - || nCurrentVersion >= *oEarliestODFVersionForExport) + if (nEarliestODFVersionForExport <= nCurrentVersion) { pFilterInfo->AddProperty(rAPIName, i); } |