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:39 +0000 |
commit | 14171010959a4ebf0f6373b6e7f20d1f0741d5a4 (patch) | |
tree | b23aef064c0adb996d4ddd939628826b6dd90b1f /cui | |
parent | c1afa80bb3613c9202fa9d83447fdd5d57667cb6 (diff) |
respect read-only config items in Options - Load/Save - General dialog
Change-Id: I110e8eb2b858c8b86b01d46bec40873939ae53d8
Reviewed-on: https://gerrit.libreoffice.org/31236
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Andras Timar <andras.timar@collabora.com>
Diffstat (limited to 'cui')
-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 ); |