diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2021-07-24 16:56:15 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2021-07-25 20:05:30 +0200 |
commit | 134f40136a9bea265d8f2fedfdb41a1e65d81b49 (patch) | |
tree | d00db8e5b8cc954440228b8815631aa937effdca /include | |
parent | 28993c0a8d8628c650b661767fd8ab2228c507d9 (diff) |
use officecfg to retrieve OdfDefaultVersion
Change-Id: Id54b98d978965e7ce304b83d5eff7d6c844a41d5
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/119474
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'include')
-rw-r--r-- | include/unotools/saveopt.hxx | 35 |
1 files changed, 11 insertions, 24 deletions
diff --git a/include/unotools/saveopt.hxx b/include/unotools/saveopt.hxx index 2793187ec621..9cd6367615bd 100644 --- a/include/unotools/saveopt.hxx +++ b/include/unotools/saveopt.hxx @@ -20,20 +20,12 @@ #define INCLUDED_UNOTOOLS_SAVEOPT_HXX #include <unotools/unotoolsdllapi.h> -#include <unotools/options.hxx> +#include <memory> -struct SvtLoadSaveOptions_Impl; -class UNOTOOLS_DLLPUBLIC SvtSaveOptions final : public utl::detail::Options -{ - SvtLoadSaveOptions_Impl* pImp; - -public: - - enum class EOption - { - OdfDefaultVersion - }; +namespace comphelper { class ConfigurationChanges; } +namespace SvtSaveOptions +{ /** 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. @@ -74,21 +66,16 @@ public: ODFSVER_LATEST_EXTENDED = ODFSVER_013_EXTENDED ///< @internal DO NOT USE in comparisons }; - SvtSaveOptions(); - virtual ~SvtSaveOptions() override; - - void SetODFDefaultVersion( ODFDefaultVersion eVersion ); - ODFDefaultVersion GetODFDefaultVersion() const; - ODFSaneDefaultVersion GetODFSaneDefaultVersion() const; +}; - bool IsReadOnly( EOption eOption ) const; +UNOTOOLS_DLLPUBLIC void SetODFDefaultVersion( SvtSaveOptions::ODFDefaultVersion eVersion ); +UNOTOOLS_DLLPUBLIC void SetODFDefaultVersion( SvtSaveOptions::ODFDefaultVersion eVersion, const std::shared_ptr<comphelper::ConfigurationChanges>& ); - /** gets a sane default from the currently configured default */ - static ODFSaneDefaultVersion GetODFSaneDefaultVersion(ODFDefaultVersion eDefaultVersion); -}; +UNOTOOLS_DLLPUBLIC SvtSaveOptions::ODFDefaultVersion GetODFDefaultVersion(); +UNOTOOLS_DLLPUBLIC SvtSaveOptions::ODFSaneDefaultVersion GetODFSaneDefaultVersion(); -/** lighter-weight version of the same method in SvtSaveOptions */ -UNOTOOLS_DLLPUBLIC SvtSaveOptions::ODFSaneDefaultVersion GetODFSaneDefaultVersion(); +/** gets a sane default from the currently configured default */ +UNOTOOLS_DLLPUBLIC SvtSaveOptions::ODFSaneDefaultVersion GetODFSaneDefaultVersion(SvtSaveOptions::ODFDefaultVersion eDefaultVersion); #endif |