summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndras Timar <timar@fsf.hu>2011-01-11 13:08:28 +0100
committerAndras Timar <timar@fsf.hu>2011-01-11 13:09:31 +0100
commit98494fa7a16c4a18d5ca994062efab16276997b4 (patch)
tree3686cefe819198ae17aee36dde4f75d2e99f5d29
parent55a089e440e58a17e89c818ae34921e236e503e1 (diff)
s/KAPITAELCHENPROP/SMALL_CAPS_PERCENT/ and define it in a header
-rw-r--r--editeng/inc/editeng/svxfont.hxx4
-rw-r--r--editeng/source/items/svxfont.cxx7
2 files changed, 6 insertions, 5 deletions
diff --git a/editeng/inc/editeng/svxfont.hxx b/editeng/inc/editeng/svxfont.hxx
index 69c8f2ca854c..381d8f9f9c23 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 2a1d11888424..55c4607f35bc 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 );