summaryrefslogtreecommitdiff
path: root/unotools
diff options
context:
space:
mode:
authorEike Rathke <erack@redhat.com>2015-03-22 19:14:32 +0000
committerEike Rathke <erack@redhat.com>2015-03-22 19:29:39 +0000
commitdd8c23522f9123bdf02c366e2abb7b1439028848 (patch)
tree066234abb9da6ceb2f05b68683f5992445f9c819 /unotools
parent009762b05131760144dbd2af8900ee2b84077564 (diff)
introduce ODFSaneDefaultVersion; ODFDefaultVersion is a mess, mess, mess..
A running ODFVER_LATEST is fine for configuration purposes, but not for determining how to store a feature. Change-Id: I8ebc13f900f62f8c36d2cdc50a18855fc6693527
Diffstat (limited to 'unotools')
-rw-r--r--unotools/source/config/saveopt.cxx24
1 files changed, 24 insertions, 0 deletions
diff --git a/unotools/source/config/saveopt.cxx b/unotools/source/config/saveopt.cxx
index 57b0aec7f8ae..18f958136998 100644
--- a/unotools/source/config/saveopt.cxx
+++ b/unotools/source/config/saveopt.cxx
@@ -1005,6 +1005,30 @@ SvtSaveOptions::ODFDefaultVersion SvtSaveOptions::GetODFDefaultVersion() const
return pImp->pSaveOpt->GetODFDefaultVersion();
}
+SvtSaveOptions::ODFSaneDefaultVersion SvtSaveOptions::GetODFSaneDefaultVersion() const
+{
+ const ODFSaneDefaultVersion NOW_CURRENT_LATEST = ODFSVER_012_EXTENDED;
+
+ switch (pImp->pSaveOpt->GetODFDefaultVersion())
+ {
+ default:
+ assert(!"map new ODFDefaultVersion to ODFSaneDefaultVersion");
+ break;
+ case ODFVER_UNKNOWN:
+ case ODFVER_LATEST:
+ return NOW_CURRENT_LATEST;
+ case ODFVER_010:
+ return ODFSVER_010;
+ case ODFVER_011:
+ return ODFSVER_011;
+ case ODFVER_012:
+ return ODFSVER_012;
+ case ODFVER_012_EXT_COMPAT:
+ return ODFSVER_012_EXT_COMPAT;
+ }
+ return NOW_CURRENT_LATEST;
+}
+
bool SvtSaveOptions::IsUseSHA1InODF12() const
{
return pImp->pSaveOpt->IsUseSHA1InODF12();