[Libreoffice-commits] core.git: Branch 'libreoffice-5-1' - drawinglayer/source

Tor Lillqvist tml at collabora.com
Mon Jun 6 08:31:36 UTC 2016


 drawinglayer/source/processor2d/vclprocessor2d.cxx |    5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

New commits:
commit 6bac502897585a32c9ad9256c344499d73f7d5ba
Author: Tor Lillqvist <tml at collabora.com>
Date:   Wed Jun 1 13:30:59 2016 +0300

    tdf#95581: Assume tiny shears are rounding artefacts etc and can be ignored
    
    See bug report for more discussion.
    
    Change-Id: I50ee82abac4ddfbdca0fb03d17c0518860466a52
    Reviewed-on: https://gerrit.libreoffice.org/25767
    Tested-by: Jenkins <ci at libreoffice.org>
    Reviewed-by: Miklos Vajna <vmiklos at collabora.co.uk>

diff --git a/drawinglayer/source/processor2d/vclprocessor2d.cxx b/drawinglayer/source/processor2d/vclprocessor2d.cxx
index fda9de5..45a92ae 100644
--- a/drawinglayer/source/processor2d/vclprocessor2d.cxx
+++ b/drawinglayer/source/processor2d/vclprocessor2d.cxx
@@ -17,6 +17,7 @@
  *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
  */
 
+#include <cmath>
 #include <comphelper/string.hxx>
 #include "vclprocessor2d.hxx"
 #include <drawinglayer/primitive2d/textprimitive2d.hxx>
@@ -123,7 +124,9 @@ namespace drawinglayer
             aLocalTransform.decompose(aFontScaling, aTranslate, fRotate, fShearX);
             bool bPrimitiveAccepted(false);
 
-            if(basegfx::fTools::equalZero(fShearX))
+            // tdf#95581: Assume tiny shears are rounding artefacts or whatever and can be ignored,
+            // especially if the effect is less than a pixel.
+            if(std::abs(aFontScaling.getY() * fShearX) < 1)
             {
                 if(basegfx::fTools::less(aFontScaling.getX(), 0.0) && basegfx::fTools::less(aFontScaling.getY(), 0.0))
                 {


More information about the Libreoffice-commits mailing list