From f579109b9253a70751920e75af9000deafc23cb1 Mon Sep 17 00:00:00 2001 From: Michael Stahl Date: Tue, 29 May 2018 13:12:15 +0200 Subject: sw_redlinehide: disable optimisation in ContentIdxStoreImpl::SaveFlys() ... if there's a merged text frame. Change-Id: Ida468518ab3f0c2a077a831ec81522f7d3b2c9ff --- sw/source/core/doc/CntntIdxStore.cxx | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/sw/source/core/doc/CntntIdxStore.cxx b/sw/source/core/doc/CntntIdxStore.cxx index 7f97c0c83250..ffdf2ff15764 100644 --- a/sw/source/core/doc/CntntIdxStore.cxx +++ b/sw/source/core/doc/CntntIdxStore.cxx @@ -38,6 +38,7 @@ #include #include #include +#include #include using namespace ::boost; @@ -321,7 +322,10 @@ void ContentIdxStoreImpl::SaveFlys(SwDoc* pDoc, sal_uLong nNode, sal_Int32 nCont SwFrame* pFrame = pNode->getLayoutFrame( pDoc->getIDocumentLayoutAccess().GetCurrentLayout() ); if( pFrame ) { - if( !pFrame->GetDrawObjs() ) + // sw_redlinehide: this looks like an invalid optimisation if merged, + // assuming that flys in deleted redlines should be saved here too. + if ((!pFrame->IsTextFrame() || !static_cast(pFrame)->GetMergedPara()) + && !pFrame->GetDrawObjs()) return; // if we have a layout and no DrawObjs, we can skip this } MarkEntry aSave = { 0, false, 0 }; -- cgit v1.2.3