From ba5a9132375bcfedebd7c3d2500006161800da3b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tam=C3=A1s=20Zolnai?= Date: Sat, 27 May 2017 22:15:52 +0200 Subject: [PATCH] tdf#107389: Wrong positioning of AutoFilter buttons in tiledrendering mode MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Must be a regression from this commit: 9113f17e65b1dafbc178fd269e2967c1e2632f0e Where the offset's and origin's meaning were changed, but not all code path was updated accordingly. Change-Id: Ib519303d5ca5ac7f13e74944e8147ea3220d7684 Reviewed-on: https://gerrit.libreoffice.org/38102 Tested-by: Jenkins Reviewed-by: Tamás Zolnai --- sc/source/ui/view/gridwin4.cxx | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/sc/source/ui/view/gridwin4.cxx b/sc/source/ui/view/gridwin4.cxx index 8f5159b197425..74151217831c0 100644 --- a/sc/source/ui/view/gridwin4.cxx +++ b/sc/source/ui/view/gridwin4.cxx @@ -758,7 +758,10 @@ void ScGridWindow::DrawContent(OutputDevice &rDevice, const ScTableInfo& rTableI { // Tiled offset nScrX, nScrY MapMode aMap( MapUnit::MapPixel ); - aMap.SetOrigin(Point(nScrX, nScrY)); + Point aOrigin = aOriginalMode.GetOrigin(); + aOrigin.setX(aOrigin.getX() / TWIPS_PER_PIXEL + nScrX); + aOrigin.setY(aOrigin.getY() / TWIPS_PER_PIXEL + nScrY); + aMap.SetOrigin(aOrigin); pContentDev->SetMapMode(aMap); } else