From e30b26a7c2fc9fe313c2cb5a76f3fd79c90cea5e Mon Sep 17 00:00:00 2001 From: Thomas Arnhold Date: Fri, 22 Jul 2011 11:25:56 +0200 Subject: callcatcher: clean up GlyphCache and one connected method --- vcl/inc/glyphcache.hxx | 3 --- vcl/inc/vcl/svapp.hxx | 2 -- vcl/source/app/svapp.cxx | 11 ----------- vcl/source/glyphs/glyphcache.cxx | 32 -------------------------------- 4 files changed, 48 deletions(-) (limited to 'vcl') diff --git a/vcl/inc/glyphcache.hxx b/vcl/inc/glyphcache.hxx index 42f90672f87b..6cd958d0cb11 100644 --- a/vcl/inc/glyphcache.hxx +++ b/vcl/inc/glyphcache.hxx @@ -71,9 +71,7 @@ public: /*virtual*/ ~GlyphCache(); static GlyphCache& GetInstance(); - void LoadFonts(); - void ClearFontPath(); void AddFontPath( const String& rFontPath ); void AddFontFile( const rtl::OString& rNormalizedName, int nFaceNum, sal_IntPtr nFontId, const ImplDevFontAttributes&, @@ -96,7 +94,6 @@ private: void GrowNotify(); private: - sal_uLong CalcByteCount() const; void GarbageCollect(); // the GlyphCache's FontList matches a font request to a serverfont instance diff --git a/vcl/inc/vcl/svapp.hxx b/vcl/inc/vcl/svapp.hxx index b233a3c07c03..2c85dbb7de23 100644 --- a/vcl/inc/vcl/svapp.hxx +++ b/vcl/inc/vcl/svapp.hxx @@ -382,8 +382,6 @@ public: static void SetDialogScaleX( short nScale ); - static const String& GetFontPath(); - static UniqueItemId CreateUniqueId(); static ::com::sun::star::uno::Reference< ::com::sun::star::awt::XDisplayConnection > GetDisplayConnection(); diff --git a/vcl/source/app/svapp.cxx b/vcl/source/app/svapp.cxx index 231f5fa97125..925ad70e199b 100644 --- a/vcl/source/app/svapp.cxx +++ b/vcl/source/app/svapp.cxx @@ -1589,17 +1589,6 @@ sal_uInt16 Application::GetSystemWindowMode() // ----------------------------------------------------------------------- -const String& Application::GetFontPath() -{ - ImplSVData* pSVData = ImplGetSVData(); - - if( pSVData->maAppData.mpFontPath ) - return *(pSVData->maAppData.mpFontPath); - return ImplGetSVEmptyStr(); -} - -// ----------------------------------------------------------------------- - UniqueItemId Application::CreateUniqueId() { ImplSVData* pSVData = ImplGetSVData(); diff --git a/vcl/source/glyphs/glyphcache.cxx b/vcl/source/glyphs/glyphcache.cxx index 0688e17d9a45..b857c0824975 100644 --- a/vcl/source/glyphs/glyphcache.cxx +++ b/vcl/source/glyphs/glyphcache.cxx @@ -175,23 +175,6 @@ GlyphCache& GlyphCache::GetInstance() // ----------------------------------------------------------------------- -void GlyphCache::LoadFonts() -{ - const String& rFontPath = Application::GetFontPath(); - if( rFontPath.Len() > 0 ) - AddFontPath( rFontPath ); -} - -// ----------------------------------------------------------------------- - -void GlyphCache::ClearFontPath() -{ - if( mpFtManager ) - mpFtManager->ClearFontList(); -} - -// ----------------------------------------------------------------------- - void GlyphCache::AddFontPath( const String& rFontPath ) { if( !mpFtManager ) @@ -299,21 +282,6 @@ void GlyphCache::UncacheFont( ServerFont& rServerFont ) // ----------------------------------------------------------------------- -sal_uLong GlyphCache::CalcByteCount() const -{ - sal_uLong nCacheSize = sizeof(*this); - for( FontList::const_iterator it = maFontList.begin(); it != maFontList.end(); ++it ) - { - const ServerFont* pSF = it->second; - if( pSF ) - nCacheSize += pSF->GetByteCount(); - } - // TODO: also account something for hashtable management - return nCacheSize; -} - -// ----------------------------------------------------------------------- - void GlyphCache::GarbageCollect() { // when current GC font has been destroyed get another one -- cgit