sw/inc/AnnotationWin.hxx | 2 +- sw/source/uibase/docvw/AnnotationWin.cxx | 16 ++++++++-------- sw/source/uibase/docvw/AnnotationWin2.cxx | 8 ++++---- 3 files changed, 13 insertions(+), 13 deletions(-)
New commits: commit b4f5dc552ae8fefa9fee0381399696e2c68bdec0 Author: Caolán McNamara <caol...@redhat.com> AuthorDate: Thu Dec 9 17:24:37 2021 +0000 Commit: Caolán McNamara <caol...@redhat.com> CommitDate: Fri Dec 10 10:02:00 2021 +0100 rename SwAnnotationWin::mnEventId to SwAnnotationWin::mnDeleteEventId because its solely used to track if an event was posted to delete the annotation Change-Id: I7c6458475e967b8f313f1a770946c0db65561434 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/126624 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caol...@redhat.com> diff --git a/sw/inc/AnnotationWin.hxx b/sw/inc/AnnotationWin.hxx index 5fde0c3b76fd..bc5a4293b33d 100644 --- a/sw/inc/AnnotationWin.hxx +++ b/sw/inc/AnnotationWin.hxx @@ -229,7 +229,7 @@ class SAL_DLLPUBLIC_RTTI SwAnnotationWin final : public InterimItemWindow SwPostItMgr& mrMgr; SwView& mrView; - ImplSVEvent * mnEventId; + ImplSVEvent* mnDeleteEventId; std::unique_ptr<OutlinerView> mpOutlinerView; std::unique_ptr<Outliner> mpOutliner; diff --git a/sw/source/uibase/docvw/AnnotationWin.cxx b/sw/source/uibase/docvw/AnnotationWin.cxx index 84d7e47cfb31..c41b7a2136a8 100644 --- a/sw/source/uibase/docvw/AnnotationWin.cxx +++ b/sw/source/uibase/docvw/AnnotationWin.cxx @@ -91,7 +91,7 @@ SwAnnotationWin::SwAnnotationWin( SwEditWin& rEditWin, : InterimItemWindow(&rEditWin, "modules/swriter/ui/annotation.ui", "Annotation") , mrMgr(aMgr) , mrView(rEditWin.GetView()) - , mnEventId(nullptr) + , mnDeleteEventId(nullptr) , meSidebarPosition(sw::sidebarwindows::SidebarPosition::NONE) , mPageBorder(0) , mbAnchorRectChanged(false) @@ -152,8 +152,8 @@ void SwAnnotationWin::dispose() mxMenuButton.reset(); - if (mnEventId) - Application::RemoveUserEvent( mnEventId ); + if (mnDeleteEventId) + Application::RemoveUserEvent(mnDeleteEventId); mpOutliner.reset(); mpOutlinerView.reset(); @@ -240,11 +240,11 @@ void SwAnnotationWin::DeleteThread() while(next && next->GetTopReplyNote() == topNote) { - current->mnEventId = Application::PostUserEvent( LINK( current, SwAnnotationWin, DeleteHdl), nullptr, true ); + current->mnDeleteEventId = Application::PostUserEvent( LINK( current, SwAnnotationWin, DeleteHdl), nullptr, true ); current = next; next = mrMgr.GetNextPostIt(KEY_PAGEDOWN, current); } - current->mnEventId = Application::PostUserEvent( LINK( current, SwAnnotationWin, DeleteHdl), nullptr, true ); + current->mnDeleteEventId = Application::PostUserEvent( LINK( current, SwAnnotationWin, DeleteHdl), nullptr, true ); } bool SwAnnotationWin::IsResolved() const @@ -318,10 +318,10 @@ void SwAnnotationWin::Delete() { mrMgr.SetActiveSidebarWin(nullptr); // if the note is empty, the previous line will send a delete event, but we are already there - if (mnEventId) + if (mnDeleteEventId) { - Application::RemoveUserEvent( mnEventId ); - mnEventId = nullptr; + Application::RemoveUserEvent(mnDeleteEventId); + mnDeleteEventId = nullptr; } } // we delete the field directly, the Mgr cleans up the PostIt by listening diff --git a/sw/source/uibase/docvw/AnnotationWin2.cxx b/sw/source/uibase/docvw/AnnotationWin2.cxx index 6cb5511a02fa..30e391182118 100644 --- a/sw/source/uibase/docvw/AnnotationWin2.cxx +++ b/sw/source/uibase/docvw/AnnotationWin2.cxx @@ -1043,9 +1043,9 @@ void SwAnnotationWin::DeactivatePostIt() if ( !Application::GetSettings().GetStyleSettings().GetHighContrastMode() ) GetOutlinerView()->SetBackgroundColor(COL_TRANSPARENT); - if (!mnEventId && !IsProtected() && mpOutliner->GetEditEngine().GetText().isEmpty()) + if (!mnDeleteEventId && !IsProtected() && mpOutliner->GetEditEngine().GetText().isEmpty()) { - mnEventId = Application::PostUserEvent( LINK( this, SwAnnotationWin, DeleteHdl), nullptr, true ); + mnDeleteEventId = Application::PostUserEvent( LINK( this, SwAnnotationWin, DeleteHdl), nullptr, true ); } } @@ -1088,7 +1088,7 @@ void SwAnnotationWin::ExecuteCommand(sal_uInt16 nSlot) } case FN_DELETE_COMMENT: //Delete(); // do not kill the parent of our open popup menu - mnEventId = Application::PostUserEvent( LINK( this, SwAnnotationWin, DeleteHdl), nullptr, true ); + mnDeleteEventId = Application::PostUserEvent( LINK( this, SwAnnotationWin, DeleteHdl), nullptr, true ); break; case FN_DELETE_COMMENT_THREAD: DeleteThread(); @@ -1207,7 +1207,7 @@ IMPL_LINK_NOARG(SwAnnotationWin, ModifyHdl, LinkParamNone*, void) IMPL_LINK_NOARG(SwAnnotationWin, DeleteHdl, void*, void) { - mnEventId = nullptr; + mnDeleteEventId = nullptr; Delete(); }