[Libreoffice-commits] core.git: sw/source

Khaled Hosny khaledhosny at eglug.org
Mon May 27 00:43:34 PDT 2013


 sw/source/core/txtnode/swfont.cxx |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

New commits:
commit 6e6b028164176e39219dccbe1b84380b10b6e64f
Author: Khaled Hosny <khaledhosny at eglug.org>
Date:   Sat May 25 14:33:46 2013 +0200

    Fix fdo#64685 - Superscript broken in master
    
    After f22006dc6ac34a35a060e15466cf6b2d2058617d the position member of
    SwDrawTextInfo is no longer a pointer, so changing the passed Point
    after calling SetPos() has no effect, but some code seems to be relying
    on it being pointer. Moving SetPos() to after changing the point seems
    to do the trick, but there may be other similarly broken code like
    SwSubFont::_DrawStretchText() below.
    
    Change-Id: I2f563c1543ff7bff68e573f69fce39694181b370
    Reviewed-on: https://gerrit.libreoffice.org/4032
    Reviewed-by: David Tardon <dtardon at redhat.com>
    Tested-by: David Tardon <dtardon at redhat.com>

diff --git a/sw/source/core/txtnode/swfont.cxx b/sw/source/core/txtnode/swfont.cxx
index 02b5add..068fd71 100644
--- a/sw/source/core/txtnode/swfont.cxx
+++ b/sw/source/core/txtnode/swfont.cxx
@@ -850,12 +850,12 @@ void SwSubFont::_DrawText( SwDrawTextInfo &rInf, const sal_Bool bGrey )
     SwDigitModeModifier aDigitModeModifier( rInf.GetOut(), rInf.GetFont()->GetLanguage() );
 
     Point aPos( rInf.GetPos() );
-    const Point &rOld = rInf.GetPos();
-    rInf.SetPos( aPos );
 
     if( GetEscapement() )
         CalcEsc( rInf, aPos );
 
+    const Point &rOld = rInf.GetPos();
+    rInf.SetPos( aPos );
     rInf.SetKern( CheckKerning() + rInf.GetSperren() / SPACING_PRECISION_FACTOR );
 
     if( IsCapital() )


More information about the Libreoffice-commits mailing list