sw/inc/PostItMgr.hxx | 4 ++-- sw/source/uibase/docvw/AnnotationWin2.cxx | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-)
New commits: commit 5bf54247e247dda92b3805e28e3ed9b283958c1a Author: Caolán McNamara <caolan.mcnam...@collabora.com> AuthorDate: Mon Oct 7 10:47:51 2024 +0100 Commit: Caolán McNamara <caolan.mcnam...@collabora.com> CommitDate: Tue Oct 8 11:17:25 2024 +0200 RegisterAnswer is never passed null Change-Id: I3d724c5ea77865de9850a655aaa23c9633b68d22 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/174643 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolan.mcnam...@collabora.com> diff --git a/sw/inc/PostItMgr.hxx b/sw/inc/PostItMgr.hxx index 30ae1296b62f..dec8cec70764 100644 --- a/sw/inc/PostItMgr.hxx +++ b/sw/inc/PostItMgr.hxx @@ -226,9 +226,9 @@ class SAL_DLLPUBLIC_RTTI SwPostItMgr final : public SfxListener, static Color GetColorLight(std::size_t aAuthorIndex); static Color GetColorAnchor(std::size_t aAuthorIndex); - void RegisterAnswer(const OutlinerParaObject* pAnswer) { if (pAnswer) mpAnswer =* pAnswer; else mpAnswer.reset(); } + void RegisterAnswer(const OutlinerParaObject& rAnswer) { mpAnswer = rAnswer; } OutlinerParaObject* IsAnswer() { return mpAnswer ? &*mpAnswer : nullptr; } - void RegisterAnswerText(const OUString& aAnswerText) { maAnswerText = aAnswerText; } + void RegisterAnswerText(const OUString& rAnswerText) { maAnswerText = rAnswerText; } const OUString& GetAnswerText() const { return maAnswerText; } void CheckMetaText(); void UpdateColors(); diff --git a/sw/source/uibase/docvw/AnnotationWin2.cxx b/sw/source/uibase/docvw/AnnotationWin2.cxx index 306e4795a41f..236fc9990fb0 100644 --- a/sw/source/uibase/docvw/AnnotationWin2.cxx +++ b/sw/source/uibase/docvw/AnnotationWin2.cxx @@ -1062,7 +1062,7 @@ void SwAnnotationWin::ExecuteCommand(sal_uInt16 nSlot) if (!mpOutliner->GetEditEngine().GetText().isEmpty()) { OutlinerParaObject aPara(GetOutlinerView()->GetEditView().CreateTextObject()); - mrMgr.RegisterAnswer(&aPara); + mrMgr.RegisterAnswer(aPara); } if (mrMgr.HasActiveSidebarWin()) mrMgr.SetActiveSidebarWin(nullptr);