vcl/inc/quartz/salgdi.h | 3 +-- vcl/quartz/ctfonts.cxx | 14 +++++++------- 2 files changed, 8 insertions(+), 9 deletions(-)
New commits: commit 43836528f445061d622b8edc7773ee40798d3a59 Author: Tor Lillqvist <t...@collabora.com> Date: Mon Jan 22 20:57:24 2018 +0200 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 diff --git a/vcl/inc/quartz/salgdi.h b/vcl/inc/quartz/salgdi.h index 17faec998c26..4016fcb4a2cc 100644 --- a/vcl/inc/quartz/salgdi.h +++ b/vcl/inc/quartz/salgdi.h @@ -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; }; diff --git a/vcl/quartz/ctfonts.cxx b/vcl/quartz/ctfonts.cxx index b7389c895568..fbdf2efe89a3 100644 --- a/vcl/quartz/ctfonts.cxx +++ b/vcl/quartz/ctfonts.cxx @@ -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; } _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits