Kaydet (Commit) 43836528 authored tarafından Tor Lillqvist's avatar Tor Lillqvist

The CT prefix is used by the CoreText API

Surely we should not be using it for our own things in our Quartz
code, that is misleading.

Also bin a silly typedef.

Change-Id: Ie932e8784128246ca449608aad3dc96a575ec9d5
üst 746c89bf
......@@ -126,8 +126,7 @@ private:
CTFontCollectionRef mpCTFontCollection;
CFArrayRef mpCTFontArray;
typedef std::unordered_map<sal_IntPtr,CoreTextFontFace*> CTFontContainer;
CTFontContainer maFontContainer;
std::unordered_map<sal_IntPtr,CoreTextFontFace*> maFontContainer;
};
......
......@@ -441,7 +441,7 @@ FontAttributes DevFontFromCTFontDescriptor( CTFontDescriptorRef pFD, bool* bFont
return rDFA;
}
static void CTFontEnumCallBack( const void* pValue, void* pContext )
static void fontEnumCallBack( const void* pValue, void* pContext )
{
CTFontDescriptorRef pFD = static_cast<CTFontDescriptorRef>(pValue);
......@@ -464,8 +464,8 @@ SystemFontList::SystemFontList()
SystemFontList::~SystemFontList()
{
CTFontContainer::const_iterator it = maFontContainer.begin();
for(; it != maFontContainer.end(); ++it )
auto it = maFontContainer.cbegin();
for(; it != maFontContainer.cend(); ++it )
{
delete (*it).second;
}
......@@ -489,8 +489,8 @@ void SystemFontList::AddFont( CoreTextFontFace* pFontData )
void SystemFontList::AnnounceFonts( PhysicalFontCollection& rFontCollection ) const
{
CTFontContainer::const_iterator it = maFontContainer.begin();
for(; it != maFontContainer.end(); ++it )
auto it = maFontContainer.cbegin();
for(; it != maFontContainer.cend(); ++it )
{
rFontCollection.Add( (*it).second->Clone() );
}
......@@ -498,7 +498,7 @@ void SystemFontList::AnnounceFonts( PhysicalFontCollection& rFontCollection ) co
CoreTextFontFace* SystemFontList::GetFontDataFromId( sal_IntPtr nFontId ) const
{
CTFontContainer::const_iterator it = maFontContainer.find( nFontId );
auto it = maFontContainer.find( nFontId );
if( it == maFontContainer.end() )
{
return nullptr;
......@@ -522,7 +522,7 @@ bool SystemFontList::Init()
const int nFontCount = CFArrayGetCount( mpCTFontArray );
const CFRange aFullRange = CFRangeMake( 0, nFontCount );
CFArrayApplyFunction( mpCTFontArray, aFullRange, CTFontEnumCallBack, this );
CFArrayApplyFunction( mpCTFontArray, aFullRange, fontEnumCallBack, this );
return true;
}
......
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