diff options
author | Chris Sherlock <Chris Sherlock chris.sherlock79@gmail.com> | 2015-12-23 10:39:37 +1100 |
---|---|---|
committer | Chris Sherlock <chris.sherlock79@gmail.com> | 2015-12-23 07:13:23 +0000 |
commit | 395815caa6be493d0831a61ba3de4e7d5ba4ae1d (patch) | |
tree | 3d8dcbf4234e2fbe1af92a93a40c838b57f8d21e /vcl | |
parent | fc1d9e3496492d9cfec491887f8007d0e42dd368 (diff) |
vcl: Make ImplFindByAttributes public and rename
Renamed PhysicalFontCollection::ImplFindByAttributes to
FindByAttributes. This function is actually useful for finding a
font within the collection, so I'm moving it from being a protected
function to public because it is actually useful in its own right,
not just for PhysicalFontCollection.
Note that ImplFontAttrs is a mess anyway, so not going to touch that
(yet).
Change-Id: I884ddd5118cbbb0f92b157540f7ffcf1bf35609b
Reviewed-on: https://gerrit.libreoffice.org/20865
Reviewed-by: Chris Sherlock <chris.sherlock79@gmail.com>
Tested-by: Chris Sherlock <chris.sherlock79@gmail.com>
Diffstat (limited to 'vcl')
-rw-r--r-- | vcl/inc/PhysicalFontCollection.hxx | 5 | ||||
-rw-r--r-- | vcl/source/font/PhysicalFontCollection.cxx | 6 | ||||
-rw-r--r-- | vcl/win/gdi/salgdi3.cxx | 10 |
3 files changed, 10 insertions, 11 deletions
diff --git a/vcl/inc/PhysicalFontCollection.hxx b/vcl/inc/PhysicalFontCollection.hxx index 6eb77ae39448..2e4825f4894a 100644 --- a/vcl/inc/PhysicalFontCollection.hxx +++ b/vcl/inc/PhysicalFontCollection.hxx @@ -63,10 +63,9 @@ public: ImplGetDevSizeList* GetDevSizeList( const OUString& rFontName ) const; PhysicalFontFamily* FindByTokenNames(const OUString& rTokenStr) const; - + PhysicalFontFamily* FindByAttributes(ImplFontAttrs nSearchType, FontWeight, FontWidth, + FontItalic, const OUString& rSearchFamily) const; protected: - PhysicalFontFamily* ImplFindByAttributes(ImplFontAttrs nSearchType, FontWeight, FontWidth, - FontItalic, const OUString& rSearchFamily) const; PhysicalFontFamily* FindDefaultFont() const; private: diff --git a/vcl/source/font/PhysicalFontCollection.cxx b/vcl/source/font/PhysicalFontCollection.cxx index 02c85cbc75dd..39bcb2661f5f 100644 --- a/vcl/source/font/PhysicalFontCollection.cxx +++ b/vcl/source/font/PhysicalFontCollection.cxx @@ -421,7 +421,7 @@ PhysicalFontFamily* PhysicalFontCollection::ImplFindBySubstFontAttr( const utl:: const FontItalic eSearchSlant = ITALIC_DONTKNOW; const OUString aSearchName; - pFoundData = ImplFindByAttributes( nSearchType, + pFoundData = FindByAttributes( nSearchType, eSearchWeight, eSearchWidth, eSearchSlant, aSearchName ); if( pFoundData ) @@ -454,7 +454,7 @@ void PhysicalFontCollection::InitMatchData() const } } -PhysicalFontFamily* PhysicalFontCollection::ImplFindByAttributes( ImplFontAttrs nSearchType, +PhysicalFontFamily* PhysicalFontCollection::FindByAttributes( ImplFontAttrs nSearchType, FontWeight eSearchWeight, FontWidth eSearchWidth, FontItalic eSearchItalic, @@ -1271,7 +1271,7 @@ PhysicalFontFamily* PhysicalFontCollection::FindByFont( FontSelectPattern& rFSD } PhysicalFontFamily::CalcType( nSearchType, eSearchWeight, eSearchWidth, rFSD.GetFamilyType(), pFontAttr ); - PhysicalFontFamily* pFoundData = ImplFindByAttributes( nSearchType, + PhysicalFontFamily* pFoundData = FindByAttributes( nSearchType, eSearchWeight, eSearchWidth, rFSD.GetSlant(), aSearchFamilyName ); if( pFoundData ) diff --git a/vcl/win/gdi/salgdi3.cxx b/vcl/win/gdi/salgdi3.cxx index d09176441ad8..02982f6d6dd9 100644 --- a/vcl/win/gdi/salgdi3.cxx +++ b/vcl/win/gdi/salgdi3.cxx @@ -543,11 +543,11 @@ bool WinGlyphFallbackSubstititution::FindFontSubstitute( FontSelectPattern& rFon } // are the missing characters symbols? - pFontFamily = pFontCollection->ImplFindByAttributes( ImplFontAttrs::Symbol, - rFontSelData.GetWeight(), - rFontSelData.GetWidthType(), - rFontSelData.GetSlant(), - rFontSelData.maSearchName ); + pFontFamily = pFontCollection->FindByAttributes( ImplFontAttrs::Symbol, + rFontSelData.GetWeight(), + rFontSelData.GetWidthType(), + rFontSelData.GetSlant(), + rFontSelData.maSearchName ); if( pFontFamily ) { PhysicalFontFace* pFace = pFontFamily->FindBestFontFace( rFontSelData ); |