summaryrefslogtreecommitdiff
path: root/svx/source/table/tablelayouter.cxx
diff options
context:
space:
mode:
authorMatúš Kukan <matus.kukan@collabora.com>2014-06-23 19:20:07 +0200
committerCaolán McNamara <caolanm@redhat.com>2014-06-24 09:14:39 +0000
commita64eda5c5f754b7534d2d62ac9a1f13165621533 (patch)
tree665980197f59da1895d86e13e3c8210c653bec24 /svx/source/table/tablelayouter.cxx
parent69987ea99a722cb4b3e2df3132b89bacd0a5b862 (diff)
Related bnc#822625: Minimum height was not invalidated when rectangle changes.
5792e76cb5beb630c135f57b74f57d74dd2dc2b0 was too optimistic and did not invalidate mnCachedMinHeight often enough. This was resulting in a grey area below table frame when resizing it. So, revert 5792e76cb5beb630c135f57b74f57d74dd2dc2b0 "Related bnc#822625: Cache minimum height for table cells." and istead just use getMinimumWidth() in TableLayouter if that's all we need. getMinimumHeight() is expensive. Change-Id: I34c49dda75d6ccccaa5b4d3746114352621a40dd (cherry picked from commit b8f7ea5da41d61d405adec54dcd10b54ee0e5591) Reviewed-on: https://gerrit.libreoffice.org/9871 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'svx/source/table/tablelayouter.cxx')
-rw-r--r--svx/source/table/tablelayouter.cxx8
1 files changed, 4 insertions, 4 deletions
diff --git a/svx/source/table/tablelayouter.cxx b/svx/source/table/tablelayouter.cxx
index 55ed2d2247a8..2b979968a215 100644
--- a/svx/source/table/tablelayouter.cxx
+++ b/svx/source/table/tablelayouter.cxx
@@ -556,7 +556,7 @@ void TableLayouter::LayoutTableWidth( Rectangle& rArea, bool bFit )
}
else
{
- nMinWidth = std::max( nMinWidth, xCell->getMinimumSize().Width );
+ nMinWidth = std::max( nMinWidth, xCell->getMinimumWidth() );
}
}
}
@@ -622,7 +622,7 @@ void TableLayouter::LayoutTableWidth( Rectangle& rArea, bool bFit )
while( iter != aMergedCells[nCol].end() )
{
CellRef xCell( (*iter++) );
- sal_Int32 nMinWidth = xCell->getMinimumSize().Width;
+ sal_Int32 nMinWidth = xCell->getMinimumWidth();
for( sal_Int32 nMCol = nCol - xCell->getColumnSpan() + 1; (nMCol > 0) && (nMCol < nCol); ++nMCol )
nMinWidth -= maColumns[nMCol].mnSize;
@@ -706,7 +706,7 @@ void TableLayouter::LayoutTableHeight( Rectangle& rArea, bool bFit )
}
else
{
- nMinHeight = std::max( nMinHeight, xCell->getMinimumSize().Height );
+ nMinHeight = std::max( nMinHeight, xCell->getMinimumHeight() );
}
}
}
@@ -773,7 +773,7 @@ void TableLayouter::LayoutTableHeight( Rectangle& rArea, bool bFit )
while( iter != aMergedCells[nRow].end() )
{
CellRef xCell( (*iter++) );
- sal_Int32 nMinHeight = xCell->getMinimumSize().Height;
+ sal_Int32 nMinHeight = xCell->getMinimumHeight();
for( sal_Int32 nMRow = nRow - xCell->getRowSpan() + 1; (nMRow > 0) && (nMRow < nRow); ++nMRow )
nMinHeight -= maRows[nMRow].mnSize;