Kaydet (Commit) 98da670a authored tarafından Norbert Thiebaud's avatar Norbert Thiebaud

replace DevFontList with PhysicalFontFamilies propagate the naming change

Change-Id: Ib3a4ce44d4bdde5570ece84e7399743ee7b8418f
üst cabee397
...@@ -217,8 +217,8 @@ private: ...@@ -217,8 +217,8 @@ private:
mutable bool mbMatchData; // true if matching attributes are initialized mutable bool mbMatchData; // true if matching attributes are initialized
bool mbMapNames; // true if MapNames are available bool mbMapNames; // true if MapNames are available
typedef boost::unordered_map<const OUString, PhysicalFontFamily*,FontNameHash> DevFontList; typedef boost::unordered_map<const OUString, PhysicalFontFamily*,FontNameHash> PhysicalFontFamilies;
DevFontList maDevFontList; PhysicalFontFamilies maPhysicalFontFamilies;
ImplPreMatchFontSubstitution* mpPreMatchHook; // device specific prematch substitution ImplPreMatchFontSubstitution* mpPreMatchHook; // device specific prematch substitution
ImplGlyphFallbackFontSubstitution* mpFallbackHook; // device specific glyh fallback substitution ImplGlyphFallbackFontSubstitution* mpFallbackHook; // device specific glyh fallback substitution
...@@ -230,7 +230,7 @@ public: ...@@ -230,7 +230,7 @@ public:
// fill the list with device fonts // fill the list with device fonts
void Add( PhysicalFontFace* ); void Add( PhysicalFontFace* );
void Clear(); void Clear();
int Count() const { return maDevFontList.size(); } int Count() const { return maPhysicalFontFamilies.size(); }
// find the device font // find the device font
PhysicalFontFamily* FindFontFamily( const OUString& rFontName ) const; PhysicalFontFamily* FindFontFamily( const OUString& rFontName ) const;
......
...@@ -1204,14 +1204,14 @@ void ImplDevFontList::Clear() ...@@ -1204,14 +1204,14 @@ void ImplDevFontList::Clear()
mnFallbackCount = -1; mnFallbackCount = -1;
// clear all entries in the device font list // clear all entries in the device font list
DevFontList::iterator it = maDevFontList.begin(); PhysicalFontFamilies::iterator it = maPhysicalFontFamilies.begin();
for(; it != maDevFontList.end(); ++it ) for(; it != maPhysicalFontFamilies.end(); ++it )
{ {
PhysicalFontFamily* pEntry = (*it).second; PhysicalFontFamily* pEntry = (*it).second;
delete pEntry; delete pEntry;
} }
maDevFontList.clear(); maPhysicalFontFamilies.clear();
// match data must be recalculated too // match data must be recalculated too
mbMatchData = false; mbMatchData = false;
...@@ -1408,15 +1408,15 @@ void ImplDevFontList::Add( PhysicalFontFace* pNewData ) ...@@ -1408,15 +1408,15 @@ void ImplDevFontList::Add( PhysicalFontFace* pNewData )
OUString aSearchName = pNewData->GetFamilyName(); OUString aSearchName = pNewData->GetFamilyName();
GetEnglishSearchFontName( aSearchName ); GetEnglishSearchFontName( aSearchName );
DevFontList::const_iterator it = maDevFontList.find( aSearchName ); PhysicalFontFamilies::const_iterator it = maPhysicalFontFamilies.find( aSearchName );
PhysicalFontFamily* pFoundData = NULL; PhysicalFontFamily* pFoundData = NULL;
if( it != maDevFontList.end() ) if( it != maPhysicalFontFamilies.end() )
pFoundData = (*it).second; pFoundData = (*it).second;
if( !pFoundData ) if( !pFoundData )
{ {
pFoundData = new PhysicalFontFamily( aSearchName ); pFoundData = new PhysicalFontFamily( aSearchName );
maDevFontList[ aSearchName ] = pFoundData; maPhysicalFontFamilies[ aSearchName ] = pFoundData;
} }
bool bKeepNewData = pFoundData->AddFontFace( pNewData ); bool bKeepNewData = pFoundData->AddFontFace( pNewData );
...@@ -1434,8 +1434,8 @@ PhysicalFontFamily* ImplDevFontList::ImplFindBySearchName( const OUString& rSear ...@@ -1434,8 +1434,8 @@ PhysicalFontFamily* ImplDevFontList::ImplFindBySearchName( const OUString& rSear
DBG_ASSERT( aTempName == rSearchName, "ImplDevFontList::ImplFindBySearchName() called with non-normalized name" ); DBG_ASSERT( aTempName == rSearchName, "ImplDevFontList::ImplFindBySearchName() called with non-normalized name" );
#endif #endif
DevFontList::const_iterator it = maDevFontList.find( rSearchName ); PhysicalFontFamilies::const_iterator it = maPhysicalFontFamilies.find( rSearchName );
if( it == maDevFontList.end() ) if( it == maPhysicalFontFamilies.end() )
return NULL; return NULL;
PhysicalFontFamily* pFoundData = (*it).second; PhysicalFontFamily* pFoundData = (*it).second;
...@@ -1455,8 +1455,8 @@ PhysicalFontFamily* ImplDevFontList::ImplFindByAliasName(const OUString& rSearch ...@@ -1455,8 +1455,8 @@ PhysicalFontFamily* ImplDevFontList::ImplFindByAliasName(const OUString& rSearch
// use the font's alias names to find the font // use the font's alias names to find the font
// TODO: get rid of linear search // TODO: get rid of linear search
DevFontList::const_iterator it = maDevFontList.begin(); PhysicalFontFamilies::const_iterator it = maPhysicalFontFamilies.begin();
while( it != maDevFontList.end() ) while( it != maPhysicalFontFamilies.end() )
{ {
PhysicalFontFamily* pData = (*it).second; PhysicalFontFamily* pData = (*it).second;
if( pData->maMapNames.isEmpty() ) if( pData->maMapNames.isEmpty() )
...@@ -1549,8 +1549,8 @@ void ImplDevFontList::InitMatchData() const ...@@ -1549,8 +1549,8 @@ void ImplDevFontList::InitMatchData() const
// calculate MatchData for all entries // calculate MatchData for all entries
const FontSubstConfiguration& rFontSubst = FontSubstConfiguration::get(); const FontSubstConfiguration& rFontSubst = FontSubstConfiguration::get();
DevFontList::const_iterator it = maDevFontList.begin(); PhysicalFontFamilies::const_iterator it = maPhysicalFontFamilies.begin();
for(; it != maDevFontList.end(); ++it ) for(; it != maPhysicalFontFamilies.end(); ++it )
{ {
const OUString& rSearchName = (*it).first; const OUString& rSearchName = (*it).first;
PhysicalFontFamily* pEntry = (*it).second; PhysicalFontFamily* pEntry = (*it).second;
...@@ -1579,8 +1579,8 @@ PhysicalFontFamily* ImplDevFontList::ImplFindByAttributes( sal_uLong nSearchType ...@@ -1579,8 +1579,8 @@ PhysicalFontFamily* ImplDevFontList::ImplFindByAttributes( sal_uLong nSearchType
long nBestMatch = 40000; long nBestMatch = 40000;
sal_uLong nBestType = 0; sal_uLong nBestType = 0;
DevFontList::const_iterator it = maDevFontList.begin(); PhysicalFontFamilies::const_iterator it = maPhysicalFontFamilies.begin();
for(; it != maDevFontList.end(); ++it ) for(; it != maPhysicalFontFamilies.end(); ++it )
{ {
PhysicalFontFamily* pData = (*it).second; PhysicalFontFamily* pData = (*it).second;
...@@ -1946,8 +1946,8 @@ PhysicalFontFamily* ImplDevFontList::FindDefaultFont() const ...@@ -1946,8 +1946,8 @@ PhysicalFontFamily* ImplDevFontList::FindDefaultFont() const
InitMatchData(); InitMatchData();
DevFontList::const_iterator it = maDevFontList.begin(); PhysicalFontFamilies::const_iterator it = maPhysicalFontFamilies.begin();
for(; it != maDevFontList.end(); ++it ) for(; it != maPhysicalFontFamilies.end(); ++it )
{ {
PhysicalFontFamily* pData = (*it).second; PhysicalFontFamily* pData = (*it).second;
if( pData->mnMatchType & IMPL_FONT_ATTR_SYMBOL ) if( pData->mnMatchType & IMPL_FONT_ATTR_SYMBOL )
...@@ -1960,8 +1960,8 @@ PhysicalFontFamily* ImplDevFontList::FindDefaultFont() const ...@@ -1960,8 +1960,8 @@ PhysicalFontFamily* ImplDevFontList::FindDefaultFont() const
return pFoundData; return pFoundData;
// finding any font is better than finding no font at all // finding any font is better than finding no font at all
it = maDevFontList.begin(); it = maPhysicalFontFamilies.begin();
if( it != maDevFontList.end() ) if( it != maPhysicalFontFamilies.end() )
pFoundData = (*it).second; pFoundData = (*it).second;
return pFoundData; return pFoundData;
...@@ -1977,8 +1977,8 @@ ImplDevFontList* ImplDevFontList::Clone( bool bScalable, bool bEmbeddable ) cons ...@@ -1977,8 +1977,8 @@ ImplDevFontList* ImplDevFontList::Clone( bool bScalable, bool bEmbeddable ) cons
// TODO: clone the config-font attributes too? // TODO: clone the config-font attributes too?
pClonedList->mbMatchData = false; pClonedList->mbMatchData = false;
DevFontList::const_iterator it = maDevFontList.begin(); PhysicalFontFamilies::const_iterator it = maPhysicalFontFamilies.begin();
for(; it != maDevFontList.end(); ++it ) for(; it != maPhysicalFontFamilies.end(); ++it )
{ {
const PhysicalFontFamily* pFontFace = (*it).second; const PhysicalFontFamily* pFontFace = (*it).second;
pFontFace->UpdateCloneFontList( *pClonedList, bScalable, bEmbeddable ); pFontFace->UpdateCloneFontList( *pClonedList, bScalable, bEmbeddable );
...@@ -1991,8 +1991,8 @@ ImplGetDevFontList* ImplDevFontList::GetDevFontList() const ...@@ -1991,8 +1991,8 @@ ImplGetDevFontList* ImplDevFontList::GetDevFontList() const
{ {
ImplGetDevFontList* pGetDevFontList = new ImplGetDevFontList; ImplGetDevFontList* pGetDevFontList = new ImplGetDevFontList;
DevFontList::const_iterator it = maDevFontList.begin(); PhysicalFontFamilies::const_iterator it = maPhysicalFontFamilies.begin();
for(; it != maDevFontList.end(); ++it ) for(; it != maPhysicalFontFamilies.end(); ++it )
{ {
const PhysicalFontFamily* pFontFamily = (*it).second; const PhysicalFontFamily* pFontFamily = (*it).second;
pFontFamily->UpdateDevFontList( *pGetDevFontList ); pFontFamily->UpdateDevFontList( *pGetDevFontList );
......
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