Kaydet (Commit) 395815ca authored tarafından Chris Sherlock's avatar Chris Sherlock Kaydeden (comit) Chris Sherlock

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/20865Reviewed-by: 's avatarChris Sherlock <chris.sherlock79@gmail.com>
Tested-by: 's avatarChris Sherlock <chris.sherlock79@gmail.com>
üst fc1d9e34
...@@ -63,10 +63,9 @@ public: ...@@ -63,10 +63,9 @@ public:
ImplGetDevSizeList* GetDevSizeList( const OUString& rFontName ) const; ImplGetDevSizeList* GetDevSizeList( const OUString& rFontName ) const;
PhysicalFontFamily* FindByTokenNames(const OUString& rTokenStr) const; PhysicalFontFamily* FindByTokenNames(const OUString& rTokenStr) const;
PhysicalFontFamily* FindByAttributes(ImplFontAttrs nSearchType, FontWeight, FontWidth,
FontItalic, const OUString& rSearchFamily) const;
protected: protected:
PhysicalFontFamily* ImplFindByAttributes(ImplFontAttrs nSearchType, FontWeight, FontWidth,
FontItalic, const OUString& rSearchFamily) const;
PhysicalFontFamily* FindDefaultFont() const; PhysicalFontFamily* FindDefaultFont() const;
private: private:
......
...@@ -421,7 +421,7 @@ PhysicalFontFamily* PhysicalFontCollection::ImplFindBySubstFontAttr( const utl:: ...@@ -421,7 +421,7 @@ PhysicalFontFamily* PhysicalFontCollection::ImplFindBySubstFontAttr( const utl::
const FontItalic eSearchSlant = ITALIC_DONTKNOW; const FontItalic eSearchSlant = ITALIC_DONTKNOW;
const OUString aSearchName; const OUString aSearchName;
pFoundData = ImplFindByAttributes( nSearchType, pFoundData = FindByAttributes( nSearchType,
eSearchWeight, eSearchWidth, eSearchSlant, aSearchName ); eSearchWeight, eSearchWidth, eSearchSlant, aSearchName );
if( pFoundData ) if( pFoundData )
...@@ -454,7 +454,7 @@ void PhysicalFontCollection::InitMatchData() const ...@@ -454,7 +454,7 @@ void PhysicalFontCollection::InitMatchData() const
} }
} }
PhysicalFontFamily* PhysicalFontCollection::ImplFindByAttributes( ImplFontAttrs nSearchType, PhysicalFontFamily* PhysicalFontCollection::FindByAttributes( ImplFontAttrs nSearchType,
FontWeight eSearchWeight, FontWeight eSearchWeight,
FontWidth eSearchWidth, FontWidth eSearchWidth,
FontItalic eSearchItalic, FontItalic eSearchItalic,
...@@ -1271,7 +1271,7 @@ PhysicalFontFamily* PhysicalFontCollection::FindByFont( FontSelectPattern& rFSD ...@@ -1271,7 +1271,7 @@ PhysicalFontFamily* PhysicalFontCollection::FindByFont( FontSelectPattern& rFSD
} }
PhysicalFontFamily::CalcType( nSearchType, eSearchWeight, eSearchWidth, rFSD.GetFamilyType(), pFontAttr ); PhysicalFontFamily::CalcType( nSearchType, eSearchWeight, eSearchWidth, rFSD.GetFamilyType(), pFontAttr );
PhysicalFontFamily* pFoundData = ImplFindByAttributes( nSearchType, PhysicalFontFamily* pFoundData = FindByAttributes( nSearchType,
eSearchWeight, eSearchWidth, rFSD.GetSlant(), aSearchFamilyName ); eSearchWeight, eSearchWidth, rFSD.GetSlant(), aSearchFamilyName );
if( pFoundData ) if( pFoundData )
......
...@@ -543,11 +543,11 @@ bool WinGlyphFallbackSubstititution::FindFontSubstitute( FontSelectPattern& rFon ...@@ -543,11 +543,11 @@ bool WinGlyphFallbackSubstititution::FindFontSubstitute( FontSelectPattern& rFon
} }
// are the missing characters symbols? // are the missing characters symbols?
pFontFamily = pFontCollection->ImplFindByAttributes( ImplFontAttrs::Symbol, pFontFamily = pFontCollection->FindByAttributes( ImplFontAttrs::Symbol,
rFontSelData.GetWeight(), rFontSelData.GetWeight(),
rFontSelData.GetWidthType(), rFontSelData.GetWidthType(),
rFontSelData.GetSlant(), rFontSelData.GetSlant(),
rFontSelData.maSearchName ); rFontSelData.maSearchName );
if( pFontFamily ) if( pFontFamily )
{ {
PhysicalFontFace* pFace = pFontFamily->FindBestFontFace( rFontSelData ); PhysicalFontFace* pFace = pFontFamily->FindBestFontFace( rFontSelData );
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment