X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=src%2Fconverter.h;h=9cec2c122b132ddf1734532f4267eea9952ed688;hb=35204f8f33d7400a5fefeffea533fb4cb4097211;hp=d2bf17328748281e16b5aa8b3b949de9c9f944e1;hpb=3b9338a3a8ba33fbbdf2c77cbffb3ff50d8fad86;p=lyx.git diff --git a/src/converter.h b/src/converter.h index d2bf173287..9cec2c122b 100644 --- a/src/converter.h +++ b/src/converter.h @@ -19,7 +19,11 @@ #include +namespace lyx { + + class Buffer; +class ErrorList; class Format; class Formats; class OutputParams; @@ -103,16 +107,21 @@ public: Graph::EdgePath const getPath(std::string const & from, std::string const & to); /// OutputParams::FLAVOR getFlavor(Graph::EdgePath const & path); + /// Flags for converting files + enum ConversionFlags { + /// No special flags + none = 0, + /// Use the default converter if no converter is defined + try_default = 1 << 0, + /// Get the converted file from cache if possible + try_cache = 1 << 1 + }; /// bool convert(Buffer const * buffer, - std::string const & from_file, std::string const & to_file_base, - std::string const & from_format, std::string const & to_format, - std::string & to_file, bool try_default = false); - /// - bool convert(Buffer const * buffer, - std::string const & from_file, std::string const & to_file_base, - std::string const & from_format, std::string const & to_format, - bool try_default = false); + std::string const & from_file, std::string const & to_file, + std::string const & orig_from, + std::string const & from_format, std::string const & to_format, + ErrorList & errorList, int conversionflags = none); /// void update(Formats const & formats); /// @@ -134,10 +143,10 @@ private: intToFormat(std::vector const & input); /// bool scanLog(Buffer const & buffer, std::string const & command, - std::string const & filename); + std::string const & filename, ErrorList & errorList); /// bool runLaTeX(Buffer const & buffer, std::string const & command, - OutputParams const &); + OutputParams const &, ErrorList & errorList); /// ConverterList converterlist_; /// @@ -155,4 +164,7 @@ extern Converters converters; extern Converters system_converters; + +} // namespace lyx + #endif //CONVERTER_H