sc/source/ui/optdlg/tpusrlst.cxx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)
New commits: commit 99c7a2a6a0bbc048204e2a2a5c013f79244c72ee Author: Balazs Varga <balazs.varga.ext...@allotropia.de> AuthorDate: Fri Dec 8 17:56:14 2023 +0100 Commit: Balazs Varga <balazs.varga.ext...@allotropia.de> CommitDate: Sun Dec 10 17:59:20 2023 +0100 tdf#158469 - UI: Part 51 - Unify lockdown behavior of Options dialog for Calc - Sort Lists Page. Change-Id: I857b49caf8fa6823ae2582212885b317a34ff1df Reviewed-on: https://gerrit.libreoffice.org/c/core/+/160494 Tested-by: Jenkins Reviewed-by: Balazs Varga <balazs.varga.ext...@allotropia.de> diff --git a/sc/source/ui/optdlg/tpusrlst.cxx b/sc/source/ui/optdlg/tpusrlst.cxx index 128b8ea936aa..f3999d562d55 100644 --- a/sc/source/ui/optdlg/tpusrlst.cxx +++ b/sc/source/ui/optdlg/tpusrlst.cxx @@ -20,6 +20,7 @@ #undef SC_DLLIMPLEMENTATION #include <comphelper/string.hxx> +#include <officecfg/Office/Calc.hxx> #include <tools/lineend.hxx> #include <vcl/svapp.hxx> #include <vcl/weld.hxx> @@ -161,7 +162,7 @@ void ScTpUserLists::Reset( const SfxItemSet* rCoreAttrs ) mxEdCopyFrom->set_text( aStrSelectedArea ); - if ( mxLbLists->n_children() == 0 ) + if ( mxLbLists->n_children() == 0 || officecfg::Office::Calc::SortList::List::isReadOnly() ) { mxFtLists->set_sensitive(false); mxLbLists->set_sensitive(false); @@ -174,6 +175,7 @@ void ScTpUserLists::Reset( const SfxItemSet* rCoreAttrs ) mxBtnDiscard->hide(); mxBtnAdd->show(); mxBtnModify->hide(); + mxBtnNew->set_sensitive(!officecfg::Office::Calc::SortList::List::isReadOnly()); mxBtnAdd->set_sensitive(false); mxBtnModify->set_sensitive(false);