desktop/source/lib/init.cxx |    7 ++++++-
 sfx2/source/view/viewsh.cxx |    1 +
 2 files changed, 7 insertions(+), 1 deletion(-)

New commits:
commit 09b30a80a3b2a58d981b712f8bd184410c222535
Author:     Mert Tumer <mert.tu...@collabora.com>
AuthorDate: Mon Jan 10 13:23:03 2022 +0300
Commit:     Mert Tumer <mert.tu...@collabora.com>
CommitDate: Mon Jan 10 13:13:40 2022 +0100

    lok: Fix freshly added comments are not displayed
    
    Signed-off-by: Mert Tumer <mert.tu...@collabora.com>
    Change-Id: Ice772eff8b9f8ae8c23ec1e66675e33a80492028
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/128217
    Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoff...@gmail.com>
    Reviewed-by: Szymon Kłos <szymon.k...@collabora.com>

diff --git a/desktop/source/lib/init.cxx b/desktop/source/lib/init.cxx
index 1ef25f2c5dc6..545e7182068e 100644
--- a/desktop/source/lib/init.cxx
+++ b/desktop/source/lib/init.cxx
@@ -1585,13 +1585,18 @@ void CallbackFlushHandler::queue(const int type, 
CallbackData& aCallbackData)
     SAL_INFO("lok", "Queue: [" << type << "]: [" << aCallbackData.getPayload() 
<< "] on " << m_queue1.size() << " entries.");
 
     bool bIsChartActive = false;
+    bool bIsComment = false;
     if (type == LOK_CALLBACK_GRAPHIC_SELECTION)
     {
         LokChartHelper aChartHelper(SfxViewShell::Current());
         bIsChartActive = aChartHelper.GetWindow() != nullptr;
     }
+    else if (type == LOK_CALLBACK_COMMENT)
+    {
+        bIsComment = true;
+    }
 
-    if (callbacksDisabled() && !bIsChartActive)
+    if (callbacksDisabled() && !bIsChartActive && !bIsComment)
     {
         // We drop notifications when this is set, except for important ones.
         // When we issue a complex command (such as .uno:InsertAnnotation)
diff --git a/sfx2/source/view/viewsh.cxx b/sfx2/source/view/viewsh.cxx
index d1c0e48ba18e..292f6f4fe096 100644
--- a/sfx2/source/view/viewsh.cxx
+++ b/sfx2/source/view/viewsh.cxx
@@ -1455,6 +1455,7 @@ static bool ignoreLibreOfficeKitViewCallback(int nType, 
const SfxViewShell_Impl*
         {
         case LOK_CALLBACK_FORM_FIELD_BUTTON:
         case LOK_CALLBACK_TEXT_SELECTION:
+        case LOK_CALLBACK_COMMENT:
             break;
         default:
             // Reject e.g. invalidate during paint.

Reply via email to