Resolves tdf#143100 - Disable cell style commands when sheet is protected

Change-Id: Id532bee30ebd550df3a55074aec94a1f92aad564
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/131665
Tested-by: Jenkins
Reviewed-by: Heiko Tietze <heiko.tietze@documentfoundation.org>
diff --git a/sc/source/ui/view/formatsh.cxx b/sc/source/ui/view/formatsh.cxx
index 913915a..5513c9d 100644
--- a/sc/source/ui/view/formatsh.cxx
+++ b/sc/source/ui/view/formatsh.cxx
@@ -189,6 +189,9 @@ void ScFormatShell::GetStyleState( SfxItemSet& rSet )
                    rSet.Put( SfxTemplateItem( nSlotId, pStyleSheet->GetName() ) );
                else
                    rSet.Put( SfxTemplateItem( nSlotId, OUString() ) );

                if ( bProtected )
                    rSet.DisableItem( nSlotId );
            }
            break;