summaryrefslogtreecommitdiff
path: root/vcl
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2012-09-07 10:42:06 +0100
committerCaolán McNamara <caolanm@redhat.com>2012-09-28 08:48:44 +0100
commitf4af1f209d56a23ab169f966f14270042df12033 (patch)
tree8908870159aad831f582576b68182305a68aee10 /vcl
parent628be0262163574bb1cbe0dc49f0132a4e6d61dc (diff)
we need to retain invisible children for the first grid pass
We will drop them frm the final grid, but for the first pass we need to know about invisible spanning children Change-Id: If3938a622a5f0609964bb5e72f8428c64cb09f79
Diffstat (limited to 'vcl')
-rw-r--r--vcl/source/window/layout.cxx13
1 files changed, 5 insertions, 8 deletions
diff --git a/vcl/source/window/layout.cxx b/vcl/source/window/layout.cxx
index db512436d0dd..a474074b7d3d 100644
--- a/vcl/source/window/layout.cxx
+++ b/vcl/source/window/layout.cxx
@@ -390,9 +390,6 @@ VclGrid::array_type VclGrid::assembleGrid() const
for (Window* pChild = GetWindow(WINDOW_FIRSTCHILD); pChild;
pChild = pChild->GetWindow(WINDOW_NEXT))
{
- if (!pChild->IsVisible())
- continue;
-
sal_Int32 nLeftAttach = pChild->get_grid_left_attach();
sal_Int32 nWidth = pChild->get_grid_width();
sal_Int32 nMaxXPos = nLeftAttach+nWidth-1;
@@ -449,9 +446,6 @@ VclGrid::array_type VclGrid::assembleGrid() const
}
}
- sal_Int32 nNonEmptyCols = std::count(aNonEmptyCols.begin(), aNonEmptyCols.end(), true);
- sal_Int32 nNonEmptyRows = std::count(aNonEmptyRows.begin(), aNonEmptyRows.end(), true);
-
//reduce the spans of elements that span empty rows or columns
for (sal_Int32 x = 0; x < nMaxX; ++x)
{
@@ -459,13 +453,16 @@ VclGrid::array_type VclGrid::assembleGrid() const
{
ExtendedGridEntry &rSpan = A[x][y];
ExtendedGridEntry &rEntry = A[rSpan.x][rSpan.y];
- if (!aNonEmptyCols[x])
+ if (aNonEmptyCols[x] == false)
--rEntry.nSpanWidth;
- if (!aNonEmptyRows[y])
+ if (aNonEmptyRows[y] == false)
--rEntry.nSpanHeight;
}
}
+ sal_Int32 nNonEmptyCols = std::count(aNonEmptyCols.begin(), aNonEmptyCols.end(), true);
+ sal_Int32 nNonEmptyRows = std::count(aNonEmptyRows.begin(), aNonEmptyRows.end(), true);
+
//make new grid without empty rows and columns
array_type B(boost::extents[nNonEmptyCols][nNonEmptyRows]);
for (sal_Int32 x = 0, x2 = 0; x < nMaxX; ++x)