diff options
author | Caolán McNamara <caolanm@redhat.com> | 2014-03-20 16:59:48 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2014-03-21 08:56:45 +0000 |
commit | a547f865e0ce7731e1b3998b06ecba505e1c27ca (patch) | |
tree | d018b8040ceb3597fcf497903986eaea68dede02 /vcl | |
parent | 52cc0c8f05d40db6d076c13f8b8d6d9453ec8930 (diff) |
drop spadmin
Change-Id: Ie10ee80f1d35b40c0baf9d7ba5c1181b52405b5f
Diffstat (limited to 'vcl')
-rw-r--r-- | vcl/unx/generic/printer/ppdparser.cxx | 59 |
1 files changed, 0 insertions, 59 deletions
diff --git a/vcl/unx/generic/printer/ppdparser.cxx b/vcl/unx/generic/printer/ppdparser.cxx index 121fa8fa6f02..7e56085a4cf1 100644 --- a/vcl/unx/generic/printer/ppdparser.cxx +++ b/vcl/unx/generic/printer/ppdparser.cxx @@ -488,24 +488,6 @@ void PPDParser::initPPDFiles(PPDCache &rPPDCache) } } -void PPDParser::getKnownPPDDrivers( std::list< OUString >& o_rDrivers, bool bRefresh ) -{ - PPDCache &rPPDCache = thePPDCache::get(); - - if( bRefresh ) - { - delete rPPDCache.pAllPPDFiles; - rPPDCache.pAllPPDFiles = NULL; - } - - initPPDFiles(rPPDCache); - o_rDrivers.clear(); - - boost::unordered_map< OUString, OUString, OUStringHash >::const_iterator it; - for( it = rPPDCache.pAllPPDFiles->begin(); it != rPPDCache.pAllPPDFiles->end(); ++it ) - o_rDrivers.push_back( it->first ); -} - OUString PPDParser::getPPDFile( const OUString& rFile ) { INetURLObject aPPD( rFile, INET_PROT_FILE, INetURLObject::ENCODE_ALL ); @@ -569,47 +551,6 @@ OUString PPDParser::getPPDFile( const OUString& rFile ) return aRet; } -OUString PPDParser::getPPDPrinterName( const OUString& rFile ) -{ - OUString aPath = getPPDFile( rFile ); - OUString aName; - - // read in the file - PPDDecompressStream aStream( aPath ); - if( aStream.IsOpen() ) - { - OUString aCurLine; - while( ! aStream.IsEof() && aStream.IsOpen() ) - { - OString aByteLine = aStream.ReadLine(); - aCurLine = OStringToOUString(aByteLine, RTL_TEXTENCODING_MS_1252); - if( aCurLine.startsWithIgnoreAsciiCase( "*include:" ) ) - { - aCurLine = aCurLine.replaceAt( 0, 9, "" ); - aCurLine = comphelper::string::stripStart(aCurLine, ' '); - aCurLine = comphelper::string::stripEnd(aCurLine, ' '); - aCurLine = comphelper::string::stripStart(aCurLine, '\t'); - aCurLine = comphelper::string::stripEnd(aCurLine, '\t'); - aCurLine = comphelper::string::stripEnd(aCurLine, '\r'); - aCurLine = comphelper::string::stripEnd(aCurLine, '\n'); - aCurLine = comphelper::string::stripStart(aCurLine, '"'); - aCurLine = comphelper::string::stripEnd(aCurLine, '"'); - aStream.Close(); - aStream.Open( getPPDFile( aCurLine ) ); - continue; - } - if( aCurLine.startsWith( "*ModelName:" ) ) - { - aName = aCurLine.getToken( 1, '"' ); - break; - } - else if( aCurLine.startsWith( "*NickName:" ) ) - aName = aCurLine.getToken( 1, '"' ); - } - } - return aName; -} - const PPDParser* PPDParser::getParser( const OUString& rFile ) { static ::osl::Mutex aMutex; |