[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-6.2' - sc/source
Marco Cecchetti (via logerrit)
logerrit at kemper.freedesktop.org
Tue Dec 10 12:35:10 UTC 2019
sc/source/ui/view/gridwin4.cxx | 11 +++++++----
1 file changed, 7 insertions(+), 4 deletions(-)
New commits:
commit c107d0215142934e270b794da66dc1a467818c56
Author: Marco Cecchetti <marco.cecchetti at collabora.com>
AuthorDate: Tue Dec 10 10:57:32 2019 +0100
Commit: Marco Cecchetti <marco.cecchetti at collabora.com>
CommitDate: Tue Dec 10 13:34:13 2019 +0100
lok: calc: zoomed text entry not rendered
Change-Id: I829966d81bd68571a0651feb458a817587e4d88e
diff --git a/sc/source/ui/view/gridwin4.cxx b/sc/source/ui/view/gridwin4.cxx
index 91b5415b9510..66a261931216 100644
--- a/sc/source/ui/view/gridwin4.cxx
+++ b/sc/source/ui/view/gridwin4.cxx
@@ -947,8 +947,10 @@ void ScGridWindow::DrawContent(OutputDevice &rDevice, const ScTableInfo& rTableI
rDevice.SetMapMode(aDrawMode);
static const double twipFactor = 15 * 1.76388889; // 26.45833335
- aOrigin = Point(aOrigin.getX() * twipFactor,
- aOrigin.getY() * twipFactor);
+ // keep into account the zoom factor
+ aOrigin = Point((aOrigin.getX() * twipFactor) / (double)(aDrawMode.GetScaleX()),
+ (aOrigin.getY() * twipFactor) / (double)(aDrawMode.GetScaleY()));
+
MapMode aNew = rDevice.GetMapMode();
aNew.SetOrigin(aOrigin);
rDevice.SetMapMode(aNew);
@@ -1019,8 +1021,9 @@ void ScGridWindow::DrawContent(OutputDevice &rDevice, const ScTableInfo& rTableI
aOrigin.setX(aOrigin.getX() / TWIPS_PER_PIXEL + nScrX);
aOrigin.setY(aOrigin.getY() / TWIPS_PER_PIXEL + nScrY);
static const double twipFactor = 15 * 1.76388889; // 26.45833335
- aOrigin = Point(aOrigin.getX() * twipFactor,
- aOrigin.getY() * twipFactor);
+ // keep into account the zoom factor
+ aOrigin = Point((aOrigin.getX() * twipFactor) / (double)(aDrawMode.GetScaleX()),
+ (aOrigin.getY() * twipFactor) / (double)(aDrawMode.GetScaleY()));
MapMode aNew = rDevice.GetMapMode();
aNew.SetOrigin(aOrigin);
rDevice.SetMapMode(aNew);
More information about the Libreoffice-commits
mailing list