]> git.lyx.org Git - lyx.git/commitdiff
Activate export of external material for XHTML.
authorRichard Heck <rgheck@lyx.org>
Sun, 31 Jul 2016 02:42:01 +0000 (22:42 -0400)
committerRichard Heck <rgheck@lyx.org>
Sun, 31 Jul 2016 05:35:53 +0000 (01:35 -0400)
As of this commit, this is ineffective, since no changes have been
made to external_templates.

(cherry picked from commit daf7cd4c05f55c7eb957df7076ec91dcd2eca543)

src/insets/InsetExternal.cpp

index 8e89ead8be114f843813df3ea0ae2b68c8708998..d524cfca993880030eac9233630a9a02fb9f173b 100644 (file)
@@ -30,6 +30,7 @@
 #include "MetricsInfo.h"
 #include "OutputParams.h"
 #include "output_latex.h"
+#include "output_xhtml.h"
 #include "TocBackend.h"
 
 #include "frontends/alert.h"
@@ -753,12 +754,17 @@ int InsetExternal::docbook(odocstream & os,
 }
 
 
-docstring InsetExternal::xhtml(XHTMLStream  & /*xs*/,
-                       OutputParams const & /*rp*/) const
+docstring InsetExternal::xhtml(XHTMLStream & xs,
+                       OutputParams const & runparams) const
 {
-//     external::writeExternal(params_, "XHTML", buffer(), os,
-//                                    *(runparams.exportdata), false,
-//                                    runparams.dryrun || runparams.inComment);
+       bool const external_in_tmpdir = !runparams.nice;
+       bool const dryrun = runparams.dryrun || runparams.inComment;
+    TexRow texrow;
+    odocstringstream ods;
+    otexstream ots(ods, texrow);
+    external::writeExternal(params_, "XHTML", buffer(), ots,
+                                      *(runparams.exportdata), external_in_tmpdir, dryrun);
+       xs << XHTMLStream::ESCAPE_NONE << ods.str();
        return docstring();
 }