2002-07-22 Lars Gullik Bj�nnes <larsbj@birdstep.com>

* GraphicsConverter.C (build_script): take a ostream as a more
general argument than ostringstream.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@4750 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Lars Gullik Bjønnes 2002-07-22 20:50:45 +00:00
parent 1e5bcef101
commit 3c22b7dc3b
2 changed files with 23 additions and 15 deletions

View File

@ -1,7 +1,12 @@
2002-07-22 Lars Gullik Bjønnes <larsbj@birdstep.com>
* GraphicsConverter.C (build_script): take a ostream as a more
general argument than ostringstream.
2002-07-22 Herbert Voss <voss@lyx.org>
* GraphicsConverter.C: get the "default converter" run again
2002-07-21 Jean-Marc Lasgouttes <lasgouttes@freesurf.fr>
* PreviewLoader.C: use BufferParams::getLyXTextClass
@ -27,7 +32,7 @@
2002-07-18 Jean-Marc Lasgouttes <lasgouttes@freesurf.fr>
* GraphicsCacheItem.C (reset): use erase() instead of clear() for
strings
strings
2002-07-18 Angus Leeming <leeming@lyx.org>
@ -66,7 +71,7 @@
* GraphicsConverter.[Ch]: (startConversion): const-ify.
(finishedConversion): move the signal into the Impl class.
(connect): new method, enabling a listener to connect to this signal.
* GraphicsLoader.[Ch] (reset, startLoading): const-ify.
(statusChanged): move the signal into the Impl class.
(connect): new method, enabling a listener to connect to this signal.
@ -107,11 +112,11 @@
* Previews.[Ch]: use const in more places.
(generateBufferPreviews): now takes a Buffer const & argument, not a
pointer.
2002-07-15 John Levon <moz@compsoc.man.ac.uk>
* GraphicsImage.h: remove getPixmap/X, add isDrawable()
2002-07-12 Angus Leeming <leeming@lyx.org>
* GraphicsLoader.[Ch]: smart loading of images. Images are loaded only
@ -130,7 +135,7 @@
2002-07-12 John Levon <moz@compsoc.man.ac.uk>
* GraphicsCache.C: remove init_graphics()
2002-07-09 Angus Leeming <leeming@lyx.org>
* PreviewLoader.C (setAscentFractions): fix bug due to use of integer

View File

@ -25,10 +25,12 @@
#include <boost/signals/trackable.hpp>
#include "Lsstream.h"
#include "support/LOstream.h"
#include <fstream>
#include <sys/types.h> // needed for pid_t
using std::endl;
using std::ostream;
namespace grfx {
@ -114,7 +116,7 @@ namespace {
*/
bool build_script(string const & from_file, string const & to_file_base,
string const & from_format, string const & to_format,
ostringstream & script);
ostream & script);
} // namespace anon
@ -140,21 +142,21 @@ Converter::Impl::Impl(string const & from_file, string const & to_file_base,
// The converted image is to be stored in this file
to_file_ = ChangeExtension(to_file_base, formats.extension(to_format));
if (!success) {
if (!success) {
script_file_ = string();
if (from_format == "lyxpreview") {
script_command_ =
LibFileSearch("scripts", "lyxpreview2xpm.sh")
script_command_ =
LibFileSearch("scripts", "lyxpreview2xpm.sh")
+ " " +from_file + " " + to_file_;
lyxerr[Debug::GRAPHICS]
lyxerr[Debug::GRAPHICS]
<< "\tI use lyxpreview2xpm for the conversion\n\t"
<< script_command_ << endl;
} else {
script_command_ =
} else {
script_command_ =
LibFileSearch("scripts", "convertDefault.sh") +
' ' + from_format + ':' + from_file + ' ' +
to_format + ':' + to_file_;
lyxerr[Debug::GRAPHICS]
lyxerr[Debug::GRAPHICS]
<< "\tNo converter defined! I use convertDefault.sh\n\t"
<< script_command_ << endl;
}
@ -256,11 +258,12 @@ string const move_file(string const & from_file, string const & to_file)
return command.str().c_str();
}
bool build_script(string const & from_file,
string const & to_file_base,
string const & from_format,
string const & to_format,
ostringstream & script)
ostream & script)
{
lyxerr[Debug::GRAPHICS] << "build_script ... ";
typedef Converters::EdgePath EdgePath;