Kaydet (Commit) f579109b authored tarafından Michael Stahl's avatar Michael Stahl

sw_redlinehide: disable optimisation in ContentIdxStoreImpl::SaveFlys()

... if there's a merged text frame.

Change-Id: Ida468518ab3f0c2a077a831ec81522f7d3b2c9ff
üst 5ab62600
...@@ -38,6 +38,7 @@ ...@@ -38,6 +38,7 @@
#include <sal/types.h> #include <sal/types.h>
#include <unocrsr.hxx> #include <unocrsr.hxx>
#include <edimp.hxx> #include <edimp.hxx>
#include <txtfrm.hxx>
#include <memory> #include <memory>
using namespace ::boost; using namespace ::boost;
...@@ -321,7 +322,10 @@ void ContentIdxStoreImpl::SaveFlys(SwDoc* pDoc, sal_uLong nNode, sal_Int32 nCont ...@@ -321,7 +322,10 @@ void ContentIdxStoreImpl::SaveFlys(SwDoc* pDoc, sal_uLong nNode, sal_Int32 nCont
SwFrame* pFrame = pNode->getLayoutFrame( pDoc->getIDocumentLayoutAccess().GetCurrentLayout() ); SwFrame* pFrame = pNode->getLayoutFrame( pDoc->getIDocumentLayoutAccess().GetCurrentLayout() );
if( pFrame ) 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 return; // if we have a layout and no DrawObjs, we can skip this
} }
MarkEntry aSave = { 0, false, 0 }; MarkEntry aSave = { 0, false, 0 };
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment