sc/source/ui/view/gridwin4.cxx |   12 ++++--------
 1 file changed, 4 insertions(+), 8 deletions(-)

New commits:
commit 25245dba23def7391f3c0c82f7e804674a89a876
Author:     Szymon Kłos <szymon.k...@collabora.com>
AuthorDate: Thu Nov 10 21:27:36 2022 +0100
Commit:     Szymon Kłos <szymon.k...@collabora.com>
CommitDate: Tue Nov 22 12:44:06 2022 +0100

    Revert "lok: respect zoom in calc tile rendering of EditView"
    
    This reverts commit 7260b8724fafd41294761382f69ece7fe09588c4.
    lok: respect zoom in calc tile rendering of EditView
    
    Which was causing chart artifacts. Original issue which was
    fixed by above change is no longer valid. Probably different
    fix was made.
    
    Change-Id: I855be90b2736a2d1e95dc1cabef54a438644aa7d
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/142570
    Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoff...@gmail.com>
    Reviewed-by: Gökay ŞATIR <gokaysa...@collabora.com>
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/142996
    Tested-by: Jenkins
    Reviewed-by: Szymon Kłos <szymon.k...@collabora.com>

diff --git a/sc/source/ui/view/gridwin4.cxx b/sc/source/ui/view/gridwin4.cxx
index 6716d2f4c4b9..07265d4cf23e 100644
--- a/sc/source/ui/view/gridwin4.cxx
+++ b/sc/source/ui/view/gridwin4.cxx
@@ -748,8 +748,7 @@ void ScGridWindow::DrawContent(OutputDevice &rDevice, const 
ScTableInfo& rTableI
         // the same as editeng and drawinglayer), and get rid of all the
         // SetMapMode's and other unnecessary fun we have with pixels
         // See also ScGridWindow::GetDrawMapMode() for the rest of this hack
-        aDrawMode.SetOrigin(PixelToLogic(Point(tools::Long(nScrX / 
aOutputData.aZoomX),
-                                               tools::Long(nScrY / 
aOutputData.aZoomY)), aDrawMode));
+        aDrawMode.SetOrigin(PixelToLogic(Point(nScrX, nScrY), aDrawMode));
     }
     tools::Rectangle aDrawingRectLogic;
     bool bLayoutRTL = rDoc.IsLayoutRTL( nTab );
@@ -1057,9 +1056,6 @@ void ScGridWindow::DrawContent(OutputDevice &rDevice, 
const ScTableInfo& rTableI
 
             if (bIsTiledRendering)
             {
-                const double fZoomX = static_cast<double>(aOutputData.aZoomX);
-                const double fZoomY = static_cast<double>(aOutputData.aZoomY);
-
                 Point aOrigin = aOriginalMode.GetOrigin();
                 if (bLayoutRTL)
                     aOrigin.setX(-o3tl::convert(aOrigin.getX(), 
o3tl::Length::twip, o3tl::Length::px)
@@ -1071,8 +1067,8 @@ void ScGridWindow::DrawContent(OutputDevice &rDevice, 
const ScTableInfo& rTableI
                 aOrigin.setY(o3tl::convert(aOrigin.getY(), o3tl::Length::twip, 
o3tl::Length::px)
                              + aOutputData.nScrY);
                 const double twipFactor = 15 * 1.76388889; // 26.45833335
-                aOrigin = Point(aOrigin.getX() * twipFactor / fZoomX,
-                                aOrigin.getY() * twipFactor / fZoomY);
+                aOrigin = Point(aOrigin.getX() * twipFactor,
+                                aOrigin.getY() * twipFactor);
                 MapMode aNew = rDevice.GetMapMode();
                 aNew.SetOrigin(aOrigin);
                 rDevice.SetMapMode(aNew);
@@ -1658,7 +1654,7 @@ void ScGridWindow::PaintTile( VirtualDevice& rDevice,
                              -nTopLeftTileRowOffset,
                              nTopLeftTileCol, nTopLeftTileRow,
                              nBottomRightTileCol, nBottomRightTileRow,
-                             fPPTX, fPPTY, &aFracX, &aFracY);
+                             fPPTX, fPPTY, nullptr, nullptr);
 
     // setup the SdrPage so that drawinglayer works correctly
     ScDrawLayer* pModel = rDoc.GetDrawLayer();

Reply via email to