sc: remove protect cell tab from cell format dialog

Change-Id: I33a32ca756263426abb4dcb733139baf58221554
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/147897
Tested-by: Jenkins
Reviewed-by: Pranam Lashkari <lpranam@collabora.com>
diff --git a/sc/source/ui/attrdlg/attrdlg.cxx b/sc/source/ui/attrdlg/attrdlg.cxx
index 734ae94..4e13eae6 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()