From 3b65c1660427e66642f63f24ba35c85c48c7a08c Mon Sep 17 00:00:00 2001 From: Jan Holesovsky Date: Fri, 31 Mar 2017 17:47:46 +0200 Subject: [PATCH] sc lok: Make the FmFormView we need for drawinglayer persistent. Based on Marco Cecchetti's research - thanks! :-) Change-Id: I579b6c8e54311a679f5d684f7ca1e2d7373d0ec9 --- sc/source/ui/inc/gridwin.hxx | 5 +++++ sc/source/ui/view/gridwin4.cxx | 7 +++---- 2 files changed, 8 insertions(+), 4 deletions(-) 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