[Libreoffice-commits] .: 2 commits - configure.in vcl/aqua

Norbert Thiebaud nthiebaud at kemper.freedesktop.org
Mon Jun 4 07:32:18 PDT 2012


 configure.in                   |    3 +++
 vcl/aqua/source/gdi/salgdi.cxx |   26 +++++++++++++++++++++-----
 2 files changed, 24 insertions(+), 5 deletions(-)

New commits:
commit 6b44e97fb6a4deffeee0654951a2a9dc43554820
Author: Norbert Thiebaud <nthiebaud at gmail.com>
Date:   Mon Jun 4 09:31:25 2012 -0500

    module icc removal was a bit too harsh in configure.in
    
    re-instated lines that were accidentally wiped out in configure.in
    
    Change-Id: I54d3140723e99eae1dda6c7b05c29327a22028a3

diff --git a/configure.in b/configure.in
index 27b3e1b..6d6155f 100644
--- a/configure.in
+++ b/configure.in
@@ -7945,6 +7945,9 @@ dnl Check for nsplugin
 dnl ===================================================================
 AC_MSG_CHECKING([whether to build nsplugin extension])
 ENABLE_NSPLUGIN=NO
+if test $_os = Darwin -o $_os = iOS -o $_os = Android; then
+    enable_gtk=no
+fi
 if test "$enable_nsplugin" != "no"; then
     if test "$enable_gtk" != "no"; then
         AC_MSG_RESULT([yes])
commit 1802271ac4aef34a7957a1fac492daa788d1d984
Author: Norbert Thiebaud <nthiebaud at gmail.com>
Date:   Mon Jun 4 09:30:10 2012 -0500

    fdo#50631: Fix the bounding box of rotated glyphs on MacOSX.
    
    Similarly to Ifb04d4a8e485182c5ef2771025b06832bfd75ae0 (commit
    ac25f124858b79e302adcc533d6a658d5c529394), we need to rotate the bounding
    box of glyphs on MacOSX too.
    
    Additionally, round the position up, and convert the size more
    straight-forward way.
    
    Change-Id: Idf7a077836e65072795c6d98d61925ce62ee35b7

diff --git a/vcl/aqua/source/gdi/salgdi.cxx b/vcl/aqua/source/gdi/salgdi.cxx
index 0fccd6d..e21c30a 100644
--- a/vcl/aqua/source/gdi/salgdi.cxx
+++ b/vcl/aqua/source/gdi/salgdi.cxx
@@ -1860,11 +1860,27 @@ sal_Bool AquaSalGraphics::GetGlyphBoundRect( sal_GlyphId nGlyphId, Rectangle& rR
     if( eStatus != noErr )
         return false;
 
-    const long nMinX = (long)(+aGlyphMetrics.topLeft.x * mfFontScale - 0.5);
-    const long nMaxX = (long)(aGlyphMetrics.width * mfFontScale + 0.5) + nMinX;
-    const long nMinY = (long)(-aGlyphMetrics.topLeft.y * mfFontScale - 0.5);
-    const long nMaxY = (long)(aGlyphMetrics.height * mfFontScale + 0.5) + nMinY;
-    rRect = Rectangle( nMinX, nMinY, nMaxX, nMaxY );
+    const long nMinX = (long)(+aGlyphMetrics.topLeft.x * mfFontScale + 0.5);
+    const long nMinY = (long)(-aGlyphMetrics.topLeft.y * mfFontScale + 0.5);
+    const long nWidth  = (long)(aGlyphMetrics.width * mfFontScale + 0.5);
+    const long nHeight = (long)(aGlyphMetrics.height * mfFontScale + 0.5);
+    Rectangle aRect(Point(nMinX, nMinY), Size(nWidth, nHeight));
+
+    if ( mnATSUIRotation == 0 )
+        rRect = aRect;
+    else
+    {
+        const double fRadians = mnATSUIRotation * (M_PI/0xB40000);
+        const double nSin = sin( fRadians );
+        const double nCos = cos( fRadians );
+
+        rRect.Left() =  nCos*aRect.Left() + nSin*aRect.Top();
+        rRect.Top()  = -nSin*aRect.Left() - nCos*aRect.Top();
+
+        rRect.Right()  =  nCos*aRect.Right() + nSin*aRect.Bottom();
+        rRect.Bottom() = -nSin*aRect.Right() - nCos*aRect.Bottom();
+    }
+
     return true;
 }
 


More information about the Libreoffice-commits mailing list