summaryrefslogtreecommitdiff
path: root/sc
diff options
context:
space:
mode:
authorJan Holesovsky <kendy@collabora.com>2015-04-07 16:45:46 +0200
committerJan Holesovsky <kendy@collabora.com>2015-04-08 00:04:06 +0200
commit25d3fd0b729423251b242b22e6a324983f0c6b39 (patch)
tree73288ed6c03058cf66880eea87c35fbced583d1e /sc
parentc5bd865ac6e6d7fe1a26b2db3269d60c3c7b4ba4 (diff)
sc tiled editing: Better setup of drawinglayer, so that images are swapped in.
Change-Id: I6f28ab1e4af91b12005ddfb9e64e984c783081ff
Diffstat (limited to 'sc')
-rw-r--r--sc/source/ui/view/gridwin4.cxx15
1 files changed, 9 insertions, 6 deletions
diff --git a/sc/source/ui/view/gridwin4.cxx b/sc/source/ui/view/gridwin4.cxx
index 269d12ee17f5..a14c04e447ac 100644
--- a/sc/source/ui/view/gridwin4.cxx
+++ b/sc/source/ui/view/gridwin4.cxx
@@ -971,15 +971,18 @@ void ScGridWindow::PaintTile( VirtualDevice& rDevice,
-fTilePosXPixel, -fTilePosYPixel, nStartCol, nStartRow, nEndCol, nEndRow,
fPPTX, fPPTY);
- // create a temporary SdrPaintWindow to avoid warnings
- SdrPaintWindow aTemporaryPaintWindow(*pViewData->GetScDrawView(), rDevice);
- SdrPageView* pSdrPageView = pViewData->GetScDrawView()->GetSdrPageView();
- pSdrPageView->AddPaintWindowToPageView(aTemporaryPaintWindow);
+ // setup the SdrPage so that drawinglayer works correctly
+ ScDrawLayer* pModel = pDoc->GetDrawLayer();
+ boost::scoped_ptr<FmFormView> pDrawView;
+ if (pModel)
+ {
+ pDrawView.reset(new FmFormView(pModel, &rDevice));
+ pDrawView->ShowSdrPage(pDrawView->GetModel()->GetPage(nTab));
+ aOutputData.SetDrawView( pDrawView.get() );
+ }
// draw the content
DrawContent(rDevice, aTabInfo, aOutputData, true, SC_UPDATE_ALL);
-
- pSdrPageView->RemovePaintWindowFromPageView(aTemporaryPaintWindow);
}
void ScGridWindow::LogicInvalidate(const Rectangle* pRectangle)