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>
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 2a76145..3f70e76 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