summaryrefslogtreecommitdiff
path: root/include/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 /include/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 'include/unotools')
-rw-r--r--include/unotools/saveopt.hxx24
1 files changed, 22 insertions, 2 deletions
diff --git a/include/unotools/saveopt.hxx b/include/unotools/saveopt.hxx
index 207ad42e7c63..c9d793dfe134 100644
--- a/include/unotools/saveopt.hxx
+++ b/include/unotools/saveopt.hxx
@@ -51,7 +51,14 @@ public:
E_USERAUTOSAVE,
};
- // keep enum values sorted that a less or greater compare maps to older and newer versions!
+ /** Keep enum values sorted that a less or greater compare maps to older
+ and newer versions.
+ Do not change values, they are stored in the configuration.
+ ODFVER_LATEST designates the "current greatest and latest".
+ When adding a new value or ODFVER_LATEST designates a new real version
+ (plus extensions) adjust the mapping in
+ SvtSaveOptions::GetODFSaneDefaultVersion().
+ */
enum ODFDefaultVersion
{
ODFVER_UNKNOWN = 0, // unknown
@@ -60,11 +67,23 @@ public:
DO_NOT_USE = 3, // Do not use this, only here for compatibility with pre OOo 3.2 configuration
ODFVER_012 = 4, // ODF 1.2
ODFVER_012_EXT_COMPAT = 8, // ODF 1.2 extended, but with compatibility fallbacks
- ODFVER_013 = 9, // ODF 1.3
ODFVER_LATEST = SAL_MAX_ENUM, // ODF latest version with enhancements
};
+ /// Enums that allow a sane comparison of versions, without LATEST.
+ enum ODFSaneDefaultVersion
+ {
+ ODFSVER_EXTENDED = 1, // bit designating extensions are allowed
+ ODFSVER_010 = 2, // ODF 1.0
+ ODFSVER_011 = 4, // ODF 1.1
+ ODFSVER_012 = 6, // ODF 1.2
+ ODFSVER_012_EXT_COMPAT = 9, // ODF 1.2 extended, but with compatibility fallbacks
+ ODFSVER_012_EXTENDED = 11, // ODF 1.2 extended
+ ODFSVER_013 = 12, // ODF 1.3
+ ODFSVER_013_EXTENDED = 13 // ODF 1.3 extended
+ };
+
SvtSaveOptions();
virtual ~SvtSaveOptions();
@@ -117,6 +136,7 @@ public:
void SetODFDefaultVersion( ODFDefaultVersion eVersion );
ODFDefaultVersion GetODFDefaultVersion() const;
+ ODFSaneDefaultVersion GetODFSaneDefaultVersion() const;
bool IsUseSHA1InODF12() const;