diff options
author | Miklos Vajna <vmiklos@collabora.com> | 2021-09-21 20:06:16 +0200 |
---|---|---|
committer | Miklos Vajna <vmiklos@collabora.com> | 2021-09-22 08:21:28 +0200 |
commit | b22cd6bfb10a2fe0407875e456708d6086accb81 (patch) | |
tree | 84111c921c7fc44c7036e6cb92238415d4a9b6a6 /sw | |
parent | 5fc94be9d55791340a56f238ded12261f68af552 (diff) |
sw: clean up no longer needed debug code
It made sense when the perf improvement was added to see if the faster
code indeed does the same as the old slower one, but now it can go.
Change-Id: I45e05d51c2bac1e0d2df6fa1cdf1debe13dd21e8
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/122401
Tested-by: Jenkins
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
Diffstat (limited to 'sw')
-rw-r--r-- | sw/source/core/txtnode/ndtxt.cxx | 30 |
1 files changed, 0 insertions, 30 deletions
diff --git a/sw/source/core/txtnode/ndtxt.cxx b/sw/source/core/txtnode/ndtxt.cxx index 47d495fef56d..190b39a5a7fa 100644 --- a/sw/source/core/txtnode/ndtxt.cxx +++ b/sw/source/core/txtnode/ndtxt.cxx @@ -1426,28 +1426,6 @@ void SwTextNode::Update( } // at-char anchored flys shouldn't be moved, either. -#if OSL_DEBUG_LEVEL > 0 - std::vector<SwFrameFormat*> checkFormats; - const SwFrameFormats& rFormats = *GetDoc().GetSpzFrameFormats(); - for (auto& rpFormat : rFormats) - { - const SwFormatAnchor& rAnchor = rpFormat->GetAnchor(); - const SwPosition* pContentAnchor = rAnchor.GetContentAnchor(); - if (rAnchor.GetAnchorId() == RndStdIds::FLY_AT_CHAR && pContentAnchor) - { - // The fly is at-char anchored and has an anchor position. - SwIndex& rEndIdx = const_cast<SwIndex&>(pContentAnchor->nContent); - if (&pContentAnchor->nNode.GetNode() == this && rEndIdx.GetIndex() == rPos.GetIndex()) - { - // The anchor position is exactly our insert position. - #if 0 - rEndIdx.Assign(&aTmpIdxReg, rEndIdx.GetIndex()); - #endif - checkFormats.push_back( rpFormat ); - } - } - } -#endif std::vector<SwFrameFormat*> const& rFlys(GetAnchoredFlys()); for (size_t i = 0; i != rFlys.size(); ++i) { @@ -1462,17 +1440,9 @@ void SwTextNode::Update( { // The anchor position is exactly our insert position. rEndIdx.Assign(&aTmpIdxReg, rEndIdx.GetIndex()); -#if OSL_DEBUG_LEVEL > 0 - auto checkPos = std::find( checkFormats.begin(), checkFormats.end(), pFormat ); - assert( checkPos != checkFormats.end()); - checkFormats.erase( checkPos ); -#endif } } } -#if OSL_DEBUG_LEVEL > 0 - assert( checkFormats.empty()); -#endif // The cursors of other shells shouldn't be moved, either. if (SwDocShell* pDocShell = GetDoc().GetDocShell()) |