sw/source/core/docnode/ndtbl1.cxx | 2 ++ 1 file changed, 2 insertions(+)
New commits: commit 360e6b8453acc26880f4f45e6792c2c0e15f0896 Author: Justin Luth <[email protected]> AuthorDate: Fri Sep 24 12:46:27 2021 +0200 Commit: Justin Luth <[email protected]> CommitDate: Sat Sep 25 07:08:28 2021 +0200 tdf#45525 tdf#64242 sw row optimize: get correct row height Optimizing is trying to find the actual height of each row and adding them all up together to find the total height. But without this fix, the height of the previous rows was never being reset, so the later rows were potentially reporting a larger height than they should have. Change-Id: I789edc0ca700d9b1448832fa9720ec7ec3b16223 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/122572 Tested-by: Jenkins Reviewed-by: Justin Luth <[email protected]> diff --git a/sw/source/core/docnode/ndtbl1.cxx b/sw/source/core/docnode/ndtbl1.cxx index 4e56000d760b..7e9a437aed94 100644 --- a/sw/source/core/docnode/ndtbl1.cxx +++ b/sw/source/core/docnode/ndtbl1.cxx @@ -449,6 +449,8 @@ bool SwDoc::BalanceRowHeight( const SwCursor& rCursor, bool bTstOnly, const bool sal_Int32 nTotalHeight = 0; for ( auto pLn : aRowArr ) { + if (bOptimize) + nHeight = 0; SwIterator<SwFrame,SwFormat> aIter( *pLn->GetFrameFormat() ); SwFrame* pFrame = aIter.First(); while ( pFrame )
