diff options
author | Michael Stahl <Michael.Stahl@cib.de> | 2019-09-25 15:01:20 +0200 |
---|---|---|
committer | Michael Stahl <michael.stahl@cib.de> | 2019-10-23 12:47:56 +0200 |
commit | e511a0ca5dde6d731bb126bbfe21768867890102 (patch) | |
tree | 32a4ca71fc2a1726cc202958e27f41382a2dd234 /sw/source/core/doc/DocumentContentOperationsManager.cxx | |
parent | b522fc0646915d4da94df38dd249c88b28f25be7 (diff) |
sw: DelFullPara() and MoveRange() shouldn't do anything...
Change-Id: I34bcbf4d601dd96e13efec513e8a001865f3065f
Reviewed-on: https://gerrit.libreoffice.org/80071
Tested-by: Jenkins
Reviewed-by: Michael Stahl <michael.stahl@cib.de>
Diffstat (limited to 'sw/source/core/doc/DocumentContentOperationsManager.cxx')
-rw-r--r-- | sw/source/core/doc/DocumentContentOperationsManager.cxx | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/sw/source/core/doc/DocumentContentOperationsManager.cxx b/sw/source/core/doc/DocumentContentOperationsManager.cxx index ad031b9e702d..816468cb1368 100644 --- a/sw/source/core/doc/DocumentContentOperationsManager.cxx +++ b/sw/source/core/doc/DocumentContentOperationsManager.cxx @@ -1940,6 +1940,16 @@ bool DocumentContentOperationsManager::DelFullPara( SwPaM& rPam ) return false; } + { + std::vector<std::pair<sal_uLong, sal_Int32>> Breaks; + lcl_CalcBreaks(Breaks, rPam); + if (!Breaks.empty()) + { // a bit of a problem: we want to completely remove the nodes + // but then how can the CH_TXT_ATR survive? + return false; + } + } + // Move hard page brakes to the following Node. bool bSavePageBreak = false, bSavePageDesc = false; @@ -2084,6 +2094,14 @@ bool DocumentContentOperationsManager::MoveRange( SwPaM& rPaM, SwPosition& rPos, if( !rPaM.HasMark() || *pStt >= *pEnd || (*pStt <= rPos && rPos < *pEnd)) return false; +#ifndef NDEBUG + { + std::vector<std::pair<sal_uLong, sal_Int32>> Breaks; + lcl_CalcBreaks(Breaks, rPaM); + assert(Breaks.empty()); // probably an invalid redline was created? + } +#endif + // Save the paragraph anchored Flys, so that they can be moved. SaveFlyArr aSaveFlyArr; SaveFlyInRange( rPaM, rPos, aSaveFlyArr, bool( SwMoveFlags::ALLFLYS & eMvFlags ) ); |