diff options
author | Michael Meeks <michael.meeks@collabora.com> | 2019-10-28 21:39:14 +0000 |
---|---|---|
committer | Michael Meeks <michael.meeks@collabora.com> | 2019-11-06 01:19:18 +0100 |
commit | 56b11c503cbc4a42b604821a8701408d59a7f744 (patch) | |
tree | ed0713d32334087438df19af5c3b58dd8f4a524c | |
parent | 854caac9191b0d6a32fc1d4c9d110f11e7d1a311 (diff) |
Revert "lok: sc: make hi-dpi/zoom compatible with retrieving cell cursor"
This reverts commit e3ff84aed5be8e0d2780d80b178fa8fc0e388859.
Change-Id: I174dd54cf7b44f12c90c61882814b6dee9be9b7c
Reviewed-on: https://gerrit.libreoffice.org/82089
Reviewed-by: Michael Meeks <michael.meeks@collabora.com>
Tested-by: Michael Meeks <michael.meeks@collabora.com>
-rw-r--r-- | desktop/qa/desktop_lib/test_desktop_lib.cxx | 2 | ||||
-rw-r--r-- | sc/source/ui/view/gridwin.cxx | 7 |
2 files changed, 3 insertions, 6 deletions
diff --git a/desktop/qa/desktop_lib/test_desktop_lib.cxx b/desktop/qa/desktop_lib/test_desktop_lib.cxx index 49a26253b388..8200c7e1c859 100644 --- a/desktop/qa/desktop_lib/test_desktop_lib.cxx +++ b/desktop/qa/desktop_lib/test_desktop_lib.cxx @@ -813,7 +813,7 @@ void DesktopLOKTest::testCellCursor() OString aRectangle(aTree.get<std::string>("commandValues").c_str()); // cell cursor geometry + col + row - CPPUNIT_ASSERT_EQUAL(OString("0, 0, 1274, 254, 0, 0"), aRectangle); + CPPUNIT_ASSERT_EQUAL(OString("0, 0, 1279, 255, 0, 0"), aRectangle); } void DesktopLOKTest::testCommandResult() diff --git a/sc/source/ui/view/gridwin.cxx b/sc/source/ui/view/gridwin.cxx index 8f5324a7cd00..0f72c2954a1b 100644 --- a/sc/source/ui/view/gridwin.cxx +++ b/sc/source/ui/view/gridwin.cxx @@ -5675,7 +5675,7 @@ OString ScGridWindow::getCellCursor( int nOutputWidth, int nOutputHeight, return getCellCursor(zoomX, zoomY); } -OString ScGridWindow::getCellCursor(const Fraction& /*rZoomX*/, const Fraction& /*rZoomY*/) const +OString ScGridWindow::getCellCursor(const Fraction& rZoomX, const Fraction& rZoomY) const { // GridWindow stores a shown cell cursor in mpOOCursors, hence // we can use that to determine whether we would want to be showing @@ -5691,10 +5691,7 @@ OString ScGridWindow::getCellCursor(const Fraction& /*rZoomX*/, const Fraction& Fraction defaultZoomX = pViewData->GetZoomX(); Fraction defaultZoomY = pViewData->GetZoomY(); - // hardcode to what we mean as 100% (256px tiles meaning 3840 twips) - Fraction aFracX(long(256 * TWIPS_PER_PIXEL), 3840); - Fraction aFracY(long(256 * TWIPS_PER_PIXEL), 3840); - pViewData->SetZoom(aFracX, aFracY, true); + pViewData->SetZoom(rZoomX, rZoomY, true); Point aScrPos = pViewData->GetScrPos( nX, nY, eWhich, true ); long nSizeXPix; |