diff --git a/generators/chm/kio-msits/msits.cpp b/generators/chm/kio-msits/msits.cpp index 962c33ca9..d71b8a1fa 100644 --- a/generators/chm/kio-msits/msits.cpp +++ b/generators/chm/kio-msits/msits.cpp @@ -38,20 +38,20 @@ extern "C" { int KDE_EXPORT kdemain( int argc, char **argv ) { - kDebug() << "*** kio_msits Init" << endl; + kDebug() << "*** kio_msits Init"; KComponentData instance( "kio_msits" ); if ( argc != 4 ) { - kDebug() << "Usage: kio_msits protocol domain-socket1 domain-socket2" << endl; + kDebug() << "Usage: kio_msits protocol domain-socket1 domain-socket2"; exit (-1); } ProtocolMSITS slave ( argv[2], argv[3] ); slave.dispatchLoop(); - kDebug() << "*** kio_msits Done" << endl; + kDebug() << "*** kio_msits Done"; return 0; } } @@ -83,12 +83,12 @@ void ProtocolMSITS::get( const KUrl& url ) QString fileName; chmUnitInfo ui; - kDebug() << "kio_msits::get() " << url.path() << endl; + kDebug() << "kio_msits::get() " << url.path(); if ( !parseLoadAndLookup ( url, fileName ) ) return; // error() has been called by parseLoadAndLookup - kDebug() << "kio_msits::get: parseLoadAndLookup returned " << fileName << endl; + kDebug() << "kio_msits::get: parseLoadAndLookup returned " << fileName; if ( isDirectory (fileName) ) { @@ -98,7 +98,7 @@ void ProtocolMSITS::get( const KUrl& url ) if ( !ResolveObject ( fileName, &ui) ) { - kDebug() << "kio_msits::get: could not resolve filename " << fileName << endl; + kDebug() << "kio_msits::get: could not resolve filename " << fileName; error( KIO::ERR_DOES_NOT_EXIST, url.prettyUrl() ); return; } @@ -107,14 +107,14 @@ void ProtocolMSITS::get( const KUrl& url ) if ( RetrieveObject (&ui, (unsigned char*) buf.data(), 0, ui.length) == 0 ) { - kDebug() << "kio_msits::get: could not retrieve filename " << fileName << endl; + kDebug() << "kio_msits::get: could not retrieve filename " << fileName; error( KIO::ERR_NO_CONTENT, url.prettyUrl() ); return; } totalSize( ui.length ); KMimeType::Ptr result = KMimeType::findByNameAndContent( fileName, buf ); - kDebug() << "Emitting mimetype " << result->name() << endl; + kDebug() << "Emitting mimetype " << result->name(); mimeType( result->name() ); data( buf ); @@ -126,7 +126,7 @@ void ProtocolMSITS::get( const KUrl& url ) bool ProtocolMSITS::parseLoadAndLookup ( const KUrl& url, QString& abspath ) { - kDebug() << "ProtocolMSITS::parseLoadAndLookup (const KUrl&) " << url.path() << endl; + kDebug() << "ProtocolMSITS::parseLoadAndLookup (const KUrl&) " << url.path(); int pos = url.path().indexOf ("::"); @@ -139,7 +139,7 @@ bool ProtocolMSITS::parseLoadAndLookup ( const KUrl& url, QString& abspath ) QString filename = url.path().left (pos); abspath = url.path().mid (pos + 2); // skip :: - kDebug() << "ProtocolMSITS::parseLoadAndLookup: filename " << filename << ", path " << abspath << endl; + kDebug() << "ProtocolMSITS::parseLoadAndLookup: filename " << filename << ", path " << abspath; if ( filename.isEmpty() ) { @@ -151,7 +151,7 @@ bool ProtocolMSITS::parseLoadAndLookup ( const KUrl& url, QString& abspath ) if ( m_chmFile && filename == m_openedFile ) return true; - kDebug() << "Opening a new CHM file " << filename << endl; + kDebug() << "Opening a new CHM file " << filename; // First try to open a temporary file chmFile * tmpchm; @@ -169,7 +169,7 @@ bool ProtocolMSITS::parseLoadAndLookup ( const KUrl& url, QString& abspath ) m_chmFile = tmpchm; m_openedFile = filename; - kDebug() << "A CHM file " << filename << " has beed opened successfully" << endl; + kDebug() << "A CHM file " << filename << " has beed opened successfully"; return true; } @@ -212,7 +212,7 @@ void ProtocolMSITS::stat (const KUrl & url) QString fileName; chmUnitInfo ui; - kDebug() << "kio_msits::stat (const KUrl& url) " << url.path() << endl; + kDebug() << "kio_msits::stat (const KUrl& url) " << url.path(); if ( !parseLoadAndLookup ( url, fileName ) ) return; // error() has been called by parseLoadAndLookup @@ -223,7 +223,7 @@ void ProtocolMSITS::stat (const KUrl & url) return; } - kDebug() << "kio_msits::stat: adding an entry for " << fileName << endl; + kDebug() << "kio_msits::stat: adding an entry for " << fileName; UDSEntry entry; if ( isDirectory ( fileName ) ) @@ -249,7 +249,7 @@ void ProtocolMSITS::listDir (const KUrl & url) { QString filepath; - kDebug() << "kio_msits::listDir (const KUrl& url) " << url.path() << endl; + kDebug() << "kio_msits::listDir (const KUrl& url) " << url.path(); if ( !parseLoadAndLookup ( url, filepath ) ) return; // error() has been called by parseLoadAndLookup @@ -262,7 +262,7 @@ void ProtocolMSITS::listDir (const KUrl & url) return; } - kDebug() << "kio_msits::listDir: enumerating directory " << filepath << endl; + kDebug() << "kio_msits::listDir: enumerating directory " << filepath; QVector listing; diff --git a/generators/dvi/TeXFontDefinition.cpp b/generators/dvi/TeXFontDefinition.cpp index 6d4b11357..d780ad822 100644 --- a/generators/dvi/TeXFontDefinition.cpp +++ b/generators/dvi/TeXFontDefinition.cpp @@ -34,7 +34,7 @@ TeXFontDefinition::TeXFontDefinition(const QString &nfontname, double _displayRe class fontPool *pool, double _enlargement) { #ifdef DEBUG_FONT - kDebug(kvs::dvi) << "TeXFontDefinition::TeXFontDefinition(...); fontname=" << nfontname << ", enlargement=" << _enlargement << endl; + kDebug(kvs::dvi) << "TeXFontDefinition::TeXFontDefinition(...); fontname=" << nfontname << ", enlargement=" << _enlargement; #endif enlargement = _enlargement; @@ -60,7 +60,7 @@ TeXFontDefinition::TeXFontDefinition(const QString &nfontname, double _displayRe TeXFontDefinition::~TeXFontDefinition() { #ifdef DEBUG_FONT - kDebug(kvs::dvi) << "discarding font " << fontname << " at " << (int)(enlargement * MFResolutions[font_pool->getMetafontMode()] + 0.5) << " dpi" << endl; + kDebug(kvs::dvi) << "discarding font " << fontname << " at " << (int)(enlargement * MFResolutions[font_pool->getMetafontMode()] + 0.5) << " dpi"; #endif if (font != 0) { @@ -86,7 +86,7 @@ TeXFontDefinition::~TeXFontDefinition() void TeXFontDefinition::fontNameReceiver(const QString& fname) { #ifdef DEBUG_FONT - kDebug(kvs::dvi) << "void TeXFontDefinition::fontNameReceiver( " << fname << " )" << endl; + kDebug(kvs::dvi) << "void TeXFontDefinition::fontNameReceiver( " << fname << " )"; #endif flags |= TeXFontDefinition::FONT_LOADED; @@ -120,7 +120,7 @@ void TeXFontDefinition::fontNameReceiver(const QString& fname) font = new TeXFont_PK(this); set_char_p = &dviRenderer::set_char; if ((checksum != 0) && (checksum != font->checksum)) - kWarning(kvs::dvi) << i18n("Checksum mismatch for font file %1", filename) << endl; + kWarning(kvs::dvi) << i18n("Checksum mismatch for font file %1", filename) ; fontTypeName = "TeX PK"; return; } @@ -152,12 +152,12 @@ void TeXFontDefinition::fontNameReceiver(const QString& fname) if (enc.isEmpty() == false) { #ifdef DEBUG_FONT - kDebug(kvs::dvi) << "Font " << fontname << " uses encoding " << enc << endl; + kDebug(kvs::dvi) << "Font " << fontname << " uses encoding " << enc; #endif font = new TeXFont_PFB(this, font_pool->encodingPool.findByName(enc), font_pool->fontsByTeXName.findSlant(fontname) ); } else { #ifdef DEBUG_FONT - kDebug(kvs::dvi) << "Font " << fontname << " does not have an encoding." << endl; + kDebug(kvs::dvi) << "Font " << fontname << " does not have an encoding."; #endif font = new TeXFont_PFB(this); } @@ -214,7 +214,7 @@ void TeXFontDefinition::setDisplayResolution(double _displayResolution_in_dpi) void TeXFontDefinition::mark_as_used() { #ifdef DEBUG_FONT - kDebug(kvs::dvi) << "TeXFontDefinition::mark_as_used()" << endl; + kDebug(kvs::dvi) << "TeXFontDefinition::mark_as_used()"; #endif if (flags & TeXFontDefinition::FONT_IN_USE) diff --git a/generators/dvi/TeXFont_PFB.cpp b/generators/dvi/TeXFont_PFB.cpp index d6f7d460e..cc866310a 100644 --- a/generators/dvi/TeXFont_PFB.cpp +++ b/generators/dvi/TeXFont_PFB.cpp @@ -29,9 +29,9 @@ TeXFont_PFB::TeXFont_PFB(TeXFontDefinition *parent, fontEncoding *enc, double sl { #ifdef DEBUG_PFB if (enc != 0) - kDebug(kvs::dvi) << "TeXFont_PFB::TeXFont_PFB( parent=" << parent << ", encoding=" << enc->encodingFullName << " )" << endl; + kDebug(kvs::dvi) << "TeXFont_PFB::TeXFont_PFB( parent=" << parent << ", encoding=" << enc->encodingFullName << " )"; else - kDebug(kvs::dvi) << "TeXFont_PFB::TeXFont_PFB( parent=" << parent << ", encoding=0 )" << endl; + kDebug(kvs::dvi) << "TeXFont_PFB::TeXFont_PFB( parent=" << parent << ", encoding=0 )"; #endif fatalErrorInFontLoading = false; @@ -80,12 +80,12 @@ TeXFont_PFB::TeXFont_PFB(TeXFontDefinition *parent, fontEncoding *enc, double sl // the FreeType library function 'FT_Get_Name_Index()' to // associate glyph indices to those names. #ifdef DEBUG_PFB - kDebug(kvs::dvi) << "Trying to associate glyph indices to names from the encoding vector." << endl; + kDebug(kvs::dvi) << "Trying to associate glyph indices to names from the encoding vector."; #endif for(int i=0; i<256; i++) { charMap[i] = FT_Get_Name_Index( face, (FT_String *)(enc->glyphNameVector[i].toAscii().data()) ); #ifdef DEBUG_PFB - kDebug(kvs::dvi) << i << ": " << enc->glyphNameVector[i] << ", GlyphIndex=" << charMap[i] << endl; + kDebug(kvs::dvi) << i << ": " << enc->glyphNameVector[i] << ", GlyphIndex=" << charMap[i]; #endif } } else { @@ -105,7 +105,7 @@ TeXFont_PFB::TeXFont_PFB(TeXFontDefinition *parent, fontEncoding *enc, double sl // Feed the charMap array with the charmap data found in the // previous step. #ifdef DEBUG_PFB - kDebug(kvs::dvi) << "No encoding given: using charmap platform=7, encoding=2 that is contained in the font." << endl; + kDebug(kvs::dvi) << "No encoding given: using charmap platform=7, encoding=2 that is contained in the font."; #endif for(int i=0; i<256; i++) charMap[i] = FT_Get_Char_Index( face, i ); @@ -120,7 +120,7 @@ TeXFont_PFB::TeXFont_PFB(TeXFontDefinition *parent, fontEncoding *enc, double sl } else { // As a last resort, we use the identity map. #ifdef DEBUG_PFB - kDebug(kvs::dvi) << "No encoding given, no suitable charmaps found in the font: using identity charmap." << endl; + kDebug(kvs::dvi) << "No encoding given, no suitable charmaps found in the font: using identity charmap."; #endif for(int i=0; i<256; i++) charMap[i] = i; @@ -139,7 +139,7 @@ TeXFont_PFB::~TeXFont_PFB() glyph* TeXFont_PFB::getGlyph(quint16 ch, bool generateCharacterPixmap, const QColor& color) { #ifdef DEBUG_PFB - kDebug(kvs::dvi) << "TeXFont_PFB::getGlyph( ch=" << ch << ", '" << (char)(ch) << "', generateCharacterPixmap=" << generateCharacterPixmap << " )" << endl; + kDebug(kvs::dvi) << "TeXFont_PFB::getGlyph( ch=" << ch << ", '" << (char)(ch) << "', generateCharacterPixmap=" << generateCharacterPixmap << " )"; #endif // Paranoia checks diff --git a/generators/dvi/TeXFont_PK.cpp b/generators/dvi/TeXFont_PK.cpp index cff9c4df2..039a89588 100644 --- a/generators/dvi/TeXFont_PK.cpp +++ b/generators/dvi/TeXFont_PK.cpp @@ -79,7 +79,7 @@ TeXFont_PK::TeXFont_PK(TeXFontDefinition *parent) : TeXFont(parent) { #ifdef DEBUG_PK - kDebug(kvs::dvi) << "TeXFont_PK::TeXFont_PK( parent=" << parent << ")" << endl; + kDebug(kvs::dvi) << "TeXFont_PK::TeXFont_PK( parent=" << parent << ")"; #endif for(unsigned int i=0; ifilename) << endl; #ifdef DEBUG_PK else - kDebug(kvs::dvi) << "TeXFont_PK::TeXFont_PK(): file opened successfully" << endl; + kDebug(kvs::dvi) << "TeXFont_PK::TeXFont_PK(): file opened successfully"; #endif read_PK_index(); #ifdef DEBUG_PK - kDebug(kvs::dvi) << "TeXFont_PK::TeXFont_PK() ended" << endl; + kDebug(kvs::dvi) << "TeXFont_PK::TeXFont_PK() ended"; #endif } @@ -114,7 +114,7 @@ TeXFont_PK::~TeXFont_PK() glyph* TeXFont_PK::getGlyph(quint16 ch, bool generateCharacterPixmap, const QColor& color) { #ifdef DEBUG_PK - kDebug(kvs::dvi) << "TeXFont_PK::getGlyph( ch=" << ch << ", generateCharacterPixmap=" << generateCharacterPixmap << " )" << endl; + kDebug(kvs::dvi) << "TeXFont_PK::getGlyph( ch=" << ch << ", generateCharacterPixmap=" << generateCharacterPixmap << " )"; #endif // Paranoia checks @@ -368,7 +368,7 @@ static quint32 bit_masks[33] = { int TeXFont_PK::PK_get_nyb(FILE *fp) { #ifdef DEBUG_PK - kDebug(kvs::dvi) << "PK_get_nyb" << endl; + kDebug(kvs::dvi) << "PK_get_nyb"; #endif unsigned temp; @@ -385,7 +385,7 @@ int TeXFont_PK::PK_get_nyb(FILE *fp) int TeXFont_PK::PK_packed_num(FILE *fp) { #ifdef DEBUG_PK - kDebug(kvs::dvi) << "PK_packed_num" << endl; + kDebug(kvs::dvi) << "PK_packed_num"; #endif int i, j; @@ -417,7 +417,7 @@ int TeXFont_PK::PK_packed_num(FILE *fp) void TeXFont_PK::PK_skip_specials() { #ifdef DEBUG_PK - kDebug(kvs::dvi) << "TeXFont_PK::PK_skip_specials() called" << endl; + kDebug(kvs::dvi) << "TeXFont_PK::PK_skip_specials() called"; #endif int i,j; @@ -425,7 +425,7 @@ void TeXFont_PK::PK_skip_specials() #ifdef DEBUG_PK if (fp == 0) - kDebug(kvs::dvi) << "TeXFont_PK::PK_skip_specials(): file == 0" << endl; + kDebug(kvs::dvi) << "TeXFont_PK::PK_skip_specials(): file == 0"; #endif do { @@ -455,7 +455,7 @@ void TeXFont_PK::PK_skip_specials() while (PK_flag_byte != PK_POST && PK_flag_byte >= PK_CMD_START); #ifdef DEBUG_PK - kDebug(kvs::dvi) << "TeXFont_PK::PK_skip_specials() ended" << endl; + kDebug(kvs::dvi) << "TeXFont_PK::PK_skip_specials() ended"; #endif } @@ -463,7 +463,7 @@ void TeXFont_PK::PK_skip_specials() void TeXFont_PK::read_PK_char(unsigned int ch) { #ifdef DEBUG_PK - kDebug(kvs::dvi) << "read_PK_char" << endl; + kDebug(kvs::dvi) << "read_PK_char"; #endif int i, j; @@ -492,7 +492,7 @@ void TeXFont_PK::read_PK_char(unsigned int ch) n = 1; #ifdef DEBUG_PK - kDebug(kvs::dvi) << "loading pk char " << ch << ", char type " << n << endl; + kDebug(kvs::dvi) << "loading pk char " << ch << ", char type " << n; #endif if (characterBitmaps[ch] == 0) @@ -550,7 +550,7 @@ void TeXFont_PK::read_PK_char(unsigned int ch) // (Ultra-)Sparc processors. #ifdef DEBUG_PK - kDebug(kvs::dvi) << "big Endian byte ordering" << endl; + kDebug(kvs::dvi) << "big Endian byte ordering"; #endif if (PK_dyn_f == 14) { /* get raster by bits */ @@ -636,7 +636,7 @@ void TeXFont_PK::read_PK_char(unsigned int ch) // Intel and Alpha processors. #ifdef DEBUG_PK - kDebug(kvs::dvi) << "small Endian byte ordering" << endl; + kDebug(kvs::dvi) << "small Endian byte ordering"; #endif if (PK_dyn_f == 14) { /* get raster by bits */ @@ -712,7 +712,7 @@ void TeXFont_PK::read_PK_char(unsigned int ch) void TeXFont_PK::read_PK_index() { #ifdef DEBUG_PK - kDebug(kvs::dvi) << "TeXFont_PK::read_PK_index() called" << endl; + kDebug(kvs::dvi) << "TeXFont_PK::read_PK_index() called"; #endif if (file == 0) { @@ -734,7 +734,7 @@ void TeXFont_PK::read_PK_index() int hppp = sfour(file); int vppp = sfour(file); if (hppp != vppp) - kWarning(kvs::dvi) << i18n("Font has non-square aspect ratio ") << vppp << ":" << hppp << endl; + kWarning(kvs::dvi) << i18n("Font has non-square aspect ratio ") << vppp << ":" << hppp ; // Read glyph directory (really a whole pass over the file). for (;;) { @@ -761,10 +761,10 @@ void TeXFont_PK::read_PK_index() glyphtable[ch].x2 = PK_flag_byte; fseek(file, (long) bytes_left, SEEK_CUR); #ifdef DEBUG_PK - kDebug(kvs::dvi) << "Scanning pk char " << ch << "at " << glyphtable[ch].addr << endl; + kDebug(kvs::dvi) << "Scanning pk char " << ch << "at " << glyphtable[ch].addr; #endif } #ifdef DEBUG_PK - kDebug(kvs::dvi) << "TeXFont_PK::read_PK_index() called" << endl; + kDebug(kvs::dvi) << "TeXFont_PK::read_PK_index() called"; #endif } diff --git a/generators/dvi/TeXFont_TFM.cpp b/generators/dvi/TeXFont_TFM.cpp index decd011ae..f7d8f99ee 100644 --- a/generators/dvi/TeXFont_TFM.cpp +++ b/generators/dvi/TeXFont_TFM.cpp @@ -21,7 +21,7 @@ TeXFont_TFM::TeXFont_TFM(TeXFontDefinition *parent) : TeXFont(parent) { #ifdef DEBUG_TFM - kDebug(kvs::dvi) << "TeXFont_TFM::TeXFont_TFM( parent=" << parent << " )" << endl; + kDebug(kvs::dvi) << "TeXFont_TFM::TeXFont_TFM( parent=" << parent << " )"; #endif QFile file( parent->filename ); @@ -36,7 +36,7 @@ TeXFont_TFM::TeXFont_TFM(TeXFontDefinition *parent) quint16 lf, lh, bc, ec, nw, nh, nd; stream >> lf >> lh >> bc >> ec >> nw >> nh >> nd; #ifdef DEBUG_TFM - kDebug(kvs::dvi) << "lf= " << lf << endl + kDebug(kvs::dvi) << "lf= " << lf << "lh= " << lh << endl << "bc= " << bc << endl << "ec= " << ec << endl @@ -54,7 +54,7 @@ TeXFont_TFM::TeXFont_TFM(TeXFontDefinition *parent) file.seek(24); stream >> checksum >> design_size_in_TeX_points.value; #ifdef DEBUG_TFM - kDebug(kvs::dvi) << "checksum = " << checksum << endl + kDebug(kvs::dvi) << "checksum = " << checksum << "design_size = " << design_size_in_TeX_points.toDouble() << " TeX Points" << endl << " = " << design_size_in_TeX_points.toDouble()*254.0/7227.0 << " cm" << endl; #endif @@ -121,7 +121,7 @@ TeXFont_TFM::~TeXFont_TFM() glyph* TeXFont_TFM::getGlyph(quint16 characterCode, bool generateCharacterPixmap, const QColor& color) { #ifdef DEBUG_TFM - kDebug(kvs::dvi) << "TeXFont_TFM::getGlyph( ch=" << ch << ", generateCharacterPixmap=" << generateCharacterPixmap << " )" << endl; + kDebug(kvs::dvi) << "TeXFont_TFM::getGlyph( ch=" << ch << ", generateCharacterPixmap=" << generateCharacterPixmap << " )"; #endif // Paranoia checks diff --git a/generators/dvi/dviFile.cpp b/generators/dvi/dviFile.cpp index 084a162b1..8e3251d70 100644 --- a/generators/dvi/dviFile.cpp +++ b/generators/dvi/dviFile.cpp @@ -195,7 +195,7 @@ void dvifile::read_postamble() command_pointer += len; #ifdef DEBUG_FONTS - kDebug(kvs::dvi) << "Postamble: define font \"" << fontname << "\" scale=" << scale << " design=" << design << endl; + kDebug(kvs::dvi) << "Postamble: define font \"" << fontname << "\" scale=" << scale << " design=" << design; #endif // According to section A.4 of the DVI driver standard, this font @@ -233,7 +233,7 @@ void dvifile::read_postamble() void dvifile::prepare_pages() { #ifdef DEBUG_DVIFILE - kDebug(kvs::dvi) << "prepare_pages" << endl; + kDebug(kvs::dvi) << "prepare_pages"; #endif if (page_offset.resize(total_pages+1) == false) { @@ -266,7 +266,7 @@ void dvifile::prepare_pages() dvifile::dvifile(const QString& fname, fontPool* pool) { #ifdef DEBUG_DVIFILE - kDebug(kvs::dvi) << "init_dvi_file: " << fname << endl; + kDebug(kvs::dvi) << "init_dvi_file: " << fname; #endif errorMsg.clear(); @@ -312,7 +312,7 @@ dvifile::dvifile(const QString& fname, fontPool* pool) dvifile::~dvifile() { #ifdef DEBUG_DVIFILE - kDebug(kvs::dvi) << "destroy dvi-file" << endl; + kDebug(kvs::dvi) << "destroy dvi-file"; #endif // Delete converted PDF files diff --git a/generators/dvi/dviRenderer.cpp b/generators/dvi/dviRenderer.cpp index 044460b09..915d1d922 100644 --- a/generators/dvi/dviRenderer.cpp +++ b/generators/dvi/dviRenderer.cpp @@ -69,7 +69,7 @@ dviRenderer::dviRenderer() currentlyDrawnPage(0) { #ifdef DEBUG_DVIRENDERER - //kDebug(kvs::dvi) << "dviRenderer( parent=" << par << " )" << endl; + //kDebug(kvs::dvi) << "dviRenderer( parent=" << par << " )"; #endif // connect(&font_pool, SIGNAL( setStatusBarText( const QString& ) ), this, SIGNAL( setStatusBarText( const QString& ) ) ); @@ -82,7 +82,7 @@ dviRenderer::dviRenderer() dviRenderer::~dviRenderer() { #ifdef DEBUG_DVIRENDERER - kDebug(kvs::dvi) << "~dviRenderer" << endl; + kDebug(kvs::dvi) << "~dviRenderer"; #endif QMutexLocker locker(&mutex); @@ -117,7 +117,7 @@ void dviRenderer::showInfo() void dviRenderer::drawPage(RenderedDocumentPagePixmap* page) { #ifdef DEBUG_DVIRENDERER - //kDebug(kvs::dvi) << "dviRenderer::drawPage(documentPage *) called, page number " << page->pageNumber << endl; + //kDebug(kvs::dvi) << "dviRenderer::drawPage(documentPage *) called, page number " << page->pageNumber; #endif // Paranoid safety checks @@ -177,7 +177,7 @@ void dviRenderer::drawPage(RenderedDocumentPagePixmap* page) } else { - kDebug(kvs::dvi) << "painter creation failed." << endl; + kDebug(kvs::dvi) << "painter creation failed."; } page->img = img; //page->setImage(img); @@ -324,7 +324,7 @@ void dviRenderer::showThatSourceInformationIsPresent() void dviRenderer::embedPostScript() { #ifdef DEBUG_DVIRENDERER - kDebug(kvs::dvi) << "dviRenderer::embedPostScript()" << endl; + kDebug(kvs::dvi) << "dviRenderer::embedPostScript()"; #endif if (!dviFile) @@ -370,7 +370,7 @@ void dviRenderer::embedPostScript() // Prescan phase starts here #ifdef PERFORMANCE_MEASUREMENT - //kDebug(kvs::dvi) << "Time elapsed till prescan phase starts " << performanceTimer.elapsed() << "ms" << endl; + //kDebug(kvs::dvi) << "Time elapsed till prescan phase starts " << performanceTimer.elapsed() << "ms"; //QTime preScanTimer; //preScanTimer.start(); #endif @@ -399,7 +399,7 @@ void dviRenderer::embedPostScript() #ifdef PERFORMANCE_MEASUREMENT - //kDebug(kvs::dvi) << "Time required for prescan phase: " << preScanTimer.restart() << "ms" << endl; + //kDebug(kvs::dvi) << "Time required for prescan phase: " << preScanTimer.restart() << "ms"; #endif current_page = currPageSav; _isModified = true; @@ -432,7 +432,7 @@ bool dviRenderer::isValidFile(const QString& filename) const bool dviRenderer::setFile(const QString &fname, const KUrl &base) { #ifdef DEBUG_DVIRENDERER - kDebug(kvs::dvi) << "dviRenderer::setFile( fname='" << fname << "' )"<PostScriptHeaderString->append( " @defspecial \n" ); @@ -330,7 +330,7 @@ void dviRenderer::prescan_ParsePSQuoteSpecial(const QString& cp) void dviRenderer::prescan_ParsePSSpecial(const QString& cp) { #ifdef DEBUG_PRESCAN - kDebug(kvs::dvi) << "PostScript-special, direct PostScript " << cp << endl; + kDebug(kvs::dvi) << "PostScript-special, direct PostScript " << cp; #endif // Unfortunately, in some TeX distribution the hyperref package uses @@ -394,7 +394,7 @@ void dviRenderer::prescan_ParsePSSpecial(const QString& cp) void dviRenderer::prescan_ParsePSFileSpecial(const QString& cp) { #ifdef DEBUG_PRESCAN - kDebug(kvs::dvi) << "epsf-special: psfile=" << cp <::Iterator it; for ( it = fontMapEntries.begin(); it != fontMapEntries.end(); ++it ) kDebug(kvs::dvi) << "TeXName: " << it.key() diff --git a/generators/dvi/fontpool.cpp b/generators/dvi/fontpool.cpp index 94529c3b9..abecd970d 100644 --- a/generators/dvi/fontpool.cpp +++ b/generators/dvi/fontpool.cpp @@ -44,7 +44,7 @@ fontPool::fontPool() 0) { #ifdef DEBUG_FONTPOOL - kDebug(kvs::dvi) << "fontPool::fontPool() called" << endl; + kDebug(kvs::dvi) << "fontPool::fontPool() called"; #endif setObjectName("Font Pool"); @@ -89,12 +89,12 @@ fontPool::fontPool() if ((result == 0xff) || (result == 0x00)) { #ifdef DEBUG_FONTPOOL - kDebug(kvs::dvi) << "fontPool::fontPool(): QPixmap does not support the alpha channel" << endl; + kDebug(kvs::dvi) << "fontPool::fontPool(): QPixmap does not support the alpha channel"; #endif QPixmapSupportsAlpha = false; } else { #ifdef DEBUG_FONTPOOL - kDebug(kvs::dvi) << "fontPool::fontPool(): QPixmap supports the alpha channel" << endl; + kDebug(kvs::dvi) << "fontPool::fontPool(): QPixmap supports the alpha channel"; #endif QPixmapSupportsAlpha = true; } @@ -104,7 +104,7 @@ fontPool::fontPool() fontPool::~fontPool() { #ifdef DEBUG_FONTPOOL - kDebug(kvs::dvi) << "fontPool::~fontPool() called" << endl; + kDebug(kvs::dvi) << "fontPool::~fontPool() called"; #endif #ifdef HAVE_FREETYPE @@ -169,7 +169,7 @@ TeXFontDefinition* fontPool::appendx(const QString& fontname, quint32 checksum, QString fontPool::status() { #ifdef DEBUG_FONTPOOL - kDebug(kvs::dvi) << "fontPool::status() called" << endl; + kDebug(kvs::dvi) << "fontPool::status() called"; #endif QString text; @@ -225,7 +225,7 @@ QString fontPool::status() bool fontPool::areFontsLocated() { #ifdef DEBUG_FONTPOOL - kDebug(kvs::dvi) << "fontPool::areFontsLocated() called" << endl; + kDebug(kvs::dvi) << "fontPool::areFontsLocated() called"; #endif // Is there a font whose name we did not try to find out yet? @@ -237,7 +237,7 @@ bool fontPool::areFontsLocated() } #ifdef DEBUG_FONTPOOL - kDebug(kvs::dvi) << "... yes, all fonts are located (but not necessarily loaded)." << endl; + kDebug(kvs::dvi) << "... yes, all fonts are located (but not necessarily loaded)."; #endif return true; // That says that all fonts are located. } @@ -406,7 +406,7 @@ void fontPool::locateFonts(bool makePK, bool locateTFMonly, bool *virtualFontsFo if (matchingFiles.isEmpty() != true) { #ifdef DEBUG_FONTPOOL - kDebug(kvs::dvi) << "Associated " << fontp->fontname << " to " << matchingFiles.first() << endl; + kDebug(kvs::dvi) << "Associated " << fontp->fontname << " to " << matchingFiles.first(); #endif QString fname = matchingFiles.first(); fontp->fontNameReceiver(fname); @@ -430,7 +430,7 @@ void fontPool::locateFonts(bool makePK, bool locateTFMonly, bool *virtualFontsFo void fontPool::setCMperDVIunit( double _CMperDVI ) { #ifdef DEBUG_FONTPOOL - kDebug(kvs::dvi) << "fontPool::setCMperDVIunit( " << _CMperDVI << " )" << endl; + kDebug(kvs::dvi) << "fontPool::setCMperDVIunit( " << _CMperDVI << " )"; #endif if (CMperDVIunit == _CMperDVI) @@ -449,7 +449,7 @@ void fontPool::setCMperDVIunit( double _CMperDVI ) void fontPool::setDisplayResolution( double _displayResolution_in_dpi ) { #ifdef DEBUG_FONTPOOL - kDebug(kvs::dvi) << "fontPool::setDisplayResolution( displayResolution_in_dpi=" << _displayResolution_in_dpi << " ) called" << endl; + kDebug(kvs::dvi) << "fontPool::setDisplayResolution( displayResolution_in_dpi=" << _displayResolution_in_dpi << " ) called"; #endif // Ignore minute changes by less than 2 DPI. The difference would @@ -458,7 +458,7 @@ void fontPool::setDisplayResolution( double _displayResolution_in_dpi ) // changes the window size by 1 pixel all the time. if ( fabs(displayResolution_in_dpi - _displayResolution_in_dpi) <= 2.0 ) { #ifdef DEBUG_FONTPOOL - kDebug(kvs::dvi) << "fontPool::setDisplayResolution(...): resolution wasn't changed. Aborting." << endl; + kDebug(kvs::dvi) << "fontPool::setDisplayResolution(...): resolution wasn't changed. Aborting."; #endif return; } @@ -493,7 +493,7 @@ void fontPool::markFontsAsLocated() void fontPool::mark_fonts_as_unused() { #ifdef DEBUG_FONTPOOL - kDebug(kvs::dvi) << "fontPool::mark_fonts_as_unused() called" << endl; + kDebug(kvs::dvi) << "fontPool::mark_fonts_as_unused() called"; #endif TeXFontDefinition *fontp = fontList.first(); @@ -507,7 +507,7 @@ void fontPool::mark_fonts_as_unused() void fontPool::release_fonts() { #ifdef DEBUG_FONTPOOL - kDebug(kvs::dvi) << "Release_fonts" << endl; + kDebug(kvs::dvi) << "Release_fonts"; #endif TeXFontDefinition *fontp = fontList.first(); diff --git a/generators/dvi/generator_dvi.cpp b/generators/dvi/generator_dvi.cpp index 3b0ad7ae5..8ad747305 100644 --- a/generators/dvi/generator_dvi.cpp +++ b/generators/dvi/generator_dvi.cpp @@ -40,14 +40,14 @@ DviGenerator::DviGenerator() : Okular::Generator(), bool DviGenerator::loadDocument( const QString & fileName, QVector< Okular::Page * > &pagesVector ) { - //kDebug() << "file: " << qPrintable( fileName ) << endl; + //kDebug() << "file: " << qPrintable( fileName ); KUrl base( fileName ); m_dviRenderer = new dviRenderer(); if ( ! m_dviRenderer->setFile( fileName, base ) ) return false; - kDebug() << "# of pages: " << m_dviRenderer->dviFile->total_pages << endl; + kDebug() << "# of pages: " << m_dviRenderer->dviFile->total_pages; m_resolution = Okular::Utils::dpiY(); loadPages( pagesVector, 0 ); @@ -223,7 +223,7 @@ void DviGenerator::generatePixmap( Okular::PixmapRequest *request ) if ( ! pageInfo->img.isNull() ) { - kDebug() << "Image OK" << endl; + kDebug() << "Image OK"; request->page()->setPixmap( request->id(), new QPixmap( QPixmap::fromImage( pageInfo->img ) ) ); @@ -241,7 +241,7 @@ void DviGenerator::generatePixmap( Okular::PixmapRequest *request ) Okular::TextPage* DviGenerator::textPage( Okular::Page *page ) { - kDebug() << "DviGenerator::textPage( Okular::Page * page )" << endl; + kDebug() << "DviGenerator::textPage( Okular::Page * page )"; dviPageInfo *pageInfo = new dviPageInfo(); pageSize ps; @@ -377,7 +377,7 @@ void DviGenerator::loadPages( QVector< Okular::Page * > &pagesVector, int orient int numofpages = m_dviRenderer->dviFile->total_pages; pagesVector.resize( numofpages ); - //kDebug() << "resolution: " << m_resolution << ", dviFile->preferred? " << endl; + //kDebug() << "resolution: " << m_resolution << ", dviFile->preferred? "; /* get the suggested size */ if ( m_dviRenderer->dviFile->suggestedPageSize ) @@ -401,7 +401,7 @@ void DviGenerator::loadPages( QVector< Okular::Page * > &pagesVector, int orient for ( int i = 0; i < numofpages; ++i ) { - //kDebug() << "getting status of page " << i << ":" << endl; + //kDebug() << "getting status of page " << i << ":"; if ( pagesVector[i] ) { @@ -414,7 +414,7 @@ void DviGenerator::loadPages( QVector< Okular::Page * > &pagesVector, int orient (Okular::Rotation)orientation ); pagesVector[i] = page; } - kDebug() << "pagesVector successfully inizialized ! " << endl; + kDebug() << "pagesVector successfully inizialized ! "; // filling the pages with the source references rects const QVector& sourceAnchors = m_dviRenderer->sourceAnchors(); diff --git a/generators/dvi/glyph.cpp b/generators/dvi/glyph.cpp index 2fb7ded3c..a2e768133 100644 --- a/generators/dvi/glyph.cpp +++ b/generators/dvi/glyph.cpp @@ -16,7 +16,7 @@ glyph::glyph() { #ifdef DEBUG_GLYPH - kDebug(kvs::dvi) << "glyph::glyph()" << endl; + kDebug(kvs::dvi) << "glyph::glyph()"; #endif addr = 0; diff --git a/generators/dvi/psgs.cpp b/generators/dvi/psgs.cpp index 569168ff2..87502bc1b 100644 --- a/generators/dvi/psgs.cpp +++ b/generators/dvi/psgs.cpp @@ -66,7 +66,7 @@ ghostscript_interface::~ghostscript_interface() { void ghostscript_interface::setPostScript(const PageNumber& page, const QString& PostScript) { #ifdef DEBUG_PSGS - kDebug(kvs::dvi) << "ghostscript_interface::setPostScript( " << page << ", ... )" << endl; + kDebug(kvs::dvi) << "ghostscript_interface::setPostScript( " << page << ", ... )"; #endif if (pageList.find(page) == 0) { @@ -90,7 +90,7 @@ void ghostscript_interface::setIncludePath(const QString &_includePath) { void ghostscript_interface::setBackgroundColor(const PageNumber& page, const QColor& background_color, bool permanent) { #ifdef DEBUG_PSGS - kDebug(kvs::dvi) << "ghostscript_interface::setBackgroundColor( " << page << ", " << background_color << " )" << endl; + kDebug(kvs::dvi) << "ghostscript_interface::setBackgroundColor( " << page << ", " << background_color << " )"; #endif if (pageList.find(page) == 0) { @@ -112,7 +112,7 @@ void ghostscript_interface::setBackgroundColor(const PageNumber& page, const QCo void ghostscript_interface::restoreBackgroundColor(const PageNumber& page) { #ifdef DEBUG_PSGS - kDebug(kvs::dvi) << "ghostscript_interface::restoreBackgroundColor( " << page << " )" << endl; + kDebug(kvs::dvi) << "ghostscript_interface::restoreBackgroundColor( " << page << " )"; #endif if (pageList.find(page) == 0) return; @@ -126,7 +126,7 @@ void ghostscript_interface::restoreBackgroundColor(const PageNumber& page) QColor ghostscript_interface::getBackgroundColor(const PageNumber& page) const { #ifdef DEBUG_PSGS - kDebug(kvs::dvi) << "ghostscript_interface::getBackgroundColor( " << page << " )" << endl; + kDebug(kvs::dvi) << "ghostscript_interface::getBackgroundColor( " << page << " )"; #endif if (pageList.find(page) == 0) @@ -146,7 +146,7 @@ void ghostscript_interface::clear() { void ghostscript_interface::gs_generate_graphics_file(const PageNumber& page, const QString& filename, long magnification) { #ifdef DEBUG_PSGS - kDebug(kvs::dvi) << "ghostscript_interface::gs_generate_graphics_file( " << page << ", " << filename << " )" << endl; + kDebug(kvs::dvi) << "ghostscript_interface::gs_generate_graphics_file( " << page << ", " << filename << " )"; #endif if (knownDevices.isEmpty()) { @@ -226,7 +226,7 @@ void ghostscript_interface::gs_generate_graphics_file(const PageNumber& page, co argus << "-f" << PSfileName; #ifdef DEBUG_PSGS - kDebug(kvs::dvi) << argus.join(" ") << endl; + kDebug(kvs::dvi) << argus.join(" "); #endif proc << argus; @@ -279,7 +279,7 @@ void ghostscript_interface::gs_generate_graphics_file(const PageNumber& page, co "drivers. Note that KDVI needs to be restarted to re-enable PostScript support." "

")); else { - kDebug(kvs::dvi) << QString("KDVI will now try to use the '%1' device driver.").arg(*gsDevice) << endl; + kDebug(kvs::dvi) << QString("KDVI will now try to use the '%1' device driver.").arg(*gsDevice); gs_generate_graphics_file(page, filename, magnification); } return; @@ -291,7 +291,7 @@ void ghostscript_interface::gs_generate_graphics_file(const PageNumber& page, co void ghostscript_interface::graphics(const PageNumber& page, double dpi, long magnification, QPainter* paint) { #ifdef DEBUG_PSGS - kDebug(kvs::dvi) << "ghostscript_interface::graphics( " << page << ", " << dpi << ", ... ) called." << endl; + kDebug(kvs::dvi) << "ghostscript_interface::graphics( " << page << ", " << dpi << ", ... ) called."; #endif if (paint == 0) { @@ -309,7 +309,7 @@ void ghostscript_interface::graphics(const PageNumber& page, double dpi, long ma // No PostScript? Then return immediately. if ((info == 0) || (info->PostScriptString->isEmpty())) { #ifdef DEBUG_PSGS - kDebug(kvs::dvi) << "No PostScript found. Not drawing anything." << endl; + kDebug(kvs::dvi) << "No PostScript found. Not drawing anything."; #endif return; } diff --git a/generators/dvi/simplePageSize.cpp b/generators/dvi/simplePageSize.cpp index 1440f26c0..3a2fe92ab 100644 --- a/generators/dvi/simplePageSize.cpp +++ b/generators/dvi/simplePageSize.cpp @@ -39,7 +39,7 @@ double SimplePageSize::zoomForWidth(quint32 width, const QPaintDevice& pd) const double SimplePageSize::zoomToFitInto(const SimplePageSize &target) const { if (!isValid() || isSmall() || !target.isValid()) { - kWarning(kvs::shell) << "SimplePageSize::zoomToFitInto(...) with unsuitable source of target" << endl; + kWarning(kvs::shell) << "SimplePageSize::zoomToFitInto(...) with unsuitable source of target" ; return 1.0; } diff --git a/generators/dvi/special.cpp b/generators/dvi/special.cpp index 84fa9acb2..339a85474 100644 --- a/generators/dvi/special.cpp +++ b/generators/dvi/special.cpp @@ -251,7 +251,7 @@ void dviRenderer::html_href_special(const QString& _cp) cp.truncate(cp.indexOf('"')); #ifdef DEBUG_SPECIAL - kDebug(kvs::dvi) << "HTML-special, href " << cp.toLatin1() << endl; + kDebug(kvs::dvi) << "HTML-special, href " << cp.toLatin1(); #endif HTML_href = new QString(cp); } @@ -260,7 +260,7 @@ void dviRenderer::html_href_special(const QString& _cp) void dviRenderer::html_anchor_end() { #ifdef DEBUG_SPECIAL - kDebug(kvs::dvi) << "HTML-special, anchor-end" << endl; + kDebug(kvs::dvi) << "HTML-special, anchor-end"; #endif if (HTML_href != NULL) { @@ -310,7 +310,7 @@ void parse_special_argument(const QString& strg, const char* argument_name, int* void dviRenderer::epsf_special(const QString& cp) { #ifdef DEBUG_SPECIAL - kDebug(kvs::dvi) << "epsf-special: psfile=" << cp <computePageSize( internalDoc->pageMedia() ) << endl; + kDebug() << "New Page size:" << size.name() << ":" << internalDoc->computePageSize( internalDoc->pageMedia() ); break; } } @@ -280,7 +280,7 @@ bool GSGenerator::loadPages( QVector< Okular::Page * > & pagesVector ) tmpPage=(internalDoc->dsc() -> page() + i); if (!tmpPage) { - kDebug() << "no tmpPage for page nr " << i << endl; + kDebug() << "no tmpPage for page nr " << i; continue; } pSize = internalDoc -> computePageSize( internalDoc -> pageMedia( i ) ); @@ -327,14 +327,14 @@ bool GSGenerator::loadDocumentWithDSC( const QString & name, QVector< Okular::Pa { internalDoc = new GSInternalDocument (name, ps ? GSInternalDocument::PS : GSInternalDocument::PDF); pagesVector.resize( internalDoc->dsc()->page_count() ); - kDebug() << "Page count: " << internalDoc->dsc()->page_count() << endl; - kDebug() << "Page size: " << internalDoc->computePageSize( internalDoc->pageMedia() ) << endl; + kDebug() << "Page count: " << internalDoc->dsc()->page_count(); + kDebug() << "Page size: " << internalDoc->computePageSize( internalDoc->pageMedia() ); return loadPages (pagesVector); } void GSGenerator::generatePixmap( Okular::PixmapRequest * req ) { - kWarning() << "receiving req id=" << req->id() << " " <width() << "x" << req->height() << "@" << req->pageNumber() << " async == " << req->asynchronous() << endl; + kWarning() << "receiving req id=" << req->id() << " " <width() << "x" << req->height() << "@" << req->pageNumber() << " async == " << req->asynchronous() ; int pgNo=req->pageNumber(); double width = req->page()->width(); double height = req->page()->height(); diff --git a/generators/ghostview/gshandler.cpp b/generators/ghostview/gshandler.cpp index 74fd94770..76607ed2d 100644 --- a/generators/ghostview/gshandler.cpp +++ b/generators/ghostview/gshandler.cpp @@ -29,11 +29,11 @@ static bool handleErrorCode(int code) switch (code) { case e_Fatal: - kDebug() << "fatal internal error " << code << endl; + kDebug() << "fatal internal error " << code; break; case e_ExecStackUnderflow: - kDebug() << "stack overflow " << code << endl; + kDebug() << "stack overflow " << code; break; // no error or not important @@ -46,7 +46,7 @@ static bool handleErrorCode(int code) const char* errors[]= { "", ERROR_NAMES }; int x=(-1)*code; if (x < sizeof(errors)/sizeof(const char*)) { - kDebug() << errors[x] << " " << code << endl; + kDebug() << errors[x] << " " << code; } return false; } diff --git a/generators/ghostview/gvlogwindow.cpp b/generators/ghostview/gvlogwindow.cpp index 933564149..b51465238 100644 --- a/generators/ghostview/gvlogwindow.cpp +++ b/generators/ghostview/gvlogwindow.cpp @@ -26,7 +26,7 @@ // GSLogWindow::GSLogWindow( QWidget* parent ) // : KVBox( parent ) // { -// kDebug() << "Starting logwindow" <setSpacing( 2 ); // QWidget *searchWidget = new QWidget( this ); @@ -67,7 +67,7 @@ // if ( event->type() == QEvent::Reparent && ( m_msgList->childCount() ) ) // { // int w=( m_msgList->firstChild() ) -> width( m_msgList->fontMetrics() , m_msgList, m_tCol); -// kDebug() << "new width = " << w << endl; +// kDebug() << "new width = " << w; // m_msgList->setColumnWidth(m_tCol, w); // } // return true; @@ -77,8 +77,8 @@ // // void GSLogWindow::append( GSInterpreterLib::MessageType t, const QString &text) // { -// //kDebug() << "Appending: " << text <name); diff --git a/generators/ghostview/interpreter_cmd.cpp b/generators/ghostview/interpreter_cmd.cpp index e0f5d8fa0..f3708b2ac 100644 --- a/generators/ghostview/interpreter_cmd.cpp +++ b/generators/ghostview/interpreter_cmd.cpp @@ -86,7 +86,7 @@ void GSInterpreterCMD::fordwardImage(QImage *image) { if (image->width() != m_request->width() || image->height() != m_request->height()) { - kWarning(4656) << "Generated image does not match wanted size " << image->width() << " " << m_request->width() << " " << image->height() << " " << m_request->height() << endl; + kWarning(4656) << "Generated image does not match wanted size " << image->width() << " " << m_request->width() << " " << image->height() << " " << m_request->height() ; QImage aux = image->scaled(m_request->width(), m_request->height()); delete image; image = new QImage(aux); diff --git a/generators/xps/generator_xps.cpp b/generators/xps/generator_xps.cpp index e4ec078d2..2ee6fc55a 100644 --- a/generators/xps/generator_xps.cpp +++ b/generators/xps/generator_xps.cpp @@ -213,7 +213,7 @@ static QPainterPath parseAbbreviatedPathData( const QString &data) { if (token.type != abtEOF) { - kDebug(XpsDebug) << "Error in parsing abbreviated path data" << endl; + kDebug(XpsDebug) << "Error in parsing abbreviated path data"; } return path; } @@ -355,7 +355,7 @@ static QBrush parseRscRefColorForBrush( const QString &data ) { if (data[0] == '{') { //TODO - kDebug(XpsDebug) << "Reference" << data << endl; + kDebug(XpsDebug) << "Reference" << data; return QBrush(); } else { return QBrush( hexToRgba( data.toLatin1() ) ); @@ -369,7 +369,7 @@ static QPen parseRscRefColorForPen( const QString &data ) { if (data[0] == '{') { //TODO - kDebug(XpsDebug) << "Reference" << data << endl; + kDebug(XpsDebug) << "Reference" << data; return QPen(); } else { return QPen( hexToRgba( data.toLatin1() ) ); @@ -383,7 +383,7 @@ static QMatrix parseRscRefMatrix( const QString &data ) { if (data[0] == '{') { //TODO - kDebug(XpsDebug) << "Reference" << data << endl; + kDebug(XpsDebug) << "Reference" << data; return QMatrix(); } else { return attsToMatrix( data ); @@ -402,7 +402,7 @@ XpsHandler::~XpsHandler() bool XpsHandler::startDocument() { - kDebug(XpsDebug) << "start document" << m_page->m_fileName << endl; + kDebug(XpsDebug) << "start document" << m_page->m_fileName ; m_page->m_pageImage->fill( QColor("White").rgba() ); XpsRenderNode node; @@ -441,7 +441,7 @@ bool XpsHandler::endElement( const QString &nameSpace, XpsRenderNode node = m_nodes.pop(); if (node.name != localName) { - kDebug(XpsDebug) << "Name doesn't match" << endl; + kDebug(XpsDebug) << "Name doesn't match"; } processEndElement( node ); node.children.clear(); @@ -462,7 +462,7 @@ void XpsHandler::processGlyph( XpsRenderNode &node ) // Get font (doesn't work well because qt doesn't allow to load font from file) // This works despite the fact that font size isn't specified in points as required by qt. It's because I set point size to be equal to drawing unit. - // kDebug(XpsDebug) << "Font Rendering EmSize: " << node.attributes.value("FontRenderingEmSize").toFloat() << endl; + // kDebug(XpsDebug) << "Font Rendering EmSize: " << node.attributes.value("FontRenderingEmSize").toFloat(); QFont font = m_page->m_file->getFontByName( node.attributes.value("FontUri"), node.attributes.value("FontRenderingEmSize").toFloat()); m_painter->setFont(font); @@ -499,9 +499,9 @@ void XpsHandler::processGlyph( XpsRenderNode &node ) } m_painter->drawText( origin, node.attributes.value("UnicodeString") ); - // kDebug(XpsDebug) << "Glyphs: " << atts.value("Fill") << ", " << atts.value("FontUri") << endl; - // kDebug(XpsDebug) << " Origin: " << atts.value("OriginX") << "," << atts.value("OriginY") << endl; - // kDebug(XpsDebug) << " Unicode: " << atts.value("UnicodeString") << endl; + // kDebug(XpsDebug) << "Glyphs: " << atts.value("Fill") << ", " << atts.value("FontUri"); + // kDebug(XpsDebug) << " Origin: " << atts.value("OriginX") << "," << atts.value("OriginY"); + // kDebug(XpsDebug) << " Unicode: " << atts.value("UnicodeString"); m_painter->restore(); } @@ -511,7 +511,7 @@ void XpsHandler::processFill( XpsRenderNode &node ) //TODO Ignored child elements: LinearGradientBrush, RadialGradientBrush, VirtualBrush if (node.children.size() != 1) { - kDebug(XpsDebug) << "Fill element should have exactly one child" << endl; + kDebug(XpsDebug) << "Fill element should have exactly one child"; } else { node.data = node.children[0].data; } @@ -658,7 +658,7 @@ void XpsHandler::processEndElement( XpsRenderNode &node ) } else if (node.name == "ImageBrush.Transform") { node.data = node.getRequiredChildData( "MatrixTransform" ); } else { - //kDebug(XpsDebug) << "Unknown element: " << node->name << endl; + //kDebug(XpsDebug) << "Unknown element: " << node->name; } } @@ -667,7 +667,7 @@ XpsPage::XpsPage(XpsFile *file, const QString &fileName): m_file( file ), { m_pageImage = NULL; - // kDebug(XpsDebug) << "page file name: " << fileName << endl; + // kDebug(XpsDebug) << "page file name: " << fileName; const KZipFileEntry* pageFile = static_cast(m_file->xpsArchive()->directory()->entry( fileName )); @@ -686,7 +686,7 @@ XpsPage::XpsPage(XpsFile *file, const QString &fileName): m_file( file ), } if ( xml.error() ) { - kDebug(XpsDebug) << "Could not parse XPS page:" << xml.errorString() << endl; + kDebug(XpsDebug) << "Could not parse XPS page:" << xml.errorString(); } } @@ -719,7 +719,7 @@ bool XpsPage::renderToImage( QImage *p ) QBuffer * buffer = new QBuffer(&data); QXmlInputSource *source = new QXmlInputSource(buffer); bool ok = parser->parse( source ); - kDebug(XpsDebug) << "Parse result: " << ok << endl; + kDebug(XpsDebug) << "Parse result: " << ok; delete source; delete parser; delete handler; @@ -739,7 +739,7 @@ QSize XpsPage::size() const QFont XpsFile::getFontByName( const QString &fileName, float size ) { - // kDebug(XpsDebug) << "trying to get font: " << fileName << ", size: " << size << endl; + // kDebug(XpsDebug) << "trying to get font: " << fileName << ", size: " << size; int index = m_fontCache.value(fileName, -1); if (index == -1) @@ -757,7 +757,7 @@ QFont XpsFile::getFontByName( const QString &fileName, float size ) int XpsFile::loadFontByName( const QString &fileName ) { - // kDebug(XpsDebug) << "font file name: " << fileName << endl; + // kDebug(XpsDebug) << "font file name: " << fileName; const KZipFileEntry* fontFile = static_cast(m_xpsArchive->directory()->entry( fileName )); @@ -775,13 +775,13 @@ int XpsFile::loadFontByName( const QString &fileName ) unsigned short guid[16]; if (!parseGUID(baseName, guid)) { - kDebug(XpsDebug) << "File to load font - file name isn't a GUID" << endl; + kDebug(XpsDebug) << "File to load font - file name isn't a GUID"; } else { if (fontData.length() < 32) { - kDebug(XpsDebug) << "Font file is too small" << endl; + kDebug(XpsDebug) << "Font file is too small"; } else { // Obfuscation - xor bytes in font binary with bytes from guid (font's filename) const static int mapping[] = {15, 14, 13, 12, 11, 10, 9, 8, 6, 7, 4, 5, 0, 1, 2, 3}; @@ -795,7 +795,7 @@ int XpsFile::loadFontByName( const QString &fileName ) } - // kDebug(XpsDebug) << "Loaded font: " << m_fontDatabase.applicationFontFamilies( result ) << endl; + // kDebug(XpsDebug) << "Loaded font: " << m_fontDatabase.applicationFontFamilies( result ); return result; // a font ID } @@ -806,7 +806,7 @@ KZip * XpsFile::xpsArchive() { QImage XpsPage::loadImageFromFile( const QString &fileName ) { - // kDebug(XpsDebug) << "image file name: " << fileName << endl; + // kDebug(XpsDebug) << "image file name: " << fileName; const KZipFileEntry* imageFile = static_cast(m_file->xpsArchive()->directory()->entry( fileName )); @@ -842,7 +842,7 @@ QImage XpsPage::loadImageFromFile( const QString &fileName ) Okular::TextPage* XpsPage::textPage() { - // kDebug(XpsDebug) << "Parsing XpsPage, text extraction" << endl; + // kDebug(XpsDebug) << "Parsing XpsPage, text extraction"; Okular::TextPage* textPage = new Okular::TextPage(); @@ -882,7 +882,7 @@ Okular::TextPage* XpsPage::textPage() } else if (xml.name() == "FixedPage") { // not useful for text extraction } else { - kDebug(XpsDebug) << "Unhandled element in Text Extraction start: " << xml.name().toString() << endl; + kDebug(XpsDebug) << "Unhandled element in Text Extraction start: " << xml.name().toString(); } } else if (xml.isEndElement() ) { if (xml.name() == "Canvas") { @@ -929,19 +929,19 @@ Okular::TextPage* XpsPage::textPage() } else if (xml.name() == "FixedPage") { // not useful for text extraction } else { - kDebug(XpsDebug) << "Unhandled element in Text Extraction end: " << xml.name().toString() << endl; + kDebug(XpsDebug) << "Unhandled element in Text Extraction end: " << xml.name().toString(); } } } if ( xml.error() ) { - kDebug(XpsDebug) << "Error parsing XpsPage text: " << xml.errorString() << endl; + kDebug(XpsDebug) << "Error parsing XpsPage text: " << xml.errorString(); } return textPage; } void XpsDocument::parseDocumentStructure( const QString &documentStructureFileName ) { - kDebug(XpsDebug) << "document structure file name: " << documentStructureFileName << endl; + kDebug(XpsDebug) << "document structure file name: " << documentStructureFileName; m_haveDocumentStructure = false; const KZipFileEntry* documentStructureFile = static_cast(m_file->xpsArchive()->directory()->entry( documentStructureFileName )); @@ -957,9 +957,9 @@ void XpsDocument::parseDocumentStructure( const QString &documentStructureFileNa if ( xml.name() == "DocumentStructure" ) { // just a container for optional outline and story elements - nothing to do here } else if ( xml.name() == "DocumentStructure.Outline" ) { - kDebug(XpsDebug) << "found DocumentStructure.Outline" << endl; + kDebug(XpsDebug) << "found DocumentStructure.Outline"; } else if ( xml.name() == "DocumentOutline" ) { - kDebug(XpsDebug) << "found DocumentOutline" << endl; + kDebug(XpsDebug) << "found DocumentOutline"; m_docStructure = new Okular::DocumentSynopsis; } else if ( xml.name() == "OutlineEntry" ) { m_haveDocumentStructure = true; @@ -971,7 +971,7 @@ void XpsDocument::parseDocumentStructure( const QString &documentStructureFileNa QString target = attributes.value("OutlineTarget").toString(); int hashPosition = target.lastIndexOf( '#' ); target = target.mid( hashPosition + 1 ); - // kDebug(XpsDebug) << "target: " << target << endl; + // kDebug(XpsDebug) << "target: " << target; Okular::DocumentViewport viewport; viewport.pageNumber = m_docStructurePageMap.value( target ); synopsisElement.setAttribute( "Viewport", viewport.toString() ); @@ -1000,7 +1000,7 @@ void XpsDocument::parseDocumentStructure( const QString &documentStructureFileNa } else if ( xml.name() == "StoryFragmentReference" ) { // we need to handle StoryFragmentReference here, but I have no idea what to do with it. } else { - kDebug(XpsDebug) << "Unhandled entry in DocumentStructure: " << xml.name().toString() << endl; + kDebug(XpsDebug) << "Unhandled entry in DocumentStructure: " << xml.name().toString(); } } } @@ -1018,7 +1018,7 @@ bool XpsDocument::hasDocumentStructure() XpsDocument::XpsDocument(XpsFile *file, const QString &fileName): m_file(file), m_haveDocumentStructure( false ) { - kDebug(XpsDebug) << "document file name: " << fileName << endl; + kDebug(XpsDebug) << "document file name: " << fileName; const KZipFileEntry* documentFile = static_cast(file->xpsArchive()->directory()->entry( fileName )); @@ -1029,7 +1029,7 @@ XpsDocument::XpsDocument(XpsFile *file, const QString &fileName): m_file(file), if ( docXml.isStartElement() ) { if ( docXml.name() == "PageContent" ) { QString pagePath = docXml.attributes().value("Source").toString(); - kDebug(XpsDebug) << "Page Path: " << pagePath << endl; + kDebug(XpsDebug) << "Page Path: " << pagePath; if (pagePath.startsWith('/') == false ) { int offset = fileName.lastIndexOf('/'); QString thisDir = fileName.mid(0, offset) + '/'; @@ -1047,12 +1047,12 @@ XpsDocument::XpsDocument(XpsFile *file, const QString &fileName): m_file(file), } else if ( docXml.name() == "FixedDocument" ) { // we just ignore this - it is just a container } else { - kDebug(XpsDebug) << "Unhandled entry in FixedDocument: " << docXml.name().toString() << endl; + kDebug(XpsDebug) << "Unhandled entry in FixedDocument: " << docXml.name().toString(); } } } if ( docXml.error() ) { - kDebug(XpsDebug) << "Could not parse main XPS document file: " << docXml.errorString() << endl; + kDebug(XpsDebug) << "Could not parse main XPS document file: " << docXml.errorString(); } // There might be a relationships entry for this document - typically used to tell us where to find the @@ -1093,12 +1093,12 @@ XpsDocument::XpsDocument(XpsFile *file, const QString &fileName): m_file(file), } } else { // the page relationship file didn't exist in the zipfile // this isn't fatal - kDebug(XpsDebug) << "Could not open Document relationship file from " << maybeDocumentRelationshipPath << endl; + kDebug(XpsDebug) << "Could not open Document relationship file from " << maybeDocumentRelationshipPath; } if ( ! documentStructureFile.isEmpty() ) { - // kDebug(XpsDebug) << "Document structure filename: " << documentStructureFile << endl; + // kDebug(XpsDebug) << "Document structure filename: " << documentStructureFile; // make the document path absolute if ( documentStructureFile.startsWith( '/' ) ) { @@ -1109,7 +1109,7 @@ XpsDocument::XpsDocument(XpsFile *file, const QString &fileName): m_file(file), maybeDocumentRelationshipPath.truncate( slashPosition ); documentStructureFile.prepend( maybeDocumentRelationshipPath + '/' ); } - // kDebug(XpsDebug) << "Document structure absolute path: " << documentStructureFile << endl; + // kDebug(XpsDebug) << "Document structure absolute path: " << documentStructureFile; parseDocumentStructure( documentStructureFile ); } @@ -1152,9 +1152,9 @@ bool XpsFile::loadDocument(const QString &filename) { m_xpsArchive = new KZip( filename ); if ( m_xpsArchive->open( QIODevice::ReadOnly ) == true ) { - kDebug(XpsDebug) << "Successful open of " << m_xpsArchive->fileName() << endl; + kDebug(XpsDebug) << "Successful open of " << m_xpsArchive->fileName(); } else { - kDebug(XpsDebug) << "Could not open XPS archive: " << m_xpsArchive->fileName() << endl; + kDebug(XpsDebug) << "Could not open XPS archive: " << m_xpsArchive->fileName(); delete m_xpsArchive; return false; } @@ -1189,17 +1189,17 @@ bool XpsFile::loadDocument(const QString &filename) } else if ("http://schemas.openxmlformats.org/package/2006/relationships/digital-signature/origin" == type) { m_signatureOrigin = target; } else { - kDebug(XpsDebug) << "Unknown relationships element: " << type << " : " << target << endl; + kDebug(XpsDebug) << "Unknown relationships element: " << type << " : " << target; } } else if ( relXml.name() == "Relationships" ) { // nothing to do here - this is just the container level } else { - kDebug(XpsDebug) << "unexpected element in _rels/.rels: " << relXml.name().toString() << endl; + kDebug(XpsDebug) << "unexpected element in _rels/.rels: " << relXml.name().toString(); } } } if ( relXml.error() ) { - kDebug(XpsDebug) << "Could not parse _rels/.rels: " << relXml.errorString() << endl; + kDebug(XpsDebug) << "Could not parse _rels/.rels: " << relXml.errorString(); return false; } @@ -1227,12 +1227,12 @@ bool XpsFile::loadDocument(const QString &filename) } else if ( fixedRepXml.name() == "FixedDocumentSequence") { // we don't do anything here - this is just a container for one or more DocumentReference elements } else { - kDebug(XpsDebug) << "Unhandled entry in FixedDocumentSequence: " << fixedRepXml.name().toString() << endl; + kDebug(XpsDebug) << "Unhandled entry in FixedDocumentSequence: " << fixedRepXml.name().toString(); } } } if ( fixedRepXml.error() ) { - kDebug(XpsDebug) << "Could not parse FixedRepresentation file:" << fixedRepXml.errorString() << endl; + kDebug(XpsDebug) << "Could not parse FixedRepresentation file:" << fixedRepXml.errorString(); return false; } @@ -1283,10 +1283,10 @@ const Okular::DocumentInfo * XpsFile::generateDocumentInfo() } if ( xml.error() ) { - kDebug(XpsDebug) << "Could not parse XPS core properties:" << xml.errorString() << endl; + kDebug(XpsDebug) << "Could not parse XPS core properties:" << xml.errorString(); } } else { - kDebug(XpsDebug) << "No core properties filename" << endl; + kDebug(XpsDebug) << "No core properties filename"; } m_docInfo->set( Okular::DocumentInfo::Pages, QString::number(numPages()) ); @@ -1402,14 +1402,14 @@ Okular::TextPage* XpsGenerator::textPage( Okular::Page * page ) const Okular::DocumentInfo * XpsGenerator::generateDocumentInfo() { - kDebug(XpsDebug) << "generating document metadata" << endl; + kDebug(XpsDebug) << "generating document metadata"; return m_xpsFile->generateDocumentInfo(); } const Okular::DocumentSynopsis * XpsGenerator::generateDocumentSynopsis() { - kDebug(XpsDebug) << "generating document synopsis" << endl; + kDebug(XpsDebug) << "generating document synopsis"; // we only generate the synopsis for the first file. if ( !m_xpsFile || !m_xpsFile->document( 0 ) ) @@ -1470,7 +1470,7 @@ void * XpsRenderNode::getRequiredChildData( const QString &name ) { XpsRenderNode * child = findChild( name ); if (child == NULL) { - kDebug(XpsDebug) << "Required element " << name << " is missing in " << this->name << endl; + kDebug(XpsDebug) << "Required element " << name << " is missing in " << this->name; return NULL; }