mirror of
https://invent.kde.org/graphics/okular
synced 2024-08-25 10:55:37 +00:00
Adapt to new KWarning/kFatal/kDebug api
svn path=/trunk/KDE/kdegraphics/okular/; revision=695802
This commit is contained in:
parent
dea213be87
commit
d7193013e2
|
@ -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<QString> listing;
|
||||
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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; i<TeXFontDefinition::max_num_of_chars_in_font; i++)
|
||||
|
@ -89,13 +89,13 @@ TeXFont_PK::TeXFont_PK(TeXFontDefinition *parent)
|
|||
kError(kvs::dvi) << i18n("Cannot open font file %1.", parent->filename) << 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
|
||||
}
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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 << "' )"<<endl; //, ref='" << ref << "', sourceMarker=" << sourceMarker << " )" << endl;
|
||||
kDebug(kvs::dvi) << "dviRenderer::setFile( fname='" << fname << "' )"; //, ref='" << ref << "', sourceMarker=" << sourceMarker << " )";
|
||||
#endif
|
||||
|
||||
//QMutexLocker lock(&mutex);
|
||||
|
@ -531,7 +531,7 @@ bool dviRenderer::setFile(const QString &fname, const KUrl &base)
|
|||
|
||||
// PRESCAN 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
|
||||
|
@ -580,7 +580,7 @@ bool dviRenderer::setFile(const QString &fname, const KUrl &base)
|
|||
#endif
|
||||
|
||||
#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;
|
||||
// PRESCAN ENDS HERE
|
||||
|
|
|
@ -77,7 +77,7 @@ extern QPainter *foreGroundPainter;
|
|||
void dviRenderer::set_char(unsigned int cmd, unsigned int ch)
|
||||
{
|
||||
#ifdef DEBUG_RENDER
|
||||
kDebug(kvs::dvi) << "set_char #" << ch << endl;
|
||||
kDebug(kvs::dvi) << "set_char #" << ch;
|
||||
#endif
|
||||
|
||||
glyph *g;
|
||||
|
@ -206,7 +206,7 @@ void dviRenderer::set_empty_char(unsigned int, unsigned int)
|
|||
void dviRenderer::set_vf_char(unsigned int cmd, unsigned int ch)
|
||||
{
|
||||
#ifdef DEBUG_RENDER
|
||||
kDebug(kvs::dvi) << "dviRenderer::set_vf_char( cmd=" << cmd << ", ch=" << ch << " )" << endl;
|
||||
kDebug(kvs::dvi) << "dviRenderer::set_vf_char( cmd=" << cmd << ", ch=" << ch << " )";
|
||||
#endif
|
||||
|
||||
static unsigned char c;
|
||||
|
@ -247,7 +247,7 @@ void dviRenderer::set_vf_char(unsigned int cmd, unsigned int ch)
|
|||
void dviRenderer::set_no_char(unsigned int cmd, unsigned int ch)
|
||||
{
|
||||
#ifdef DEBUG_RENDER
|
||||
kDebug(kvs::dvi) << "dviRenderer::set_no_char( cmd=" << cmd << ", ch =" << ch << " )" << endl;
|
||||
kDebug(kvs::dvi) << "dviRenderer::set_no_char( cmd=" << cmd << ", ch =" << ch << " )" ;
|
||||
#endif
|
||||
|
||||
if (currinf._virtual) {
|
||||
|
@ -267,7 +267,7 @@ void dviRenderer::set_no_char(unsigned int cmd, unsigned int ch)
|
|||
void dviRenderer::draw_part(double current_dimconv, bool is_vfmacro)
|
||||
{
|
||||
#ifdef DEBUG_RENDER
|
||||
kDebug(kvs::dvi) << "draw_part" << endl;
|
||||
kDebug(kvs::dvi) << "draw_part";
|
||||
#endif
|
||||
|
||||
qint32 RRtmp=0, WWtmp=0, XXtmp=0, YYtmp=0, ZZtmp=0;
|
||||
|
@ -368,7 +368,7 @@ void dviRenderer::draw_part(double current_dimconv, bool is_vfmacro)
|
|||
// that at the end of a page, the stack should always be
|
||||
// empty.
|
||||
if (!stack.isEmpty()) {
|
||||
kDebug(kvs::dvi) << "DRAW: The stack was not empty when the EOP command was encountered." << endl;
|
||||
kDebug(kvs::dvi) << "DRAW: The stack was not empty when the EOP command was encountered.";
|
||||
errorMsg = i18n("The stack was not empty when the EOP command was encountered.");
|
||||
return;
|
||||
}
|
||||
|
@ -590,14 +590,14 @@ void dviRenderer::draw_page()
|
|||
// elapsed till the kdvi_multipage was constructed, and print
|
||||
// it. Set the flag so that is message will not be printed again.
|
||||
if (performanceFlag == 0) {
|
||||
kDebug(kvs::dvi) << "Time elapsed till the first page is drawn: " << performanceTimer.restart() << "ms" << endl;
|
||||
kDebug(kvs::dvi) << "Time elapsed till the first page is drawn: " << performanceTimer.restart() << "ms";
|
||||
performanceFlag = 1;
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
#ifdef DEBUG_RENDER
|
||||
kDebug(kvs::dvi) <<"draw_page" << endl;
|
||||
kDebug(kvs::dvi) <<"draw_page";
|
||||
#endif
|
||||
|
||||
#if 0
|
||||
|
|
|
@ -41,7 +41,7 @@ extern void parse_special_argument(const QString& strg, const char* argument_nam
|
|||
void dviRenderer::prescan_embedPS(char *cp, quint8 *beginningOfSpecialCommand)
|
||||
{
|
||||
#ifdef DEBUG_PRESCAN
|
||||
kDebug(kvs::dvi) << "dviRenderer::prescan_embedPS( cp = " << cp << " ) " << endl;
|
||||
kDebug(kvs::dvi) << "dviRenderer::prescan_embedPS( cp = " << cp << " ) ";
|
||||
#endif
|
||||
|
||||
// Encapsulated Postscript File
|
||||
|
@ -226,7 +226,7 @@ void dviRenderer::prescan_embedPS(char *cp, quint8 *beginningOfSpecialCommand)
|
|||
void dviRenderer::prescan_removePageSizeInfo(char *cp, quint8 *beginningOfSpecialCommand)
|
||||
{
|
||||
#ifdef DEBUG_PRESCAN
|
||||
kDebug(kvs::dvi) << "dviRenderer::prescan_embedPS( cp = " << cp << " ) " << endl;
|
||||
kDebug(kvs::dvi) << "dviRenderer::prescan_embedPS( cp = " << cp << " ) ";
|
||||
#endif
|
||||
|
||||
// Encapsulated Postscript File
|
||||
|
@ -241,7 +241,7 @@ void dviRenderer::prescan_removePageSizeInfo(char *cp, quint8 *beginningOfSpecia
|
|||
void dviRenderer::prescan_ParsePapersizeSpecial(const QString& _cp)
|
||||
{
|
||||
#ifdef DEBUG_PRESCAN
|
||||
kDebug(kvs::dvi) << "Papersize-Special : papersize" << _cp << endl;
|
||||
kDebug(kvs::dvi) << "Papersize-Special : papersize" << _cp;
|
||||
#endif
|
||||
|
||||
QString cp = _cp.simplified();
|
||||
|
@ -280,7 +280,7 @@ void dviRenderer::prescan_ParseHTMLAnchorSpecial(const QString& _cp)
|
|||
void dviRenderer::prescan_ParsePSHeaderSpecial(const QString& cp)
|
||||
{
|
||||
#ifdef DEBUG_PRESCAN
|
||||
kDebug(kvs::dvi) << "PostScript-special, header " << cp.latin1() << endl;
|
||||
kDebug(kvs::dvi) << "PostScript-special, header " << cp.latin1();
|
||||
#endif
|
||||
|
||||
QString _file = cp;
|
||||
|
@ -303,7 +303,7 @@ void dviRenderer::prescan_ParsePSHeaderSpecial(const QString& cp)
|
|||
void dviRenderer::prescan_ParsePSBangSpecial(const QString& cp)
|
||||
{
|
||||
#ifdef DEBUG_PRESCAN
|
||||
kDebug(kvs::dvi) << "PostScript-special, literal header " << cp.latin1() << endl;
|
||||
kDebug(kvs::dvi) << "PostScript-special, literal header " << cp.latin1();
|
||||
#endif
|
||||
|
||||
PS_interface->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 <<endl;
|
||||
kDebug(kvs::dvi) << "epsf-special: psfile=" << cp;
|
||||
#endif
|
||||
|
||||
QString include_command = cp.simplified();
|
||||
|
@ -618,7 +618,7 @@ void dviRenderer::prescan_setChar(unsigned int ch)
|
|||
void dviRenderer::prescan(parseSpecials specialParser)
|
||||
{
|
||||
#ifdef DEBUG_PRESCAN
|
||||
kDebug(kvs::dvi) << "dviRenderer::prescan( ... )" << endl;
|
||||
kDebug(kvs::dvi) << "dviRenderer::prescan( ... )";
|
||||
#endif
|
||||
|
||||
if (resolutionInDPI == 0.0)
|
||||
|
|
|
@ -26,7 +26,7 @@ DVI_SourceFileSplitter::DVI_SourceFileSplitter(const QString &srclink, const QSt
|
|||
bool possibleNumberMixUp = false;
|
||||
|
||||
#ifdef DEBUG_SOURCESPLITTER
|
||||
kDebug(kvs::dvi) << "DVI_SourceSplitter: srclink " << srclink << endl;
|
||||
kDebug(kvs::dvi) << "DVI_SourceSplitter: srclink " << srclink;
|
||||
#endif
|
||||
|
||||
//remove src: if necessary
|
||||
|
@ -46,7 +46,7 @@ DVI_SourceFileSplitter::DVI_SourceFileSplitter(const QString &srclink, const QSt
|
|||
linepart = linepart.trimmed();
|
||||
|
||||
#ifdef DEBUG_SOURCESPLITTER
|
||||
kDebug(kvs::dvi) << "DVI_SourceSplitter: filepart " << filepart << " linepart " << linepart << endl;
|
||||
kDebug(kvs::dvi) << "DVI_SourceSplitter: filepart " << filepart << " linepart " << linepart;
|
||||
#endif
|
||||
|
||||
//test if the file exists
|
||||
|
@ -70,12 +70,12 @@ DVI_SourceFileSplitter::DVI_SourceFileSplitter(const QString &srclink, const QSt
|
|||
{
|
||||
tempInfo.setFile(linepart.right(index) + tempFileName);
|
||||
#ifdef DEBUG_SOURCESPLITTER
|
||||
kDebug(kvs::dvi) << "DVI_SourceSplitter: trying " << tempInfo.fileName() << endl;
|
||||
kDebug(kvs::dvi) << "DVI_SourceSplitter: trying " << tempInfo.fileName();
|
||||
#endif
|
||||
if ( tempInfo.exists() ) { found = true; break;}
|
||||
tempInfo.setFile(linepart.right(index) + tempFileName + ".tex");
|
||||
#ifdef DEBUG_SOURCESPLITTER
|
||||
kDebug(kvs::dvi) << "DVI_SourceSplitter: trying " << tempInfo.fileName() << endl;
|
||||
kDebug(kvs::dvi) << "DVI_SourceSplitter: trying " << tempInfo.fileName();
|
||||
#endif
|
||||
if ( tempInfo.exists() ) { found = true; break;}
|
||||
}
|
||||
|
@ -92,6 +92,6 @@ DVI_SourceFileSplitter::DVI_SourceFileSplitter(const QString &srclink, const QSt
|
|||
if (!ok) m_line = 0;
|
||||
|
||||
#ifdef DEBUG_SOURCESPLITTER
|
||||
kDebug(kvs::dvi) << "DVI_SourceSplitter: result: file " << m_fileInfo.absoluteFilePath() << " line " << m_line << endl;
|
||||
kDebug(kvs::dvi) << "DVI_SourceSplitter: result: file " << m_fileInfo.absoluteFilePath() << " line " << m_line;
|
||||
#endif
|
||||
}
|
||||
|
|
|
@ -23,7 +23,7 @@
|
|||
fontEncoding::fontEncoding(const QString &encName)
|
||||
{
|
||||
#ifdef DEBUG_FONTENC
|
||||
kDebug(kvs::dvi) << "fontEncoding( " << encName << " )" << endl;
|
||||
kDebug(kvs::dvi) << "fontEncoding( " << encName << " )";
|
||||
#endif
|
||||
|
||||
_isValid = false;
|
||||
|
@ -50,7 +50,7 @@ fontEncoding::fontEncoding(const QString &encName)
|
|||
}
|
||||
|
||||
#ifdef DEBUG_FONTENC
|
||||
kDebug(kvs::dvi) << "FileName of the encoding: " << encFileName << endl;
|
||||
kDebug(kvs::dvi) << "FileName of the encoding: " << encFileName;
|
||||
#endif
|
||||
|
||||
QFile file( encFileName );
|
||||
|
@ -68,7 +68,7 @@ fontEncoding::fontEncoding(const QString &encName)
|
|||
// Find the name of the encoding
|
||||
encodingFullName = fileContent.section('[', 0, 0).simplified().mid(1);
|
||||
#ifdef DEBUG_FONTENC
|
||||
kDebug(kvs::dvi) << "encodingFullName: " << encodingFullName << endl;
|
||||
kDebug(kvs::dvi) << "encodingFullName: " << encodingFullName;
|
||||
#endif
|
||||
|
||||
fileContent = fileContent.section('[', 1, 1).section(']',0,0).simplified();
|
||||
|
@ -78,7 +78,7 @@ fontEncoding::fontEncoding(const QString &encName)
|
|||
for ( QStringList::Iterator it = glyphNameList.begin(); (it != glyphNameList.end())&&(i<256); ++it ) {
|
||||
glyphNameVector[i] = (*it).simplified();
|
||||
#ifdef DEBUG_FONTENC
|
||||
kDebug(kvs::dvi) << i << ": " << glyphNameVector[i] << endl;
|
||||
kDebug(kvs::dvi) << i << ": " << glyphNameVector[i];
|
||||
#endif
|
||||
i++;
|
||||
}
|
||||
|
|
|
@ -112,7 +112,7 @@ fontMap::fontMap()
|
|||
kError(kvs::dvi) << QString("fontMap::fontMap(): The file '%1' could not be opened.").arg(map_fileName) << endl;
|
||||
|
||||
#ifdef DEBUG_FONTMAP
|
||||
kDebug(kvs::dvi) << "FontMap file parsed. Results:" << endl;
|
||||
kDebug(kvs::dvi) << "FontMap file parsed. Results:";
|
||||
QMap<QString, fontMapEntry>::Iterator it;
|
||||
for ( it = fontMapEntries.begin(); it != fontMapEntries.end(); ++it )
|
||||
kDebug(kvs::dvi) << "TeXName: " << it.key()
|
||||
|
|
|
@ -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();
|
||||
|
|
|
@ -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<DVI_SourceFileAnchor>& sourceAnchors = m_dviRenderer->sourceAnchors();
|
||||
|
|
|
@ -16,7 +16,7 @@
|
|||
glyph::glyph()
|
||||
{
|
||||
#ifdef DEBUG_GLYPH
|
||||
kDebug(kvs::dvi) << "glyph::glyph()" << endl;
|
||||
kDebug(kvs::dvi) << "glyph::glyph()";
|
||||
#endif
|
||||
|
||||
addr = 0;
|
||||
|
|
|
@ -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."
|
||||
"</p></qt>"));
|
||||
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;
|
||||
}
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
@ -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 <<endl;
|
||||
kDebug(kvs::dvi) << "epsf-special: psfile=" << cp;
|
||||
#endif
|
||||
|
||||
QString include_command = cp.simplified();
|
||||
|
@ -437,7 +437,7 @@ void dviRenderer::epsf_special(const QString& cp)
|
|||
void dviRenderer::TPIC_flushPath_special()
|
||||
{
|
||||
#ifdef DEBUG_SPECIAL
|
||||
kDebug(kvs::dvi) << "TPIC special flushPath" << endl;
|
||||
kDebug(kvs::dvi) << "TPIC special flushPath";
|
||||
#endif
|
||||
|
||||
if (number_of_elements_in_path == 0) {
|
||||
|
@ -455,7 +455,7 @@ void dviRenderer::TPIC_flushPath_special()
|
|||
void dviRenderer::TPIC_addPath_special(const QString& cp)
|
||||
{
|
||||
#ifdef DEBUG_SPECIAL
|
||||
kDebug(kvs::dvi) << "TPIC special addPath: " << cp << endl;
|
||||
kDebug(kvs::dvi) << "TPIC special addPath: " << cp;
|
||||
#endif
|
||||
|
||||
// Adds a point to the path list
|
||||
|
@ -489,7 +489,7 @@ void dviRenderer::TPIC_addPath_special(const QString& cp)
|
|||
void dviRenderer::TPIC_setPen_special(const QString& cp)
|
||||
{
|
||||
#ifdef DEBUG_SPECIAL
|
||||
kDebug(kvs::dvi) << "TPIC special setPen: " << cp << endl;
|
||||
kDebug(kvs::dvi) << "TPIC special setPen: " << cp;
|
||||
#endif
|
||||
|
||||
// Sets the pen size in milli-inches
|
||||
|
|
|
@ -68,7 +68,7 @@ extern void oops(const QString& message);
|
|||
void TeXFontDefinition::read_VF_index()
|
||||
{
|
||||
#ifdef DEBUG_FONTS
|
||||
kDebug(kvs::dvi) << "font::read_VF_index()" << endl;
|
||||
kDebug(kvs::dvi) << "font::read_VF_index()";
|
||||
#endif
|
||||
FILE *VF_file = file;
|
||||
unsigned char cmnd;
|
||||
|
@ -78,7 +78,7 @@ void TeXFontDefinition::read_VF_index()
|
|||
flags |= FONT_VIRTUAL;
|
||||
set_char_p = &dviRenderer::set_vf_char;
|
||||
#ifdef DEBUG_FONTS
|
||||
kDebug(kvs::dvi) << "TeXFontDefinition::read_VF_index: reading VF pixel file " << filename << endl;
|
||||
kDebug(kvs::dvi) << "TeXFontDefinition::read_VF_index: reading VF pixel file " << filename;
|
||||
#endif
|
||||
// Read preamble.
|
||||
fseek(VF_file, (long) one(VF_file), 1); /* skip comment */
|
||||
|
@ -103,7 +103,7 @@ void TeXFontDefinition::read_VF_index()
|
|||
fontname[len] = '\0';
|
||||
|
||||
#ifdef DEBUG_FONTS
|
||||
kDebug(kvs::dvi) << "Virtual font defines subfont \"" << fontname << "\" scale=" << scale << " design=" << design << endl;
|
||||
kDebug(kvs::dvi) << "Virtual font defines subfont \"" << fontname << "\" scale=" << scale << " design=" << design;
|
||||
#endif
|
||||
|
||||
// According to Knuth's documentation found in the web source code
|
||||
|
|
|
@ -232,7 +232,7 @@ void GSGenerator::pageSizeChanged( const Okular::PageSize &size, const Okular::P
|
|||
if ( size == m_pageSizes.at(i) )
|
||||
{
|
||||
internalDoc->setMedia( size.name() );
|
||||
kDebug() << "New Page size:" << size.name() << ":" << internalDoc->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() << " " <<req->width() << "x" << req->height() << "@" << req->pageNumber() << " async == " << req->asynchronous() << endl;
|
||||
kWarning() << "receiving req id=" << req->id() << " " <<req->width() << "x" << req->height() << "@" << req->pageNumber() << " async == " << req->asynchronous() ;
|
||||
int pgNo=req->pageNumber();
|
||||
double width = req->page()->width();
|
||||
double height = req->page()->height();
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
|
|
@ -26,7 +26,7 @@
|
|||
// GSLogWindow::GSLogWindow( QWidget* parent )
|
||||
// : KVBox( parent )
|
||||
// {
|
||||
// kDebug() << "Starting logwindow" <<endl;
|
||||
// kDebug() << "Starting logwindow";
|
||||
//
|
||||
// layout()->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 <<endl;
|
||||
// kDebug() << "last int: " << m_lastInt << endl;
|
||||
// //kDebug() << "Appending: " << text;
|
||||
// kDebug() << "last int: " << m_lastInt;
|
||||
// QStringList l=text.trimmed().split("\n",QString::SkipEmptyParts);
|
||||
// QStringList::Iterator it=l.begin(), end=l.end();
|
||||
// while (it!=end)
|
||||
|
@ -112,15 +112,15 @@
|
|||
// // ghostscript splits messages longer then 128 to chunks, handle this properly
|
||||
// if (m_lastInt == 128)
|
||||
// {
|
||||
// kDebug() << "last was full line" << endl;
|
||||
// kDebug() << "last was full line";
|
||||
// if (t==m_buffer.first)
|
||||
// {
|
||||
// kDebug() << "appending to buffer" << endl;
|
||||
// kDebug() << "appending to buffer";
|
||||
// m_buffer.second +=QString::fromLocal8Bit( buf, num );
|
||||
// }
|
||||
// else
|
||||
// {
|
||||
// kDebug() << "appending from buffer" << endl;
|
||||
// kDebug() << "appending from buffer";
|
||||
// // sets m_lastInt to 0
|
||||
// appendBuffered();
|
||||
// }
|
||||
|
@ -128,10 +128,10 @@
|
|||
//
|
||||
// if (num==128)
|
||||
// {
|
||||
// kDebug() << "this is full line" << endl;
|
||||
// kDebug() << "this is full line";
|
||||
// if (m_lastInt != 128)
|
||||
// {
|
||||
// kDebug() << "appending to buffer" << endl;
|
||||
// kDebug() << "appending to buffer";
|
||||
// m_buffer.first=t;
|
||||
// m_buffer.second=QString::fromLocal8Bit( buf, num );
|
||||
// }
|
||||
|
@ -140,22 +140,22 @@
|
|||
// }
|
||||
// else
|
||||
// {
|
||||
// kDebug() << "this is normal line" << endl;
|
||||
// kDebug() << "this is normal line";
|
||||
// if (m_lastInt == 128)
|
||||
// {
|
||||
// kDebug() << "appending from buffer" << endl;
|
||||
// kDebug() << "appending from buffer";
|
||||
// appendBuffered();
|
||||
// }
|
||||
// else
|
||||
// {
|
||||
// kDebug() << "appending directly" << endl;
|
||||
// kDebug() << "appending directly";
|
||||
// append(t,QString::fromLocal8Bit( buf, num ));
|
||||
// m_clearTimer.stop();
|
||||
// }
|
||||
// }
|
||||
// m_lastInt=num;
|
||||
//
|
||||
// // kDebug()<< "LogWindow before split: " << msgString << " length: " << num << endl;
|
||||
// // kDebug()<< "LogWindow before split: " << msgString << " length: " << num;
|
||||
//
|
||||
// }
|
||||
//
|
||||
|
|
|
@ -106,7 +106,7 @@ GSInternalDocument::GSInternalDocument(const QString &fname, Format form) : m_er
|
|||
}
|
||||
|
||||
if (m_error)
|
||||
kDebug(4656) << m_errorString << endl;
|
||||
kDebug(4656) << m_errorString;
|
||||
}
|
||||
|
||||
GSInternalDocument::~GSInternalDocument()
|
||||
|
@ -248,7 +248,7 @@ QString GSInternalDocument::getPaperSize( const QString& mediaName ) const
|
|||
m++;
|
||||
}
|
||||
// should never happen as we have fallback
|
||||
kDebug(4656) << "UNABLE TO FIND PAPER SIZE FOR MEDIA NAME: " << mediaName << endl;
|
||||
kDebug(4656) << "UNABLE TO FIND PAPER SIZE FOR MEDIA NAME: " << mediaName;
|
||||
return QString("a4");
|
||||
}
|
||||
return QString(r->name);
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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<const KZipFileEntry *>(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<const KZipFileEntry *>(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<const KZipFileEntry *>(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<const KZipFileEntry *>(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<const KZipFileEntry *>(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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue