diff options
author | merttumer <mert.tumer@collabora.com> | 2021-05-07 10:19:05 +0000 |
---|---|---|
committer | Mert Tumer <mert.tumer@collabora.com> | 2021-05-12 05:55:56 +0200 |
commit | 0a0d19f8d604ea9560484817948f690978c8489a (patch) | |
tree | 27a10ec4373caaef64554b819cfb4f4a3415ebbf | |
parent | 70c75b2d21fc136362e6476ea2f84478459a018c (diff) |
android: Fix DrawingArea inside CsvTableBox is shrinked
Change-Id: Ia722297051eb3413b9db17024173c9eb596d8e7a
Signed-off-by: merttumer <mert.tumer@collabora.com>
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/115235
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
-rw-r--r-- | vcl/source/window/layout.cxx | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/vcl/source/window/layout.cxx b/vcl/source/window/layout.cxx index 110ffa6b4f87..edebff002f8f 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 <o3tl/enumarray.hxx> #include <o3tl/enumrange.hxx> @@ -262,6 +263,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 |