diff options
author | Chris Sherlock <chris.sherlock79@gmail.com> | 2016-01-17 01:00:00 +1100 |
---|---|---|
committer | Chris Sherlock <chris.sherlock79@gmail.com> | 2016-01-16 16:16:19 +0000 |
commit | 26371f105bc44e04469ec03fc5bb12505e651c6b (patch) | |
tree | f60eb9388f3a736d966137ef40fca336fb4277e9 /vcl/source/font | |
parent | 2dd0b4317372b8022efe3911b38b4fa02956d8b9 (diff) |
vcl: FontAttributes::GetSlantType() -> FontAttributes::GetItalic()
This brings FontAttributes into line with ImplFont and Font, which is
important to the refactoring work I am doing.
Change-Id: I2a2ca2f18fc7b5be45d6f350c0328fad62bf2bc9
Reviewed-on: https://gerrit.libreoffice.org/21517
Reviewed-by: Chris Sherlock <chris.sherlock79@gmail.com>
Tested-by: Chris Sherlock <chris.sherlock79@gmail.com>
Diffstat (limited to 'vcl/source/font')
-rw-r--r-- | vcl/source/font/PhysicalFontCollection.cxx | 6 | ||||
-rw-r--r-- | vcl/source/font/PhysicalFontFace.cxx | 12 | ||||
-rw-r--r-- | vcl/source/font/PhysicalFontFamily.cxx | 6 | ||||
-rw-r--r-- | vcl/source/font/fontcache.cxx | 2 | ||||
-rw-r--r-- | vcl/source/font/fontselect.cxx | 2 |
5 files changed, 14 insertions, 14 deletions
diff --git a/vcl/source/font/PhysicalFontCollection.cxx b/vcl/source/font/PhysicalFontCollection.cxx index 07723101235a..61a8a9fd3ccd 100644 --- a/vcl/source/font/PhysicalFontCollection.cxx +++ b/vcl/source/font/PhysicalFontCollection.cxx @@ -1273,7 +1273,7 @@ PhysicalFontFamily* PhysicalFontCollection::FindFontFamily( FontSelectPattern& r PhysicalFontFamily::CalcType( nSearchType, eSearchWeight, eSearchWidth, rFSD.GetFamilyType(), pFontAttr ); PhysicalFontFamily* pFoundData = FindFontFamilyByAttributes( nSearchType, - eSearchWeight, eSearchWidth, rFSD.GetSlantType(), aSearchFamilyName ); + eSearchWeight, eSearchWidth, rFSD.GetItalic(), aSearchFamilyName ); if( pFoundData ) { @@ -1293,8 +1293,8 @@ PhysicalFontFamily* PhysicalFontCollection::FindFontFamily( FontSelectPattern& r } if( (nSearchType & ImplFontAttrs::Italic) && - ((rFSD.GetSlantType() == ITALIC_DONTKNOW) || - (rFSD.GetSlantType() == ITALIC_NONE)) && + ((rFSD.GetItalic() == ITALIC_DONTKNOW) || + (rFSD.GetItalic() == ITALIC_NONE)) && (pFoundData->GetTypeFaces() & FONT_FAMILY_ITALIC) ) { rFSD.SetItalic( ITALIC_NORMAL ); diff --git a/vcl/source/font/PhysicalFontFace.cxx b/vcl/source/font/PhysicalFontFace.cxx index 9540604f137f..1e50b0cafece 100644 --- a/vcl/source/font/PhysicalFontFace.cxx +++ b/vcl/source/font/PhysicalFontFace.cxx @@ -50,9 +50,9 @@ sal_Int32 PhysicalFontFace::CompareIgnoreSize( const PhysicalFontFace& rOther ) else if( GetWeight() > rOther.GetWeight() ) return 1; - if( GetSlantType() < rOther.GetSlantType() ) + if( GetItalic() < rOther.GetItalic() ) return -1; - else if( GetSlantType() > rOther.GetSlantType() ) + else if( GetItalic() > rOther.GetItalic() ) return 1; sal_Int32 nRet = GetFamilyName().compareTo( rOther.GetFamilyName() ); @@ -143,18 +143,18 @@ bool PhysicalFontFace::IsBetterMatch( const FontSelectPattern& rFSD, FontMatchSt } // if requiring custom matrix to fake italic, prefer upright font - FontItalic ePatternItalic = rFSD.maItalicMatrix != ItalicMatrix() ? ITALIC_NONE : rFSD.GetSlantType(); + FontItalic ePatternItalic = rFSD.maItalicMatrix != ItalicMatrix() ? ITALIC_NONE : rFSD.GetItalic(); if ( ePatternItalic == ITALIC_NONE ) { - if( GetSlantType() == ITALIC_NONE ) + if( GetItalic() == ITALIC_NONE ) nMatch += 900; } else { - if( ePatternItalic == GetSlantType() ) + if( ePatternItalic == GetItalic() ) nMatch += 900; - else if( GetSlantType() != ITALIC_NONE ) + else if( GetItalic() != ITALIC_NONE ) nMatch += 600; } diff --git a/vcl/source/font/PhysicalFontFamily.cxx b/vcl/source/font/PhysicalFontFamily.cxx index 20a72e068625..47879976e28d 100644 --- a/vcl/source/font/PhysicalFontFamily.cxx +++ b/vcl/source/font/PhysicalFontFamily.cxx @@ -150,10 +150,10 @@ bool PhysicalFontFamily::AddFontFace( PhysicalFontFace* pNewFontFace ) mnTypeFaces |= FONT_FAMILY_NORMAL; } - if( pNewFontFace->GetSlantType() == ITALIC_NONE ) + if( pNewFontFace->GetItalic() == ITALIC_NONE ) mnTypeFaces |= FONT_FAMILY_NONEITALIC; - else if( (pNewFontFace->GetSlantType() == ITALIC_NORMAL) - || (pNewFontFace->GetSlantType() == ITALIC_OBLIQUE) ) + else if( (pNewFontFace->GetItalic() == ITALIC_NORMAL) + || (pNewFontFace->GetItalic() == ITALIC_OBLIQUE) ) mnTypeFaces |= FONT_FAMILY_ITALIC; // reassign name (sharing saves memory) diff --git a/vcl/source/font/fontcache.cxx b/vcl/source/font/fontcache.cxx index 7f2e82b7420d..39d436635d84 100644 --- a/vcl/source/font/fontcache.cxx +++ b/vcl/source/font/fontcache.cxx @@ -87,7 +87,7 @@ bool ImplFontCache::IFSD_Equal::operator()(const FontSelectPattern& rA, const Fo // check font face attributes if( (rA.GetWeight() != rB.GetWeight()) - || (rA.GetSlantType() != rB.GetSlantType()) + || (rA.GetItalic() != rB.GetItalic()) // || (rA.meFamily != rB.meFamily) // TODO: remove this mostly obsolete member || (rA.GetPitch() != rB.GetPitch()) ) return false; diff --git a/vcl/source/font/fontselect.cxx b/vcl/source/font/fontselect.cxx index 641e3c6ea0b3..6f5f42ba05fc 100644 --- a/vcl/source/font/fontselect.cxx +++ b/vcl/source/font/fontselect.cxx @@ -155,7 +155,7 @@ size_t FontSelectPatternAttributes::hashCode() const } nHash += 11 * mnHeight; nHash += 19 * GetWeight(); - nHash += 29 * GetSlantType(); + nHash += 29 * GetItalic(); nHash += 37 * mnOrientation; nHash += 41 * meLanguage; if( mbVertical ) |