summaryrefslogtreecommitdiff
path: root/sc
diff options
context:
space:
mode:
authorTor Lillqvist <tml@collabora.com>2018-11-23 17:36:33 +0200
committerTor Lillqvist <tml@collabora.com>2018-11-23 17:48:20 +0200
commit3ace447b0fe1926945f739479a7be39276e81fb5 (patch)
tree27a32645bf4c4587e70e2f8f4676dcd60148f128 /sc
parentc9b0766aee1f13c07c1f3decbc2e8b0388e5f8e5 (diff)
Use the correct DPI scaling factor in LibreOfficeKit for iOS, too
Fixes the rendering of spreadsheets in the iOS app. (The cell area was rendered at half the scale of the row and column headers.) Actual code change only in desktop/source/lib/init.cxx, but update related comments elsewhere to mention CoreGraphics, too, and not just cairo. Change-Id: Ife99c6a2d58e592cfea3b4ed1ab09c19fba77e72
Diffstat (limited to 'sc')
-rw-r--r--sc/source/ui/view/gridwin4.cxx12
1 files changed, 6 insertions, 6 deletions
diff --git a/sc/source/ui/view/gridwin4.cxx b/sc/source/ui/view/gridwin4.cxx
index 1ed36c4ed414..99329375b2c2 100644
--- a/sc/source/ui/view/gridwin4.cxx
+++ b/sc/source/ui/view/gridwin4.cxx
@@ -1112,10 +1112,10 @@ void ScGridWindow::PaintTile( VirtualDevice& rDevice,
// not care about any zoom settings.
//
// But until that happens, we actually draw everything at 100%, and only
- // set cairo's scale factor accordingly, so that everything is painted
- // bigger or smaller. This is different to what Calc's internal scaling
- // would do - because that one is trying to fit the lines between cells to
- // integer multiples of pixels.
+ // set cairo's or CoreGraphic's scale factor accordingly, so that everything
+ // is painted bigger or smaller. This is different to what Calc's internal
+ // scaling would do - because that one is trying to fit the lines between
+ // cells to integer multiples of pixels.
//
// See also desktop/source/lib/init.cxx for details, where we have to set
// the stuff accordingly for the VirtualDevice creation.
@@ -1126,8 +1126,8 @@ void ScGridWindow::PaintTile( VirtualDevice& rDevice,
Fraction aFracY(long(256 * TWIPS_PER_PIXEL), 3840);
pViewData->SetZoom(aFracX, aFracY, true);
- // Cairo scales for us, we have to compensate for that, otherwise we are
- // painting too far away
+ // Cairo or CoreGraphics scales for us, we have to compensate for that,
+ // otherwise we are painting too far away
const double fDPIScale = comphelper::LibreOfficeKit::getDPIScale();
const double fTilePosXPixel = static_cast<double>(nTilePosX) * nOutputWidth / (nTileWidth * fDPIScale);