bump product version to 6.3.0.0.beta1
[LibreOffice.git] / include / unotools / saveopt.hxx
blob865ec73835ccefeb25c02379ff36556eb752e6ae
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 <unotools/options.hxx>
25 struct SvtLoadSaveOptions_Impl;
26 class UNOTOOLS_DLLPUBLIC SvtSaveOptions: public utl::detail::Options
28 SvtLoadSaveOptions_Impl* pImp;
30 public:
32 enum class EOption
34 AutoSaveTime,
35 UseUserData,
36 Backup,
37 AutoSave,
38 AutoSavePrompt,
39 DocInfSave,
40 SaveWorkingSet,
41 SaveDocView,
42 SaveRelInet,
43 SaveRelFsys,
44 DoPrettyPrinting,
45 WarnAlienFormat,
46 LoadDocPrinter,
47 OdfDefaultVersion,
48 UserAutoSave,
51 /** Keep enum values sorted that a less or greater compare maps to older
52 and newer versions.
53 Do not change values, they are stored in the configuration.
54 ODFVER_LATEST designates the "current greatest and latest".
55 When adding a new value or ODFVER_LATEST designates a new real version
56 (plus extensions) adjust the mapping in
57 SvtSaveOptions::GetODFSaneDefaultVersion().
59 enum ODFDefaultVersion
61 ODFVER_UNKNOWN = 0, // unknown
62 ODFVER_010 = 1, // ODF 1.0
63 ODFVER_011 = 2, // ODF 1.1
64 DO_NOT_USE = 3, // Do not use this, only here for compatibility with pre OOo 3.2 configuration
65 ODFVER_012 = 4, // ODF 1.2
66 ODFVER_012_EXT_COMPAT = 8, // ODF 1.2 extended, but with compatibility fallbacks
68 ODFVER_LATEST = SAL_MAX_ENUM, // ODF latest version with enhancements
71 /// Enums that allow a sane comparison of versions, without LATEST.
72 enum ODFSaneDefaultVersion
74 ODFSVER_EXTENDED = 1, ///< bit designating extensions are allowed
75 ODFSVER_010 = 2, ///< ODF 1.0
76 ODFSVER_011 = 4, ///< ODF 1.1
77 ODFSVER_012 = 6, ///< ODF 1.2
78 ODFSVER_012_EXT_COMPAT = 9, ///< ODF 1.2 extended, but with compatibility fallbacks
79 ODFSVER_012_EXTENDED = 11, ///< ODF 1.2 extended
80 ODFSVER_013 = 12, ///< ODF 1.3
81 ODFSVER_013_EXTENDED = 13, ///< ODF 1.3 extended
83 // The latest defined standard. Adapt when a new one is published.
84 ODFSVER_LATEST = ODFSVER_012, ///< @internal DO NOT USE in comparisons
85 ODFSVER_LATEST_EXTENDED = ODFSVER_LATEST | ODFSVER_EXTENDED ///< @internal DO NOT USE in comparisons
88 SvtSaveOptions();
89 virtual ~SvtSaveOptions() override;
91 void SetAutoSaveTime( sal_Int32 n );
92 sal_Int32 GetAutoSaveTime() const;
94 void SetUseUserData( bool b );
95 bool IsUseUserData() const;
97 void SetBackup( bool b );
98 bool IsBackup() const;
100 void SetAutoSave( bool b );
101 bool IsAutoSave() const;
103 void SetAutoSavePrompt( bool b );
104 bool IsAutoSavePrompt() const;
106 void SetUserAutoSave( bool b );
107 bool IsUserAutoSave() const;
109 void SetDocInfoSave(bool b);
110 bool IsDocInfoSave() const;
112 void SetSaveWorkingSet( bool b );
113 bool IsSaveWorkingSet() const;
115 void SetSaveDocView( bool b );
116 bool IsSaveDocView() const;
118 void SetSaveRelINet( bool b );
119 bool IsSaveRelINet() const;
121 void SetSaveRelFSys( bool b );
122 bool IsSaveRelFSys() const;
124 void SetLoadUserSettings(bool b);
125 bool IsLoadUserSettings() const;
127 void SetPrettyPrinting( bool _bEnable );
128 bool IsPrettyPrinting( ) const;
130 void SetWarnAlienFormat( bool _bEnable );
131 bool IsWarnAlienFormat( ) const;
133 void SetLoadDocumentPrinter( bool _bEnable );
134 bool IsLoadDocumentPrinter( ) const;
136 void SetODFDefaultVersion( ODFDefaultVersion eVersion );
137 ODFDefaultVersion GetODFDefaultVersion() const;
138 ODFSaneDefaultVersion GetODFSaneDefaultVersion() const;
140 bool IsReadOnly( EOption eOption ) const;
143 #endif
145 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */