sw/source/core/table/swtable.cxx | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-)
New commits: commit e3ea0e32657a41b48d9d9d28f6ad15af4c2a7abc Author: Noel Grandin <[email protected]> AuthorDate: Sat Aug 28 17:28:34 2021 +0200 Commit: Noel Grandin <[email protected]> CommitDate: Sun Aug 29 09:33:52 2021 +0200 tdf#135683 speed up large writer table load no need to do this reregister check during import Change-Id: I254ad24f1802e9cee51786ce5e3253d62c74829f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/121207 Tested-by: Jenkins Reviewed-by: Noel Grandin <[email protected]> diff --git a/sw/source/core/table/swtable.cxx b/sw/source/core/table/swtable.cxx index fb5839ea687b..51e57b57b9ac 100644 --- a/sw/source/core/table/swtable.cxx +++ b/sw/source/core/table/swtable.cxx @@ -1679,6 +1679,7 @@ SwFrameFormat* SwTableBox::ClaimFrameFormat() // If other SwTableBox objects currently listen to the same SwTableBoxFormat as // this one, something needs to be done SwTableBoxFormat *pRet = static_cast<SwTableBoxFormat*>(GetFrameFormat()); + const bool bInImport = pRet->GetDoc()->IsInWriterfilterImport(); SwIterator<SwTableBox,SwFormat> aIter( *pRet ); for( SwTableBox* pLast = aIter.First(); pLast; pLast = aIter.Next() ) { @@ -1694,10 +1695,13 @@ SwFrameFormat* SwTableBox::ClaimFrameFormat() pNewFormat->UnlockModify(); // re-register SwCellFrame objects that know me - SwIterator<SwCellFrame,SwFormat> aFrameIter( *pRet ); - for( SwCellFrame* pCell = aFrameIter.First(); pCell; pCell = aFrameIter.Next() ) - if( pCell->GetTabBox() == this ) - pCell->RegisterToFormat( *pNewFormat ); + if (!bInImport) + { + SwIterator<SwCellFrame,SwFormat> aFrameIter( *pRet ); + for( SwCellFrame* pCell = aFrameIter.First(); pCell; pCell = aFrameIter.Next() ) + if( pCell->GetTabBox() == this ) + pCell->RegisterToFormat( *pNewFormat ); + } // re-register myself pNewFormat->Add( this );
