[Libreoffice-commits] .: editeng/inc editeng/source

Andras Timar timar at kemper.freedesktop.org
Tue Jan 11 04:13:11 PST 2011


 editeng/inc/editeng/svxfont.hxx  |    4 ++++
 editeng/source/items/svxfont.cxx |    7 ++-----
 2 files changed, 6 insertions(+), 5 deletions(-)

New commits:
commit 1914f0dc43cb6af931a350a4e9d694d6801f41a9
Author: Andras Timar <timar at fsf.hu>
Date:   Tue Jan 11 13:08:28 2011 +0100

    s/KAPITAELCHENPROP/SMALL_CAPS_PERCENT/ and define it in a header

diff --git a/editeng/inc/editeng/svxfont.hxx b/editeng/inc/editeng/svxfont.hxx
index 120dd2c..c07a0eb 100644
--- a/editeng/inc/editeng/svxfont.hxx
+++ b/editeng/inc/editeng/svxfont.hxx
@@ -34,6 +34,10 @@
 #include <vcl/font.hxx>
 #include "editeng/editengdllapi.h"
 
+// Percentage of height of lower case small capital letters compared to upper case letters
+// See i#1526# for full explanation
+#define SMALL_CAPS_PERCENTAGE 80
+
 class SvxDoCapitals;
 class OutputDevice;
 class Printer;
diff --git a/editeng/source/items/svxfont.cxx b/editeng/source/items/svxfont.cxx
index d604aac..027ffd2 100644
--- a/editeng/source/items/svxfont.cxx
+++ b/editeng/source/items/svxfont.cxx
@@ -46,9 +46,6 @@
 // Minimum: Prozentwert fuers kernen
 #define MINKERNPERCENT 5
 
-// prop. Groesse der Kleinbuchstaben bei Kapitaelchen
-#define KAPITAELCHENPROP 80
-
 #ifndef REDUCEDSVXFONT
     const sal_Unicode CH_BLANK = sal_Unicode(' ');  	// ' ' Leerzeichen
     static sal_Char const sDoubleSpace[] = "  ";
@@ -709,7 +706,7 @@ void SvxDoGetCapitalSize::Do( const XubString &_rTxt, const xub_StrLen _nIdx,
     if ( !bUpper )
     {
         BYTE nProp = pFont->GetPropr();
-        pFont->SetProprRel( KAPITAELCHENPROP );
+        pFont->SetProprRel( SMALL_CAPS_PERCENTAGE );
         pFont->SetPhysFont( pOut );
         aPartSize.setWidth( pOut->GetTextWidth( _rTxt, _nIdx, _nLen ) );
         aPartSize.setHeight( pOut->GetTextHeight() );
@@ -817,7 +814,7 @@ void SvxDoDrawCapital::Do( const XubString &_rTxt, const xub_StrLen _nIdx,
     if ( !bUpper )
     {
         nProp = pFont->GetPropr();
-        pFont->SetProprRel( KAPITAELCHENPROP );
+        pFont->SetProprRel( SMALL_CAPS_PERCENTAGE );
     }
     pFont->SetPhysFont( pOut );
 


More information about the Libreoffice-commits mailing list