vcl/source/window/layout.cxx |    9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)

New commits:
commit 9ca2a827de1b7f3180975ce750674169986c5978
Author:     Xisco Fauli <xiscofa...@libreoffice.org>
AuthorDate: Thu May 26 16:45:30 2022 +0200
Commit:     Aron Budea <aron.bu...@collabora.com>
CommitDate: Sat Jun 18 03:21:41 2022 +0200

    tdf#147844: Use sanity check only if LibreOfficeKit is active
    
    Regression from 2b58a0979f9206cfca6d78cb2f3d5e65cd735f8b
    "Add sanity check to avoid potential crash in the Collabora Online
    server"
    
    Change-Id: I2fcfb634b47f9d76f8efbbd64a8e69ea236894c3
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/135024
    Tested-by: Jenkins
    Reviewed-by: Miklos Vajna <vmik...@collabora.com>
    (cherry picked from commit b7efccde76ca7bfa181fff39c52282e87e940614)
    
    Related: tdf#147844 still log the discrepancy
    
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/135367
    Tested-by: Jenkins
    Reviewed-by: Xisco Fauli <xiscofa...@libreoffice.org>
    Reviewed-by: Aron Budea <aron.bu...@collabora.com>
    (cherry picked from commit 08850dbead8a8a797965aaa97d43d639bc0814d3)
    
    Change-Id: I2fcfb634b47f9d76f8efbbd64a8e69ea236894c3
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/136065
    Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoff...@gmail.com>
    Reviewed-by: Aron Budea <aron.bu...@collabora.com>

diff --git a/vcl/source/window/layout.cxx b/vcl/source/window/layout.cxx
index 995ae09a0c9e..c38790b6b2df 100644
--- a/vcl/source/window/layout.cxx
+++ b/vcl/source/window/layout.cxx
@@ -14,6 +14,7 @@
 #include <config_features.h>
 #include <com/sun/star/accessibility/AccessibleRole.hpp>
 #include <comphelper/base64.hxx>
+#include <comphelper/lok.hxx>
 #include <o3tl/enumarray.hxx>
 #include <o3tl/enumrange.hxx>
 #include <o3tl/string_view.hxx>
@@ -283,10 +284,14 @@ void VclBox::setAllocation(const Size &rAllocation)
 // Though the dialogs are rendered in javascript for LOK Android some widgets 
like weld::DrawingArea
 // is sent as bitmap but it is rendered from only the visible part
 // when it gets negative, it shrinks instead of expands and it becomes 
invisible
+
         if (nExtraSpace < 0)
         {
-            SAL_WARN("vcl.layout", "nExtraSpace went negative, setting to 
zero");
-            nExtraSpace = 0;
+            SAL_WARN("vcl.layout", "nExtraSpace went negative for VclBox: " << 
GetHelpId());
+            if (comphelper::LibreOfficeKit::isActive())
+            {
+                nExtraSpace = 0;
+            }
         }
     }
 

Reply via email to