sc/source/ui/attrdlg/attrdlg.cxx | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-)
New commits: commit 300be323d3bc5b3f52394ee6924abf4e293bedb4 Author: Pranam Lashkari <lpra...@collabora.com> AuthorDate: Fri Feb 24 22:20:11 2023 +0530 Commit: Andras Timar <andras.ti...@collabora.com> CommitDate: Mon Feb 27 16:45:03 2023 +0000 sc: remove protect cell tab from cell format dialog Change-Id: I33a32ca756263426abb4dcb733139baf58221554 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/147663 Reviewed-by: Andras Timar <andras.ti...@collabora.com> Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoff...@gmail.com> diff --git a/sc/source/ui/attrdlg/attrdlg.cxx b/sc/source/ui/attrdlg/attrdlg.cxx index 4c761ef7b36f..66e19fcd4b15 100644 --- a/sc/source/ui/attrdlg/attrdlg.cxx +++ b/sc/source/ui/attrdlg/attrdlg.cxx @@ -30,6 +30,7 @@ #include <editeng/editids.hrc> #include <editeng/flstitem.hxx> #include <osl/diagnose.h> +#include <comphelper/lok.hxx> ScAttrDlg::ScAttrDlg(weld::Window* pParent, const SfxItemSet* pCellAttrs) : SfxTabDialogController(pParent, "modules/scalc/ui/formatcellsdialog.ui", @@ -57,7 +58,11 @@ ScAttrDlg::ScAttrDlg(weld::Window* pParent, const SfxItemSet* pCellAttrs) AddTabPage( "borders", pFact->GetTabPageCreatorFunc( RID_SVXPAGE_BORDER ), nullptr ); OSL_ENSURE(pFact->GetTabPageCreatorFunc( RID_SVXPAGE_BKG ), "GetTabPageCreatorFunc fail!"); AddTabPage( "background", pFact->GetTabPageCreatorFunc( RID_SVXPAGE_BKG ), nullptr ); - AddTabPage( "cellprotection" , ScTabPageProtection::Create, nullptr ); + + if (!comphelper::LibreOfficeKit::isActive()) + AddTabPage( "cellprotection" , ScTabPageProtection::Create, nullptr ); + else + RemoveTabPage( "cellprotection" ); } ScAttrDlg::~ScAttrDlg()