sc lok: Make the FmFormView we need for drawinglayer persistent.

Based on Marco Cecchetti's research - thanks! :-)

Change-Id: I579b6c8e54311a679f5d684f7ca1e2d7373d0ec9
This commit is contained in:
Jan Holesovsky
2017-03-31 17:47:46 +02:00
parent 12e88e3b28
commit 3b65c16604
2 changed files with 8 additions and 4 deletions

View File

@@ -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;
/**

View File

@@ -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