1 /************************************************************** 2 * 3 * Licensed to the Apache Software Foundation (ASF) under one 4 * or more contributor license agreements. See the NOTICE file 5 * distributed with this work for additional information 6 * regarding copyright ownership. The ASF licenses this file 7 * to you under the Apache License, Version 2.0 (the 8 * "License"); you may not use this file except in compliance 9 * with the License. You may obtain a copy of the License at 10 * 11 * http://www.apache.org/licenses/LICENSE-2.0 12 * 13 * Unless required by applicable law or agreed to in writing, 14 * software distributed under the License is distributed on an 15 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 16 * KIND, either express or implied. See the License for the 17 * specific language governing permissions and limitations 18 * under the License. 19 * 20 *************************************************************/ 21 22 23 #ifndef INCLUDED_unotools_SAVEOPT_HXX 24 #define INCLUDED_unotools_SAVEOPT_HXX 25 26 #include "unotools/unotoolsdllapi.h" 27 #include <unotools/options.hxx> 28 29 struct SvtLoadSaveOptions_Impl; 30 class UNOTOOLS_DLLPUBLIC SvtSaveOptions: public utl::detail::Options 31 { 32 SvtLoadSaveOptions_Impl* pImp; 33 34 public: 35 36 enum EOption 37 { 38 E_AUTOSAVETIME, 39 E_USEUSERDATA, 40 E_BACKUP, 41 E_AUTOSAVE, 42 E_AUTOSAVEPROMPT, 43 E_DOCINFSAVE, 44 E_SAVEWORKINGSET, 45 E_SAVEDOCVIEW, 46 E_SAVERELINET, 47 E_SAVERELFSYS, 48 E_SAVEUNPACKED, 49 E_DOPRETTYPRINTING, 50 E_WARNALIENFORMAT, 51 E_LOADDOCPRINTER, 52 E_ODFDEFAULTVERSION, 53 E_USESHA1INODF12, 54 E_USEBLOWFISHINODF12 55 }; 56 57 // keep enum values sorted that a less or greater compare maps to older and newer versions! 58 enum ODFDefaultVersion 59 { 60 ODFVER_UNKNOWN = 0, // unknown 61 ODFVER_010 = 1, // ODF 1.0 62 ODFVER_011 = 2, // ODF 1.1 63 DO_NOT_USE = 3, // Do not use this, only here for compatibility with pre OOo 3.2 configuration 64 ODFVER_012 = 4, // ODF 1.2 65 66 ODFVER_LATEST = SAL_MAX_ENUM, // ODF latest version with enhancements 67 }; 68 69 SvtSaveOptions(); 70 virtual ~SvtSaveOptions(); 71 72 void SetAutoSaveTime( sal_Int32 n ); 73 sal_Int32 GetAutoSaveTime() const; 74 75 void SetUseUserData( sal_Bool b ); 76 sal_Bool IsUseUserData() const; 77 78 void SetBackup( sal_Bool b ); 79 sal_Bool IsBackup() const; 80 81 void SetAutoSave( sal_Bool b ); 82 sal_Bool IsAutoSave() const; 83 84 void SetAutoSavePrompt( sal_Bool b ); 85 sal_Bool IsAutoSavePrompt() const; 86 87 void SetDocInfoSave(sal_Bool b); 88 sal_Bool IsDocInfoSave() const; 89 90 void SetSaveWorkingSet( sal_Bool b ); 91 sal_Bool IsSaveWorkingSet() const; 92 93 void SetSaveDocView( sal_Bool b ); 94 sal_Bool IsSaveDocView() const; 95 96 void SetSaveRelINet( sal_Bool b ); 97 sal_Bool IsSaveRelINet() const; 98 99 void SetSaveRelFSys( sal_Bool b ); 100 sal_Bool IsSaveRelFSys() const; 101 102 void SetSaveUnpacked( sal_Bool b ); 103 sal_Bool IsSaveUnpacked() const; 104 105 void SetLoadUserSettings(sal_Bool b); 106 sal_Bool IsLoadUserSettings() const; 107 108 void SetPrettyPrinting( sal_Bool _bEnable ); 109 sal_Bool IsPrettyPrinting( ) const; 110 111 void SetWarnAlienFormat( sal_Bool _bEnable ); 112 sal_Bool IsWarnAlienFormat( ) const; 113 114 void SetLoadDocumentPrinter( sal_Bool _bEnable ); 115 sal_Bool IsLoadDocumentPrinter( ) const; 116 117 void SetODFDefaultVersion( ODFDefaultVersion eVersion ); 118 ODFDefaultVersion GetODFDefaultVersion() const; 119 120 void SetUseSHA1InODF12( sal_Bool bUse ); 121 sal_Bool IsUseSHA1InODF12() const; 122 123 void SetUseBlowfishInODF12( sal_Bool bUse ); 124 sal_Bool IsUseBlowfishInODF12() const; 125 126 sal_Bool IsReadOnly( EOption eOption ) const; 127 }; 128 129 #endif 130 131