#include "LyXRC.h"
#include "MetricsInfo.h"
#include "OutputParams.h"
+#include "output_latex.h"
#include "frontends/alert.h"
#include "frontends/Application.h"
if (defaultTemplateName.empty()) {
external::TemplateManager const & etm =
external::TemplateManager::get();
- templatename_ = etm.getTemplates().begin()->first;
+ if (!etm.getTemplates().empty())
+ templatename_ = etm.getTemplates().begin()->first;
} else
templatename_ = defaultTemplateName;
}
}
-InsetExternal::InsetExternal(Buffer & buf)
- : renderer_(new RenderButton)
+InsetExternal::InsetExternal(Buffer * buf)
+ : Inset(buf), renderer_(new RenderButton)
{
- Inset::setBuffer(buf);
}
}
-docstring InsetExternal::xhtml(odocstream & /*os*/,
+docstring InsetExternal::xhtml(XHTMLStream & /*xs*/,
OutputParams const & /*rp*/) const
{
// external::writeExternal(params_, "XHTML", buffer(), os,
case OutputParams::XML:
format = "DocBook";
break;
+ case OutputParams::HTML:
+ format = "html";
+ break;
+ case OutputParams::TEXT:
+ format = "text";
+ break;
}
external::Template::Formats::const_iterator cit =
et.formats.find(format);
}
-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)