summaryrefslogtreecommitdiff
path: root/vcl/generic
diff options
context:
space:
mode:
authornavin <patidar@kacst.edu.sa>2013-01-06 16:18:00 +0300
committerMiklos Vajna <vmiklos@suse.cz>2013-01-07 10:19:47 +0000
commit1e1ba8611fb134fb693354daae8931e93e46124c (patch)
tree46b8c0a25110796ae621bb10e37e6b6697e292ac /vcl/generic
parentb40d74a4430d7c6e1def1720335b4e87aa07c803 (diff)
Change public variables of class ImplFontAttributes to private.
Change-Id: I56ff5d7d2420c334c6fc9e4c552f8b5c4715d93f Reviewed-on: https://gerrit.libreoffice.org/1551 Reviewed-by: Tor Lillqvist <tml@iki.fi> Reviewed-by: Norbert Thiebaud <nthiebaud@gmail.com> Reviewed-by: Miklos Vajna <vmiklos@suse.cz> Tested-by: Miklos Vajna <vmiklos@suse.cz>
Diffstat (limited to 'vcl/generic')
-rw-r--r--vcl/generic/fontmanager/fontconfig.cxx12
-rw-r--r--vcl/generic/fontmanager/fontsubst.cxx8
-rw-r--r--vcl/generic/glyphs/gcach_ftyp.cxx22
-rw-r--r--vcl/generic/glyphs/glyphcache.cxx8
-rw-r--r--vcl/generic/print/genpspgraphics.cxx20
5 files changed, 35 insertions, 35 deletions
diff --git a/vcl/generic/fontmanager/fontconfig.cxx b/vcl/generic/fontmanager/fontconfig.cxx
index b707b78c400a..0efdbe47bebb 100644
--- a/vcl/generic/fontmanager/fontconfig.cxx
+++ b/vcl/generic/fontmanager/fontconfig.cxx
@@ -946,8 +946,8 @@ bool PrintFontManager::Substitute( FontSelectPattern &rPattern, rtl::OUString& r
FcCharSetDestroy(unicodes);
}
- addtopattern(pPattern, rPattern.meItalic, rPattern.meWeight,
- rPattern.meWidthType, rPattern.mePitch);
+ addtopattern(pPattern, rPattern.GetSlant(), rPattern.GetWeight(),
+ rPattern.GetWidthType(), rPattern.GetPitch());
// query fontconfig for a substitute
FcConfigSubstitute(FcConfigGetCurrent(), pPattern, FcMatchPattern);
@@ -1017,13 +1017,13 @@ bool PrintFontManager::Substitute( FontSelectPattern &rPattern, rtl::OUString& r
{
int val = 0;
if (FcResultMatch == FcPatternGetInteger(pSet->fonts[0], FC_WEIGHT, 0, &val))
- rPattern.meWeight = convertWeight(val);
+ rPattern.SetWeight( convertWeight(val) );
if (FcResultMatch == FcPatternGetInteger(pSet->fonts[0], FC_SLANT, 0, &val))
- rPattern.meItalic = convertSlant(val);
+ rPattern.SetItalic( convertSlant(val) );
if (FcResultMatch == FcPatternGetInteger(pSet->fonts[0], FC_SPACING, 0, &val))
- rPattern.mePitch = convertSpacing(val);
+ rPattern.SetPitch ( convertSpacing(val) );
if (FcResultMatch == FcPatternGetInteger(pSet->fonts[0], FC_WIDTH, 0, &val))
- rPattern.meWidthType = convertWidth(val);
+ rPattern.SetWidthType ( convertWidth(val) );
FcBool bEmbolden;
if (FcResultMatch == FcPatternGetBool(pSet->fonts[0], FC_EMBOLDEN, 0, &bEmbolden))
rPattern.mbEmbolden = bEmbolden;
diff --git a/vcl/generic/fontmanager/fontsubst.cxx b/vcl/generic/fontmanager/fontsubst.cxx
index 23ac9688522e..a026ee95e28d 100644
--- a/vcl/generic/fontmanager/fontsubst.cxx
+++ b/vcl/generic/fontmanager/fontsubst.cxx
@@ -132,10 +132,10 @@ namespace
return
(
rOrig.maTargetName == rNew.maSearchName &&
- rOrig.meWeight == rNew.meWeight &&
- rOrig.meItalic == rNew.meItalic &&
- rOrig.mePitch == rNew.mePitch &&
- rOrig.meWidthType == rNew.meWidthType
+ rOrig.GetWeight() == rNew.GetWeight() &&
+ rOrig.GetSlant() == rNew.GetSlant() &&
+ rOrig.GetPitch() == rNew.GetPitch() &&
+ rOrig.GetWidthType() == rNew.GetWidthType()
);
}
diff --git a/vcl/generic/glyphs/gcach_ftyp.cxx b/vcl/generic/glyphs/gcach_ftyp.cxx
index d7e693bc8e0b..de44e3154abc 100644
--- a/vcl/generic/glyphs/gcach_ftyp.cxx
+++ b/vcl/generic/glyphs/gcach_ftyp.cxx
@@ -788,8 +788,8 @@ ServerFont::ServerFont( const FontSelectPattern& rFSD, FtFontInfo* pFI )
mnLoadFlags |= FT_LOAD_IGNORE_TRANSFORM;
#endif
- mbArtItalic = (rFSD.meItalic != ITALIC_NONE && pFI->GetFontAttributes().GetSlant() == ITALIC_NONE);
- mbArtBold = (rFSD.meWeight > WEIGHT_MEDIUM && pFI->GetFontAttributes().GetWeight() <= WEIGHT_MEDIUM);
+ mbArtItalic = (rFSD.GetSlant() != ITALIC_NONE && pFI->GetFontAttributes().GetSlant() == ITALIC_NONE);
+ mbArtBold = (rFSD.GetWeight() > WEIGHT_MEDIUM && pFI->GetFontAttributes().GetWeight() <= WEIGHT_MEDIUM);
mbUseGamma = false;
if( mbArtBold )
{
@@ -934,7 +934,7 @@ void ServerFont::FetchFontMetric( ImplFontMetricData& rTo, long& rFactor ) const
(rTo.GetFamilyName().EqualsAscii("StarSymbol"))
)
{
- rTo.mbSymbolFlag = true;
+ rTo.SetSymbolFlag( true );
}
if( maSizeFT )
@@ -964,11 +964,11 @@ void ServerFont::FetchFontMetric( ImplFontMetricData& rTo, long& rFactor ) const
// map the panose info from the OS2 table to their VCL counterparts
switch( pOS2->panose[0] )
{
- case 1: rTo.meFamily = FAMILY_ROMAN; break;
- case 2: rTo.meFamily = FAMILY_SWISS; break;
- case 3: rTo.meFamily = FAMILY_MODERN; break;
- case 4: rTo.meFamily = FAMILY_SCRIPT; break;
- case 5: rTo.meFamily = FAMILY_DECORATIVE; break;
+ case 1: rTo.SetFamilyType( FAMILY_ROMAN ); break;
+ case 2: rTo.SetFamilyType( FAMILY_SWISS ); break;
+ case 3: rTo.SetFamilyType( FAMILY_MODERN ); break;
+ case 4: rTo.SetFamilyType( FAMILY_SCRIPT ); break;
+ case 5: rTo.SetFamilyType( FAMILY_DECORATIVE ); break;
// TODO: is it reasonable to override the attribute with DONTKNOW?
case 0: // fall through
default: rTo.meFamilyType = FAMILY_DONTKNOW; break;
@@ -982,12 +982,12 @@ void ServerFont::FetchFontMetric( ImplFontMetricData& rTo, long& rFactor ) const
case 5: // fall through
case 6: // fall through
case 7: // fall through
- case 8: rTo.mePitch = PITCH_VARIABLE; break;
- case 9: rTo.mePitch = PITCH_FIXED; break;
+ case 8: rTo.SetPitch( PITCH_VARIABLE ); break;
+ case 9: rTo.SetPitch( PITCH_FIXED ); break;
// TODO: is it reasonable to override the attribute with DONTKNOW?
case 0: // fall through
case 1: // fall through
- default: rTo.mePitch = PITCH_DONTKNOW; break;
+ default: rTo.SetPitch( PITCH_DONTKNOW ); break;
}
const double fScale = (double)GetFontSelData().mnHeight / maFaceFT->units_per_EM;
diff --git a/vcl/generic/glyphs/glyphcache.cxx b/vcl/generic/glyphs/glyphcache.cxx
index deef6be55659..79a2d7a421fd 100644
--- a/vcl/generic/glyphs/glyphcache.cxx
+++ b/vcl/generic/glyphs/glyphcache.cxx
@@ -97,8 +97,8 @@ size_t GlyphCache::IFSD_Hash::operator()( const FontSelectPattern& rFontSelData
nHash += rFontSelData.mnHeight;
nHash += rFontSelData.mnOrientation;
nHash += rFontSelData.mbVertical;
- nHash += rFontSelData.meItalic;
- nHash += rFontSelData.meWeight;
+ nHash += rFontSelData.GetSlant();
+ nHash += rFontSelData.GetWeight();
#ifdef ENABLE_GRAPHITE
nHash += rFontSelData.meLanguage;
#endif
@@ -122,8 +122,8 @@ bool GlyphCache::IFSD_Equal::operator()( const FontSelectPattern& rA, const Font
|| (rA.mbNonAntialiased != rB.mbNonAntialiased) )
return false;
- if( (rA.meItalic != rB.meItalic)
- || (rA.meWeight != rB.meWeight) )
+ if( (rA.GetSlant() != rB.GetSlant())
+ || (rA.GetWeight() != rB.GetWeight()) )
return false;
// NOTE: ignoring meFamily deliberately
diff --git a/vcl/generic/print/genpspgraphics.cxx b/vcl/generic/print/genpspgraphics.cxx
index 1a271a0a56f7..7b2ce32eff0e 100644
--- a/vcl/generic/print/genpspgraphics.cxx
+++ b/vcl/generic/print/genpspgraphics.cxx
@@ -840,13 +840,13 @@ sal_uInt16 GenPspGraphics::SetFont( FontSelectPattern *pEntry, int nFallbackLeve
// determine which font attributes need to be emulated
bool bArtItalic = false;
bool bArtBold = false;
- if( pEntry->meItalic == ITALIC_OBLIQUE || pEntry->meItalic == ITALIC_NORMAL )
+ if( pEntry->GetSlant() == ITALIC_OBLIQUE || pEntry->GetSlant() == ITALIC_NORMAL )
{
FontItalic eItalic = m_pPrinterGfx->GetFontMgr().getFontItalic( nID );
if( eItalic != ITALIC_NORMAL && eItalic != ITALIC_OBLIQUE )
bArtItalic = true;
}
- int nWeight = (int)pEntry->meWeight;
+ int nWeight = (int)pEntry->GetWeight();
int nRealWeight = (int)m_pPrinterGfx->GetFontMgr().getFontWeight( nID );
if( nRealWeight <= (int)WEIGHT_MEDIUM && nWeight > (int)WEIGHT_MEDIUM )
{
@@ -1124,14 +1124,14 @@ void GenPspGraphics::DoGetGlyphWidths( psp::fontID aFont,
ImplDevFontAttributes GenPspGraphics::Info2DevFontAttributes( const psp::FastPrintFontInfo& rInfo )
{
ImplDevFontAttributes aDFA;
- aDFA.maName = rInfo.m_aFamilyName;
- aDFA.maStyleName = rInfo.m_aStyleName;
- aDFA.meFamily = rInfo.m_eFamilyStyle;
- aDFA.meWeight = rInfo.m_eWeight;
- aDFA.meItalic = rInfo.m_eItalic;
- aDFA.meWidthType = rInfo.m_eWidth;
- aDFA.mePitch = rInfo.m_ePitch;
- aDFA.mbSymbolFlag = (rInfo.m_aEncoding == RTL_TEXTENCODING_SYMBOL);
+ aDFA.SetFamilyName( rInfo.m_aFamilyName );
+ aDFA.SetStyleName( rInfo.m_aStyleName );
+ aDFA.SetFamilyType( rInfo.m_eFamilyStyle );
+ aDFA.SetWeight( rInfo.m_eWeight );
+ aDFA.SetItalic( rInfo.m_eItalic );
+ aDFA.SetWidthType( rInfo.m_eWidth );
+ aDFA.SetPitch( rInfo.m_ePitch );
+ aDFA.SetSymbolFlag( (rInfo.m_aEncoding == RTL_TEXTENCODING_SYMBOL) );
aDFA.mbSubsettable = rInfo.m_bSubsettable;
aDFA.mbEmbeddable = rInfo.m_bEmbeddable;