diff options
author | Krisztian Pinter <pin.terminator@gmail.com> | 2013-02-26 16:43:48 +0100 |
---|---|---|
committer | Jan Holesovsky <kendy@suse.cz> | 2013-03-07 10:11:47 +0100 |
commit | 895898596c72fd14db2abec3aeaab74d583769e5 (patch) | |
tree | 61587b3cb2638b20931ede8114b6fc3ae5a32f87 /sfx2/source/appl/appcfg.cxx | |
parent | add copy() to OUStringBuffer (diff) | |
download | core-895898596c72fd14db2abec3aeaab74d583769e5.tar.gz core-895898596c72fd14db2abec3aeaab74d583769e5.zip |
WIP: fdo#47011 autosave feature
Change-Id: Ib2cbcc33e6188c60c183b5f47e9ae9c9d4c91b95
Diffstat (limited to 'sfx2/source/appl/appcfg.cxx')
-rw-r--r-- | sfx2/source/appl/appcfg.cxx | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/sfx2/source/appl/appcfg.cxx b/sfx2/source/appl/appcfg.cxx index 11441cd3b651..061f697de81c 100644 --- a/sfx2/source/appl/appcfg.cxx +++ b/sfx2/source/appl/appcfg.cxx @@ -226,6 +226,14 @@ sal_Bool SfxApplication::GetOptions( SfxItemSet& rSet ) bRet = sal_False; } break; + case SID_ATTR_USERAUTOSAVE : + { + bRet = sal_True; + if (!aSaveOptions.IsReadOnly(SvtSaveOptions::E_USERAUTOSAVE)) + if (!rSet.Put( SfxBoolItem( rPool.GetWhich( SID_ATTR_USERAUTOSAVE ), aSaveOptions.IsUserAutoSave()))) + bRet = sal_False; + } + break; case SID_ATTR_DOCINFO : { bRet = sal_True; @@ -582,6 +590,13 @@ void SfxApplication::SetOptions_Impl( const SfxItemSet& rSet ) aSaveOptions.SetAutoSaveTime(((const SfxUInt16Item *)pItem)->GetValue()); } + // UserAutoSave + if ( SFX_ITEM_SET == rSet.GetItemState(rPool.GetWhich(SID_ATTR_USERAUTOSAVE), sal_True, &pItem)) + { + DBG_ASSERT(pItem->ISA(SfxBoolItem), "BoolItem expected"); + aSaveOptions.SetUserAutoSave( ( (const SfxBoolItem*)pItem )->GetValue() ); + } + // DocInfo if ( SFX_ITEM_SET == rSet.GetItemState(rPool.GetWhich(SID_ATTR_DOCINFO), sal_True, &pItem)) { |