[Libreoffice-commits] core.git: Branch 'distro/suse/suse-3.6' - editeng/source

Jan Holesovsky kendy at suse.cz
Mon Mar 4 01:47:47 PST 2013


 editeng/source/editeng/impedit3.cxx |    8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

New commits:
commit bafef6a9e36380c7c75169e600632914fe099453
Author: Jan Holesovsky <kendy at suse.cz>
Date:   Mon Feb 25 14:46:21 2013 +0100

    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

diff --git a/editeng/source/editeng/impedit3.cxx b/editeng/source/editeng/impedit3.cxx
index 9f1a955..21c4420 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 )


More information about the Libreoffice-commits mailing list