diff options
author | Timothy Pearson <kb9vqf@pearsoncomputing.net> | 2012-03-02 02:11:59 -0600 |
---|---|---|
committer | Timothy Pearson <kb9vqf@pearsoncomputing.net> | 2012-03-02 02:11:59 -0600 |
commit | 9a75b154bf0732aa3a501b6e31e566e06c5f8a31 (patch) | |
tree | df1e10cc7504665622d096f9ba80dc9e56f3afb8 /src/kernel/qpsprinter.cpp | |
parent | a830bf10b7d4ed2c83ffe68c0b22d7c4ba9860b0 (diff) | |
download | qt3-9a75b154bf0732aa3a501b6e31e566e06c5f8a31.tar.gz qt3-9a75b154bf0732aa3a501b6e31e566e06c5f8a31.zip |
Undo prior accidental commit
Diffstat (limited to 'src/kernel/qpsprinter.cpp')
-rw-r--r-- | src/kernel/qpsprinter.cpp | 120 |
1 files changed, 60 insertions, 60 deletions
diff --git a/src/kernel/qpsprinter.cpp b/src/kernel/qpsprinter.cpp index 6f00db3..039b587 100644 --- a/src/kernel/qpsprinter.cpp +++ b/src/kernel/qpsprinter.cpp @@ -1668,7 +1668,7 @@ unsigned short QPSPrinterFontPrivate::insertIntoSubset( unsigned short u ) pageSubsetCount++; } } else { - tqWarning("QPSPrinterFont::internal error"); + qWarning("QPSPrinterFont::internal error"); } return retval; } @@ -1677,7 +1677,7 @@ void QPSPrinterFontPrivate::restore() { page_subset.clear(); pageSubsetCount = 0; - //tqDebug("restore for font %s\n",psname.latin1()); + //qDebug("restore for font %s\n",psname.latin1()); } static inline const char *toHex( uchar u ) @@ -1814,7 +1814,7 @@ unsigned short QPSPrinterFontPrivate::mapUnicode( unsigned short unicode ) if ( !found ) { return insertIntoSubset( unicode ); } - //tqDebug("mapping unicode %x to %x", unicode, offset+*res); + //qDebug("mapping unicode %x to %x", unicode, offset+*res); return offset + *res; } @@ -2289,7 +2289,7 @@ QPSPrinterFontTTF::QPSPrinterFontTTF(const QFontEngine *f, QByteArray& d) else if (QString(environment_preference) == "3") target_type = 3; else - tqWarning("The value of QT_TTFTOPS must be 42 or 3"); + qWarning("The value of QT_TTFTOPS must be 42 or 3"); } #endif offset_table = (unsigned char*) data.data(); /* first 12 bytes */ @@ -2318,12 +2318,12 @@ QPSPrinterFontTTF::QPSPrinterFontTTF(const QFontEngine *f, QByteArray& d) ury = topost( getFWord( ptr + 42 ) ); indexToLocFormat = getSHORT( ptr + 50 ); /* size of 'loca' data */ if(indexToLocFormat != 0 && indexToLocFormat != 1) { - tqWarning("TrueType font is unusable because indexToLocFormat != 0"); + qWarning("TrueType font is unusable because indexToLocFormat != 0"); defective = TRUE; return; } if( getSHORT(ptr+52) != 0 ) { - tqWarning("TrueType font is unusable because glyphDataFormat != 0"); + qWarning("TrueType font is unusable because glyphDataFormat != 0"); defective = TRUE; return; } @@ -2340,7 +2340,7 @@ QPSPrinterFontTTF::QPSPrinterFontTTF(const QFontEngine *f, QByteArray& d) BYTE* table_ptr = getTable("name"); /* pointer to table */ if ( !table_ptr ) { defective = TRUE; - tqDebug("couldn't find name table" ); + qDebug("couldn't find name table" ); return; } int numrecords = getUSHORT( table_ptr + 2 ); /* number of names */ @@ -2392,8 +2392,8 @@ QPSPrinterFontTTF::QPSPrinterFontTTF(const QFontEngine *f, QByteArray& d) Fixed post_format = getFixed( post_table ); if( post_format.whole != 2 || post_format.fraction != 0 ) { - tqWarning("TrueType font does not have a format 2.0 'post' table"); - tqWarning("post format is %d.%d",post_format.whole,post_format.fraction); + qWarning("TrueType font does not have a format 2.0 'post' table"); + qWarning("post format is %d.%d",post_format.whole,post_format.fraction); // Sivan Feb 2001: no longer defective. // defective = TRUE; } @@ -2402,11 +2402,11 @@ QPSPrinterFontTTF::QPSPrinterFontTTF(const QFontEngine *f, QByteArray& d) BYTE *maxp = getTable("maxp"); if ( !maxp ) { defective = TRUE; - tqDebug("no maxp table in font"); + qDebug("no maxp table in font"); return; } numGlyphs = getUSHORT( maxp + 4 ); -// tqDebug("number of glyphs is %d", numGlyphs); +// qDebug("number of glyphs is %d", numGlyphs); replacementList = makePSFontNameList( f, psname ); uni2glyphSetup(); } @@ -2505,8 +2505,8 @@ void QPSPrinterFontTTF::download(QTextStream& s,bool global) return; } - //tqDebug("downloading ttf font %s", psname.latin1() ); - //tqDebug("target type=%d", target_type); + //qDebug("downloading ttf font %s", psname.latin1() ); + //qDebug("target type=%d", target_type); global_dict = global; QMap<unsigned short, unsigned short> *subsetDict = ⊂ if ( !global ) @@ -2716,7 +2716,7 @@ void QPSPrinterFontTTF::download(QTextStream& s,bool global) } else { /* type 3 */ if (!glyphset[x]) continue; - //tqDebug("emitting charproc for glyph %d, name=%s", x, glyphName(x).latin1() ); + //qDebug("emitting charproc for glyph %d, name=%s", x, glyphName(x).latin1() ); s << "/"; s << glyphName( x, glyphset ); s << "{"; @@ -2916,7 +2916,7 @@ void QPSPrinterFontTTF::uni2glyphSetup() } } if (map==nmaps) { - tqWarning("Font does not have unicode encoding\n"); + qWarning("Font does not have unicode encoding\n"); return; // no unicode encoding! } @@ -2928,7 +2928,7 @@ void QPSPrinterFontTTF::uni2glyphSetup() //fprintf(stderr,"Unicode cmap format %d\n",format); if (format != 4) { - //tqWarning("Unicode cmap format is not 4"); + //qWarning("Unicode cmap format is not 4"); return; } @@ -3145,7 +3145,7 @@ void QPSPrinterFontTTF::sfnts_glyf_table(ULONG oldoffset, ** two byte boundary. */ if( length % 2 ) { - tqWarning("TrueType font contains a 'glyf' table without 2 byte padding"); + qWarning("TrueType font contains a 'glyf' table without 2 byte padding"); defective = TRUE; return; } @@ -3168,7 +3168,7 @@ void QPSPrinterFontTTF::sfnts_glyf_table(ULONG oldoffset, /* Look for unexplainable descrepancies between sizes */ if( total != correct_total_length ) { - tqWarning("QPSPrinterFontTTF::sfnts_glyf_table: total != correct_total_length"); + qWarning("QPSPrinterFontTTF::sfnts_glyf_table: total != correct_total_length"); defective = TRUE; return; } @@ -3260,7 +3260,7 @@ void QPSPrinterFontTTF::download_sfnts(QTextStream& s) sfnts_pputUSHORT(81,s, string_len, line_len, in_string); /* rangeShift */ } else { - tqWarning("Fewer than 9 tables selected"); + qWarning("Fewer than 9 tables selected"); } /* Now, emmit the table directory. */ @@ -3297,7 +3297,7 @@ void QPSPrinterFontTTF::download_sfnts(QTextStream& s) string_len, line_len, in_string); } else { // other tables should not exceed 64K (not always true; Sivan) if( tables[x].length > 65535 ) { - tqWarning("TrueType font has a table which is too long"); + qWarning("TrueType font has a table which is too long"); defective = TRUE; return; } @@ -3699,7 +3699,7 @@ void QPSPrinterFontTTF::charprocLoad(BYTE *glyph, charproc_data* cd) ct = *(glyph++); if( (x + ct) > cd->num_pts ) { - tqWarning("Fatal Error in TT flags"); + qWarning("Fatal Error in TT flags"); return; } @@ -4053,7 +4053,7 @@ QPSPrinterFontPFA::QPSPrinterFontPFA(const QFontEngine *f, QByteArray& d) QString fontname; if (p[ pos ] != '%' || p[ pos+1 ] != '!') { // PFA marker - tqWarning("invalid pfa file"); + qWarning("invalid pfa file"); return; } @@ -4079,7 +4079,7 @@ void QPSPrinterFontPFA::download(QTextStream& s, bool global) return; } - //tqDebug("downloading pfa font %s", psname.latin1() ); + //qDebug("downloading pfa font %s", psname.latin1() ); char* p = data.data(); s << "% Font resource\n"; @@ -4111,7 +4111,7 @@ QPSPrinterFontPFB::QPSPrinterFontPFB(const QFontEngine *f, QByteArray& d) QString fontname; if (p[ pos ] != 0x80) { // PFB marker - tqWarning("pfb file does not start with 0x80"); + qWarning("pfb file does not start with 0x80"); return; } pos++; @@ -4146,7 +4146,7 @@ void QPSPrinterFontPFB::download(QTextStream& s, bool global) return; } - //tqDebug("downloading pfb font %s", psname.latin1() ); + //qDebug("downloading pfb font %s", psname.latin1() ); unsigned char* p = (unsigned char*) data.data(); int pos; int len; @@ -4173,7 +4173,7 @@ void QPSPrinterFontPFB::download(QTextStream& s, bool global) len |= (p[ pos ] << 16); pos++; len |= (p[ pos ] << 24); pos++; - //tqDebug("font block type %d len %d",typ,len); + //qDebug("font block type %d len %d",typ,len); int end = pos + len; if (typ==1) { @@ -4182,7 +4182,7 @@ void QPSPrinterFontPFB::download(QTextStream& s, bool global) s << "\n"; hexcol = 0; } - //tqWarning(QString::fromLatin1((char*)(p+pos),1)); + //qWarning(QString::fromLatin1((char*)(p+pos),1)); if (p[pos] == '\r' || p[pos] == '\n') { s << "\n"; while (pos < end && (p[pos] == '\r' || p[pos] == '\n')) @@ -4233,7 +4233,7 @@ QPSPrinterFontNotFound::QPSPrinterFontNotFound(const QFontEngine* f) void QPSPrinterFontNotFound::download(QTextStream& s, bool) { - //tqDebug("downloading not found font %s", psname.latin1() ); + //qDebug("downloading not found font %s", psname.latin1() ); emitPSFontNameList( s, psname, replacementList ); s << "% No embeddable font for "; s << psname; @@ -4350,7 +4350,7 @@ QString QPSPrinterFontAsian::defineFont( QTextStream &stream, const QString &ps, void QPSPrinterFontAsian::download(QTextStream& s, bool) { - //tqDebug("downloading asian font %s", psname.latin1() ); + //qDebug("downloading asian font %s", psname.latin1() ); s << "% Asian postscript font requested. Using " << psname << endl; emitPSFontNameList( s, psname, replacementList ); @@ -4871,7 +4871,7 @@ QPSPrinterFontSimplifiedChinese::QPSPrinterFontSimplifiedChinese(const QFontEngi psname = SongGBK2K[type].psname; appendReplacements( replacementList, SimplifiedReplacements, type ); } - //tqDebug("simplified chinese: fontname is %s, psname=%s", f.family().latin1(), psname.latin1() ); + //qDebug("simplified chinese: fontname is %s, psname=%s", f.family().latin1(), psname.latin1() ); } QString QPSPrinterFontSimplifiedChinese::extension() const @@ -4921,14 +4921,14 @@ QPSPrinterFont::QPSPrinterFont(const QFont &f, int script, QPSPrinterPrivate *pr #if defined( Q_WS_X11 ) bool xlfd = FALSE; - //tqDebug("engine = %p name=%s, script=%d", engine, engine ? engine->name() : "(null)", script); + //qDebug("engine = %p name=%s, script=%d", engine, engine ? engine->name() : "(null)", script); #ifndef QT_NO_XFTFREETYPE if ( qt_has_xft && engine && engine->type() == QFontEngine::Xft ) { XftPattern *pattern = static_cast<QFontEngineXft *>( engine )->pattern(); char *filename = 0; XftPatternGetString (pattern, XFT_FILE, 0, &filename); - //tqDebug("filename for font is '%s'", filename); + //qDebug("filename for font is '%s'", filename); if ( filename ) { fontfilename = QString::fromLocal8Bit( filename ); xfontname = fontfilename; @@ -4996,7 +4996,7 @@ QPSPrinterFont::QPSPrinterFont(const QFont &f, int script, QPSPrinterPrivate *pr xfontname += "/" + toString( script ); #endif - //tqDebug("looking for font %s in dict", xfontname.latin1() ); + //qDebug("looking for font %s in dict", xfontname.latin1() ); p = priv->fonts.find(xfontname); if ( p ) return; @@ -5014,15 +5014,15 @@ QPSPrinterFont::QPSPrinterFont(const QFont &f, int script, QPSPrinterPrivate *pr fontmapname = (*it) + "/fonts.scale"; else fontmapname = (*it) + "/fonts.dir"; - //tqWarning(fontmapname); + //qWarning(fontmapname); QFile fontmap(fontmapname); if (fontmap.open(IO_ReadOnly)) { while (!fontmap.atEnd()) { QString mapping; fontmap.readLine(mapping,512); // fold to lower (since X folds to lowercase) - //tqWarning(xfontname); - //tqWarning(mapping); + //qWarning(xfontname); + //qWarning(mapping); if (mapping.lower().contains(searchname.lower())) { int index = mapping.find(' ',0); QString ffn = mapping.mid(0,index); @@ -5031,7 +5031,7 @@ QPSPrinterFont::QPSPrinterFont(const QFont &f, int script, QPSPrinterPrivate *pr !ffn.contains( ".spd" ) && !ffn.contains( ".phont" ) ) { fontfilename = (*it) + QString("/") + ffn; if ( QFile::exists(fontfilename) ) { - //tqDebug("found font file %s", fontfilename.latin1()); + //qDebug("found font file %s", fontfilename.latin1()); break; } else // unset fontfilename fontfilename = QString(); @@ -5046,7 +5046,7 @@ QPSPrinterFont::QPSPrinterFont(const QFont &f, int script, QPSPrinterPrivate *pr } #endif - //tqDebug("font=%s, fontname=%s, file=%s, p=%p", f.family().latin1(), xfontname.latin1(), fontfilename.latin1(), p); + //qDebug("font=%s, fontname=%s, file=%s, p=%p", f.family().latin1(), xfontname.latin1(), fontfilename.latin1(), p); // memory mapping would be better here if (fontfilename.length() > 0) { // maybe there is no file name @@ -5074,7 +5074,7 @@ QPSPrinterFont::QPSPrinterFont(const QFont &f, int script, QPSPrinterPrivate *pr } else type = NONE; - //tqDebug("font is of type %d", type ); + //qDebug("font is of type %d", type ); switch (type) { case TTF : p = new QPSPrinterFontTTF(engine, data); @@ -5116,7 +5116,7 @@ QPSPrinterFont::QPSPrinterFont(const QFont &f, int script, QPSPrinterPrivate *pr } } else #endif - //tqDebug("didnt find font for %s", xfontname.latin1()); + //qDebug("didnt find font for %s", xfontname.latin1()); p = new QPSPrinterFontNotFound( engine ); break; } @@ -5128,14 +5128,14 @@ QPSPrinterFont::QPSPrinterFont(const QFont &f, int script, QPSPrinterPrivate *pr QDictIterator<QPSPrinterFontPrivate> it( priv->fonts ); for( it.toFirst(); it.current(); ++it ) { if ( *(*it) == *p ) { -// tqWarning("Post script driver: font already in dict"); +// qWarning("Post script driver: font already in dict"); delete p; p = *it; return; } } - //tqDebug("inserting font %s in dict psname=%s", xfontname.latin1(), p->postScriptFontName().latin1() ); + //qDebug("inserting font %s in dict psname=%s", xfontname.latin1(), p->postScriptFontName().latin1() ); priv->fonts.insert( xfontname, p ); } @@ -5235,7 +5235,7 @@ void QPSPrinterPrivate::setFont( const QFont & fnt, int script ) } if ( f.pointSize() == 0 ) { #if defined(CHECK_RANGE) - tqWarning( "QPrinter: Cannot set a font with zero point size." ); + qWarning( "QPrinter: Cannot set a font with zero point size." ); #endif f.setPointSize(QApplication::font().pointSize()); if ( f.pointSize() == 0 ) @@ -5529,7 +5529,7 @@ static QByteArray compress( const QImage & image, bool gray ) { #if 0 /* this should never happen: both the start and the end pointers ran off their tracks. */ - tqDebug( "oops! %06x %06x %06x %06x %5d %5d %5d %d", + qDebug( "oops! %06x %06x %06x %06x %5d %5d %5d %d", pixel[start], pixel[end], pixel[index], pixel[index+bestLength], start, end, index, bestLength ); @@ -5716,20 +5716,20 @@ static QByteArray compress( const QImage & image, bool gray ) { delete [] pixel; #ifdef DEBUG_COMPRESS - tqDebug( "------------- image compression statistics ----------------" ); - tqDebug(" compression time %d", t.elapsed() ); - tqDebug( "Size dist of uncompressed blocks:" ); - tqDebug( "\t%d\t%d\t%d\t%d\t%d\t%d\n", sizeUncompressed[0], sizeUncompressed[1], + qDebug( "------------- image compression statistics ----------------" ); + qDebug(" compression time %d", t.elapsed() ); + qDebug( "Size dist of uncompressed blocks:" ); + qDebug( "\t%d\t%d\t%d\t%d\t%d\t%d\n", sizeUncompressed[0], sizeUncompressed[1], sizeUncompressed[2], sizeUncompressed[3], sizeUncompressed[4], sizeUncompressed[5]); - tqDebug( "\t%d\t%d\t%d\t%d\t%d\n", sizeUncompressed[6], sizeUncompressed[7], + qDebug( "\t%d\t%d\t%d\t%d\t%d\n", sizeUncompressed[6], sizeUncompressed[7], sizeUncompressed[8], sizeUncompressed[9], sizeUncompressed[10] ); - tqDebug( "Size dist of compressed blocks:" ); - tqDebug( "\t%d\t%d\t%d\t%d\t%d\t%d\n", sizeCompressed[0], sizeCompressed[1], + qDebug( "Size dist of compressed blocks:" ); + qDebug( "\t%d\t%d\t%d\t%d\t%d\t%d\n", sizeCompressed[0], sizeCompressed[1], sizeCompressed[2], sizeCompressed[3], sizeCompressed[4], sizeCompressed[5]); - tqDebug( "\t%d\t%d\t%d\t%d\t%d\n", sizeCompressed[6], sizeCompressed[7], + qDebug( "\t%d\t%d\t%d\t%d\t%d\n", sizeCompressed[6], sizeCompressed[7], sizeCompressed[8], sizeCompressed[9], sizeCompressed[10] ); - tqDebug( "===> total compression ratio %d/%d = %f", outOffset, size, (float)outOffset/(float)size ); - tqDebug( "-----------------------------------------------------------" ); + qDebug( "===> total compression ratio %d/%d = %f", outOffset, size, (float)outOffset/(float)size ); + qDebug( "-----------------------------------------------------------" ); #endif return outarr; @@ -6061,7 +6061,7 @@ void QPSPrinterPrivate::resetDrawingTools( QPainter *paint ) if ( b != defaultBrush ) { if ( b == Qt::CustomPattern ) { #if defined(CHECK_RANGE) - tqWarning( "QPrinter: Pixmap brush not supported" ); + qWarning( "QPrinter: Pixmap brush not supported" ); #endif } else { cbrush = b; @@ -6171,7 +6171,7 @@ void QPSPrinterPrivate::flushPage( bool last ) (last || buffer->size() > 50000000) #endif ) { -// tqDebug("emiting header at page %d", pageCount ); +// qDebug("emiting header at page %d", pageCount ); emitHeader( last ); } outStream << "%%Page: " @@ -6180,7 +6180,7 @@ void QPSPrinterPrivate::flushPage( bool last ) << "QI\n"; if (!dirtyNewPage) { if ( pageFonts ) { - //tqDebug("page fonts for page %d", pageCount); + //qDebug("page fonts for page %d", pageCount); // we have already downloaded the header. Maybe we have page fonts here QDictIterator<QPSPrinterFontPrivate> it(fonts); while (it.current()) { @@ -6243,7 +6243,7 @@ static void ignoreSigPipe(bool b) return; // not ignoring sigpipe if (sigaction(SIGPIPE, users_sigpipe_handler, 0) == -1) - tqWarning("QPSPrinter: could not restore SIGPIPE handler"); + qWarning("QPSPrinter: could not restore SIGPIPE handler"); delete users_sigpipe_handler; users_sigpipe_handler = 0; @@ -6513,7 +6513,7 @@ bool QPSPrinter::cmd( int c , QPainter *paint, QPDevCmdParam *p ) case PdcSetROP: #if defined(CHECK_RANGE) if ( p[0].ival != Qt::CopyROP ) - tqWarning( "QPrinter: Raster operation setting not supported" ); + qWarning( "QPrinter: Raster operation setting not supported" ); #endif break; case PdcSetBrushOrigin: @@ -6534,7 +6534,7 @@ bool QPSPrinter::cmd( int c , QPainter *paint, QPDevCmdParam *p ) case PdcSetBrush: if ( p[0].brush->style() == Qt::CustomPattern ) { #if defined(CHECK_RANGE) - tqWarning( "QPrinter: Pixmap brush not supported" ); + qWarning( "QPrinter: Pixmap brush not supported" ); #endif return FALSE; } |