diff options
author | Xisco Fauli <xiscofauli@libreoffice.org> | 2020-11-05 13:23:57 +0100 |
---|---|---|
committer | Xisco Fauli <xiscofauli@libreoffice.org> | 2020-11-05 17:43:53 +0100 |
commit | 54daa022df46d07171201b3fe236cf3f5726e271 (patch) | |
tree | a6d89a3ae08f5d1848566ae22b4caa76d593974b /svx/source/table | |
parent | d64bd977a430182826252695f041a6ddd62e45ef (diff) |
tdf#138011: Revert "tdf#137949 Fix table row heigths."
This reverts commit 7dc234fa57ca409d0db131c93abea738014b5e1f.
Reason for revert: introduced tdf#138011
Change-Id: I44229135878524557dee29a6976f9bb1cf42766b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105351
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
Diffstat (limited to 'svx/source/table')
-rw-r--r-- | svx/source/table/tablelayouter.cxx | 17 |
1 files changed, 4 insertions, 13 deletions
diff --git a/svx/source/table/tablelayouter.cxx b/svx/source/table/tablelayouter.cxx index 09611ab50979..1c369e6d08b4 100644 --- a/svx/source/table/tablelayouter.cxx +++ b/svx/source/table/tablelayouter.cxx @@ -725,7 +725,6 @@ void TableLayouter::LayoutTableHeight( tools::Rectangle& rArea, bool bFit ) { const sal_Int32 nColCount = getColumnCount(); const sal_Int32 nRowCount = getRowCount(); - if( nRowCount == 0 ) return; @@ -742,9 +741,6 @@ void TableLayouter::LayoutTableHeight( tools::Rectangle& rArea, bool bFit ) sal_Int32 nCol, nRow; for( nRow = 0; nRow < nRowCount; ++nRow ) { - Reference< XPropertySet > xRowSet( xRows->getByIndex(nRow), UNO_QUERY_THROW ); - sal_Int32 nRowPropHeight = 0; - xRowSet->getPropertyValue( gsSize ) >>= nRowPropHeight; sal_Int32 nMinHeight = 0; bool bIsEmpty = true; // check if all cells in this row are merged @@ -768,13 +764,7 @@ void TableLayouter::LayoutTableHeight( tools::Rectangle& rArea, bool bFit ) bool bCellHasText = xCell->hasText(); if (bRowHasText == bCellHasText) { - if(nRowPropHeight > 0) - { - nMinHeight = std::max( nMinHeight, xCell->getMinimumHeight() ); - nMinHeight = std::min( nMinHeight, nRowPropHeight); - } - else - nMinHeight = xCell->getMinimumHeight(); + nMinHeight = std::max( nMinHeight, xCell->getMinimumHeight() ); } else if ( !bRowHasText && bCellHasText ) { @@ -794,6 +784,7 @@ void TableLayouter::LayoutTableHeight( tools::Rectangle& rArea, bool bFit ) else { sal_Int32 nRowHeight = 0; + Reference< XPropertySet > xRowSet( xRows->getByIndex(nRow), UNO_QUERY_THROW ); bool bOptimal = false; xRowSet->getPropertyValue( sOptimalSize ) >>= bOptimal; @@ -863,7 +854,7 @@ void TableLayouter::LayoutTableHeight( tools::Rectangle& rArea, bool bFit ) } // now scale if wanted and needed - if( bFit && nCurrentHeight != rArea.getHeight()) + if( bFit && nCurrentHeight != rArea.getHeight() ) distribute(maRows, o3tl::saturating_sub<sal_Int32>(rArea.getHeight(), nCurrentHeight)); // last step, update left edges @@ -873,7 +864,7 @@ void TableLayouter::LayoutTableHeight( tools::Rectangle& rArea, bool bFit ) maRows[nRow].mnPos = nNewHeight; nNewHeight = o3tl::saturating_add(nNewHeight, maRows[nRow].mnSize); - if( bFit) + if( bFit ) { Reference< XPropertySet > xRowSet( xRows->getByIndex(nRow), UNO_QUERY_THROW ); xRowSet->setPropertyValue( gsSize, Any( maRows[nRow].mnSize ) ); |