[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    branches/KDE/3.5/kdegraphics/kdvi
From:       Stefan Kebekus <stefan.kebekus () uni-bayreuth ! de>
Date:       2005-12-05 18:55:55
Message-ID: 1133808955.447569.20445.nullmailer () svn ! kde ! org
[Download RAW message or body]

SVN commit 485802 by kebekus:

fixes problems with PSLATEX and references to non-existent PS files


 M  +1 -1      fontpool.cpp  
 M  +2 -2      psgs.cpp  
 M  +10 -7     special.cpp  


--- branches/KDE/3.5/kdegraphics/kdvi/fontpool.cpp #485801:485802
@@ -422,7 +422,7 @@
 	matchingFiles = fileNameList.grep(fn);
 #endif
       if (matchingFiles.isEmpty() == true)
-	matchingFiles += fileNameList.grep(fontp->fontname);
+	matchingFiles += fileNameList.grep(fontp->fontname+".");
       
       if (matchingFiles.isEmpty() != true) {
 #ifdef DEBUG_FONTPOOL
--- branches/KDE/3.5/kdegraphics/kdvi/psgs.cpp #485801:485802
@@ -329,11 +329,11 @@
   
   // Otherwise, use kpsewhich to find the eps file.
   QString EPSfilename;
-
   KProcIO proc;
-  proc << "kpsewhich" << EPSfilename;
+  proc << "kpsewhich" << filename;
   proc.start(KProcess::Block);
   proc.readln(EPSfilename);
+
   return EPSfilename.stripWhiteSpace();
 }
 
--- branches/KDE/3.5/kdegraphics/kdvi/special.cpp #485801:485802
@@ -326,17 +326,17 @@
   // course, this does not work if the filename contains spaces
   // (already the simplifyWhiteSpace() above is wrong). If you have
   // files like this, go away.
-  QString EPSfilename = include_command;
-  EPSfilename.truncate(EPSfilename.find(' '));
+  QString EPSfilename_orig = include_command;
+  EPSfilename_orig.truncate(EPSfilename_orig.find(' '));
 
   // Strip enclosing quotation marks which are included by some LaTeX
   // macro packages (but not by others). This probably means that
   // graphic files are no longer found if the filename really does
   // contain quotes, but we don't really care that much.
-  if ((EPSfilename.at(0) == '\"') && (EPSfilename.at(EPSfilename.length()-1) == '\"')) {
-    EPSfilename = EPSfilename.mid(1,EPSfilename.length()-2);
+  if ((EPSfilename_orig.at(0) == '\"') && (EPSfilename_orig.at(EPSfilename_orig.length()-1) == '\"')) {
+    EPSfilename_orig = EPSfilename_orig.mid(1,EPSfilename_orig.length()-2);
   }
-  EPSfilename = ghostscript_interface::locateEPSfile(EPSfilename, baseURL);
+  QString EPSfilename = ghostscript_interface::locateEPSfile(EPSfilename_orig, baseURL);
   
   // Now parse the arguments. 
   int  llx     = 0; 
@@ -425,11 +425,14 @@
       foreGroundPainter->setBrush(Qt::red);
     foreGroundPainter->setPen(Qt::black);
     foreGroundPainter->drawRoundRect(bbox, 2, 2);
+    QFont f = foreGroundPainter->font();
+    f.setPointSize(8);
+    foreGroundPainter->setFont(f);
     if (QFile::exists(EPSfilename))
-      foreGroundPainter->drawText (bbox, (int)(Qt::AlignCenter), EPSfilename, -1);
+      foreGroundPainter->drawText (bbox, (int)(Qt::AlignCenter), EPSfilename_orig, -1);
     else
       foreGroundPainter->drawText (bbox, (int)(Qt::AlignCenter), 
-				i18n("File not found: \n %1").arg(EPSfilename), -1);
+				i18n("File not found: \n %1").arg(EPSfilename_orig), -1);
     foreGroundPainter->restore();
   }
   
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic