]> git.lyx.org Git - lyx.git/blobdiff - src/insets/ExternalSupport.h
* src/LyXAction.C: mark goto-clear-bookmark as working without buffer
[lyx.git] / src / insets / ExternalSupport.h
index 3d9e98801ebb33d341d7e0581faac1c6ecc5b247..b28e42304e275e0f3d742c589a50072d0037aced 100644 (file)
 #ifndef EXTERNALSUPPORT_H
 #define EXTERNALSUPPORT_H
 
-#include <iosfwd>
-#include <string>
+#include "support/docstream.h"
+
+namespace lyx {
 
 class Buffer;
+class ExportData;
 class InsetExternalParams;
 
-namespace lyx {
 namespace external {
 
 class Template;
@@ -33,22 +34,39 @@ void editExternal(InsetExternalParams const & params,
                  Buffer const & buffer);
 
 
-/// Substitute meta-variables in string s, making use of params and buffer.
+enum Substitute {
+       ALL,
+       PATHS,
+       ALL_BUT_PATHS
+};
+
+/** 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
+    master buffers temp path, and the mangled filename is used.
+    Otherwise, the output filename (absolute or relative to the parent
+    document, as written in the .lyx file) is used.
+*/
 std::string const doSubstitution(InsetExternalParams const & params,
                                 Buffer const & buffer,
-                                std::string const & s);
+                                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 &,
-                 bool external_in_tmpdir = false);
+                 odocstream &,
+                 ExportData &,
+                 bool external_in_tmpdir,
+                 bool external_in_comment);
 
 } // namespace external
 } // namespace lyx