]> git.lyx.org Git - lyx.git/blobdiff - src/insets/ExternalSupport.C
hopefully fix tex2lyx linking.
[lyx.git] / src / insets / ExternalSupport.C
index 5795a2d5f66f9f480bd459b4806e38bf1f8d18ea..087ac5d9f3a54630fb2091fd9c4bf724a91261e4 100644 (file)
 #include "support/package.h"
 #include "support/path.h"
 
-namespace support = lyx::support;
-
 using std::endl;
-
 using std::string;
 using std::vector;
 
@@ -308,14 +305,13 @@ void updateExternal(InsetExternalParams const & params,
        // Yes if to_file does not exist or if from_file is newer than to_file
        if (support::compare_timestamps(temp_file, abs_to_file) < 0)
                return; // SUCCESS
-       string const to_file_base =
-               support::changeExtension(to_file, string());
 
        // FIXME (Abdel 12/08/06): Is there a need to show these errors?
        ErrorList el;
        /* bool const success = */
-               converters.convert(&buffer, temp_file, to_file_base,
-                                  from_format, to_format, el, true);
+               converters.convert(&buffer, temp_file, abs_to_file,
+                                  abs_from_file, from_format, to_format, el,
+                                  Converters::try_default | Converters::try_cache);
        // return success
 }
 
@@ -331,7 +327,7 @@ string const substituteOptions(InsetExternalParams const & params,
 
 int writeExternal(InsetExternalParams const & params,
                  string const & format,
-                 Buffer const & buffer, lyx::odocstream & os,
+                 Buffer const & buffer, odocstream & os,
                  ExportData & exportdata,
                  bool external_in_tmpdir,
                  bool external_in_comment)
@@ -360,7 +356,7 @@ int writeExternal(InsetExternalParams const & params,
        str = substituteCommands(params, str, format);
        str = substituteOptions(params, str, format);
        // FIXME UNICODE
-       os << lyx::from_utf8(str);
+       os << from_utf8(str);
        return int(lyx::count(str.begin(), str.end(),'\n'));
 }
 
@@ -511,9 +507,10 @@ string const substituteOptions(InsetExternalParams const & params,
        }
 
        return output;
- }
+}
 
 } // namespace anon
 
 } // namespace external
+
 } // namespace lyx