summaryrefslogtreecommitdiff
path: root/sc
diff options
context:
space:
mode:
authorHenry Castro <hcastro@collabora.com>2015-03-22 20:13:29 -0400
committerMiklos Vajna <vmiklos@collabora.co.uk>2015-03-30 09:23:41 +0200
commit0e3fc4ae7e532c670ce723433984a971ca0a5804 (patch)
tree74c3e61c5bb5b94bc966ae31916418273a8391b8 /sc
parentfc3896a1c4bfc6b8f15bc4b6fc21dfdfd41805c2 (diff)
sc tiled editing: Set the viewport size to document size
When clicking out of range of viewport, the cursor position and edit in place view get wrong values. Change-Id: I210705c9f8909598d8d47c15c14c06f96bfc4caa
Diffstat (limited to 'sc')
-rw-r--r--sc/source/ui/unoobj/docuno.cxx5
1 files changed, 5 insertions, 0 deletions
diff --git a/sc/source/ui/unoobj/docuno.cxx b/sc/source/ui/unoobj/docuno.cxx
index 75300bd3a02d..bac3479fcd6f 100644
--- a/sc/source/ui/unoobj/docuno.cxx
+++ b/sc/source/ui/unoobj/docuno.cxx
@@ -469,6 +469,11 @@ void ScModelObj::paintTile( VirtualDevice& rDevice,
ScViewData* pViewData = ScDocShell::GetViewData();
ScGridWindow* pGridWindow = pViewData->GetActiveWin();
+ // Set the viewport size to document size
+ const MapMode aMapTwip( MAP_TWIP );
+ Size aDocSize = getDocumentSize();
+ pGridWindow->SetOutputSizePixel( pGridWindow->LogicToPixel(aDocSize, aMapTwip) );
+
pGridWindow->PaintTile( rDevice, nOutputWidth, nOutputHeight,
nTilePosX, nTilePosY, nTileWidth, nTileHeight );
}