summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHubert Figuière <hub@collabora.com>2024-02-13 15:56:57 -0500
committerAndras Timar <andras.timar@collabora.com>2024-02-14 09:51:09 +0100
commitdb963d695dae5f9d4e3825a896f41bbdf9484bb2 (patch)
treea74c51a17228c0cdf5ff13a4f91e596fbbdfbe4f
parentd0241915eba35c9dc0cc42f322df798a270db00f (diff)
calc: getPartInfo() returns the sheet protected state
Change-Id: I67e2a26680895b5c76977109f4c3f9e1638a9f9e Signed-off-by: Hubert Figuière <hub@collabora.com> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/163325 Reviewed-by: Michael Meeks <michael.meeks@collabora.com> Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
-rw-r--r--sc/source/ui/unoobj/docuno.cxx3
1 files changed, 3 insertions, 0 deletions
diff --git a/sc/source/ui/unoobj/docuno.cxx b/sc/source/ui/unoobj/docuno.cxx
index cb13801b7b1e..832b2015c2b2 100644
--- a/sc/source/ui/unoobj/docuno.cxx
+++ b/sc/source/ui/unoobj/docuno.cxx
@@ -613,6 +613,7 @@ OUString ScModelObj::getPartInfo( int nPart )
return OUString();
const bool bIsVisible = pViewData->GetDocument().IsVisible(nPart);
+ const bool bIsProtected = pViewData->GetDocument().IsTabProtected(nPart);
//FIXME: Implement IsSelected().
const bool bIsSelected = false; //pViewData->GetDocument()->IsSelected(nPart);
const bool bIsRTLLayout = pViewData->GetDocument().IsLayoutRTL(nPart);
@@ -623,6 +624,8 @@ OUString ScModelObj::getPartInfo( int nPart )
OUString::number(static_cast<unsigned int>(bIsSelected)) +
"\", \"rtllayout\": \"" +
OUString::number(static_cast<unsigned int>(bIsRTLLayout)) +
+ "\", \"protected\": \"" +
+ OUString::number(static_cast<unsigned int>(bIsProtected)) +
"\" }";
return aPartInfo;
}