]> git.lyx.org Git - lyx.git/blobdiff - src/insets/insetgraphics.C
prevent crash when inserting minipage in table cell,
[lyx.git] / src / insets / insetgraphics.C
index 3a847d9d83483e835808398ea4568b21abc5061a..c2b4a355f7e43ec987f3d1cdb60b42c8b5e72877 100644 (file)
@@ -82,7 +82,6 @@ TODO
 
 #include <algorithm> // For the std::max
 
-extern string system_tempdir;
 // set by Exporters
 
 using namespace lyx::support;
@@ -551,9 +550,14 @@ int InsetGraphics::ascii(Buffer const *, ostream & os, int) const
 }
 
 
-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;
 }