[ooo-build-commit] patches/dev300

Thorsten Behrens thorsten at kemper.freedesktop.org
Fri Jun 26 17:09:24 PDT 2009


 patches/dev300/fit-list-to-size.diff |   76 +++++++++++++++++++++++++++++++++++
 1 file changed, 76 insertions(+)

New commits:
commit e17cb292b3f653cacb414864c779d09301708c53
Author: Thorsten Behrens <tbehrens at novell.com>
Date:   Sat Jun 27 01:11:00 2009 +0200

    Ensure fit-to-size scales isotrophically
    
    * patches/dev300/fit-list-to-size.diff: user reported that, when
      fit-to-size in Impress kicks in, fonts look _slightly_ compressed.
      And indeed, shrinking sets both font width and font height, which
      is notorious for creating slightly anisotrophic scalings. Catching
      the special case, setting font width to zero then (requests
      strictly isotrophic scaling)

diff --git a/patches/dev300/fit-list-to-size.diff b/patches/dev300/fit-list-to-size.diff
index 021d91c..b61d67b 100644
--- a/patches/dev300/fit-list-to-size.diff
+++ b/patches/dev300/fit-list-to-size.diff
@@ -290,6 +290,82 @@
  /* cl removed because not needed anymore since binfilter
 --- svx/source/editeng/impedit3.cxx.old	2009-04-06 16:42:16.000000000 +0000
 +++ svx/source/editeng/impedit3.cxx	2009-04-06 16:42:18.000000000 +0000
+@@ -2665,38 +2665,46 @@ void ImpEditEngine::SeekCursor( ContentNode* pNode, sal_uInt16 nPos, SvxFont& rF
+ 				aRealSz.Height() /= 100;
+ 			}
+ 			if ( nStretchX != 100 )
+-			{
+-				aRealSz.Width() *= nStretchX;
+-				aRealSz.Width() /= 100;
++            {
++                if ( nStretchX == nStretchY &&
++                     nRelWidth == 100 )
++                {
++                    aRealSz.Width() = 0;
++                }
++                else
++                {
++                    aRealSz.Width() *= nStretchX;
++                    aRealSz.Width() /= 100;
+ 
+-				// Auch das Kerning: (long wegen Zwischenergebnis)
+-				long nKerning = rFont.GetFixKerning();
++                    // Auch das Kerning: (long wegen Zwischenergebnis)
++                    long nKerning = rFont.GetFixKerning();
+ /*
+-				Die Ueberlegung war: Wenn neg. Kerning, aber StretchX = 200
+-				=> Nicht das Kerning verdoppelt, also die Buchstaben weiter
+-				zusammenziehen
+-				---------------------------
+-				Kern	StretchX	=>Kern
+-				---------------------------
+-				 >0		<100		< (Proportional)
+-				 <0		<100		< (Proportional)
+-				 >0		>100		> (Proportional)
+-				 <0		>100		< (Der Betrag, also Antiprop)
++  Die Ueberlegung war: Wenn neg. Kerning, aber StretchX = 200
++  => Nicht das Kerning verdoppelt, also die Buchstaben weiter
++  zusammenziehen
++  ---------------------------
++  Kern	StretchX	=>Kern
++  ---------------------------
++  >0		<100		< (Proportional)
++  <0		<100		< (Proportional)
++  >0		>100		> (Proportional)
++  <0		>100		< (Der Betrag, also Antiprop)
+ */
+-				if ( ( nKerning < 0  ) && ( nStretchX > 100 ) )
+-				{
+-					// Antiproportional
+-					nKerning *= 100;
+-					nKerning /= nStretchX;
+-				}
+-				else if ( nKerning )
+-				{
+-					// Proportional
+-					nKerning *= nStretchX;
+-					nKerning /= 100;
+-				}
+-				rFont.SetFixKerning( (short)nKerning );
+-			}
++                    if ( ( nKerning < 0  ) && ( nStretchX > 100 ) )
++                    {
++                        // Antiproportional
++                        nKerning *= 100;
++                        nKerning /= nStretchX;
++                    }
++                    else if ( nKerning )
++                    {
++                        // Proportional
++                        nKerning *= nStretchX;
++                        nKerning /= 100;
++                    }
++                    rFont.SetFixKerning( (short)nKerning );
++                }
++            }
+ 		}
+ 		if ( nRelWidth != 100 )
+ 		{
 @@ -4085,20 +4085,25 @@ void ImpEditEngine::SetFlatMode( sal_Boo
  
  void ImpEditEngine::SetCharStretching( sal_uInt16 nX, sal_uInt16 nY )


More information about the ooo-build-commit mailing list