]> git.lyx.org Git - lyx.git/blobdiff - src/insets/InsetExternal.cpp
Pure HTML output for math macros.
[lyx.git] / src / insets / InsetExternal.cpp
index 924afe9e93c2442caaeac241450fd5255fabf410..058b4be3218c6071e1b16b53ba3aa16ab6af75b1 100644 (file)
@@ -29,6 +29,7 @@
 #include "LyXRC.h"
 #include "MetricsInfo.h"
 #include "OutputParams.h"
+#include "output_latex.h"
 
 #include "frontends/alert.h"
 #include "frontends/Application.h"
@@ -364,10 +365,9 @@ bool InsetExternalParams::read(Buffer const & buffer, Lexer & lex)
 }
 
 
-InsetExternal::InsetExternal(Buffer & buf)
-       : renderer_(new RenderButton)
+InsetExternal::InsetExternal(Buffer * buf)
+       : Inset(buf), renderer_(new RenderButton)
 {
-       Inset::setBuffer(buf);
 }
 
 
@@ -683,7 +683,7 @@ int InsetExternal::docbook(odocstream & os,
 }
 
 
-docstring InsetExternal::xhtml(odocstream & /*os*/,
+docstring InsetExternal::xhtml(XHTMLStream  & /*xs*/,
                        OutputParams const & /*rp*/) const
 {
 //     external::writeExternal(params_, "XHTML", buffer(), os,
@@ -719,6 +719,9 @@ void InsetExternal::validate(LaTeXFeatures & features) const
        case OutputParams::HTML:
                format = "html";
                break;
+       case OutputParams::TEXT:
+               format = "text";
+               break;
        }
        external::Template::Formats::const_iterator cit =
                et.formats.find(format);
@@ -754,7 +757,8 @@ void InsetExternal::validate(LaTeXFeatures & features) const
 }
 
 
-void InsetExternal::addPreview(graphics::PreviewLoader & ploader) const
+void InsetExternal::addPreview(DocIterator const & /*inset_pos*/,
+       graphics::PreviewLoader & ploader) const        
 {
        RenderMonitoredPreview * const ptr = renderer_->asMonitoredPreview();
        if (!ptr)