Kaydet (Commit) 2c000fbf authored tarafından Chris Sherlock's avatar Chris Sherlock Kaydeden (comit) Chris Sherlock

vcl: switch from ImplFindBySearchName to FindFontFamily

ImplFindBySearchName is an implementation function, which I frown on
using if it can be avoided. In actual fact, the code in
OutputDevice::GetDefaultFont is just duplicating the
PhysicalFontFamily::FindFontFamily function anyway, so I'm switching to
using this instead.

Change-Id: I1491a09aa935e9fdb288dd6787fce1b1096d29a9
Reviewed-on: https://gerrit.libreoffice.org/20857Reviewed-by: 's avatarChris Sherlock <chris.sherlock79@gmail.com>
Tested-by: 's avatarChris Sherlock <chris.sherlock79@gmail.com>
üst 235a10d4
...@@ -870,13 +870,10 @@ vcl::Font OutputDevice::GetDefaultFont( DefaultFontType nType, LanguageType eLan ...@@ -870,13 +870,10 @@ vcl::Font OutputDevice::GetDefaultFont( DefaultFontType nType, LanguageType eLan
// Search Font in the FontList // Search Font in the FontList
OUString aName; OUString aName;
OUString aSearchName;
sal_Int32 nIndex = 0; sal_Int32 nIndex = 0;
do do
{ {
aSearchName = GetEnglishSearchFontName( GetNextFontToken( aSearch, nIndex ) ); PhysicalFontFamily* pFontFamily = pOutDev->mpFontCollection->FindFontFamily( GetNextFontToken( aSearch, nIndex ) );
PhysicalFontFamily* pFontFamily = pOutDev->mpFontCollection->ImplFindBySearchName( aSearchName );
if( pFontFamily ) if( pFontFamily )
{ {
AddTokenFontName( aName, pFontFamily->GetFamilyName() ); AddTokenFontName( aName, pFontFamily->GetFamilyName() );
......
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