[Libreoffice-commits] core.git: 2 commits - sc/source
Marco Cecchetti
marco.cecchetti at collabora.com
Fri Feb 3 14:24:12 UTC 2017
sc/source/core/data/global.cxx | 6 +++---
sc/source/ui/view/gridwin.cxx | 5 +++--
2 files changed, 6 insertions(+), 5 deletions(-)
New commits:
commit f7962f59ea0b2a8f7c2d6c015e1c02855e1008fe
Author: Marco Cecchetti <marco.cecchetti at collabora.com>
Date: Thu Feb 2 20:07:55 2017 +0100
sc rowlimit: Make the cursor better fit the rendering.
Change-Id: If4d02161bd8a37100d7403c05ea0840a3d2d0cf8
diff --git a/sc/source/ui/view/gridwin.cxx b/sc/source/ui/view/gridwin.cxx
index 3ac3af0..278aa5d 100644
--- a/sc/source/ui/view/gridwin.cxx
+++ b/sc/source/ui/view/gridwin.cxx
@@ -5721,8 +5721,9 @@ OString ScGridWindow::getCellCursor(const Fraction& rZoomX, const Fraction& rZoo
double fPPTX = pViewData->GetPPTX();
double fPPTY = pViewData->GetPPTY();
- Rectangle aRect(Point(aScrPos.getX() / fPPTX, aScrPos.getY() / fPPTY),
- Size(nSizeXPix / fPPTX, nSizeYPix / fPPTY));
+
+ Rectangle aRect(Point(rtl::math::round(aScrPos.getX() / fPPTX), rtl::math::round(aScrPos.getY() / fPPTY)),
+ Size(rtl::math::round(nSizeXPix / fPPTX), rtl::math::round(nSizeYPix / fPPTY)));
pViewData->SetZoom(defaultZoomX, defaultZoomY, true);
commit 27ca6387b7188d1805dda8906d809025a2d3fb95
Author: Jan Holesovsky <kendy at collabora.com>
Date: Thu Feb 2 19:53:16 2017 +0100
sc tiled rendering: We keep increasing the precision here...
... so let's finally do it right, and count in double precision directly.
Change-Id: Ic49cc42d9e61a1b9fa9853bfe93d2681a6be88b2
diff --git a/sc/source/core/data/global.cxx b/sc/source/core/data/global.cxx
index 3b5e848..0e175d1 100644
--- a/sc/source/core/data/global.cxx
+++ b/sc/source/core/data/global.cxx
@@ -519,9 +519,9 @@ void ScGlobal::Init()
void ScGlobal::InitPPT()
{
OutputDevice* pDev = Application::GetDefaultDevice();
- Point aPix1000 = pDev->LogicToPixel( Point(100000,100000), MapUnit::MapTwip );
- nScreenPPTX = aPix1000.X() / 100000.0;
- nScreenPPTY = aPix1000.Y() / 100000.0;
+
+ nScreenPPTX = double(pDev->GetDPIX()) / double(TWIPS_PER_INCH);
+ nScreenPPTY = double(pDev->GetDPIY()) / double(TWIPS_PER_INCH);
}
const OUString& ScGlobal::GetClipDocName()
More information about the Libreoffice-commits
mailing list