SVN commit 602383 by kebekus: fixes minor problems with hyperlinks in DVI and re-loading in PDF files M +7 -2 dvi/dviRenderer.cpp M +1 -1 pdf/pdfRenderer.cpp M +1 -1 pdf/pdfRenderer.h --- trunk/KDE/kdegraphics/kviewshell/plugins/dvi/dviRenderer.cpp #602382:602383 @@ -202,8 +202,13 @@ bool merged = false; - // Merge all hyperlinks that point to the same target, and have the same baseline. - while (hi.linkText == hj.linkText && hi.baseline == hj.baseline) + // Merge all hyperlinks that point to the same target, have the + // same baseline, and are no more than 3mm (but at least 2 pixels) + // apart + int minDistance = QMAX(2, (int)(0.3/2.54*id.resolution+0.5)); // Compute what 3mm is in pixels + while ((hi.linkText == hj.linkText) && + (hi.baseline == hj.baseline) && + ( hi.box.unite(hj.box).width() <= hi.box.width()+hj.box.width()+minDistance )) { merged = true; hi.box = hi.box.unite(hj.box); --- trunk/KDE/kdegraphics/kviewshell/plugins/pdf/pdfRenderer.cpp #602382:602383 @@ -500,7 +500,7 @@ } -bool PdfRenderer::isValidFile(const QString fileName) +bool PdfRenderer::isValidFile(const QString& fileName) const { Poppler::Document* doc = Poppler::Document::load(fileName.toAscii()); if (doc) --- trunk/KDE/kdegraphics/kviewshell/plugins/pdf/pdfRenderer.h #602382:602383 @@ -118,7 +118,7 @@ virtual void clear(); /** Check if the give file is a valid PDF Document. */ - virtual bool isValidFile(const QString fileName); + virtual bool isValidFile(const QString& fileName) const; /** Rendering a page