X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=src%2Finsets%2FExternalSupport.h;h=5c5619c13b84520f582c70ba455c4d3ced9cabe3;hb=87a7f728ca9b8b4d358cf06de980f61b67a927ac;hp=1e5bbc5583852f9b23ec176bc32f8f098b2bdf92;hpb=fa29d7ee984e9240554f093862fe53239f776582;p=lyx.git diff --git a/src/insets/ExternalSupport.h b/src/insets/ExternalSupport.h index 1e5bbc5583..5c5619c13b 100644 --- a/src/insets/ExternalSupport.h +++ b/src/insets/ExternalSupport.h @@ -13,16 +13,25 @@ #ifndef EXTERNALSUPPORT_H #define EXTERNALSUPPORT_H -#include #include + +namespace lyx { + class Buffer; class ExportData; class InsetExternalParams; +class otexstream; -namespace lyx { namespace external { +enum RetVal { + SUCCESS, + NOT_NEEDED, + FAILURE, + KILLED +}; + class Template; /// A shorthand, helper function @@ -34,6 +43,13 @@ void editExternal(InsetExternalParams const & params, Buffer const & buffer); +enum Substitute { + ALL, + PATHS, + ALL_BUT_PATHS, + FORMATS +}; + /** Substitute meta-variables in string \p s, making use of \p params and \p buffer. If \p external_in_tmpdir is true, all files are assumed to be in the @@ -43,21 +59,24 @@ void editExternal(InsetExternalParams const & params, */ std::string const doSubstitution(InsetExternalParams const & params, Buffer const & buffer, - std::string const & s, - bool external_in_tmpdir = false); + std::string const & s, + bool use_latex_path, + bool external_in_tmpdir = false, + Substitute what = ALL); /** Write the output for a specific file format and generate any external data files. - If \param external_in_tmpdir == true, then the generated file is + If \p external_in_tmpdir == true, then the generated file is place in the buffer's temporary directory. */ -int writeExternal(InsetExternalParams const &, - std::string const & format, - Buffer const &, - std::ostream &, - ExportData &, - bool external_in_tmpdir = false); +RetVal writeExternal(InsetExternalParams const &, + std::string const & format, + Buffer const &, + otexstream &, + ExportData &, + bool external_in_tmpdir, + bool dryrun); } // namespace external } // namespace lyx