summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Stahl <Michael.Stahl@cib.de>2018-05-29 13:12:15 +0200
committerMichael Stahl <Michael.Stahl@cib.de>2018-06-08 21:51:33 +0200
commitf579109b9253a70751920e75af9000deafc23cb1 (patch)
tree223a7274ef1700c05dfa91a462c3fe198e104cb3
parent5ab626004e6ed1f8eff9c9b5ebf4f17ef0203c00 (diff)
sw_redlinehide: disable optimisation in ContentIdxStoreImpl::SaveFlys()
... if there's a merged text frame. Change-Id: Ida468518ab3f0c2a077a831ec81522f7d3b2c9ff
-rw-r--r--sw/source/core/doc/CntntIdxStore.cxx6
1 files changed, 5 insertions, 1 deletions
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 <sal/types.h>
#include <unocrsr.hxx>
#include <edimp.hxx>
+#include <txtfrm.hxx>
#include <memory>
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<SwTextFrame const*>(pFrame)->GetMergedPara())
+ && !pFrame->GetDrawObjs())
return; // if we have a layout and no DrawObjs, we can skip this
}
MarkEntry aSave = { 0, false, 0 };