#include "debug.h"
#include "dispatchresult.h"
#include "exporter.h"
+#include "FuncStatus.h"
#include "funcrequest.h"
#include "gettext.h"
#include "LaTeXFeatures.h"
#include "metricsinfo.h"
#include "outputparams.h"
-#include "frontends/lyx_gui.h"
-#include "frontends/LyXView.h"
-
#include "graphics/PreviewLoader.h"
#include "support/filetools.h"
namespace external = lyx::external;
namespace graphics = lyx::graphics;
+using lyx::docstring;
using std::endl;
using std::string;
using std::auto_ptr;
if (gparams.display == graphics::DefaultDisplay)
gparams.display = lyxrc.display_graphics;
// Override the above if we're not using a gui
- if (!lyx_gui::use_gui)
+ if (!lyx::use_gui)
gparams.display = graphics::NoDisplay;
return gparams;
}
-string const getScreenLabel(InsetExternalParams const & params,
+docstring const getScreenLabel(InsetExternalParams const & params,
Buffer const & buffer)
{
external::Template const * const ptr =
external::getTemplatePtr(params);
if (!ptr)
// FIXME UNICODE
- return support::bformat(lyx::to_utf8(_("External template %1$s is not installed")),
- params.templatename());
- return external::doSubstitution(params, buffer, ptr->guiName, false);
+ return support::bformat((_("External template %1$s is not installed")),
+ lyx::from_utf8(params.templatename()));
+ // FIXME UNICODE
+ return lyx::from_utf8(external::doSubstitution(params, buffer,
+ ptr->guiName, false));
}
void add_preview_and_start_loading(RenderMonitoredPreview &,
}
-int InsetExternal::plaintext(Buffer const & buf, ostream & os,
+int InsetExternal::plaintext(Buffer const & buf, lyx::odocstream & os,
OutputParams const & runparams) const
{
- return external::writeExternal(params_, "Ascii", buf, os,
+ std::ostringstream oss;
+ int const retval = external::writeExternal(params_, "Ascii", buf, oss,
*(runparams.exportdata), false,
runparams.inComment);
+ // FIXME UNICODE
+ os << lyx::from_utf8(oss.str());
+ return retval;
}