Kaydet (Commit) c01780b8 authored tarafından Caolán McNamara's avatar Caolán McNamara

counting fence posts not fence sections

Change-Id: Ic97a766efdbd5e169923b9e7875b16b8ebd88deb
üst f6a00c88
......@@ -1041,7 +1041,9 @@ void VclGrid::setAllocation(const Size& rAllocation)
calcMaxs(A, aWidths, aHeights);
}
long nAvailableWidth = rAllocation.Width() - (get_column_spacing() * nMaxX);
long nAvailableWidth = rAllocation.Width();
if (nMaxX)
nAvailableWidth -= get_column_spacing() * (nMaxX - 1);
if (get_column_homogeneous())
{
for (sal_Int32 x = 0; x < nMaxX; ++x)
......@@ -1071,7 +1073,9 @@ void VclGrid::setAllocation(const Size& rAllocation)
}
}
long nAvailableHeight = rAllocation.Height() - (get_row_spacing() * nMaxY);
long nAvailableHeight = rAllocation.Height();
if (nMaxY)
nAvailableHeight -= get_row_spacing() * (nMaxY - 1);
if (get_row_homogeneous())
{
for (sal_Int32 y = 0; y < nMaxY; ++y)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment