sc/source/ui/unoobj/docuno.cxx |    3 +++
 1 file changed, 3 insertions(+)

New commits:
commit 3f7eb1423bdcc5d1506a87096d535d05a59fab00
Author:     Hubert Figuière <[email protected]>
AuthorDate: Tue Feb 13 15:56:57 2024 -0500
Commit:     Michael Meeks <[email protected]>
CommitDate: Wed Feb 14 10:16:12 2024 +0100

    calc: getPartInfo() returns the sheet protected state
    
    Change-Id: I67e2a26680895b5c76977109f4c3f9e1638a9f9e
    Signed-off-by: Hubert Figuière <[email protected]>
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/163336
    Tested-by: Michael Meeks <[email protected]>
    Reviewed-by: Michael Meeks <[email protected]>

diff --git a/sc/source/ui/unoobj/docuno.cxx b/sc/source/ui/unoobj/docuno.cxx
index fbc33cff551d..a6de0da0cc92 100644
--- a/sc/source/ui/unoobj/docuno.cxx
+++ b/sc/source/ui/unoobj/docuno.cxx
@@ -614,6 +614,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);
@@ -624,6 +625,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;
 }

Reply via email to