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

New commits:
commit 50b640a298604ecd10ce095a005cd8eaaf82fc14
Author:     merttumer <mert.tu...@collabora.com>
AuthorDate: Fri May 7 10:19:05 2021 +0000
Commit:     Mert Tumer <mert.tu...@collabora.com>
CommitDate: Fri Jun 4 07:47:31 2021 +0200

    android: Fix DrawingArea inside CsvTableBox is shrinked
    
    Change-Id: Ia722297051eb3413b9db17024173c9eb596d8e7a
    Signed-off-by: merttumer <mert.tu...@collabora.com>
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/115235
    Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoff...@gmail.com>
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/115276
    Tested-by: Jenkins

diff --git a/vcl/source/window/layout.cxx b/vcl/source/window/layout.cxx
index 2a76145e9247..3f70e767e344 100644
--- a/vcl/source/window/layout.cxx
+++ b/vcl/source/window/layout.cxx
@@ -7,6 +7,7 @@
  * file, You can obtain one at http://mozilla.org/MPL/2.0/.
  */
 
+#include <config_features.h>
 #include <com/sun/star/accessibility/AccessibleRole.hpp>
 #include <comphelper/base64.hxx>
 #include <o3tl/enumarray.hxx>
@@ -272,6 +273,14 @@ void VclBox::setAllocation(const Size &rAllocation)
     {
         Size aRequisition = calculateRequisition();
         nExtraSpace = (getPrimaryDimension(rAllocation) - 
getPrimaryDimension(aRequisition)) / nExpandChildren;
+// In mobile, the screen size is small and extraSpace can become negative
+// 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 HAVE_FEATURE_ANDROID_LOK
+        if (nExtraSpace < 0)
+            nExtraSpace = 0;
+#endif
     }
 
     //Split into those we pack from the start onwards, and those we pack from 
the end backwards
_______________________________________________
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to