diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2021-07-24 10:46:29 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2021-07-25 13:40:07 +0200 |
commit | f4fc908d00bf1fb05cdca89cdfd2f0c3b83723eb (patch) | |
tree | aca19516248899564db9f98adf261c34ec61fe78 /unotools | |
parent | 293c1a629a69822b4a9996d0522513bc2a0d78e1 (diff) |
use officecfg to retrieve CreateBackup
Change-Id: I4aeb1224f0d42dadd5a69dd49b8df9ee2f776b04
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/119471
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'unotools')
-rw-r--r-- | unotools/source/config/saveopt.cxx | 44 |
1 files changed, 1 insertions, 43 deletions
diff --git a/unotools/source/config/saveopt.cxx b/unotools/source/config/saveopt.cxx index 46fac1c81094..23632e4fcb62 100644 --- a/unotools/source/config/saveopt.cxx +++ b/unotools/source/config/saveopt.cxx @@ -60,13 +60,11 @@ class SvtSaveOptions_Impl : public utl::ConfigItem { sal_Int32 nAutoSaveTime; bool bUseUserData, - bBackup, bAutoSave; SvtSaveOptions::ODFDefaultVersion eODFDefaultVersion; bool bROUseUserData, - bROBackup, bROODFDefaultVersion; virtual void ImplCommit() override; @@ -77,13 +75,11 @@ public: virtual void Notify( const css::uno::Sequence< OUString >& aPropertyNames ) override; bool IsUseUserData() const { return bUseUserData; } - bool IsBackup() const { return bBackup; } SvtSaveOptions::ODFDefaultVersion GetODFDefaultVersion() const { return eODFDefaultVersion; } void SetUseUserData( bool b ); - void SetBackup( bool b ); void SetODFDefaultVersion( SvtSaveOptions::ODFDefaultVersion eNew ); bool IsReadOnly( SvtSaveOptions::EOption eOption ) const; @@ -100,15 +96,6 @@ void SvtSaveOptions_Impl::SetUseUserData( bool b ) } } -void SvtSaveOptions_Impl::SetBackup( bool b ) -{ - if (!bROBackup && bBackup!=b) - { - bBackup = b; - SetModified(); - } -} - void SvtSaveOptions_Impl::SetODFDefaultVersion( SvtSaveOptions::ODFDefaultVersion eNew ) { if ( !bROODFDefaultVersion && eODFDefaultVersion != eNew ) @@ -126,9 +113,6 @@ bool SvtSaveOptions_Impl::IsReadOnly( SvtSaveOptions::EOption eOption ) const case SvtSaveOptions::EOption::UseUserData : bReadOnly = bROUseUserData; break; - case SvtSaveOptions::EOption::Backup : - bReadOnly = bROBackup; - break; case SvtSaveOptions::EOption::OdfDefaultVersion : bReadOnly = bROODFDefaultVersion; break; @@ -138,8 +122,7 @@ bool SvtSaveOptions_Impl::IsReadOnly( SvtSaveOptions::EOption eOption ) const #define FORMAT 0 #define USEUSERDATA 1 -#define CREATEBACKUP 2 -#define ODFDEFAULTVERSION 3 +#define ODFDEFAULTVERSION 2 static Sequence< OUString > GetPropertyNames() { @@ -147,7 +130,6 @@ static Sequence< OUString > GetPropertyNames() { "Graphic/Format", "Document/UseUserData", - "Document/CreateBackup", "ODF/DefaultVersion" }; @@ -164,10 +146,8 @@ SvtSaveOptions_Impl::SvtSaveOptions_Impl() : ConfigItem( "Office.Common/Save" ) , nAutoSaveTime( 0 ) , bUseUserData( false ) - , bBackup( false ) , eODFDefaultVersion( SvtSaveOptions::ODFVER_LATEST ) , bROUseUserData( CFG_READONLY_DEFAULT ) - , bROBackup( CFG_READONLY_DEFAULT ) , bROODFDefaultVersion( CFG_READONLY_DEFAULT ) { Sequence< OUString > aNames = GetPropertyNames(); @@ -218,10 +198,6 @@ SvtSaveOptions_Impl::SvtSaveOptions_Impl() bUseUserData = bTemp; bROUseUserData = pROStates[nProp]; break; - case CREATEBACKUP : - bBackup = bTemp; - bROBackup = pROStates[nProp]; - break; default : SAL_WARN( "unotools.config", "invalid index to load a path" ); @@ -276,14 +252,6 @@ void SvtSaveOptions_Impl::ImplCommit() ++nRealCount; } break; - case CREATEBACKUP : - if (!bROBackup) - { - pValues[nRealCount] <<= bBackup; - pNames[nRealCount] = pOrgNames[i]; - ++nRealCount; - } - break; case ODFDEFAULTVERSION: if (!bROODFDefaultVersion) { @@ -404,16 +372,6 @@ bool SvtSaveOptions::IsUseUserData() const return pImp->pSaveOpt->IsUseUserData(); } -void SvtSaveOptions::SetBackup( bool b ) -{ - pImp->pSaveOpt->SetBackup( b ); -} - -bool SvtSaveOptions::IsBackup() const -{ - return pImp->pSaveOpt->IsBackup(); -} - void SvtSaveOptions::SetLoadUserSettings(bool b) { pImp->pLoadOpt->SetLoadUserSettings(b); |