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.
28 bool Export(Buffer * buffer, std::string const & format,
29 bool put_in_tempdir, std::string & result_file);
32 bool Export(Buffer * buffer, std::string const & format,
36 bool Preview(Buffer * buffer, std::string const & format);
39 bool IsExportable(Buffer const & buffer, std::string const & format);
42 std::vector<Format const *> const
43 GetExportableFormats(Buffer const & buffer, bool only_viewable);
49 ExportedFile(std::string const &, std::string const &);
50 /// absolute name of the source file
51 std::string sourceName;
52 /// final name that the exported file should get (absolute name or
53 /// relative to the directory of the master document)
54 std::string exportName;
58 bool operator==(ExportedFile const &, ExportedFile const &);
63 /** add a referenced file for one format.
64 * No inset should ever write any file outside the tempdir.
65 * Instead, files that need to be exported have to be registered
67 * Then the exporter mechanism copies them to the right place, asks
68 * for confirmation before overwriting existing files etc.
69 * \param format format that references the given file
70 * \param sourceName source file name. Needs to be absolute
71 * \param exportName resulting file name. Can be either absolute
72 * or relative to the exported document.
74 void addExternalFile(std::string const & format,
75 std::string const & sourceName,
76 std::string const & exportName);
77 /** add a referenced file for one format.
78 * The final name is the source file name without path.
79 * \param format format that references the given file
80 * \param sourceName source file name. Needs to be absolute
82 void addExternalFile(std::string const & format,
83 std::string const & sourceName);
84 /// get referenced files for \p format
85 std::vector<ExportedFile> const
86 externalFiles(std::string const & format) const;
88 typedef std::map<std::string, std::vector<ExportedFile> > FileMap;
89 /** Files that are referenced by the export result in the
92 FileMap externalfiles;