Version 7.6.3.2-android, tag libreoffice-7.6.3.2-android
[LibreOffice.git] / include / unotools / saveopt.hxx
blob9cd6367615bdca36275374170661bc8aa2d4b85d
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
3 * This file is part of the LibreOffice project.
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
9 * This file incorporates work covered by the following license notice:
11 * Licensed to the Apache Software Foundation (ASF) under one or more
12 * contributor license agreements. See the NOTICE file distributed
13 * with this work for additional information regarding copyright
14 * ownership. The ASF licenses this file to you under the Apache
15 * License, Version 2.0 (the "License"); you may not use this file
16 * except in compliance with the License. You may obtain a copy of
17 * the License at http://www.apache.org/licenses/LICENSE-2.0 .
19 #ifndef INCLUDED_UNOTOOLS_SAVEOPT_HXX
20 #define INCLUDED_UNOTOOLS_SAVEOPT_HXX
22 #include <unotools/unotoolsdllapi.h>
23 #include <memory>
25 namespace comphelper { class ConfigurationChanges; }
27 namespace SvtSaveOptions
29 /** Keep enum values sorted that a less or greater compare maps to older
30 and newer versions.
31 Do not change values, they are stored in the configuration.
32 ODFVER_LATEST designates the "current greatest and latest".
33 When adding a new value or ODFVER_LATEST designates a new real version
34 (plus extensions) adjust the mapping in
35 SvtSaveOptions::GetODFSaneDefaultVersion().
37 enum ODFDefaultVersion
39 ODFVER_UNKNOWN = 0, // unknown - very dubious, avoid using
40 ODFVER_010 = 1, // ODF 1.0
41 ODFVER_011 = 2, // ODF 1.1
42 DO_NOT_USE = 3, // Do not use this, only here for compatibility with pre OOo 3.2 configuration
43 ODFVER_012 = 4, // ODF 1.2
44 ODFVER_012_EXT_COMPAT = 8, // ODF 1.2 extended, but with compatibility fallbacks
45 ODFVER_012_EXTENDED = 9, // ODF 1.2 extended
46 ODFVER_013 = 10, // ODF 1.3
48 ODFVER_LATEST = SAL_MAX_ENUM, // ODF latest version with enhancements
51 /// Enums that allow a sane comparison of versions, without LATEST.
52 enum ODFSaneDefaultVersion
54 ODFSVER_EXTENDED = 1, ///< bit designating extensions are allowed
55 ODFSVER_010 = 2, ///< ODF 1.0
56 ODFSVER_011 = 4, ///< ODF 1.1
57 ODFSVER_012 = 6, ///< ODF 1.2
58 ODFSVER_012_EXT_COMPAT = 9, ///< ODF 1.2 extended, but with compatibility fallbacks
59 ODFSVER_012_EXTENDED = 11, ///< ODF 1.2 extended
60 ODFSVER_013 = 12, ///< ODF 1.3
61 ODFSVER_013_EXTENDED = 13, ///< ODF 1.3 extended
62 ODFSVER_FUTURE_EXTENDED = 1000 | ODFSVER_EXTENDED, ///< current extension, unknown future ODF version
64 // The latest defined standard. Adapt when a new one is published.
65 ODFSVER_LATEST = ODFSVER_013, ///< @internal DO NOT USE in comparisons
66 ODFSVER_LATEST_EXTENDED = ODFSVER_013_EXTENDED ///< @internal DO NOT USE in comparisons
71 UNOTOOLS_DLLPUBLIC void SetODFDefaultVersion( SvtSaveOptions::ODFDefaultVersion eVersion );
72 UNOTOOLS_DLLPUBLIC void SetODFDefaultVersion( SvtSaveOptions::ODFDefaultVersion eVersion, const std::shared_ptr<comphelper::ConfigurationChanges>& );
74 UNOTOOLS_DLLPUBLIC SvtSaveOptions::ODFDefaultVersion GetODFDefaultVersion();
75 UNOTOOLS_DLLPUBLIC SvtSaveOptions::ODFSaneDefaultVersion GetODFSaneDefaultVersion();
77 /** gets a sane default from the currently configured default */
78 UNOTOOLS_DLLPUBLIC SvtSaveOptions::ODFSaneDefaultVersion GetODFSaneDefaultVersion(SvtSaveOptions::ODFDefaultVersion eDefaultVersion);
80 #endif
82 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */