diff options
author | Jan Holesovsky <kendy@collabora.com> | 2017-03-31 17:47:46 +0200 |
---|---|---|
committer | Jan Holesovsky <kendy@collabora.com> | 2017-03-31 19:22:53 +0200 |
commit | 3b65c1660427e66642f63f24ba35c85c48c7a08c (patch) | |
tree | 817888b3be8fc337b1d0a39698a7a2126cf91b42 | |
parent | 12e88e3b28fd47c00c87583999053db6ad8660be (diff) |
sc lok: Make the FmFormView we need for drawinglayer persistent.
Based on Marco Cecchetti's research - thanks! :-)
Change-Id: I579b6c8e54311a679f5d684f7ca1e2d7373d0ec9
-rw-r--r-- | sc/source/ui/inc/gridwin.hxx | 5 | ||||
-rw-r--r-- | 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<tools::Rectangle> mpAutoFillRect; + /// LibreOfficeKit needs a persistent FmFormView for tiled rendering, + /// otherwise the invalidations from drawinglayer do not work. + std::unique_ptr<FmFormView> 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<FmFormView> 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 |