Disable direct loading of PostScript files by the xforms image loader.

Apply Herbert's patch removing special casing to deal with rogue PostScript
files.
Fix a few more comments.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@4693 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Angus Leeming 2002-07-17 17:55:21 +00:00
parent b1fbce7d59
commit ddb684f332
9 changed files with 30 additions and 17 deletions

View File

@ -1,3 +1,7 @@
2002-07-17 Angus Leeming <leeming@lyx.org>
* xformsImage.C (init_graphics): disable direct loading of PostScript
files. It's more effort than it's worth.
2002-07-17 André Pönitz <poenitz@gmx.net>

View File

@ -423,7 +423,10 @@ void init_graphics()
#ifdef HAVE_FLIMAGE_ENABLE_PS
// xforms recognises PS but not EPS
flimage_enable_ps();
// It dies horribly with lots of older PostScript files.
// Easiest, therefore, to disable PS support and insist that a PS-type
// file is converted to a bitmap format.
// flimage_enable_ps();
#endif
flimage_enable_sgi();

View File

@ -1,3 +1,9 @@
2002-06-17 Herbert Voss <voss@lyx.org>
* GraphicsCachItem.C (findTargetFormat): remove the speciell case
for old ps-files (Garst). It's now handled by defining a converter and
disabling the ps-support of xforms.
2002-07-17 Angus Leeming <leeming@lyx.org>
Be true to the Pimpl idiom, moving all signals into the respective

View File

@ -293,16 +293,8 @@ void CacheItem::Impl::convertToDisplayFormat()
}
string from = getExtFromContents(filename);
// Some old ps-files make problems, so we do not need direct
// loading of an ps-file
if (from == "ps") {
lyxerr[Debug::GRAPHICS]
<< "\n\tThe file contains PostScript format data.\n"
<< "\tchanging it to eps-format to get it converted to xpm\n";
from = "eps";
} else
lyxerr[Debug::GRAPHICS]
<< "\n\tThe file contains " << from << " format data." << endl;
lyxerr[Debug::GRAPHICS]
<< "\n\tThe file contains " << from << " format data." << endl;
string const to = findTargetFormat(from);
if (from == to) {

View File

@ -11,9 +11,10 @@
* * The user supplies an image file and the display parameters.
* * He can change the file or the display parameters through a reset() method.
* * He must start the loading process explicitly with startLoading().
* * He receives a statusChanged signal when the loading status changes.
* * When (status() == Ready), he uses image() to access the loaded image
* and passes it to the Painter.
* * If he is connected through the connect() method, then he'll be informed
* when the loading status changes.
* * When (status() == Ready), he can use image() to access the loaded image
* and pass it to the Painter.
*
* What could be simpler?
*/

View File

@ -6,7 +6,7 @@
*
* \author Angus Leeming <leeming@lyx.org>
*
* Used internally by the GraphicsCache.
* Used internally by the grfx::Image.
*/
#ifndef GRAPHICSPARAMS_H

View File

@ -11,6 +11,8 @@ GRAPHICSIMAGEXPM = GraphicsImageXPM.C GraphicsImageXPM.h
endif
libgraphics_la_SOURCES = \
FileMonitor.h \
FileMonitor.C \
GraphicsCache.h \
GraphicsCache.C \
GraphicsCacheItem.h \

View File

@ -9,8 +9,8 @@
* grfx::PreviewLoader collects latex snippets together. Then, on a
* startLoading() call, these are dumped to file and processed, converting
* each snippet to a separate bitmap image file. Once a bitmap file is ready
* to be loaded back into LyX, the PreviewLoader emits a readyToDisplay signal
* to inform the initiating process.
* to be loaded back into LyX, the PreviewLoader emits a signal to inform
* the initiating process.
*/
#ifndef PREVIEWLOADER_H

View File

@ -1,3 +1,8 @@
2002-07-17 Angus Leeming <leeming@lyx.org>
* insetgraphics.C (Cache c-tor): bind to the GraphicsLoader through
a method rather than to the signal directly.
2002-07-17 John Levon <moz@compsoc.man.ac.uk>
* insettext.C: use view_state_changed, switchKeyMap