sfx2/source/control/unoctitm.cxx |   10 ++++++++--
 1 file changed, 8 insertions(+), 2 deletions(-)

New commits:
commit 71e5f7e43471cc479ea1e818c813170a389964e6
Author:     Henry Castro <hcas...@collabora.com>
AuthorDate: Thu Jun 1 11:04:13 2023 -0400
Commit:     Henry Castro <hcas...@collabora.com>
CommitDate: Tue Jun 20 00:41:35 2023 +0200

    lok: sfx2: fix change state "SheetRightToLeft"
    
    The UNO command "SheetRightToLeft" can be disabled
    
    Signed-off-by: Henry Castro <hcas...@collabora.com>
    Change-Id: I54742c9d52eb52e36154e0aac2cdf440771eb177
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/152502
    Tested-by: Caolán McNamara <caolan.mcnam...@collabora.com>
    Reviewed-by: Caolán McNamara <caolan.mcnam...@collabora.com>
    (cherry picked from commit fc8270f06eca5ba2ba25673a424b36d9e352f62a)
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/152546
    Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoff...@gmail.com>
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/153267
    Tested-by: Jenkins

diff --git a/sfx2/source/control/unoctitm.cxx b/sfx2/source/control/unoctitm.cxx
index 1b0d1223a3b7..4495873a89af 100644
--- a/sfx2/source/control/unoctitm.cxx
+++ b/sfx2/source/control/unoctitm.cxx
@@ -938,8 +938,14 @@ static void InterceptLOKStateChangeEvent(sal_uInt16 nSID, 
SfxViewFrame* pViewFra
         aEvent.FeatureURL.Path == "SpacePara2")
     {
         bool bTemp = false;
-        aEvent.State >>= bTemp;
-        aBuffer.append(bTemp);
+
+        if (aEvent.IsEnabled)
+        {
+            aEvent.State >>= bTemp;
+            aBuffer.append(bTemp);
+        }
+        else
+            aBuffer.append("disabled");
     }
     else if (aEvent.FeatureURL.Path == "CharFontName")
     {

Reply via email to