diff --git a/sc/source/ui/inc/gridwin.hxx b/sc/source/ui/inc/gridwin.hxx index a9c33ea6555f..cc30dd92a4ed 100644 --- a/sc/source/ui/inc/gridwin.hxx +++ b/sc/source/ui/inc/gridwin.hxx @@ -38,6 +38,7 @@ namespace sc { struct SpellCheckContext; } +class FmFormView; struct ScTableInfo; class ScDPObject; class ScCheckListMenuWindow; @@ -103,6 +104,10 @@ class ScGridWindow : public vcl::Window, public DropTargetHelper, public DragSou std::unique_ptr mpAutoFillRect; + /// LibreOfficeKit needs a persistent FmFormView for tiled rendering, + /// otherwise the invalidations from drawinglayer do not work. + std::unique_ptr mpLOKDrawView; + struct MouseEventState; /** diff --git a/sc/source/ui/view/gridwin4.cxx b/sc/source/ui/view/gridwin4.cxx index 67b0d76fafcd..150f1f125571 100644 --- a/sc/source/ui/view/gridwin4.cxx +++ b/sc/source/ui/view/gridwin4.cxx @@ -1191,12 +1191,11 @@ void ScGridWindow::PaintTile( VirtualDevice& rDevice, // setup the SdrPage so that drawinglayer works correctly ScDrawLayer* pModel = pDoc->GetDrawLayer(); - std::unique_ptr pDrawView; if (pModel) { - pDrawView.reset(new FmFormView(pModel, &rDevice)); - pDrawView->ShowSdrPage(pDrawView->GetModel()->GetPage(nTab)); - aOutputData.SetDrawView( pDrawView.get() ); + mpLOKDrawView.reset(new FmFormView(pModel, &rDevice)); + mpLOKDrawView->ShowSdrPage(mpLOKDrawView->GetModel()->GetPage(nTab)); + aOutputData.SetDrawView(mpLOKDrawView.get()); } // draw the content