summaryrefslogtreecommitdiff
path: root/sc/source/ui/view/gridwin3.cxx
diff options
context:
space:
mode:
authorJan Holesovsky <kendy@collabora.com>2015-04-02 13:13:33 +0200
committerMiklos Vajna <vmiklos@collabora.co.uk>2015-04-07 09:18:12 +0200
commita1605d6860e3c4510177c42ab6d2fda569506f57 (patch)
treee45334352be7189c49b1533266e6aa66de533a5b /sc/source/ui/view/gridwin3.cxx
parent03ee2793543d7db25847c5263d88b0eb0d7e8f28 (diff)
sc tiled editing: Use the LogicMapMode even for mouse positions.
Instead of using whatever MapMode value that was used the last time for rendering the tile, set it to something predictable when counting the mouse clicks (100% zoom), and use the value consistently in Calc via GetDrawMapMode(). This fixes clicking the shapes in various zoom levels. Change-Id: Idf83b560f57baab4dc79c45b2ff7c3d75653e102
Diffstat (limited to 'sc/source/ui/view/gridwin3.cxx')
-rw-r--r--sc/source/ui/view/gridwin3.cxx10
1 files changed, 10 insertions, 0 deletions
diff --git a/sc/source/ui/view/gridwin3.cxx b/sc/source/ui/view/gridwin3.cxx
index 9b87a7b2ea09..be017e378e92 100644
--- a/sc/source/ui/view/gridwin3.cxx
+++ b/sc/source/ui/view/gridwin3.cxx
@@ -238,6 +238,16 @@ void ScGridWindow::DrawSdrGrid( const Rectangle& rDrawingRect, OutputDevice* pCo
MapMode ScGridWindow::GetDrawMapMode( bool bForce )
{
ScDocument* pDoc = pViewData->GetDocument();
+
+ // FIXME this shouldn't be necessary once we change the entire Calc to
+ // work in the logic coordinates (ideally 100ths of mm - so that it is
+ // the same as editeng and drawinglayer), and get rid of all the
+ // SetMapMode's and other unneccessary fun we have with pixels
+ if (pDoc->GetDrawLayer()->isTiledRendering())
+ {
+ return pViewData->GetLogicMode();
+ }
+
SCTAB nTab = pViewData->GetTabNo();
bool bNegativePage = pDoc->IsNegativePage( nTab );