nss: upgrade to release 3.73
[LibreOffice.git] / include / unotools / saveopt.hxx
blobd1e8f32af12bf511d74b2516accf9f62ff559fa1
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 final : 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 - very dubious, avoid using
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
67 ODFVER_012_EXTENDED = 9, // ODF 1.2 extended
68 ODFVER_013 = 10, // ODF 1.3
70 ODFVER_LATEST = SAL_MAX_ENUM, // ODF latest version with enhancements
73 /// Enums that allow a sane comparison of versions, without LATEST.
74 enum ODFSaneDefaultVersion
76 ODFSVER_EXTENDED = 1, ///< bit designating extensions are allowed
77 ODFSVER_010 = 2, ///< ODF 1.0
78 ODFSVER_011 = 4, ///< ODF 1.1
79 ODFSVER_012 = 6, ///< ODF 1.2
80 ODFSVER_012_EXT_COMPAT = 9, ///< ODF 1.2 extended, but with compatibility fallbacks
81 ODFSVER_012_EXTENDED = 11, ///< ODF 1.2 extended
82 ODFSVER_013 = 12, ///< ODF 1.3
83 ODFSVER_013_EXTENDED = 13, ///< ODF 1.3 extended
84 ODFSVER_FUTURE_EXTENDED = 1000 | ODFSVER_EXTENDED, ///< current extension, unknown future ODF version
86 // The latest defined standard. Adapt when a new one is published.
87 ODFSVER_LATEST = ODFSVER_013, ///< @internal DO NOT USE in comparisons
88 ODFSVER_LATEST_EXTENDED = ODFSVER_013_EXTENDED ///< @internal DO NOT USE in comparisons
91 SvtSaveOptions();
92 virtual ~SvtSaveOptions() override;
94 void SetAutoSaveTime( sal_Int32 n );
95 sal_Int32 GetAutoSaveTime() const;
97 void SetUseUserData( bool b );
98 bool IsUseUserData() const;
100 void SetBackup( bool b );
101 bool IsBackup() const;
103 void SetAutoSave( bool b );
104 bool IsAutoSave() const;
106 void SetAutoSavePrompt( bool b );
107 bool IsAutoSavePrompt() const;
109 void SetUserAutoSave( bool b );
110 bool IsUserAutoSave() const;
112 void SetDocInfoSave(bool b);
113 bool IsDocInfoSave() const;
115 void SetSaveWorkingSet( bool b );
116 bool IsSaveWorkingSet() const;
118 void SetSaveDocView( bool b );
119 bool IsSaveDocView() const;
121 void SetSaveRelINet( bool b );
122 bool IsSaveRelINet() const;
124 void SetSaveRelFSys( bool b );
125 bool IsSaveRelFSys() const;
127 void SetLoadUserSettings(bool b);
128 bool IsLoadUserSettings() const;
130 void SetPrettyPrinting( bool _bEnable );
131 bool IsPrettyPrinting( ) const;
133 void SetWarnAlienFormat( bool _bEnable );
134 bool IsWarnAlienFormat( ) const;
136 void SetLoadDocumentPrinter( bool _bEnable );
137 bool IsLoadDocumentPrinter( ) const;
139 void SetODFDefaultVersion( ODFDefaultVersion eVersion );
140 ODFDefaultVersion GetODFDefaultVersion() const;
141 ODFSaneDefaultVersion GetODFSaneDefaultVersion() const;
143 bool IsReadOnly( EOption eOption ) const;
146 #endif
148 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */