summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJan Holesovsky <kendy@suse.cz>2012-10-12 17:41:49 +0200
committerThorsten Behrens <tbehrens@suse.com>2012-10-13 22:30:28 +0000
commit4339c9e6a0e01acecd0ce687a8d0c20128cdd7cf (patch)
tree4ba388e8730186d4eb9b9279484e18b097cb2ac5
parent04ba130525bf339f774fd17423f8656e6755ed11 (diff)
fdo#55931 Fix renderding of subscript/superscript with Autofit Text.
We are using font metrics to compute the stretch ratio for autofit; but that collides with nPropr property of SvxFont - it is then counted twice, ie. in the case of nPropr == 25, we actually behave as if it was much less; and worse, only in the horizontal direction. Change-Id: Idba62f1e3f40802651b93f1344e376048866b1b6 Reviewed-on: https://gerrit.libreoffice.org/866 Reviewed-by: Thorsten Behrens <tbehrens@suse.com> Tested-by: Thorsten Behrens <tbehrens@suse.com>
-rw-r--r--editeng/source/editeng/impedit3.cxx5
1 files changed, 1 insertions, 4 deletions
diff --git a/editeng/source/editeng/impedit3.cxx b/editeng/source/editeng/impedit3.cxx
index e4025ac9e7e4..59c70bfc73b9 100644
--- a/editeng/source/editeng/impedit3.cxx
+++ b/editeng/source/editeng/impedit3.cxx
@@ -2647,10 +2647,7 @@ void ImpEditEngine::SeekCursor( ContentNode* pNode, sal_uInt16 nPos, SvxFont& rF
// ugly on the screen!
OutputDevice* pDev = pOut ? pOut : GetRefDevice();
rFont.SetPhysFont( pDev );
- FontMetric aMetric( pDev->GetFontMetric() );
- // For the height do not consider the metrics, because it will go
- // wrong at Superscript/Subscript.
- Size aRealSz( aMetric.GetSize().Width(), rFont.GetSize().Height() );
+ Size aRealSz( rFont.GetSize().Width(), rFont.GetSize().Height() );
if ( aStatus.DoStretch() )
{
if ( nStretchY != 100 )