4 * This file is part of LyX, the document processor.
5 * Licence details can be found in the file COPYING.
7 * \author Lars Gullik Bjønnes
8 * \author Jean-Marc Lasgouttes
10 * Full author contact details are available in file CREDITS.
31 bool Export(Buffer * buffer, std::string const & format,
32 bool put_in_tempdir, std::string & result_file);
35 bool Export(Buffer * buffer, std::string const & format,
39 bool preview(Buffer * buffer, std::string const & format);
42 bool isExportable(Buffer const & buffer, std::string const & format);
45 std::vector<Format const *> const
46 getExportableFormats(Buffer const & buffer, bool only_viewable);
53 ExportedFile(std::string const &, std::string const &);
54 /// absolute name of the source file
55 std::string sourceName;
56 /// final name that the exported file should get (absolute name or
57 /// relative to the directory of the master document)
58 std::string exportName;
62 bool operator==(ExportedFile const &, ExportedFile const &);
67 /** add a referenced file for one format.
68 * No inset should ever write any file outside the tempdir.
69 * Instead, files that need to be exported have to be registered
71 * Then the exporter mechanism copies them to the right place, asks
72 * for confirmation before overwriting existing files etc.
73 * \param format format that references the given file
74 * \param sourceName source file name. Needs to be absolute
75 * \param exportName resulting file name. Can be either absolute
76 * or relative to the exported document.
78 void addExternalFile(std::string const & format,
79 std::string const & sourceName,
80 std::string const & exportName);
81 /** add a referenced file for one format.
82 * The final name is the source file name without path.
83 * \param format format that references the given file
84 * \param sourceName source file name. Needs to be absolute
86 void addExternalFile(std::string const & format,
87 std::string const & sourceName);
88 /// get referenced files for \p format
89 std::vector<ExportedFile> const
90 externalFiles(std::string const & format) const;
92 typedef std::map<std::string, std::vector<ExportedFile> > FileMap;
93 /** Files that are referenced by the export result in the
96 FileMap externalfiles;