diff options
author | Andras Timar <andras.timar@collabora.com> | 2016-11-26 17:00:43 +0100 |
---|---|---|
committer | Andras Timar <andras.timar@collabora.com> | 2016-11-26 18:08:59 +0000 |
commit | 5f9bd7677047abfc9d3bde0db78f74ff23204f0d (patch) | |
tree | 95c6114847faed1fe651d364a4b1eb9274dc1cfc | |
parent | 6af70ec9d0f87553a7fb795d957d41cf6d2d7c6d (diff) |
respect read-only config items in Options - Load/Save - General dialog
Change-Id: I110e8eb2b858c8b86b01d46bec40873939ae53d8
Reviewed-on: https://gerrit.libreoffice.org/31237
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Andras Timar <andras.timar@collabora.com>
-rw-r--r-- | cui/source/options/optsave.cxx | 20 |
1 files changed, 15 insertions, 5 deletions
diff --git a/cui/source/options/optsave.cxx b/cui/source/options/optsave.cxx index 09d5a920340d..8ca666b2c533 100644 --- a/cui/source/options/optsave.cxx +++ b/cui/source/options/optsave.cxx @@ -397,8 +397,10 @@ void SvxSaveTabPage::Reset( const SfxItemSet* ) SvtSaveOptions aSaveOpt; aLoadUserSettingsCB->Check(aSaveOpt.IsLoadUserSettings()); aLoadUserSettingsCB->SaveValue(); + aLoadUserSettingsCB->Enable(!aSaveOpt.IsReadOnly(SvtSaveOptions::E_USEUSERDATA)); aLoadDocPrinterCB->Check( aSaveOpt.IsLoadDocumentPrinter() ); aLoadDocPrinterCB->SaveValue(); + aLoadDocPrinterCB->Enable(!aSaveOpt.IsReadOnly(SvtSaveOptions::E_LOADDOCPRINTER)); if ( !pImpl->bInitialized ) { @@ -471,25 +473,33 @@ void SvxSaveTabPage::Reset( const SfxItemSet* ) } aDocInfoCB->Check(aSaveOpt.IsDocInfoSave()); + aDocInfoCB->Enable(!aSaveOpt.IsReadOnly(SvtSaveOptions::E_DOCINFSAVE)); aBackupCB->Check(aSaveOpt.IsBackup()); - bool bBackupRO = aSaveOpt.IsReadOnly(SvtSaveOptions::E_BACKUP); - aBackupCB->Enable(!bBackupRO); + aBackupCB->Enable(!aSaveOpt.IsReadOnly(SvtSaveOptions::E_BACKUP)); aAutoSaveCB->Check(aSaveOpt.IsAutoSave()); + aAutoSaveCB->Enable(!aSaveOpt.IsReadOnly(SvtSaveOptions::E_AUTOSAVE)); + aUserAutoSaveCB->Check(aSaveOpt.IsUserAutoSave()); + aUserAutoSaveCB->Enable(!aSaveOpt.IsReadOnly(SvtSaveOptions::E_USERAUTOSAVE)); + aWarnAlienFormatCB->Check(aSaveOpt.IsWarnAlienFormat()); aWarnAlienFormatCB->Enable(!aSaveOpt.IsReadOnly(SvtSaveOptions::E_WARNALIENFORMAT)); - aAutoSaveEdit->SetValue( aSaveOpt.GetAutoSaveTime() ); + aAutoSaveEdit->SetValue(aSaveOpt.GetAutoSaveTime()); + aAutoSaveEdit->Enable(!aSaveOpt.IsReadOnly(SvtSaveOptions::E_AUTOSAVETIME)); // save relatively - aRelativeFsysCB->Check( aSaveOpt.IsSaveRelFSys() ); + aRelativeFsysCB->Check(aSaveOpt.IsSaveRelFSys()); + aRelativeFsysCB->Enable(!aSaveOpt.IsReadOnly(SvtSaveOptions::E_SAVERELFSYS)); - aRelativeInetCB->Check( aSaveOpt.IsSaveRelINet() ); + aRelativeInetCB->Check(aSaveOpt.IsSaveRelINet()); + aRelativeInetCB->Enable(!aSaveOpt.IsReadOnly(SvtSaveOptions::E_SAVERELINET)); void* pDefaultVersion = reinterpret_cast<void*>( aSaveOpt.GetODFDefaultVersion() ); aODFVersionLB->SelectEntryPos( aODFVersionLB->GetEntryPos( pDefaultVersion ) ); + aODFVersionLB->Enable(!aSaveOpt.IsReadOnly(SvtSaveOptions::E_ODFDEFAULTVERSION)); AutoClickHdl_Impl( aAutoSaveCB ); ODFVersionHdl_Impl( *aODFVersionLB ); |