vcl/inc/impfont.hxx | 6 ++++-- vcl/source/font/font.cxx | 24 ++++++++++++------------ 2 files changed, 16 insertions(+), 14 deletions(-)
New commits: commit b1297e4410a7a258b686380243db936b8a24e982 Author: Chris Sherlock <[email protected]> Date: Fri Jan 29 14:18:28 2016 +1100 vcl: move mnOrientation down header file ImplFont::mnOrientation is actually a font metric, it really should be moved to ImplFontMetric so added a TODO. Change-Id: If0f39be16a782692a0da68c674fc87c474dd6468 diff --git a/vcl/inc/impfont.hxx b/vcl/inc/impfont.hxx index 155f8f6..3a7ff26 100644 --- a/vcl/inc/impfont.hxx +++ b/vcl/inc/impfont.hxx @@ -121,7 +121,6 @@ private: FontStrikeout meStrikeout; FontRelief meRelief; FontEmphasisMark meEmphasisMark; - short mnOrientation; FontKerning meKerning; Size maSize; rtl_TextEncoding meCharSet; @@ -149,6 +148,9 @@ private: mbRotatable:1, // is "rotatable" even a word?!? I'll keep it for consistency for now mbDevice:1; + // TODO: metric data, should be migrated to ImplFontMetric + short mnOrientation; + int mnQuality; }; diff --git a/vcl/source/font/font.cxx b/vcl/source/font/font.cxx index 2cbc7f2..4d41ed4 100644 --- a/vcl/source/font/font.cxx +++ b/vcl/source/font/font.cxx @@ -851,7 +851,6 @@ ImplFont::ImplFont() : meStrikeout( STRIKEOUT_NONE ), meRelief( RELIEF_NONE ), meEmphasisMark( EMPHASISMARK_NONE ), - mnOrientation( 0 ), meKerning( FontKerning::NONE ), meCharSet( RTL_TEXTENCODING_DONTKNOW ), maLanguageTag( LANGUAGE_DONTKNOW ), @@ -869,6 +868,7 @@ ImplFont::ImplFont() : mbSubsettable( false ), mbRotatable( false ), mbDevice( false ), + mnOrientation( 0 ), mnQuality( 0 ) {} @@ -887,7 +887,6 @@ ImplFont::ImplFont( const ImplFont& rImplFont ) : meStrikeout( rImplFont.meStrikeout ), meRelief( rImplFont.meRelief ), meEmphasisMark( rImplFont.meEmphasisMark ), - mnOrientation( rImplFont.mnOrientation ), meKerning( rImplFont.meKerning ), maSize( rImplFont.maSize ), meCharSet( rImplFont.meCharSet ), @@ -907,6 +906,7 @@ ImplFont::ImplFont( const ImplFont& rImplFont ) : mbSubsettable( rImplFont.mbSubsettable ), mbRotatable( rImplFont.mbRotatable ), mbDevice( rImplFont.mbDevice ), + mnOrientation( rImplFont.mnOrientation ), mnQuality( rImplFont.mnQuality ) {} commit bd667840ef661ed6d9dde6151ce6f6bcd37e5668 Author: Chris Sherlock <[email protected]> Date: Fri Jan 29 14:14:08 2016 +1100 vcl: rename ImplFont::mnKerning to ImplFont::meKerning Change-Id: Iacbe55037b75d30522435f854ceeef432ccfb406 diff --git a/vcl/inc/impfont.hxx b/vcl/inc/impfont.hxx index cd215f6..155f8f6 100644 --- a/vcl/inc/impfont.hxx +++ b/vcl/inc/impfont.hxx @@ -122,7 +122,7 @@ private: FontRelief meRelief; FontEmphasisMark meEmphasisMark; short mnOrientation; - FontKerning mnKerning; + FontKerning meKerning; Size maSize; rtl_TextEncoding meCharSet; diff --git a/vcl/source/font/font.cxx b/vcl/source/font/font.cxx index c2ae98f..2cbc7f2 100644 --- a/vcl/source/font/font.cxx +++ b/vcl/source/font/font.cxx @@ -263,18 +263,18 @@ void Font::SetVertical( bool bVertical ) } } -void Font::SetKerning( FontKerning nKerning ) +void Font::SetKerning( FontKerning eKerning ) { - if( mpImplFont->mnKerning != nKerning ) + if( mpImplFont->meKerning != eKerning ) { MakeUnique(); - mpImplFont->mnKerning = nKerning; + mpImplFont->meKerning = eKerning; } } bool Font::IsKerning() const { - return bool(mpImplFont->mnKerning & FontKerning::FontSpecific); + return bool(mpImplFont->meKerning & FontKerning::FontSpecific); } void Font::SetWeight( FontWeight eWeight ) @@ -494,7 +494,7 @@ SvStream& ReadImplFont( SvStream& rIStm, ImplFont& rImplFont ) rIStm.ReadCharAsBool( bTmp ); rImplFont.mbWordLine = bTmp; rIStm.ReadCharAsBool( bTmp ); rImplFont.mbOutline = bTmp; rIStm.ReadCharAsBool( bTmp ); rImplFont.mbShadow = bTmp; - rIStm.ReadUChar( nTmp8 ); rImplFont.mnKerning = static_cast<FontKerning>(nTmp8); + rIStm.ReadUChar( nTmp8 ); rImplFont.meKerning = static_cast<FontKerning>(nTmp8); if( aCompat.GetVersion() >= 2 ) { @@ -537,7 +537,7 @@ SvStream& WriteImplFont( SvStream& rOStm, const ImplFont& rImplFont ) rOStm.WriteBool( rImplFont.mbWordLine ); rOStm.WriteBool( rImplFont.mbOutline ); rOStm.WriteBool( rImplFont.mbShadow ); - rOStm.WriteUChar( static_cast<sal_uInt8>(rImplFont.mnKerning) ); + rOStm.WriteUChar( static_cast<sal_uInt8>(rImplFont.meKerning) ); // new in version 2 rOStm.WriteUChar( rImplFont.meRelief ); @@ -795,7 +795,7 @@ LanguageType Font::GetCJKContextLanguage() const { return mpImplFont->maCJKLangu short Font::GetOrientation() const { return mpImplFont->mnOrientation; } bool Font::IsVertical() const { return mpImplFont->mbVertical; } -FontKerning Font::GetKerning() const { return mpImplFont->mnKerning; } +FontKerning Font::GetKerning() const { return mpImplFont->meKerning; } FontPitch Font::GetPitch() { return mpImplFont->GetPitch(); } FontWeight Font::GetWeight() { return mpImplFont->GetWeight(); } @@ -852,7 +852,7 @@ ImplFont::ImplFont() : meRelief( RELIEF_NONE ), meEmphasisMark( EMPHASISMARK_NONE ), mnOrientation( 0 ), - mnKerning( FontKerning::NONE ), + meKerning( FontKerning::NONE ), meCharSet( RTL_TEXTENCODING_DONTKNOW ), maLanguageTag( LANGUAGE_DONTKNOW ), maCJKLanguageTag( LANGUAGE_DONTKNOW ), @@ -888,7 +888,7 @@ ImplFont::ImplFont( const ImplFont& rImplFont ) : meRelief( rImplFont.meRelief ), meEmphasisMark( rImplFont.meEmphasisMark ), mnOrientation( rImplFont.mnOrientation ), - mnKerning( rImplFont.mnKerning ), + meKerning( rImplFont.meKerning ), maSize( rImplFont.maSize ), meCharSet( rImplFont.meCharSet ), maLanguageTag( rImplFont.maLanguageTag ), @@ -946,7 +946,7 @@ bool ImplFont::operator==( const ImplFont& rOther ) const || (mbWordLine != rOther.mbWordLine) || (mbOutline != rOther.mbOutline) || (mbShadow != rOther.mbShadow) - || (mnKerning != rOther.mnKerning) + || (meKerning != rOther.meKerning) || (mbTransparent != rOther.mbTransparent) ) return false; _______________________________________________ Libreoffice-commits mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
