summaryrefslogtreecommitdiff
path: root/sw/source/core/layout/laycache.cxx
diff options
context:
space:
mode:
authorBjoern Michaelsen <bjoern.michaelsen@libreoffice.org>2021-07-04 13:00:03 +0200
committerBjoern Michaelsen <bjoern.michaelsen@libreoffice.org>2021-07-09 23:27:26 +0200
commitdebfdcfc0b2c07319e4a754decab18a292dc227c (patch)
tree91e39d1beb39a9dc18de2de23dd60b98145f48a6 /sw/source/core/layout/laycache.cxx
parentaf2d477a30c197be5fbfa54022343f7a559b35cf (diff)
remove global bDontCreateObjects bit
Wrapping this in a scope based helper is mostly lipstick on a pig, but at least one cant forget toggling back this way. Apparently, this flag was already toggled in recursive calls without checking previous state, which is likely buggy. In the long run, this should a/ never be used recursively or better b/ not be a global flag at all. Change-Id: Id3554d2acb94d565611701c046ca4d8669594cea Reviewed-on: https://gerrit.libreoffice.org/c/core/+/118371 Tested-by: Jenkins Reviewed-by: Bjoern Michaelsen <bjoern.michaelsen@libreoffice.org>
Diffstat (limited to 'sw/source/core/layout/laycache.cxx')
-rw-r--r--sw/source/core/layout/laycache.cxx5
1 files changed, 1 insertions, 4 deletions
diff --git a/sw/source/core/layout/laycache.cxx b/sw/source/core/layout/laycache.cxx
index b9f8b1e96dbd..1e4ae047b5fc 100644
--- a/sw/source/core/layout/laycache.cxx
+++ b/sw/source/core/layout/laycache.cxx
@@ -833,8 +833,7 @@ bool SwLayHelper::CheckInsert( sal_uLong nNodeIndex )
SwFrame *pPrv;
if( nRepeat > 0 )
{
- bDontCreateObjects = true; //frmtool
-
+ sw::FlyCreationSuppressor aSuppressor;
// Insert new headlines:
sal_uInt16 nRowIdx = 0;
SwRowFrame* pHeadline = nullptr;
@@ -849,8 +848,6 @@ bool SwLayHelper::CheckInsert( sal_uLong nNodeIndex )
++nRowIdx;
}
-
- bDontCreateObjects = false;
pPrv = pHeadline;
nRows = nRows + nRepeat;
}