From 849a713ffd29a58ae79e48f80835c28bbd9d5a72 Mon Sep 17 00:00:00 2001 From: Povilas Kanapickas Date: Mon, 18 Oct 2010 16:52:05 +0100 Subject: remove non-compiled code --- padmin/source/fontentry.cxx | 86 --------------------------------------------- 1 file changed, 86 deletions(-) (limited to 'padmin/source') diff --git a/padmin/source/fontentry.cxx b/padmin/source/fontentry.cxx index 0cf9fca2b397..43abfe3b2bac 100644 --- a/padmin/source/fontentry.cxx +++ b/padmin/source/fontentry.cxx @@ -43,92 +43,6 @@ using namespace osl; using namespace rtl; using namespace psp; -#if 0 -static void CreateAfmFile( const INetURLObject& rFontFile ) -{ - rtl_TextEncoding aEncoding = gsl_getSystemTextEncoding(); - - INetURLObject aFontMap( rFontFile.GetPath(), INET_PROT_FILE, INetURLObject::ENCODE_ALL ); - aFontMap.Append( String( RTL_CONSTASCII_USTRINGPARAM( "Fontmap" ) ) ); - INetURLObject aAfmFile( rFontFile ); - aAfmFile.setExtension( String::CreateFromAscii( "afm", 3 ) ); - - - SvFileStream aMap( aFontMap.PathToFileName(), STREAM_WRITE | STREAM_TRUNC ); - if( aMap.IsOpen() ) - { - SvFileStream aRead( rFontFile.GetFull(), STREAM_READ ); - ByteString aLine; - ByteString aFullName; - int nPos; - while( ! aRead.IsEof() && - ( nPos = aLine.Search( "/FullName" ) ) == STRING_NOTFOUND ) - aRead.ReadLine( aLine ); - aRead.Close(); - if( nPos != STRING_NOTFOUND ) - { - aLine.Erase( 0, nPos ); - aFullName = aLine.GetToken( 1, '(' ).GetToken( 0, ')' ); - - aLine = '/'; - aLine += aFullName; - aLine += ' '; - aLine += '('; - aLine += ByteString( rFontFile.GetName(), aEncoding ); - aLine += ')'; - aLine += ';'; - - aMap.WriteLine( aLine ); - } - aMap.Close(); - pid_t nPID = fork(); - if( ! nPID ) - { - INetURLObject aTmp( rFontFile ); - aTmp.CutName(); - ByteString aEnv( "GS_LIB=" ); - aEnv += ByteString( aTmp.PathToFileName(), aEncoding ); - putenv( const_cast(aEnv.GetBuffer()) ); - - int nDescr = open( ByteString( aAfmFile.PathToFileName(), aEncoding ).GetBuffer(), - O_CREAT | O_TRUNC| O_WRONLY, - 00755 ); -#if OSL_DEBUG_LEVEL > 1 - if( nDescr < 0 ) - fprintf( stderr, "open( %s ) failed because of %d\n", ByteString( aAfmFile.GetFull(), aEncoding ).GetBuffer(), errno ); -#endif - if( dup2( nDescr, STDOUT_FILENO ) > 0 ) - { - execlp( "gs", - "-q", - "-dNODISPLAY", - "--", "printafm.ps", - aFullName.GetBuffer(), - NULL ); - } -#if OSL_DEBUG_LEVEL > 1 - else - fprintf( stderr, "dup2( %d, %d ) failed because of %d\n", nDescr, STDOUT_FILENO, errno ); -#endif - _exit( 0 ); - } - if( nPID > 0 ) - waitpid( nPID, NULL, 0 ); - MetricConverter::ConvertAFM( aAfmFile ); - } - - struct stat aStat; - ByteString aSysFile( aAfmFile.PathToFileName(), aEncoding ); - if( stat( aSysFile.GetBuffer(), &aStat ) || ! aStat.st_size ) - unlink( aSysFile.GetBuffer() ); -#if OSL_DEBUG_LEVEL > 1 - fprintf( stderr, " %s\n", ! access( aSysFile.GetBuffer(), F_OK ) ? "success" : "failed" ); -#endif - unlink( ByteString( aFontMap.PathToFileName(), aEncoding ).GetBuffer() ); -} - -#endif - FontNameDlg::FontNameDlg( Window *pParent ) : ModalDialog( pParent, PaResId( RID_FONTNAMEDIALOG ) ), m_aOKButton( this, PaResId( RID_FNTNM_BTN_OK ) ), -- cgit v1.2.3