vcl/source/window/layout.cxx | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-)
New commits: commit 53a8a323dfb785d35bb3a17d1ec92cda7ed8f10d Author: Caolán McNamara <caol...@redhat.com> Date: Fri Sep 7 10:42:06 2012 +0100 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 diff --git a/vcl/source/window/layout.cxx b/vcl/source/window/layout.cxx index db51243..a474074 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)
_______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits