summaryrefslogtreecommitdiff
path: root/vcl
diff options
context:
space:
mode:
authorJan Holesovsky <kendy@collabora.com>2014-12-17 08:34:52 +0100
committerJan Holesovsky <kendy@collabora.com>2014-12-17 08:34:52 +0100
commit4e1e9eb2fb08fcddf076051501c875ce0766964b (patch)
tree5e0ec446efa89e3b1eb7038516c35b2547c0d17f /vcl
parente31657a1eaad12de1ad89aec5b50f8116f67fa3e (diff)
vcl: Sidebar corner case.
Diffstat (limited to 'vcl')
-rw-r--r--vcl/source/window/layout.cxx4
1 files changed, 2 insertions, 2 deletions
diff --git a/vcl/source/window/layout.cxx b/vcl/source/window/layout.cxx
index c13e6b461fbe..be1e0600a249 100644
--- a/vcl/source/window/layout.cxx
+++ b/vcl/source/window/layout.cxx
@@ -755,11 +755,11 @@ VclGrid::array_type VclGrid::assembleGrid() const
for (vcl::Window* pChild = GetWindow(WINDOW_FIRSTCHILD); pChild;
pChild = pChild->GetWindow(WINDOW_NEXT))
{
- sal_Int32 nLeftAttach = pChild->get_grid_left_attach();
+ sal_Int32 nLeftAttach = std::max(pChild->get_grid_left_attach(), 0);
sal_Int32 nWidth = pChild->get_grid_width();
sal_Int32 nMaxXPos = nLeftAttach+nWidth-1;
- sal_Int32 nTopAttach = pChild->get_grid_top_attach();
+ sal_Int32 nTopAttach = std::max(pChild->get_grid_top_attach(), 0);
sal_Int32 nHeight = pChild->get_grid_height();
sal_Int32 nMaxYPos = nTopAttach+nHeight-1;