summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKhaled Hosny <khaledhosny@eglug.org>2013-05-25 14:33:46 +0200
committerDavid Tardon <dtardon@redhat.com>2013-05-27 09:45:08 +0200
commit0c0e7f1bd48d1a89ccdba3f5e773186123943e43 (patch)
tree1fd0bb851056dcf1b69d3c7a0226bf3c1b5b1ddf
parent1834009c19946ab47de343deb97cbc50475fb96a (diff)
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@redhat.com> Tested-by: David Tardon <dtardon@redhat.com> (cherry picked from commit 6e6b028164176e39219dccbe1b84380b10b6e64f) Signed-off-by: David Tardon <dtardon@redhat.com>
-rw-r--r--sw/source/core/txtnode/swfont.cxx4
1 files changed, 2 insertions, 2 deletions
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() )