diff options
author | Jan Holesovsky <kendy@suse.cz> | 2013-02-25 14:46:21 +0100 |
---|---|---|
committer | Thorsten Behrens <tbehrens@suse.com> | 2013-06-27 15:58:25 +0000 |
commit | 0211e1912c93247ccbf4e28ea344aab01d0eadc9 (patch) | |
tree | f2bdeb7c522f82ca61ea2991fd10a16fea1da6f6 | |
parent | af05c4b9e748ffc70b1b63e2bd156f3363977c82 (diff) |
fdo#55931, fdo#57956: Fix both autofit and stretched width.
This rewrites commit fa694a21b806ed7837c1337ec49a4b299c478393 (fix of
fdo#55931), and fixes it a better way.
Change-Id: I9ac0c78294e6a9c510c12b22547564b736416131
Reviewed-on: https://gerrit.libreoffice.org/4538
Reviewed-by: Björn Michaelsen <bjoern.michaelsen@canonical.com>
Tested-by: Björn Michaelsen <bjoern.michaelsen@canonical.com>
Reviewed-by: Thorsten Behrens <tbehrens@suse.com>
Tested-by: Thorsten Behrens <tbehrens@suse.com>
-rw-r--r-- | editeng/source/editeng/impedit3.cxx | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/editeng/source/editeng/impedit3.cxx b/editeng/source/editeng/impedit3.cxx index 9f1a955e30a9..21c4420b8da8 100644 --- a/editeng/source/editeng/impedit3.cxx +++ b/editeng/source/editeng/impedit3.cxx @@ -2647,7 +2647,13 @@ void ImpEditEngine::SeekCursor( ContentNode* pNode, sal_uInt16 nPos, SvxFont& rF // ugly on the screen! OutputDevice* pDev = pOut ? pOut : GetRefDevice(); rFont.SetPhysFont( pDev ); - Size aRealSz( rFont.GetSize().Width(), rFont.GetSize().Height() ); + FontMetric aMetric( pDev->GetFontMetric() ); + + // Set the font as we want it to look like & reset the Propr attribute + // so that it is not counted twice. + Size aRealSz( aMetric.GetSize() ); + rFont.SetPropr( 100 ); + if ( aStatus.DoStretch() ) { if ( nStretchY != 100 ) |