From 077d70b52268d48b4a21cc031636c78e1610d731 Mon Sep 17 00:00:00 2001 From: Michael Stahl Date: Fri, 31 Jul 2020 13:32:29 +0200 Subject: tdf#134931 sw_redlinehide: fix layout following paste of table The pasted table does get a SwTabFrame but the problem is that TurboAction() is called and formats the pre-existing SwTextFrame and somehow that just sets all the valid flags on the new SwTabFrame without doing any formatting. Previously, SwNodes::CopyNodes(bNewFrames=true) would call SwTabFrame::Paste() which invalidates the page. In InsertCnt_(), for new SwSectionFrames InvalidatePage() is already called so do the same for SwTabFrame which gets rid of the "turbo". (regression from 166b5010b402a41b192b1659093a25acf9065fd9) Change-Id: I970a04bd8e76f5418bddb66af915ac466f44daf3 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/99867 Tested-by: Jenkins Reviewed-by: Michael Stahl (cherry picked from commit 5f7b937e9f81824f11022bc6b4dd222f700883cd) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/99845 Reviewed-by: Thorsten Behrens --- sw/source/core/layout/frmtool.cxx | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'sw') diff --git a/sw/source/core/layout/frmtool.cxx b/sw/source/core/layout/frmtool.cxx index af968c9d3e58..745c1818d859 100644 --- a/sw/source/core/layout/frmtool.cxx +++ b/sw/source/core/layout/frmtool.cxx @@ -1615,6 +1615,10 @@ void InsertCnt_( SwLayoutFrame *pLay, SwDoc *pDoc, pPageMaker->CheckInsert( nIndex ); pFrame->InsertBehind( pLay, pPrv ); + if (pPage) // would null in SwCellFrame ctor + { // tdf#134931 call ResetTurbo(); not sure if Paste() would be + pFrame->InvalidatePage(pPage); // better than InsertBehind()? + } // #i27138# // notify accessibility paragraphs objects about changed // CONTENT_FLOWS_FROM/_TO relation. -- cgit v1.2.3