summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sc/source/ui/dbgui/csvgrid.cxx3
-rw-r--r--vcl/source/window/layout.cxx16
2 files changed, 5 insertions, 14 deletions
diff --git a/sc/source/ui/dbgui/csvgrid.cxx b/sc/source/ui/dbgui/csvgrid.cxx
index 6752fcb78a3d..82e2909cc195 100644
--- a/sc/source/ui/dbgui/csvgrid.cxx
+++ b/sc/source/ui/dbgui/csvgrid.cxx
@@ -17,6 +17,7 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
+#include <comphelper/lok.hxx>
#include <csvgrid.hxx>
#include <csvtablebox.hxx>
@@ -108,6 +109,8 @@ void ScCsvGrid::SetDrawingArea(weld::DrawingArea* pDrawingArea)
// the left edge will be lost. If this widget is smaller than the scrolling
// window it is stretched to fit the parent and the problem doesn't arise.
Size aInitialSize(10, 10);
+ if (comphelper::LibreOfficeKit::isActive())
+ aInitialSize = Size(-1, 150);
ScCsvControl::SetDrawingArea(pDrawingArea);
pDrawingArea->set_size_request(aInitialSize.Width(), aInitialSize.Height());
SetOutputSizePixel(aInitialSize);
diff --git a/vcl/source/window/layout.cxx b/vcl/source/window/layout.cxx
index facfeb8c71f0..ffdfce012f75 100644
--- a/vcl/source/window/layout.cxx
+++ b/vcl/source/window/layout.cxx
@@ -297,20 +297,8 @@ void VclBox::setAllocation(const Size &rAllocation)
else if (nExpandChildren)
{
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 (nExtraSpace < 0)
- {
- SAL_WARN("vcl.layout", "nExtraSpace went negative for VclBox: " << GetHelpId());
- if (comphelper::LibreOfficeKit::isActive())
- {
- nExtraSpace = 0;
- }
- }
+ tools::Long nPrimaryDimension = getPrimaryDimension(rAllocation);
+ nExtraSpace = (nPrimaryDimension - getPrimaryDimension(aRequisition)) / nExpandChildren;
}
//Split into those we pack from the start onwards, and those we pack from the end backwards