]> git.lyx.org Git - lyx.git/blobdiff - src/insets/ExternalSupport.C
* In the process of fixing the math background color bug, this commit transfer backgr...
[lyx.git] / src / insets / ExternalSupport.C
index 1f7b1fe7f2e1fcb9f04c8be49fde48c1ab553e82..1f7669b7045a1fed3984387c3598f52962a519d3 100644 (file)
@@ -106,12 +106,16 @@ string const doSubstitution(InsetExternalParams const & params,
                string const masterpath = external_in_tmpdir ?
                        m_buffer->temppath() :
                        m_buffer->filePath();
+               // FIXME UNICODE
                string relToMasterPath = support::onlyPath(
-                               support::makeRelPath(absname, masterpath));
+                               to_utf8(support::makeRelPath(from_utf8(absname),
+                                                            from_utf8(masterpath))));
                if (relToMasterPath == "./")
                        relToMasterPath.clear();
+               // FIXME UNICODE
                string relToParentPath = support::onlyPath(
-                               support::makeRelPath(absname, parentpath));
+                               to_utf8(support::makeRelPath(from_utf8(absname),
+                                                            from_utf8(parentpath))));
                if (relToParentPath == "./")
                        relToParentPath.clear();
 
@@ -163,7 +167,7 @@ string const doSubstitution(InsetExternalParams const & params,
                        '.' + support::getExtension(filename), use_latex_path);
        result = subst_path(result, "$$Tempname", params.tempname().absFilename(), use_latex_path);
        result = subst_path(result, "$$Sysdir",
-                               support::package().system_support(), use_latex_path);
+                               support::package().system_support().absFilename(), use_latex_path);
 
        // Handle the $$Contents(filename) syntax
        if (support::contains(result, "$$Contents(\"")) {
@@ -256,7 +260,7 @@ void updateExternal(InsetExternalParams const & params,
                if (from_checksum != temp_checksum) {
                        Mover const & mover = getMover(from_format);
                        if (!mover.copy(params.filename, temp_file)) {
-                               lyxerr[Debug::EXTERNAL]
+                               LYXERR(Debug::EXTERNAL)
                                        << "external::updateExternal. "
                                        << "Unable to copy "
                                        << params.filename << " to " << temp_file << endl;
@@ -317,7 +321,7 @@ void updateExternal(InsetExternalParams const & params,
                                   Converters::try_default | Converters::try_cache);
 
        if (!success)
-               lyxerr[Debug::EXTERNAL]
+               LYXERR(Debug::EXTERNAL)
                        << "external::updateExternal. "
                        << "Unable to convert from "
                        << from_format << " to " << to_format << endl;
@@ -349,7 +353,7 @@ int writeExternal(InsetExternalParams const & params,
 
        Template::Formats::const_iterator cit = et.formats.find(format);
        if (cit == et.formats.end()) {
-               lyxerr[Debug::EXTERNAL]
+               LYXERR(Debug::EXTERNAL)
                        << "External template format '" << format
                        << "' not specified in template "
                        << params.templatename() << endl;