diff options
author | Caolán McNamara <caolanm@redhat.com> | 2021-11-15 09:10:36 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2021-11-15 17:17:42 +0100 |
commit | acb3638afd79472851bdf111192a2c023f44bf67 (patch) | |
tree | 1eefa0dbdfba9c83f1555d0eaa8837f7024bb246 | |
parent | 8cfc86c652bc02eca2733498d4459bd24de2158b (diff) |
replace an ugly coverity warning suppression
Change-Id: I73921e43e7e955793493e2accab4e3799cfd121c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/125221
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
-rw-r--r-- | sw/inc/HandleAnchorNodeChg.hxx | 4 | ||||
-rw-r--r-- | sw/source/core/frmedt/fefly1.cxx | 2 | ||||
-rw-r--r-- | sw/source/core/frmedt/feshview.cxx | 2 | ||||
-rw-r--r-- | sw/source/core/layout/atrfrm.cxx | 7 |
4 files changed, 11 insertions, 4 deletions
diff --git a/sw/inc/HandleAnchorNodeChg.hxx b/sw/inc/HandleAnchorNodeChg.hxx index ae46c7e2cc89..446f9ac710a6 100644 --- a/sw/inc/HandleAnchorNodeChg.hxx +++ b/sw/inc/HandleAnchorNodeChg.hxx @@ -53,7 +53,7 @@ public: SwFlyFrame const* _pKeepThisFlyFrame = nullptr); /** calls <SwFlyFrameFormat::MakeFrames>, if re-creation of fly frames is necessary. */ - ~SwHandleAnchorNodeChg() COVERITY_NOEXCEPT_FALSE; + ~SwHandleAnchorNodeChg(); private: // fly frame format, which is tracked for an anchor node change. @@ -67,6 +67,8 @@ private: SwWrtShell* mpWrtShell; + void ImplDestroy(); + SwHandleAnchorNodeChg(const SwHandleAnchorNodeChg&) = delete; void operator=(const SwHandleAnchorNodeChg) = delete; }; diff --git a/sw/source/core/frmedt/fefly1.cxx b/sw/source/core/frmedt/fefly1.cxx index 7043681704d9..8158359458b7 100644 --- a/sw/source/core/frmedt/fefly1.cxx +++ b/sw/source/core/frmedt/fefly1.cxx @@ -605,7 +605,7 @@ Point SwFEShell::FindAnchorPos( const Point& rAbsPos, bool bMoveIt ) // re-created. Thus, delete all fly frames except the <this> before the // anchor attribute is change and re-create them afterwards. { - std::unique_ptr<SwHandleAnchorNodeChg, o3tl::default_delete<SwHandleAnchorNodeChg>> pHandleAnchorNodeChg; + std::unique_ptr<SwHandleAnchorNodeChg> pHandleAnchorNodeChg; SwFlyFrameFormat* pFlyFrameFormat( dynamic_cast<SwFlyFrameFormat*>(&rFormat) ); if ( pFlyFrameFormat ) { diff --git a/sw/source/core/frmedt/feshview.cxx b/sw/source/core/frmedt/feshview.cxx index 24a9655945f3..1e3c8f2ff150 100644 --- a/sw/source/core/frmedt/feshview.cxx +++ b/sw/source/core/frmedt/feshview.cxx @@ -567,7 +567,7 @@ bool SwFEShell::MoveAnchor( SwMove nDir ) // re-created. Thus, delete all fly frames except the <this> before the // anchor attribute is change and re-create them afterwards. { - std::unique_ptr<SwHandleAnchorNodeChg, o3tl::default_delete<SwHandleAnchorNodeChg>> pHandleAnchorNodeChg; + std::unique_ptr<SwHandleAnchorNodeChg> pHandleAnchorNodeChg; SwFlyFrameFormat* pFlyFrameFormat( dynamic_cast<SwFlyFrameFormat*>(&rFormat) ); if ( pFlyFrameFormat ) { diff --git a/sw/source/core/layout/atrfrm.cxx b/sw/source/core/layout/atrfrm.cxx index bc77bcf38f14..4791fda80169 100644 --- a/sw/source/core/layout/atrfrm.cxx +++ b/sw/source/core/layout/atrfrm.cxx @@ -3374,7 +3374,7 @@ SwHandleAnchorNodeChg::SwHandleAnchorNodeChg( SwFlyFrameFormat& _rFlyFrameFormat } } -SwHandleAnchorNodeChg::~SwHandleAnchorNodeChg() COVERITY_NOEXCEPT_FALSE +void SwHandleAnchorNodeChg::ImplDestroy() { if ( mbAnchorNodeChanged ) { @@ -3430,6 +3430,11 @@ SwHandleAnchorNodeChg::~SwHandleAnchorNodeChg() COVERITY_NOEXCEPT_FALSE mpWrtShell->Pop(SwCursorShell::PopMode::DeleteCurrent); } +SwHandleAnchorNodeChg::~SwHandleAnchorNodeChg() +{ + suppress_fun_call_w_exception(ImplDestroy()); +} + namespace sw { DrawFrameFormatHint::~DrawFrameFormatHint() {} |