tdf#130857 qt weld: Implement QtInstanceWidget::get_text_height
[LibreOffice.git] / include / unotools / saveopt.hxx
blob39b5db38b21ae226f9a00abfa943118fd8bcf967
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
47 ODFVER_013_EXTENDED = 11, // ODF 1.3 extended
48 ODFVER_014 = 12, // ODF 1.4
50 ODFVER_LATEST = SAL_MAX_ENUM, // ODF latest version with enhancements
53 /// Enums that allow a sane comparison of versions, without LATEST.
54 enum ODFSaneDefaultVersion
56 ODFSVER_EXTENDED = 1, ///< bit designating extensions are allowed
57 ODFSVER_010 = 2, ///< ODF 1.0
58 ODFSVER_011 = 4, ///< ODF 1.1
59 ODFSVER_012 = 6, ///< ODF 1.2
60 ODFSVER_012_EXT_COMPAT = 9, ///< ODF 1.2 extended, but with compatibility fallbacks
61 ODFSVER_012_EXTENDED = 11, ///< ODF 1.2 extended
62 ODFSVER_013 = 12, ///< ODF 1.3
63 ODFSVER_013_EXTENDED = 13, ///< ODF 1.3 extended
64 ODFSVER_014 = 14, ///< ODF 1.4
65 ODFSVER_014_EXTENDED = 15, ///< ODF 1.4 extended
66 ODFSVER_FUTURE_EXTENDED = 1000 | ODFSVER_EXTENDED, ///< current extension, unknown future ODF version
68 // The latest defined standard. Adapt when a new one is published.
69 ODFSVER_LATEST = ODFSVER_014, ///< @internal DO NOT USE in comparisons
70 ODFSVER_LATEST_EXTENDED = ODFSVER_014_EXTENDED ///< @internal DO NOT USE in comparisons
75 UNOTOOLS_DLLPUBLIC void SetODFDefaultVersion( SvtSaveOptions::ODFDefaultVersion eVersion );
76 UNOTOOLS_DLLPUBLIC void SetODFDefaultVersion( SvtSaveOptions::ODFDefaultVersion eVersion, const std::shared_ptr<comphelper::ConfigurationChanges>& );
78 UNOTOOLS_DLLPUBLIC SvtSaveOptions::ODFDefaultVersion GetODFDefaultVersion();
79 UNOTOOLS_DLLPUBLIC SvtSaveOptions::ODFSaneDefaultVersion GetODFSaneDefaultVersion();
81 /** gets a sane default from the currently configured default */
82 UNOTOOLS_DLLPUBLIC SvtSaveOptions::ODFSaneDefaultVersion GetODFSaneDefaultVersion(SvtSaveOptions::ODFDefaultVersion eDefaultVersion);
84 #endif
86 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */