summaryrefslogtreecommitdiff
path: root/vcl/generic
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2012-01-11 11:42:25 +0000
committerCaolán McNamara <caolanm@redhat.com>2012-01-11 14:13:32 +0000
commit6eddd1b54cb6fc21cdc6883eee708d1247d15f9d (patch)
tree47d78be7322dbd8771a0206ffee66c4a0c137b55 /vcl/generic
parent44cf768131e8a06ff688ddfa8b53f144ffb9e4a0 (diff)
further shrinkage of padmin non-fontconfig code-paths
Diffstat (limited to 'vcl/generic')
-rw-r--r--vcl/generic/fontmanager/fontmanager.cxx90
1 files changed, 0 insertions, 90 deletions
diff --git a/vcl/generic/fontmanager/fontmanager.cxx b/vcl/generic/fontmanager/fontmanager.cxx
index 5ca8694704e8..e99044e62c11 100644
--- a/vcl/generic/fontmanager/fontmanager.cxx
+++ b/vcl/generic/fontmanager/fontmanager.cxx
@@ -3471,96 +3471,6 @@ getImportableFontProperties(
// -------------------------------------------------------------------------
-bool PrintFontManager::getFileDuplicates( fontID nFont, ::std::list< fontID >& rFonts ) const
-{
- bool bRet = false;
-
- rFonts.clear();
-
- PrintFont* pSearchFont = getFont( nFont );
- if( ! pSearchFont ||
- pSearchFont->m_eType != fonttype::TrueType ||
- static_cast<TrueTypeFontFile*>(pSearchFont)->m_nCollectionEntry == -1
- )
- return false;
-
- OString aFile( getFontFileSysPath( nFont ) );
- if( ! aFile.getLength() )
- return false;
-
- for( ::boost::unordered_map< fontID, PrintFont* >::const_iterator it = m_aFonts.begin(); it != m_aFonts.end(); ++it )
- {
- if( nFont != it->first )
- {
- OString aCompFile( getFontFile( it->second ) );
- if( aCompFile == aFile )
- {
- rFonts.push_back( it->first );
- bRet = true;
- }
- }
- }
- return bRet;
-}
-
-// -------------------------------------------------------------------------
-
-bool PrintFontManager::removeFonts( const ::std::list< fontID >& rFonts )
-{
- bool bRet = true;
- ::std::list< fontID > aDuplicates;
- for( ::std::list< fontID >::const_iterator it = rFonts.begin(); it != rFonts.end(); ++it )
- {
- ::boost::unordered_map< fontID, PrintFont* >::const_iterator haveFont = m_aFonts.find( *it );
- if( haveFont == m_aFonts.end() )
- continue;
-
- PrintFont* pFont = haveFont->second;
- bool bRemoveDuplicates = getFileDuplicates( *it, aDuplicates );
- ByteString aFile( getFontFile( pFont ) );
- if( aFile.Len() )
- {
-#if OSL_DEBUG_LEVEL > 1
- fprintf( stderr, "try unlink( \"%s\" ) ... ", aFile.GetBuffer() );
-#endif
- if( unlink( aFile.GetBuffer() ) )
- {
- bRet = false;
-#if OSL_DEBUG_LEVEL > 1
- fprintf( stderr, "failed\n" );
-#endif
- continue;
- }
-#if OSL_DEBUG_LEVEL > 1
- fprintf( stderr, "succeeded\n" );
-#endif
- OString aAfm( getAfmFile( pFont ) );
- if( aAfm.getLength() )
- {
-#if OSL_DEBUG_LEVEL > 1
- fprintf( stderr, "unlink( \"%s\" )\n", aAfm.getStr() );
-#endif
- unlink( aAfm.getStr() );
- }
- m_aFonts.erase( *it );
- delete pFont;
- if( bRemoveDuplicates )
- {
- for( ::std::list< fontID >::iterator dup = aDuplicates.begin(); dup != aDuplicates.end(); ++dup )
- {
- m_aFontFileToFontID[ aFile ].erase( *dup );
- PrintFont* pDup = m_aFonts[ *dup ];
- m_aFonts.erase( *dup );
- delete pDup;
- }
- }
- }
- }
- return bRet;
-}
-
-// -------------------------------------------------------------------------
-
bool PrintFontManager::isPrivateFontFile( fontID nFont ) const
{
bool bRet = false;