summaryrefslogtreecommitdiff
path: root/sw/source/core/txtnode/ndtxt.cxx
diff options
context:
space:
mode:
authorMichael Stahl <Michael.Stahl@cib.de>2018-08-22 12:39:54 +0200
committerMichael Stahl <Michael.Stahl@cib.de>2018-09-19 10:18:28 +0200
commit69d2d24b3579ad21fb1ba2746f81a02f8bbfb984 (patch)
tree246d55ac6299a44a0424e40b0b90f77a5059c98d /sw/source/core/txtnode/ndtxt.cxx
parentc1c3c5cd24345e0ef909f152693f1db95d74193b (diff)
sw: add a real create-no-frames flag to MakeCopy/MakeTextNode
SwNodes::CopyNodes calling MakeCopy() and then immediately DelFrames() considered silly. Apparently SwOLENode/SwGrfNode don't actually create frames anyway since that is done via their SwFrameFormats, so they just ignore the parameter. Change-Id: I8a8f52da1d25bb5689345e956a33aebd727e8fc7
Diffstat (limited to 'sw/source/core/txtnode/ndtxt.cxx')
-rw-r--r--sw/source/core/txtnode/ndtxt.cxx5
1 files changed, 3 insertions, 2 deletions
diff --git a/sw/source/core/txtnode/ndtxt.cxx b/sw/source/core/txtnode/ndtxt.cxx
index 9f444b9fc307..7240ebf76709 100644
--- a/sw/source/core/txtnode/ndtxt.cxx
+++ b/sw/source/core/txtnode/ndtxt.cxx
@@ -112,7 +112,7 @@ typedef std::vector<SwTextAttr*> SwpHts;
#endif
SwTextNode *SwNodes::MakeTextNode( const SwNodeIndex & rWhere,
- SwTextFormatColl *pColl )
+ SwTextFormatColl *pColl, bool const bNewFrames)
{
OSL_ENSURE( pColl, "Collection pointer is 0." );
@@ -126,7 +126,8 @@ SwTextNode *SwNodes::MakeTextNode( const SwNodeIndex & rWhere,
// if there is no layout or it is in a hidden section, MakeFrames is not needed
const SwSectionNode* pSectNd;
- if( !GetDoc()->getIDocumentLayoutAccess().GetCurrentViewShell() ||
+ if (!bNewFrames ||
+ !GetDoc()->getIDocumentLayoutAccess().GetCurrentViewShell() ||
( nullptr != (pSectNd = pNode->FindSectionNode()) &&
pSectNd->GetSection().IsHiddenFlag() ))
return pNode;