diff options
author | Thomas Arnhold <thomas@arnhold.org> | 2011-07-25 21:56:49 +0200 |
---|---|---|
committer | Thomas Arnhold <thomas@arnhold.org> | 2011-07-26 09:00:54 +0200 |
commit | 6fd0fe261cd6465585adc81cb2cb96ec4c51ec34 (patch) | |
tree | 571be11f77ca456a9800d2af6245ebb3fc4ed27a /vcl/unx/generic | |
parent | c6b959536fb75dae31235d78bebb51f4c140e6cf (diff) |
callcatcher: remove unused methods
Diffstat (limited to 'vcl/unx/generic')
-rw-r--r-- | vcl/unx/generic/fontmanager/fontmanager.cxx | 69 | ||||
-rw-r--r-- | vcl/unx/generic/printer/ppdparser.cxx | 211 |
2 files changed, 0 insertions, 280 deletions
diff --git a/vcl/unx/generic/fontmanager/fontmanager.cxx b/vcl/unx/generic/fontmanager/fontmanager.cxx index 8936df327aeb..8c5c1bd232ee 100644 --- a/vcl/unx/generic/fontmanager/fontmanager.cxx +++ b/vcl/unx/generic/fontmanager/fontmanager.cxx @@ -2717,24 +2717,6 @@ void PrintFontManager::fillPrintFontInfo( PrintFont* pFont, PrintFontInfo& rInfo // ------------------------------------------------------------------------- -void PrintFontManager::getFontListWithInfo( ::std::list< PrintFontInfo >& rFonts, const PPDParser* pParser, bool bUseOverrideMetrics ) -{ - rFonts.clear(); - ::std::list< fontID > aFontList; - getFontList( aFontList, pParser, bUseOverrideMetrics ); - - ::std::list< fontID >::iterator it; - for( it = aFontList.begin(); it != aFontList.end(); ++it ) - { - PrintFontInfo aInfo; - aInfo.m_nID = *it; - fillPrintFontInfo( getFont( *it ), aInfo ); - rFonts.push_back( aInfo ); - } -} - -// ------------------------------------------------------------------------- - void PrintFontManager::getFontListWithFastInfo( ::std::list< FastPrintFontInfo >& rFonts, const PPDParser* pParser, bool bUseOverrideMetrics ) { rFonts.clear(); @@ -2883,20 +2865,6 @@ FontFamily PrintFontManager::matchFamilyName( const ::rtl::OUString& rFamily ) c // ------------------------------------------------------------------------- -FontFamily PrintFontManager::getFontFamilyType( fontID nFontID ) const -{ - PrintFont* pFont = getFont( nFontID ); - if( !pFont ) - return FAMILY_DONTKNOW; - - ::boost::unordered_map< int, FontFamily >::const_iterator it = - m_aFamilyTypes.find( pFont->m_nFamilyName ); - return (it != m_aFamilyTypes.end()) ? it->second : FAMILY_DONTKNOW; -} - - -// ------------------------------------------------------------------------- - const ::rtl::OUString& PrintFontManager::getFontFamily( fontID nFontID ) const { PrintFont* pFont = getFont( nFontID ); @@ -2975,15 +2943,6 @@ const ::rtl::OUString& PrintFontManager::getPSName( fontID nFontID ) const // ------------------------------------------------------------------------- -const CharacterMetric& PrintFontManager::getGlobalFontMetric( fontID nFontID, bool bHorizontal ) const -{ - static CharacterMetric aMetric; - PrintFont* pFont = getFont( nFontID ); - return pFont ? ( bHorizontal ? pFont->m_aGlobalMetricX : pFont->m_aGlobalMetricY ) : aMetric; -} - -// ------------------------------------------------------------------------- - int PrintFontManager::getFontAscend( fontID nFontID ) const { PrintFont* pFont = getFont( nFontID ); @@ -3016,34 +2975,6 @@ int PrintFontManager::getFontDescend( fontID nFontID ) const // ------------------------------------------------------------------------- -int PrintFontManager::getFontLeading( fontID nFontID ) const -{ - PrintFont* pFont = getFont( nFontID ); - if( pFont->m_nAscend == 0 && pFont->m_nDescend == 0 ) - { - // might be a truetype font not yet analyzed - if( pFont->m_eType == fonttype::TrueType ) - analyzeTrueTypeFile( pFont ); - } - return pFont->m_nLeading; -} - -// ------------------------------------------------------------------------- - -bool PrintFontManager::hasVerticalSubstitutions( fontID nFontID ) const -{ - PrintFont* pFont = getFont( nFontID ); - if( pFont->m_nAscend == 0 && pFont->m_nDescend == 0 ) - { - // might be a truetype font not yet analyzed - if( pFont->m_eType == fonttype::TrueType ) - analyzeTrueTypeFile( pFont ); - } - return pFont->m_bHaveVerticalSubstitutedGlyphs; -} - -// ------------------------------------------------------------------------- - void PrintFontManager::hasVerticalSubstitutions( fontID nFontID, const sal_Unicode* pCharacters, int nCharacters, bool* pHasSubst ) const { diff --git a/vcl/unx/generic/printer/ppdparser.cxx b/vcl/unx/generic/printer/ppdparser.cxx index 91643d6646b2..f0e97e820c05 100644 --- a/vcl/unx/generic/printer/ppdparser.cxx +++ b/vcl/unx/generic/printer/ppdparser.cxx @@ -1421,86 +1421,6 @@ String PPDParser::getDefaultInputSlot() const return String(); } -String PPDParser::getSlot( int nSlot ) const -{ - if( ! m_pInputSlots ) - return String(); - - if( nSlot > 0 && nSlot < m_pInputSlots->countValues() ) - return m_pInputSlots->getValue( nSlot )->m_aOption; - else if( m_pInputSlots->countValues() > 0 ) - return m_pInputSlots->getValue( (sal_uLong)0 )->m_aOption; - - return String(); -} - -String PPDParser::getSlotCommand( int nSlot ) const -{ - if( ! m_pInputSlots ) - return String(); - - if( nSlot > 0 && nSlot < m_pInputSlots->countValues() ) - return m_pInputSlots->getValue( nSlot )->m_aValue; - else if( m_pInputSlots->countValues() > 0 ) - return m_pInputSlots->getValue( (sal_uLong)0 )->m_aValue; - - return String(); -} - -String PPDParser::getSlotCommand( const String& rSlot ) const -{ - if( ! m_pInputSlots ) - return String(); - - for( int i=0; i < m_pInputSlots->countValues(); i++ ) - { - const PPDValue* pValue = m_pInputSlots->getValue( i ); - if( pValue->m_aOption == rSlot ) - return pValue->m_aValue; - } - return String(); -} - -String PPDParser::getPaperDimension( int nPaperDimension ) const -{ - if( ! m_pPaperDimensions ) - return String(); - - if( nPaperDimension > 0 && nPaperDimension < m_pPaperDimensions->countValues() ) - return m_pPaperDimensions->getValue( nPaperDimension )->m_aOption; - else if( m_pPaperDimensions->countValues() > 0 ) - return m_pPaperDimensions->getValue( (sal_uLong)0 )->m_aOption; - - return String(); -} - -String PPDParser::getPaperDimensionCommand( int nPaperDimension ) const -{ - if( ! m_pPaperDimensions ) - return String(); - - if( nPaperDimension > 0 && nPaperDimension < m_pPaperDimensions->countValues() ) - return m_pPaperDimensions->getValue( nPaperDimension )->m_aValue; - else if( m_pPaperDimensions->countValues() > 0 ) - return m_pPaperDimensions->getValue( (sal_uLong)0 )->m_aValue; - - return String(); -} - -String PPDParser::getPaperDimensionCommand( const String& rPaperDimension ) const -{ - if( ! m_pPaperDimensions ) - return String(); - - for( int i=0; i < m_pPaperDimensions->countValues(); i++ ) - { - const PPDValue* pValue = m_pPaperDimensions->getValue( i ); - if( pValue->m_aOption == rPaperDimension ) - return pValue->m_aValue; - } - return String(); -} - void PPDParser::getResolutionFromString( const String& rString, int& rXRes, int& rYRes ) const @@ -1535,94 +1455,6 @@ void PPDParser::getDefaultResolution( int& rXRes, int& rYRes ) const rYRes = 300; } -int PPDParser::getResolutions() const -{ - if( ( ! m_pResolutions || m_pResolutions->countValues() == 0 ) && - m_pDefaultResolution ) - return 1; - return m_pResolutions ? m_pResolutions->countValues() : 0; -} - -void PPDParser::getResolution( int nNr, int& rXRes, int& rYRes ) const -{ - if( ( ! m_pResolutions || m_pResolutions->countValues() == 0 ) && m_pDefaultResolution && nNr == 0 ) - { - getDefaultResolution( rXRes, rYRes ); - return; - } - if( ! m_pResolutions ) - return; - - getResolutionFromString( m_pResolutions->getValue( nNr )->m_aOption, - rXRes, rYRes ); -} - -String PPDParser::getResolutionCommand( int nXRes, int nYRes ) const -{ - if( ( ! m_pResolutions || m_pResolutions->countValues() == 0 ) && m_pDefaultResolution ) - return m_pDefaultResolution->m_aValue; - - if( ! m_pResolutions ) - return String(); - - int nX, nY; - for( int i = 0; i < m_pResolutions->countValues(); i++ ) - { - getResolutionFromString( m_pResolutions->getValue( i )->m_aOption, - nX, nY ); - if( nX == nXRes && nY == nYRes ) - return m_pResolutions->getValue( i )->m_aValue; - } - return String(); -} - -String PPDParser::getDefaultDuplexType() const -{ - if( m_pDefaultDuplexType ) - return m_pDefaultDuplexType->m_aValue; - return String(); -} - -String PPDParser::getDuplex( int nDuplex ) const -{ - if( ! m_pDuplexTypes ) - return String(); - - if( nDuplex > 0 && nDuplex < m_pDuplexTypes->countValues() ) - return m_pDuplexTypes->getValue( nDuplex )->m_aOption; - else if( m_pDuplexTypes->countValues() > 0 ) - return m_pDuplexTypes->getValue( (sal_uLong)0 )->m_aOption; - - return String(); -} - -String PPDParser::getDuplexCommand( int nDuplex ) const -{ - if( ! m_pDuplexTypes ) - return String(); - - if( nDuplex > 0 && nDuplex < m_pDuplexTypes->countValues() ) - return m_pDuplexTypes->getValue( nDuplex )->m_aValue; - else if( m_pDuplexTypes->countValues() > 0 ) - return m_pDuplexTypes->getValue( (sal_uLong)0 )->m_aValue; - - return String(); -} - -String PPDParser::getDuplexCommand( const String& rDuplex ) const -{ - if( ! m_pDuplexTypes ) - return String(); - - for( int i=0; i < m_pDuplexTypes->countValues(); i++ ) - { - const PPDValue* pValue = m_pDuplexTypes->getValue( i ); - if( pValue->m_aOption == rDuplex ) - return pValue->m_aValue; - } - return String(); -} - void PPDParser::getFontAttributes( int nFont, String& rEncoding, @@ -1637,19 +1469,6 @@ void PPDParser::getFontAttributes( } } -void PPDParser::getFontAttributes( - const String& rFont, - String& rEncoding, - String& rCharset ) const -{ - if( m_pFontList ) - { - for( int i = 0; i < m_pFontList->countValues(); i++ ) - if( m_pFontList->getValue( i )->m_aOption == rFont ) - getFontAttributes( i, rEncoding, rCharset ); - } -} - String PPDParser::getFont( int nFont ) const { if( ! m_pFontList ) @@ -1679,17 +1498,6 @@ rtl::OUString PPDParser::translateOption( const rtl::OUString& i_rKey, return aResult; } -rtl::OUString PPDParser::translateValue( const rtl::OUString& i_rKey, - const rtl::OUString& i_rOption, - const rtl::OUString& i_rValue, - const com::sun::star::lang::Locale& i_rLocale ) const -{ - rtl::OUString aResult( m_pTranslator->translateValue( i_rKey, i_rOption, i_rValue, i_rLocale ) ); - if( aResult.getLength() == 0 ) - aResult = i_rValue; - return aResult; -} - /* * PPDKey */ @@ -2027,25 +1835,6 @@ bool PPDContext::checkConstraints( const PPDKey* pKey, const PPDValue* pNewValue // ------------------------------------------------------------------- -void PPDContext::getUnconstrainedValues( const PPDKey* pKey, ::std::list< const PPDValue* >& rValues ) -{ - rValues.clear(); - - if( ! m_pParser || ! pKey || ! m_pParser->hasKey( pKey ) ) - return; - - int nValues = pKey->countValues(); - for( int i = 0; i < nValues; i++ ) - { - const PPDValue* pValue = pKey->getValue( i ); - if( checkConstraints( pKey, pValue ) ) - rValues.push_back( pValue ); - } -} - - -// ------------------------------------------------------------------- - char* PPDContext::getStreamableBuffer( sal_uLong& rBytes ) const { rBytes = 0; |