diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2021-07-23 20:39:57 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2021-07-25 08:37:08 +0200 |
commit | d5b9283985633fdb423269cab961bba2acc3539e (patch) | |
tree | 9098cabc94f33ad52f76353bc72728c673d047cc /unotools | |
parent | 84f4f7f99f92c0ecec0dd9d754fdfa8c652a7ec0 (diff) |
use officecfg to retrieve AutoSaveTime
Change-Id: I003be64cc46d6e781ab03d83bae0a3114ab6d56e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/119460
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'unotools')
-rw-r--r-- | unotools/source/config/saveopt.cxx | 59 |
1 files changed, 6 insertions, 53 deletions
diff --git a/unotools/source/config/saveopt.cxx b/unotools/source/config/saveopt.cxx index a8ffe9d01c23..47534ecdcf1e 100644 --- a/unotools/source/config/saveopt.cxx +++ b/unotools/source/config/saveopt.cxx @@ -67,8 +67,7 @@ class SvtSaveOptions_Impl : public utl::ConfigItem SvtSaveOptions::ODFDefaultVersion eODFDefaultVersion; - bool bROAutoSaveTime, - bROUseUserData, + bool bROUseUserData, bROBackup, bROWarnAlienFormat, bROLoadDocPrinter, @@ -81,7 +80,6 @@ public: virtual void Notify( const css::uno::Sequence< OUString >& aPropertyNames ) override; - sal_Int32 GetAutoSaveTime() const { return nAutoSaveTime; } bool IsUseUserData() const { return bUseUserData; } bool IsBackup() const { return bBackup; } bool IsWarnAlienFormat() const { return bWarnAlienFormat; } @@ -90,7 +88,6 @@ public: SvtSaveOptions::ODFDefaultVersion GetODFDefaultVersion() const { return eODFDefaultVersion; } - void SetAutoSaveTime( sal_Int32 n ); void SetUseUserData( bool b ); void SetBackup( bool b ); void SetWarnAlienFormat( bool _bDoPP ); @@ -102,16 +99,6 @@ public: } -void SvtSaveOptions_Impl::SetAutoSaveTime( sal_Int32 n ) -{ - if (!bROAutoSaveTime && nAutoSaveTime!=n) - { - nAutoSaveTime = n; - SetModified(); - Commit(); - } -} - void SvtSaveOptions_Impl::SetUseUserData( bool b ) { if (!bROUseUserData && bUseUserData!=b) @@ -162,9 +149,6 @@ bool SvtSaveOptions_Impl::IsReadOnly( SvtSaveOptions::EOption eOption ) const bool bReadOnly = CFG_READONLY_DEFAULT; switch(eOption) { - case SvtSaveOptions::EOption::AutoSaveTime : - bReadOnly = bROAutoSaveTime; - break; case SvtSaveOptions::EOption::UseUserData : bReadOnly = bROUseUserData; break; @@ -185,19 +169,17 @@ bool SvtSaveOptions_Impl::IsReadOnly( SvtSaveOptions::EOption eOption ) const } #define FORMAT 0 -#define TIMEINTERVALL 1 -#define USEUSERDATA 2 -#define CREATEBACKUP 3 -#define WARNALIENFORMAT 4 -#define LOADDOCPRINTER 5 -#define ODFDEFAULTVERSION 6 +#define USEUSERDATA 1 +#define CREATEBACKUP 2 +#define WARNALIENFORMAT 3 +#define LOADDOCPRINTER 4 +#define ODFDEFAULTVERSION 5 static Sequence< OUString > GetPropertyNames() { static const char* aPropNames[] = { "Graphic/Format", - "Document/AutoSaveTimeIntervall", "Document/UseUserData", "Document/CreateBackup", "Document/WarnAlienFormat", @@ -222,7 +204,6 @@ SvtSaveOptions_Impl::SvtSaveOptions_Impl() , bWarnAlienFormat( true ) , bLoadDocPrinter( true ) , eODFDefaultVersion( SvtSaveOptions::ODFVER_LATEST ) - , bROAutoSaveTime( CFG_READONLY_DEFAULT ) , bROUseUserData( CFG_READONLY_DEFAULT ) , bROBackup( CFG_READONLY_DEFAULT ) , bROWarnAlienFormat( CFG_READONLY_DEFAULT ) @@ -243,22 +224,12 @@ SvtSaveOptions_Impl::SvtSaveOptions_Impl() { if ( pValues[nProp].hasValue() ) { - sal_Int32 nTemp = 0; switch ( nProp ) { case FORMAT: // not supported anymore break; - case TIMEINTERVALL : - if ( pValues[nProp] >>= nTemp ) - nAutoSaveTime = nTemp; - else { - OSL_FAIL( "Wrong Type!" ); - }; - bROAutoSaveTime = pROStates[nProp]; - break; - case ODFDEFAULTVERSION : { sal_Int16 nTmp = 0; @@ -347,14 +318,6 @@ void SvtSaveOptions_Impl::ImplCommit() case FORMAT: // not supported anymore break; - case TIMEINTERVALL : - if (!bROAutoSaveTime) - { - pValues[nRealCount] <<= nAutoSaveTime; - pNames[nRealCount] = pOrgNames[i]; - ++nRealCount; - } - break; case USEUSERDATA : if (!bROUseUserData) { @@ -497,16 +460,6 @@ SvtSaveOptions::~SvtSaveOptions() } } -void SvtSaveOptions::SetAutoSaveTime( sal_Int32 n ) -{ - pImp->pSaveOpt->SetAutoSaveTime( n ); -} - -sal_Int32 SvtSaveOptions::GetAutoSaveTime() const -{ - return pImp->pSaveOpt->GetAutoSaveTime(); -} - void SvtSaveOptions::SetUseUserData( bool b ) { pImp->pSaveOpt->SetUseUserData( b ); |