From db963d695dae5f9d4e3825a896f41bbdf9484bb2 Mon Sep 17 00:00:00 2001 From: Hubert Figuière Date: Tue, 13 Feb 2024 15:56:57 -0500 Subject: calc: getPartInfo() returns the sheet protected state MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Change-Id: I67e2a26680895b5c76977109f4c3f9e1638a9f9e Signed-off-by: Hubert Figuière Reviewed-on: https://gerrit.libreoffice.org/c/core/+/163325 Reviewed-by: Michael Meeks Tested-by: Jenkins CollaboraOffice --- sc/source/ui/unoobj/docuno.cxx | 3 +++ 1 file changed, 3 insertions(+) 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(bIsSelected)) + "\", \"rtllayout\": \"" + OUString::number(static_cast(bIsRTLLayout)) + + "\", \"protected\": \"" + + OUString::number(static_cast(bIsProtected)) + "\" }"; return aPartInfo; } -- cgit v1.2.3