[Libreoffice-commits] core.git: Branch 'libreoffice-4-3' - vcl/quartz

Herbert Dürr hdu at apache.org
Tue Jun 17 08:16:47 PDT 2014


 vcl/quartz/ctlayout.cxx |   15 +++++++++------
 1 file changed, 9 insertions(+), 6 deletions(-)

New commits:
commit af9203676b014509c04c0495d2189e04b633f6b9
Author: Herbert Dürr <hdu at apache.org>
Date:   Mon Jun 2 11:30:49 2014 +0000

    Related: #i125020# fix the calculation of the text-update rectangle...
    
    in CoreText
    
    by doing the calculation before CTLineDraw() updates the text position.
    Requesting the update early is possible because that update region is
    not used until AquaSalInstance::Yield().
    (cherry picked from commit ee042661b996fd00d5504caf4f4be60f77bf880f)
    
    Conflicts:
    	vcl/aqua/source/gdi/ctlayout.cxx
    
    (cherry picked from commit d2bbef3d3d6c7be096175ddbdb788ece5067f5fc)
    
    Conflicts:
    	vcl/quartz/ctlayout.cxx
    
    Change-Id: I317a2068071a2f6d33f34c81e104e30beedc33db
    Reviewed-on: https://gerrit.libreoffice.org/9628
    Tested-by: Christian Lohmaier <lohmaier+LibreOffice at googlemail.com>
    Reviewed-by: Christian Lohmaier <lohmaier+LibreOffice at googlemail.com>

diff --git a/vcl/quartz/ctlayout.cxx b/vcl/quartz/ctlayout.cxx
index a39f00e..1d96f90 100644
--- a/vcl/quartz/ctlayout.cxx
+++ b/vcl/quartz/ctlayout.cxx
@@ -344,13 +344,8 @@ void CTLayout::drawCTLine(AquaSalGraphics& rAquaGraphics, CTLineRef ctline, cons
 
     CGContextSetTextPosition( rAquaGraphics.mrContext, aTextPos.x, aTextPos.y );
 
-    // set the text color as fill color (see kCTForegroundColorFromContextAttributeName)
-    CGContextSetFillColor( rAquaGraphics.mrContext, rAquaGraphics.maTextColor.AsArray() );
-
-    // draw the text
-    CTLineDraw( ctline, rAquaGraphics.mrContext );
 #ifndef IOS
-    // request an update of the changed window area
+    // request an update of the to-be-changed window area
     if( rAquaGraphics.IsWindowGraphics() )
     {
         const CGRect aInkRect = CTLineGetImageBounds( mpCTLine, rAquaGraphics.mrContext );
@@ -358,6 +353,14 @@ void CTLayout::drawCTLine(AquaSalGraphics& rAquaGraphics, CTLineRef ctline, cons
         rAquaGraphics.RefreshRect( aRefreshRect );
     }
 #endif
+
+    // set the text color as fill color (see kCTForegroundColorFromContextAttributeName)
+    CGContextSetFillColor( rAquaGraphics.mrContext, rAquaGraphics.maTextColor.AsArray() );
+
+    SAL_INFO( "vcl.ct", "CTLineDraw(" << ctline << "," << rAquaGraphics.mrContext << ")" );
+    // draw the text
+    CTLineDraw( ctline, rAquaGraphics.mrContext );
+
     // restore the original graphic context transformations
     CGContextRestoreGState( rAquaGraphics.mrContext );
 }


More information about the Libreoffice-commits mailing list