summaryrefslogtreecommitdiff
path: root/vcl/source/outdev
diff options
context:
space:
mode:
authorChris Sherlock <chris.sherlock79@gmail.com>2016-01-07 21:51:12 +1100
committerChris Sherlock <chris.sherlock79@gmail.com>2016-01-07 22:23:08 +1100
commit50261ea4b7242e365717c77a9370afd1044a97e3 (patch)
treedfa8cc19d5363bca1b582fe6c4cd95a29bdd0a19 /vcl/source/outdev
parent90e07dd6f5d64a0d0041361c1592a6cd93ff2ac0 (diff)
vcl: reorganize ImplFontEntry functions
I have moved all ImplFontEntry functions into vcl/source/font/fontentry.cxx and also created a new hash function that hashes std::pair<sal_UCS4,FontWeight> types by specializing std::hash. Change-Id: Ibbe07c38b98e3c976836a895dbfdcaecd5daff8d
Diffstat (limited to 'vcl/source/outdev')
-rw-r--r--vcl/source/outdev/font.cxx60
1 files changed, 0 insertions, 60 deletions
diff --git a/vcl/source/outdev/font.cxx b/vcl/source/outdev/font.cxx
index 915cc89fcb32..4593900da3cf 100644
--- a/vcl/source/outdev/font.cxx
+++ b/vcl/source/outdev/font.cxx
@@ -979,66 +979,6 @@ vcl::Font OutputDevice::GetDefaultFont( DefaultFontType nType, LanguageType eLan
return aFont;
}
-ImplFontEntry::ImplFontEntry( const FontSelectPattern& rFontSelData )
- : m_pFontCache(nullptr)
- , maFontSelData( rFontSelData )
- , maFontAttributes( rFontSelData )
- , mpConversion( nullptr )
- , mnLineHeight( 0 )
- , mnRefCount( 1 )
- , mnSetFontFlags( 0 )
- , mnOwnOrientation( 0 )
- , mnOrientation( 0 )
- , mbInit( false )
- , mpUnicodeFallbackList( nullptr )
-{
- maFontSelData.mpFontEntry = this;
-}
-
-ImplFontEntry::~ImplFontEntry()
-{
- delete mpUnicodeFallbackList;
- m_pFontCache = nullptr;
-}
-
-size_t ImplFontEntry::GFBCacheKey_Hash::operator()( const GFBCacheKey& rData ) const
-{
- boost::hash<sal_UCS4> a;
- boost::hash<int > b;
- return a(rData.first) ^ b(rData.second);
-}
-
-void ImplFontEntry::AddFallbackForUnicode( sal_UCS4 cChar, FontWeight eWeight, const OUString& rFontName )
-{
- if( !mpUnicodeFallbackList )
- mpUnicodeFallbackList = new UnicodeFallbackList;
- (*mpUnicodeFallbackList)[ GFBCacheKey(cChar,eWeight) ] = rFontName;
-}
-
-bool ImplFontEntry::GetFallbackForUnicode( sal_UCS4 cChar, FontWeight eWeight, OUString* pFontName ) const
-{
- if( !mpUnicodeFallbackList )
- return false;
-
- UnicodeFallbackList::const_iterator it = mpUnicodeFallbackList->find( GFBCacheKey(cChar,eWeight) );
- if( it == mpUnicodeFallbackList->end() )
- return false;
-
- *pFontName = (*it).second;
- return true;
-}
-
-void ImplFontEntry::IgnoreFallbackForUnicode( sal_UCS4 cChar, FontWeight eWeight, const OUString& rFontName )
-{
-// DBG_ASSERT( mpUnicodeFallbackList, "ImplFontEntry::IgnoreFallbackForUnicode no list" );
- UnicodeFallbackList::iterator it = mpUnicodeFallbackList->find( GFBCacheKey(cChar,eWeight) );
-// DBG_ASSERT( it != mpUnicodeFallbackList->end(), "ImplFontEntry::IgnoreFallbackForUnicode no match" );
- if( it == mpUnicodeFallbackList->end() )
- return;
- if( (*it).second == rFontName )
- mpUnicodeFallbackList->erase( it );
-}
-
FontSelectPatternAttributes::FontSelectPatternAttributes( const vcl::Font& rFont,
const OUString& rSearchName, const Size& rSize, float fExactHeight )
: maSearchName( rSearchName )