sw/source/core/docnode/ndtbl1.cxx | 2 ++ 1 file changed, 2 insertions(+)
New commits: commit 209c037872ea8adc964c94ef47c0cb010b9e0db7 Author: Justin Luth <[email protected]> AuthorDate: Fri Sep 24 12:46:27 2021 +0200 Commit: Xisco Fauli <[email protected]> CommitDate: Sun Sep 26 19:47:20 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]> (cherry picked from commit 360e6b8453acc26880f4f45e6792c2c0e15f0896) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/122447 Reviewed-by: Xisco Fauli <[email protected]> diff --git a/sw/source/core/docnode/ndtbl1.cxx b/sw/source/core/docnode/ndtbl1.cxx index 3df6b3272cee..06dc701883ad 100644 --- a/sw/source/core/docnode/ndtbl1.cxx +++ b/sw/source/core/docnode/ndtbl1.cxx @@ -447,6 +447,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 )
