#include <algorithm> // For the std::max
-extern string system_tempdir;
// set by Exporters
using namespace lyx::support;
using std::ostream;
using std::endl;
+using std::auto_ptr;
namespace {
InsetGraphics::InsetGraphics(InsetGraphics const & ig)
- : Inset(ig),
+ : InsetOld(ig),
boost::signals::trackable(),
graphic_label(uniqueID()),
graphic_(new GraphicRenderer(*ig.graphic_))
}
-InsetBase * InsetGraphics::clone() const
+auto_ptr<InsetBase> InsetGraphics::clone() const
{
- return new InsetGraphics(*this);
+ return auto_ptr<InsetBase>(new InsetGraphics(*this));
}
return DISPATCHED;
default:
- return Inset::localDispatch(cmd);
+ return InsetOld::localDispatch(cmd);
}
}
}
-Inset::EDITABLE InsetGraphics::editable() const
+InsetOld::EDITABLE InsetGraphics::editable() const
{
return IS_EDITABLE;
}
<< "insetgraphics::latex: Filename = "
<< params().filename.absFilename() << endl;
- string const relative_file =
+ string const relative_file =
params().filename.relFilename(buf->filePath());
// A missing (e)ps-extension is no problem for LaTeX, so
}
-int InsetGraphics::linuxdoc(Buffer const *, ostream &) const
+int InsetGraphics::linuxdoc(Buffer const * buf, ostream & os) const
{
- // No graphics in LinuxDoc output. Should check how/what to add.
+ string const file_name = buf->niceFile ?
+ params().filename.relFilename(buf->filePath()):
+ params().filename.absFilename();
+
+ os << "<eps file=\"" << file_name << "\">\n";
+ os << "<img src=\"" << file_name << "\">";
return 0;
}
void InsetGraphicsMailer::string2params(string const & in,
Buffer const & buffer,
- InsetGraphicsParams & params)
+ InsetGraphicsParams & params)
{
params = InsetGraphicsParams();