[Libreoffice-commits] core.git: Branch 'feature/tiled-editing' - sc/source

Henry Castro hcastro at collabora.com
Mon Mar 23 11:11:42 PDT 2015


 sc/source/ui/unoobj/docuno.cxx |    5 +++++
 1 file changed, 5 insertions(+)

New commits:
commit ff8c13a5a0821ef19688773ad202fd7942646e1e
Author: Henry Castro <hcastro at collabora.com>
Date:   Sun Mar 22 20:13:29 2015 -0400

    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

diff --git a/sc/source/ui/unoobj/docuno.cxx b/sc/source/ui/unoobj/docuno.cxx
index b9e2bf4..44e47b0 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 );
 }


More information about the Libreoffice-commits mailing list