2010-10-14 08:27:31 +02:00
|
|
|
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
|
2012-07-11 09:51:50 +01:00
|
|
|
/*
|
|
|
|
* This file is part of the LibreOffice project.
|
|
|
|
*
|
|
|
|
* This Source Code Form is subject to the terms of the Mozilla Public
|
|
|
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
|
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
|
|
|
*
|
|
|
|
* This file incorporates work covered by the following license notice:
|
|
|
|
*
|
|
|
|
* Licensed to the Apache Software Foundation (ASF) under one or more
|
|
|
|
* contributor license agreements. See the NOTICE file distributed
|
|
|
|
* with this work for additional information regarding copyright
|
|
|
|
* ownership. The ASF licenses this file to you under the Apache
|
|
|
|
* License, Version 2.0 (the "License"); you may not use this file
|
|
|
|
* except in compliance with the License. You may obtain a copy of
|
|
|
|
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
|
|
|
|
*/
|
2013-10-23 19:16:30 +02:00
|
|
|
#ifndef INCLUDED_UNOTOOLS_SAVEOPT_HXX
|
|
|
|
#define INCLUDED_UNOTOOLS_SAVEOPT_HXX
|
2007-04-11 18:34:03 +00:00
|
|
|
|
2013-11-09 15:34:19 -06:00
|
|
|
#include <unotools/unotoolsdllapi.h>
|
2009-10-06 07:38:24 +02:00
|
|
|
#include <unotools/options.hxx>
|
2007-04-11 18:34:03 +00:00
|
|
|
|
|
|
|
struct SvtLoadSaveOptions_Impl;
|
2009-10-06 07:38:24 +02:00
|
|
|
class UNOTOOLS_DLLPUBLIC SvtSaveOptions: public utl::detail::Options
|
2007-04-11 18:34:03 +00:00
|
|
|
{
|
|
|
|
SvtLoadSaveOptions_Impl* pImp;
|
|
|
|
|
|
|
|
public:
|
|
|
|
|
|
|
|
enum EOption
|
|
|
|
{
|
|
|
|
E_AUTOSAVETIME,
|
|
|
|
E_USEUSERDATA,
|
|
|
|
E_BACKUP,
|
|
|
|
E_AUTOSAVE,
|
|
|
|
E_AUTOSAVEPROMPT,
|
|
|
|
E_DOCINFSAVE,
|
|
|
|
E_SAVEWORKINGSET,
|
|
|
|
E_SAVEDOCVIEW,
|
|
|
|
E_SAVERELINET,
|
|
|
|
E_SAVERELFSYS,
|
|
|
|
E_SAVEUNPACKED,
|
|
|
|
E_DOPRETTYPRINTING,
|
2007-07-05 06:27:38 +00:00
|
|
|
E_WARNALIENFORMAT,
|
2008-03-12 10:15:39 +00:00
|
|
|
E_LOADDOCPRINTER,
|
2011-03-17 09:16:41 +01:00
|
|
|
E_ODFDEFAULTVERSION,
|
|
|
|
E_USESHA1INODF12,
|
2013-02-26 16:43:48 +01:00
|
|
|
E_USEBLOWFISHINODF12,
|
|
|
|
E_USERAUTOSAVE,
|
2007-04-11 18:34:03 +00:00
|
|
|
};
|
2008-03-12 10:15:39 +00:00
|
|
|
|
2015-03-22 19:14:32 +00:00
|
|
|
/** Keep enum values sorted that a less or greater compare maps to older
|
|
|
|
and newer versions.
|
|
|
|
Do not change values, they are stored in the configuration.
|
|
|
|
ODFVER_LATEST designates the "current greatest and latest".
|
|
|
|
When adding a new value or ODFVER_LATEST designates a new real version
|
|
|
|
(plus extensions) adjust the mapping in
|
|
|
|
SvtSaveOptions::GetODFSaneDefaultVersion().
|
|
|
|
*/
|
2008-03-12 10:15:39 +00:00
|
|
|
enum ODFDefaultVersion
|
|
|
|
{
|
|
|
|
ODFVER_UNKNOWN = 0, // unknown
|
2009-09-16 13:55:36 +00:00
|
|
|
ODFVER_010 = 1, // ODF 1.0
|
|
|
|
ODFVER_011 = 2, // ODF 1.1
|
|
|
|
DO_NOT_USE = 3, // Do not use this, only here for compatibility with pre OOo 3.2 configuration
|
|
|
|
ODFVER_012 = 4, // ODF 1.2
|
2012-06-05 03:59:46 +02:00
|
|
|
ODFVER_012_EXT_COMPAT = 8, // ODF 1.2 extended, but with compatibility fallbacks
|
2009-09-16 13:55:36 +00:00
|
|
|
|
|
|
|
ODFVER_LATEST = SAL_MAX_ENUM, // ODF latest version with enhancements
|
2008-03-12 10:15:39 +00:00
|
|
|
};
|
|
|
|
|
2015-03-22 19:14:32 +00:00
|
|
|
/// Enums that allow a sane comparison of versions, without LATEST.
|
|
|
|
enum ODFSaneDefaultVersion
|
|
|
|
{
|
|
|
|
ODFSVER_EXTENDED = 1, // bit designating extensions are allowed
|
|
|
|
ODFSVER_010 = 2, // ODF 1.0
|
|
|
|
ODFSVER_011 = 4, // ODF 1.1
|
|
|
|
ODFSVER_012 = 6, // ODF 1.2
|
|
|
|
ODFSVER_012_EXT_COMPAT = 9, // ODF 1.2 extended, but with compatibility fallbacks
|
|
|
|
ODFSVER_012_EXTENDED = 11, // ODF 1.2 extended
|
|
|
|
ODFSVER_013 = 12, // ODF 1.3
|
|
|
|
ODFSVER_013_EXTENDED = 13 // ODF 1.3 extended
|
|
|
|
};
|
|
|
|
|
2008-03-12 10:15:39 +00:00
|
|
|
SvtSaveOptions();
|
|
|
|
virtual ~SvtSaveOptions();
|
2007-04-11 18:34:03 +00:00
|
|
|
|
|
|
|
void SetAutoSaveTime( sal_Int32 n );
|
|
|
|
sal_Int32 GetAutoSaveTime() const;
|
|
|
|
|
2014-02-19 12:30:34 +01:00
|
|
|
void SetUseUserData( bool b );
|
|
|
|
bool IsUseUserData() const;
|
2007-04-11 18:34:03 +00:00
|
|
|
|
2014-02-19 12:30:34 +01:00
|
|
|
void SetBackup( bool b );
|
|
|
|
bool IsBackup() const;
|
2007-04-11 18:34:03 +00:00
|
|
|
|
2014-02-19 12:30:34 +01:00
|
|
|
void SetAutoSave( bool b );
|
|
|
|
bool IsAutoSave() const;
|
2007-04-11 18:34:03 +00:00
|
|
|
|
2014-02-19 12:30:34 +01:00
|
|
|
void SetAutoSavePrompt( bool b );
|
|
|
|
bool IsAutoSavePrompt() const;
|
2007-04-11 18:34:03 +00:00
|
|
|
|
2014-02-19 12:30:34 +01:00
|
|
|
void SetUserAutoSave( bool b );
|
|
|
|
bool IsUserAutoSave() const;
|
2013-02-26 16:43:48 +01:00
|
|
|
|
2014-02-19 12:30:34 +01:00
|
|
|
void SetDocInfoSave(bool b);
|
|
|
|
bool IsDocInfoSave() const;
|
2007-04-11 18:34:03 +00:00
|
|
|
|
2014-02-19 12:30:34 +01:00
|
|
|
void SetSaveWorkingSet( bool b );
|
|
|
|
bool IsSaveWorkingSet() const;
|
2007-04-11 18:34:03 +00:00
|
|
|
|
2014-02-19 12:30:34 +01:00
|
|
|
void SetSaveDocView( bool b );
|
|
|
|
bool IsSaveDocView() const;
|
2007-04-11 18:34:03 +00:00
|
|
|
|
2014-02-19 12:30:34 +01:00
|
|
|
void SetSaveRelINet( bool b );
|
|
|
|
bool IsSaveRelINet() const;
|
2007-04-11 18:34:03 +00:00
|
|
|
|
2014-02-19 12:30:34 +01:00
|
|
|
void SetSaveRelFSys( bool b );
|
|
|
|
bool IsSaveRelFSys() const;
|
2007-04-11 18:34:03 +00:00
|
|
|
|
2014-02-19 12:30:34 +01:00
|
|
|
bool IsSaveUnpacked() const;
|
2007-04-11 18:34:03 +00:00
|
|
|
|
2014-02-19 12:30:34 +01:00
|
|
|
void SetLoadUserSettings(bool b);
|
|
|
|
bool IsLoadUserSettings() const;
|
2007-04-11 18:34:03 +00:00
|
|
|
|
2014-02-19 12:30:34 +01:00
|
|
|
void SetPrettyPrinting( bool _bEnable );
|
|
|
|
bool IsPrettyPrinting( ) const;
|
2007-04-11 18:34:03 +00:00
|
|
|
|
2014-02-19 12:30:34 +01:00
|
|
|
void SetWarnAlienFormat( bool _bEnable );
|
|
|
|
bool IsWarnAlienFormat( ) const;
|
2007-04-11 18:34:03 +00:00
|
|
|
|
2014-02-19 12:30:34 +01:00
|
|
|
void SetLoadDocumentPrinter( bool _bEnable );
|
|
|
|
bool IsLoadDocumentPrinter( ) const;
|
2007-07-05 06:27:38 +00:00
|
|
|
|
2008-03-12 10:15:39 +00:00
|
|
|
void SetODFDefaultVersion( ODFDefaultVersion eVersion );
|
|
|
|
ODFDefaultVersion GetODFDefaultVersion() const;
|
2015-03-22 19:14:32 +00:00
|
|
|
ODFSaneDefaultVersion GetODFSaneDefaultVersion() const;
|
2008-03-12 10:15:39 +00:00
|
|
|
|
2014-02-19 12:30:34 +01:00
|
|
|
bool IsUseSHA1InODF12() const;
|
2011-03-17 09:16:41 +01:00
|
|
|
|
2014-02-19 12:30:34 +01:00
|
|
|
bool IsUseBlowfishInODF12() const;
|
2011-03-17 09:16:41 +01:00
|
|
|
|
2014-02-19 12:30:34 +01:00
|
|
|
bool IsReadOnly( EOption eOption ) const;
|
2007-04-11 18:34:03 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif
|
|
|
|
|
2010-10-14 08:27:31 +02:00
|
|
|
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|