]> git.lyx.org Git - lyx.git/blobdiff - src/graphics/PreviewLoader.C
* GuiView.C (updateTab): do not update early if current tab has
[lyx.git] / src / graphics / PreviewLoader.C
index f964ca09fcac7bc904e9b2c9dc076a751c51b89b..978355a8d80ef4a081d961d8434e279af8541bc8 100644 (file)
@@ -94,7 +94,7 @@ lyx::Converter const * setConverter()
                if (from == to)
                        continue;
 
-               lyx::Converter const * ptr = lyx::converters.getConverter(from, to);
+               lyx::Converter const * ptr = lyx::theConverters().getConverter(from, to);
                if (ptr)
                        return ptr;
        }
@@ -568,12 +568,12 @@ void PreviewLoader::Impl::startLoading()
        pending_.clear();
 
        // Output the LaTeX file.
-       string const latexfile = filename_base + ".tex";
+       FileName const latexfile(filename_base + ".tex");
 
        // FIXME UNICODE
        // This creates an utf8 encoded file, but the proper inputenc
        // command is missing.
-       odocfstream of(latexfile.c_str());
+       odocfstream of(latexfile.toFilesystemEncoding().c_str());
        if (!of) {
                lyxerr[Debug::GRAPHICS] << "PreviewLoader::startLoading()\n"
                                        << "Unable to create LaTeX file\n"
@@ -590,7 +590,7 @@ void PreviewLoader::Impl::startLoading()
        // The conversion command.
        ostringstream cs;
        cs << pconverter_->command << ' ' << pconverter_->to << ' '
-          << support::quoteName(latexfile) << ' '
+          << support::quoteName(latexfile.toFilesystemEncoding()) << ' '
           << int(font_scaling_factor_) << ' '
           << theApp()->hexName(LColor::preview) << ' '
           << theApp()->hexName(LColor::background);