summaryrefslogtreecommitdiff
path: root/padmin
diff options
context:
space:
mode:
authorPovilas Kanapickas <povilas.kanapickas@gmail.com>2010-10-18 16:52:05 +0100
committerMichael Meeks <michael.meeks@novell.com>2010-10-18 16:52:27 +0100
commit849a713ffd29a58ae79e48f80835c28bbd9d5a72 (patch)
tree7d2c662f43a00f3bc04a0d51c685544074538a5c /padmin
parentf7cbde525450a1a9427873c264791c65056c4f2a (diff)
remove non-compiled code
Diffstat (limited to 'padmin')
-rw-r--r--padmin/source/fontentry.cxx86
1 files changed, 0 insertions, 86 deletions
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<char*>(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 ) ),