sw/source/uibase/wrtsh/wrtsh1.cxx |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

New commits:
commit 0cce452b93ce657e4baedb5b1574184b32e950e3
Author:     Darshan-upadhyay1110 <darshan.upadh...@collabora.com>
AuthorDate: Mon Jan 6 15:16:03 2025 +0530
Commit:     Szymon Kłos <szymon.k...@collabora.com>
CommitDate: Tue Jan 7 13:48:48 2025 +0100

    tdf#164374 - Fix Edit comments in navigator creates new comment
    
        - Create new comment on same position for online
        - This will fix the edit comment problem described in Bug 164374
    
    Change-Id: If0aae9ad1e59eae8c7c09c72e8d7b0df5dbb38bf
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/179823
    Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoff...@gmail.com>
    Reviewed-by: Szymon Kłos <szymon.k...@collabora.com>

diff --git a/sw/source/uibase/wrtsh/wrtsh1.cxx 
b/sw/source/uibase/wrtsh/wrtsh1.cxx
index 4e3dd61bbd5b..ab45f8317a66 100644
--- a/sw/source/uibase/wrtsh/wrtsh1.cxx
+++ b/sw/source/uibase/wrtsh/wrtsh1.cxx
@@ -2244,7 +2244,8 @@ void SwWrtShell::SetShowHeaderFooterSeparator( 
FrameControlType eControl, bool b
 void SwWrtShell::InsertPostIt(SwFieldMgr& rFieldMgr, const SfxRequest& rReq)
 {
     SwPostItField* pPostIt = 
dynamic_cast<SwPostItField*>(rFieldMgr.GetCurField());
-
+    bool bNew = !(pPostIt && pPostIt->GetTyp()->Which() == SwFieldIds::Postit);
+    if (bNew || GetView().GetPostItMgr()->IsAnswer() || 
comphelper::LibreOfficeKit::isActive())
     {
         const SvxPostItAuthorItem* pAuthorItem = 
rReq.GetArg<SvxPostItAuthorItem>(SID_ATTR_POSTIT_AUTHOR);
         OUString sAuthor;

Reply via email to