From 0c0e7f1bd48d1a89ccdba3f5e773186123943e43 Mon Sep 17 00:00:00 2001 From: Khaled Hosny Date: Sat, 25 May 2013 14:33:46 +0200 Subject: 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 Tested-by: David Tardon (cherry picked from commit 6e6b028164176e39219dccbe1b84380b10b6e64f) Signed-off-by: David Tardon --- sw/source/core/txtnode/swfont.cxx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'sw') diff --git a/sw/source/core/txtnode/swfont.cxx b/sw/source/core/txtnode/swfont.cxx index 02b5addfe2b5..068fd7103433 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() ) -- cgit