[Libreoffice-commits] .: 2 commits - vcl/inc vcl/source vcl/unx
Thomas Arnhold
tarnhold at kemper.freedesktop.org
Tue Jul 26 00:02:00 PDT 2011
vcl/inc/vcl/fontmanager.hxx | 14 -
vcl/inc/vcl/jobset.hxx | 1
vcl/inc/vcl/ppdparser.hxx | 22 --
vcl/inc/vcl/print.hxx | 1
vcl/source/gdi/jobset.cxx | 13 -
vcl/unx/generic/fontmanager/fontmanager.cxx | 69 ---------
vcl/unx/generic/printer/ppdparser.cxx | 211 ----------------------------
7 files changed, 331 deletions(-)
New commits:
commit e9f4551eb792e6f5b137d95a926e192da63cf798
Author: Thomas Arnhold <thomas at arnhold.org>
Date: Mon Jul 25 21:56:49 2011 +0200
callcatcher: remove unused methods
diff --git a/vcl/inc/vcl/fontmanager.hxx b/vcl/inc/vcl/fontmanager.hxx
index 816adbe..60b5099 100644
--- a/vcl/inc/vcl/fontmanager.hxx
+++ b/vcl/inc/vcl/fontmanager.hxx
@@ -409,8 +409,6 @@ public:
// all fonttype::Builtin type fonts are not listed
// which do not occur in the PPD of pParser
void getFontList( std::list< fontID >& rFontIDs, const PPDParser* pParser = NULL, bool bUseOverrideMetrics = false );
- // get the font list and detailed font info. see getFontList for pParser
- void getFontListWithInfo( std::list< PrintFontInfo >& rFonts, const PPDParser* pParser = NULL, bool bUseOverrideMetrics = false );
// get the font list and fast font info. see getFontList for pParser
void getFontListWithFastInfo( std::list< FastPrintFontInfo >& rFonts, const PPDParser* pParser = NULL, bool bUseOverrideMetrics = false );
@@ -426,9 +424,6 @@ public:
// get a specific fonts PSName name
const rtl::OUString& getPSName( fontID nFontID ) const;
- // get a specific fonts style family
- FontFamily getFontFamilyType( fontID nFontID ) const;
-
// get a specific fonts family name aliases
void getFontFamilyAliases( fontID nFontID ) const;
@@ -490,24 +485,15 @@ public:
// get the ttc face number
int getFontFaceNumber( fontID nFontID ) const;
- // get a specific fonts global metrics
- const CharacterMetric& getGlobalFontMetric( fontID nFontID, bool bHorizontal ) const;
-
// get a specific fonts ascend
int getFontAscend( fontID nFontID ) const;
// get a specific fonts descent
int getFontDescend( fontID nFontID ) const;
- // get a specific fonts leading
- int getFontLeading( fontID nFontID ) const;
-
// get a fonts glyph bounding box
bool getFontBoundingBox( fontID nFont, int& xMin, int& yMin, int& xMax, int& yMax );
- // info whether there are vertical substitutions
- bool hasVerticalSubstitutions( fontID nFontID ) const;
-
// info whether an array of glyphs has vertical substitutions
void hasVerticalSubstitutions( fontID nFontID, const sal_Unicode* pCharacters,
int nCharacters, bool* pHasSubst ) const;
diff --git a/vcl/inc/vcl/ppdparser.hxx b/vcl/inc/vcl/ppdparser.hxx
index 853985d..e46d4df 100644
--- a/vcl/inc/vcl/ppdparser.hxx
+++ b/vcl/inc/vcl/ppdparser.hxx
@@ -229,9 +229,6 @@ public:
// returns false if paper not found
int getPaperDimensions() const
{ return m_pPaperDimensions ? m_pPaperDimensions->countValues() : 0; }
- String getPaperDimension( int ) const;
- String getPaperDimensionCommand( int ) const;
- String getPaperDimensionCommand( const String & ) const;
// match the best paper for width and height
String matchPaper( int nWidth, int nHeight ) const;
@@ -247,33 +244,20 @@ public:
String getDefaultInputSlot() const;
int getInputSlots() const
{ return m_pInputSlots ? m_pInputSlots->countValues() : 0; }
- String getSlot( int ) const;
- String getSlotCommand( int ) const;
- String getSlotCommand( const String& ) const;
void getDefaultResolution( int& rXRes, int& rYRes ) const;
- int getResolutions() const;
- void getResolution( int, int& rXRes, int& rYRes ) const;
- String getResolutionCommand( int nXRes, int nYRes ) const;
// values in dpi
void getResolutionFromString( const String&, int&, int& ) const;
// helper function
- String getDefaultDuplexType() const;
int getDuplexTypes() const
{ return m_pDuplexTypes ? m_pDuplexTypes->countValues() : 0; }
- String getDuplex( int ) const;
- String getDuplexCommand( int ) const;
- String getDuplexCommand( const String& ) const;
int getFonts() const
{ return m_pFontList ? m_pFontList->countValues() : 0; }
void getFontAttributes( int,
String& rEncoding,
String& rCharset ) const;
- void getFontAttributes( const String&,
- String& rEncoding,
- String& rCharset ) const;
String getFont( int ) const;
@@ -282,10 +266,6 @@ public:
rtl::OUString translateOption( const rtl::OUString& i_rKey,
const rtl::OUString& i_rOption,
const com::sun::star::lang::Locale& i_rLocale = com::sun::star::lang::Locale() ) const;
- rtl::OUString translateValue( const rtl::OUString& i_rKey,
- const rtl::OUString& i_rOption,
- const rtl::OUString& i_rValue,
- const com::sun::star::lang::Locale& i_rLocale = com::sun::star::lang::Locale() ) const;
};
// ----------------------------------------------------------------------
@@ -323,8 +303,6 @@ public:
// public wrapper for the private method
bool checkConstraints( const PPDKey*, const PPDValue* );
- void getUnconstrainedValues( const PPDKey*, ::std::list< const PPDValue* >& rValues );
-
// for printer setup
char* getStreamableBuffer( sal_uLong& rBytes ) const;
void rebuildFromStreamBuffer( char* pBuffer, sal_uLong nBytes );
diff --git a/vcl/unx/generic/fontmanager/fontmanager.cxx b/vcl/unx/generic/fontmanager/fontmanager.cxx
index 27a2629..1891b72 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 91643d6..f0e97e8 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;
commit c32aa7c88c5118a926de5fc33672567fb656387a
Author: Thomas Arnhold <thomas at arnhold.org>
Date: Mon Jul 25 18:52:22 2011 +0200
Fix unintendet re-add of JobSetup::GetValue
diff --git a/vcl/inc/vcl/jobset.hxx b/vcl/inc/vcl/jobset.hxx
index 322808a..a5a0f33 100644
--- a/vcl/inc/vcl/jobset.hxx
+++ b/vcl/inc/vcl/jobset.hxx
@@ -66,7 +66,6 @@ public:
* by the printer driver. One possible use are phone
* numbers for faxes (which disguise as printers)
*/
- String GetValue( const String& rKey ) const;
void SetValue( const String& rKey, const String& rValue );
JobSetup& operator=( const JobSetup& rJob );
diff --git a/vcl/inc/vcl/print.hxx b/vcl/inc/vcl/print.hxx
index c917169..3a99ba1 100644
--- a/vcl/inc/vcl/print.hxx
+++ b/vcl/inc/vcl/print.hxx
@@ -309,7 +309,6 @@ public:
sal_Bool SetJobSetup( const JobSetup& rSetup );
const JobSetup& GetJobSetup() const { return maJobSetup; }
- String GetJobValue( const String& rKey ) const { return maJobSetup.GetValue( rKey ); }
void SetJobValue( const String& rKey, const String& rValue ) { maJobSetup.SetValue( rKey, rValue ); }
sal_Bool Setup( Window* pWindow = NULL );
diff --git a/vcl/source/gdi/jobset.cxx b/vcl/source/gdi/jobset.cxx
index eb6d808..a41aca8 100644
--- a/vcl/source/gdi/jobset.cxx
+++ b/vcl/source/gdi/jobset.cxx
@@ -210,19 +210,6 @@ XubString JobSetup::GetDriverName() const
// -----------------------------------------------------------------------
-String JobSetup::GetValue( const String& rKey ) const
-{
- if( mpData )
- {
- ::boost::unordered_map< ::rtl::OUString, ::rtl::OUString, ::rtl::OUStringHash >::const_iterator it;
- it = mpData->maValueMap.find( rKey );
- return it != mpData->maValueMap.end() ? String( it->second ) : String();
- }
- return String();
-}
-
-// -----------------------------------------------------------------------
-
void JobSetup::SetValue( const String& rKey, const String& rValue )
{
if( ! mpData )
More information about the Libreoffice-commits
mailing list