summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJan Holesovsky <kendy@suse.cz>2013-02-25 14:46:21 +0100
committerThorsten Behrens <tbehrens@suse.com>2013-02-25 14:26:33 +0000
commit8518173f0b8dc73eece82be959e65dba2768d33c (patch)
tree5f67cdbd27cf0f51b044f305af274c77938f1e52
parent5cb823aa71981c1fb13872e67e74bf5027f46cd0 (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/2388 Tested-by: Thorsten Behrens <tbehrens@suse.com> Reviewed-by: Thorsten Behrens <tbehrens@suse.com>
-rw-r--r--editeng/source/editeng/impedit3.cxx8
1 files changed, 7 insertions, 1 deletions
diff --git a/editeng/source/editeng/impedit3.cxx b/editeng/source/editeng/impedit3.cxx
index 964579cb05fb..098fd92a8202 100644
--- a/editeng/source/editeng/impedit3.cxx
+++ b/editeng/source/editeng/impedit3.cxx
@@ -2643,7 +2643,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 )