svx/source/form/formcontroller.cxx |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit db227dc7d032d642983c313ab74c34a301464c2a
Author:     Mike Kaganski <mike.kagan...@collabora.com>
AuthorDate: Sat Jan 27 08:18:14 2024 +0100
Commit:     Mike Kaganski <mike.kagan...@collabora.com>
CommitDate: Sat Jan 27 11:07:32 2024 +0100

    Avoid incorrect overwrite the value
    
    It would ignore the "enabled" state, if it its read-only is false
    
    Change-Id: I155a0621d967b1026c7f83316db8b595e9d507c3
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/162613
    Tested-by: Jenkins
    Reviewed-by: Mike Kaganski <mike.kagan...@collabora.com>

diff --git a/svx/source/form/formcontroller.cxx 
b/svx/source/form/formcontroller.cxx
index 0fb1bd64c942..e39367b98353 100644
--- a/svx/source/form/formcontroller.cxx
+++ b/svx/source/form/formcontroller.cxx
@@ -2125,7 +2125,7 @@ void FormController::setControlLock(const Reference< 
XControl > & xControl)
     bool bTouch = true;
     if (::comphelper::hasProperty(FM_PROP_ENABLED, xSet))
         bTouch = 
::comphelper::getBOOL(xSet->getPropertyValue(FM_PROP_ENABLED));
-    if (::comphelper::hasProperty(FM_PROP_READONLY, xSet))
+    if (bTouch && ::comphelper::hasProperty(FM_PROP_READONLY, xSet))
         bTouch = 
!::comphelper::getBOOL(xSet->getPropertyValue(FM_PROP_READONLY));
 
     if (!bTouch)

Reply via email to