[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-5.1' - sc/source
Marco Cecchetti
marco.cecchetti at collabora.com
Thu Oct 20 11:40:08 UTC 2016
sc/source/ui/view/gridwin4.cxx | 14 ++++++++++++++
1 file changed, 14 insertions(+)
New commits:
commit 02bf72f7513aa4e28e2d544a34a8c8b3465b9e39
Author: Marco Cecchetti <marco.cecchetti at collabora.com>
Date: Wed Oct 19 21:57:18 2016 +0200
LOK: Calc: notes: when edit mode begins the text content is misplaced
Change-Id: Ia8efcee6fbeb75dd712d3ac480e355c2972875f3
Reviewed-on: https://gerrit.libreoffice.org/30092
Reviewed-by: Marco Cecchetti <mrcekets at gmail.com>
Tested-by: Marco Cecchetti <mrcekets at gmail.com>
diff --git a/sc/source/ui/view/gridwin4.cxx b/sc/source/ui/view/gridwin4.cxx
index bc35620..e9b9e67 100644
--- a/sc/source/ui/view/gridwin4.cxx
+++ b/sc/source/ui/view/gridwin4.cxx
@@ -890,6 +890,20 @@ void ScGridWindow::DrawContent(OutputDevice &rDevice, const ScTableInfo& rTableI
{
MapMode aCurrentMapMode(pContentDev->GetMapMode());
pContentDev->SetMapMode(aDrawMode);
+
+ if (bIsTiledRendering)
+ {
+ auto aOrigin = aOriginalMode.GetOrigin();
+ aOrigin.setX(aOrigin.getX() / TWIPS_PER_PIXEL + aOutputData.nScrX);
+ aOrigin.setY(aOrigin.getY() / TWIPS_PER_PIXEL + aOutputData.nScrY);
+ static const double twipFactor = 15 * 1.76388889; // 26.45833335
+ aOrigin = Point(aOrigin.getX() * twipFactor,
+ aOrigin.getY() * twipFactor);
+ MapMode aNew = rDevice.GetMapMode();
+ aNew.SetOrigin(aOrigin);
+ rDevice.SetMapMode(aNew);
+ }
+
SdrView* pDrawView = pTabViewShell->GetSdrView();
if(pDrawView)
More information about the Libreoffice-commits
mailing list