sw/inc/PostItMgr.hxx | 4 ++-- sw/source/uibase/docvw/AnnotationWin2.cxx | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-)
New commits: commit 777afd5bd97ecd145d316ea11a062b0f09958629 Author: Caolán McNamara <caolan.mcnam...@collabora.com> AuthorDate: Mon Oct 7 10:47:51 2024 +0100 Commit: Miklos Vajna <vmik...@collabora.com> CommitDate: Mon Oct 7 13:28:56 2024 +0200 RegisterAnswer is never passed null Change-Id: I3d724c5ea77865de9850a655aaa23c9633b68d22 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/174589 Reviewed-by: Miklos Vajna <vmik...@collabora.com> Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoff...@gmail.com> diff --git a/sw/inc/PostItMgr.hxx b/sw/inc/PostItMgr.hxx index 535ae5f05165..823fdb375383 100644 --- a/sw/inc/PostItMgr.hxx +++ b/sw/inc/PostItMgr.hxx @@ -260,9 +260,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(); diff --git a/sw/source/uibase/docvw/AnnotationWin2.cxx b/sw/source/uibase/docvw/AnnotationWin2.cxx index e1feb6bda484..d4d53ef6aefc 100644 --- a/sw/source/uibase/docvw/AnnotationWin2.cxx +++ b/sw/source/uibase/docvw/AnnotationWin2.cxx @@ -1055,7 +1055,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);