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 6c6bb1d434d5c0be2f71470483f3ce56f5210e01 Author: Paris Oplopoios <paris.oplopo...@collabora.com> AuthorDate: Thu Jul 20 19:49:10 2023 +0300 Commit: Paris Oplopoios <parisop...@gmail.com> CommitDate: Sat Jul 22 01:26:20 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> diff --git a/sc/source/ui/view/tabvwsh4.cxx b/sc/source/ui/view/tabvwsh4.cxx index c0a8ae702257..071017d5da43 100644 --- a/sc/source/ui/view/tabvwsh4.cxx +++ b/sc/source/ui/view/tabvwsh4.cxx @@ -1805,6 +1805,12 @@ ScTabViewShell::ScTabViewShell( SfxViewFrame* pViewFrame, 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 2716bd489ab1..55842c90bdf1 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 aff4bb710ade..94d97d8cb07a 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> @@ -1091,6 +1093,12 @@ SwView::SwView( SfxViewFrame *_pFrame, SfxViewShell* pOldSh ) m_pWrtShell->InvalidateOutlineContentVisibility(); GetViewFrame()->GetWindow().AddChildEventListener( LINK( this, SwView, WindowChildEventListener ) ); + + if (comphelper::LibreOfficeKit::isActive()) + { + SwXTextDocument* pModel = comphelper::getFromUnoTunnel<SwXTextDocument>(GetCurrentDocument()); + SfxLokHelper::notifyViewRenderState(this, pModel); + } } SwViewGlueDocShell::SwViewGlueDocShell(SwView& rView, SwDocShell& rDocSh)