sc/source/ui/view/tabvwsh4.cxx   |    6 ++++++
 sd/source/ui/view/drviewsa.cxx   |   10 ++++++++++
 sw/source/uibase/uiview/view.cxx |    8 ++++++++
 3 files changed, 24 insertions(+)

New commits:
commit e99936639379acfe7949b6b77d3b401990f50dde
Author:     Paris Oplopoios <paris.oplopo...@collabora.com>
AuthorDate: Thu Jul 20 19:49:10 2023 +0300
Commit:     Caolán McNamara <caolan.mcnam...@collabora.com>
CommitDate: Mon Oct 16 20:12:39 2023 +0200

    Execute notifyViewRenderState on view constructor
    
    notifyViewRenderState should be executed as soon as a view is created in
    order to give a view id to the client
    
    Change-Id: I31b7e61599f546bd5ec134775e6235633a6526f3
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/154681
    Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoff...@gmail.com>
    Reviewed-by: Paris Oplopoios <parisop...@gmail.com>
    (cherry picked from commit 6c6bb1d434d5c0be2f71470483f3ce56f5210e01)
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/154709
    Tested-by: Jenkins
    Tested-by: Caolán McNamara <caolan.mcnam...@collabora.com>
    Reviewed-by: Caolán McNamara <caolan.mcnam...@collabora.com>

diff --git a/sc/source/ui/view/tabvwsh4.cxx b/sc/source/ui/view/tabvwsh4.cxx
index d82c7e15c11c..c5fe69007fcc 100644
--- a/sc/source/ui/view/tabvwsh4.cxx
+++ b/sc/source/ui/view/tabvwsh4.cxx
@@ -1802,6 +1802,12 @@ ScTabViewShell::ScTabViewShell( SfxViewFrame& rViewFrame,
             pInputHdl->SetMode(SC_INPUT_NONE);
         }
     }
+
+    if (comphelper::LibreOfficeKit::isActive())
+    {
+        ScModelObj* pModel = 
comphelper::getFromUnoTunnel<ScModelObj>(GetCurrentDocument());
+        SfxLokHelper::notifyViewRenderState(this, pModel);
+    }
 }
 
 ScTabViewShell::~ScTabViewShell()
diff --git a/sd/source/ui/view/drviewsa.cxx b/sd/source/ui/view/drviewsa.cxx
index 2868c38d6c90..9bc5c0030f76 100644
--- a/sd/source/ui/view/drviewsa.cxx
+++ b/sd/source/ui/view/drviewsa.cxx
@@ -25,6 +25,7 @@
 #include <svx/svdlayer.hxx>
 #include <svx/svdograf.hxx>
 #include <sfx2/zoomitem.hxx>
+#include <sfx2/lokhelper.hxx>
 #include <svx/svdpagv.hxx>
 #include <svl/ptitem.hxx>
 #include <svl/stritem.hxx>
@@ -64,7 +65,10 @@
 #include <slideshow.hxx>
 #include <annotationmanager.hxx>
 #include <DrawController.hxx>
+#include <unomodel.hxx>
 #include <comphelper/diagnose_ex.hxx>
+#include <comphelper/lok.hxx>
+#include <comphelper/servicehelper.hxx>
 #include <LayerTabBar.hxx>
 
 #include <memory>
@@ -130,6 +134,12 @@ DrawViewShell::DrawViewShell( ViewShellBase& 
rViewShellBase, vcl::Window* pParen
     ConfigureAppBackgroundColor();
     SD_MOD()->GetColorConfig().AddListener(this);
     maViewOptions.mnDocBackgroundColor = 
SD_MOD()->GetColorConfig().GetColorValue(svtools::DOCCOLOR).nColor;
+
+    if (comphelper::LibreOfficeKit::isActive())
+    {
+        SdXImpressDocument* pModel = 
comphelper::getFromUnoTunnel<SdXImpressDocument>(rViewShellBase.GetCurrentDocument());
+        SfxLokHelper::notifyViewRenderState(&rViewShellBase, pModel);
+    }
 }
 
 DrawViewShell::~DrawViewShell()
diff --git a/sw/source/uibase/uiview/view.cxx b/sw/source/uibase/uiview/view.cxx
index 85138778bf65..3bad54a839b8 100644
--- a/sw/source/uibase/uiview/view.cxx
+++ b/sw/source/uibase/uiview/view.cxx
@@ -87,6 +87,7 @@
 #include <pview.hxx>
 #include <swdtflvr.hxx>
 #include <prtopt.hxx>
+#include <unotxdoc.hxx>
 #include <com/sun/star/frame/FrameSearchFlag.hpp>
 #include <com/sun/star/frame/XLayoutManager.hpp>
 #include <com/sun/star/scanner/ScannerContext.hpp>
@@ -106,6 +107,7 @@
 #include <com/sun/star/document/XDocumentPropertiesSupplier.hpp>
 
 #include <comphelper/propertyvalue.hxx>
+#include <comphelper/servicehelper.hxx>
 #include <sfx2/lokhelper.hxx>
 #include <LibreOfficeKit/LibreOfficeKitEnums.h>
 #include <svtools/embedhlp.hxx>
@@ -1113,6 +1115,12 @@ SwView::SwView(SfxViewFrame& _rFrame, SfxViewShell* 
pOldSh)
     m_aBringToAttentionBlinkTimer.SetInvokeHandler(
                 LINK(this, SwView, BringToAttentionBlinkTimerHdl));
     m_aBringToAttentionBlinkTimer.SetTimeout(350);
+
+    if (comphelper::LibreOfficeKit::isActive())
+    {
+        SwXTextDocument* pModel = 
comphelper::getFromUnoTunnel<SwXTextDocument>(GetCurrentDocument());
+        SfxLokHelper::notifyViewRenderState(this, pModel);
+    }
 }
 
 SwViewGlueDocShell::SwViewGlueDocShell(SwView& rView, SwDocShell& rDocSh)

Reply via email to