]> 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 8e4af07a5ff82da39415bf3423a94bd21d83c2bc..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,10 +590,10 @@ 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);
+          << theApp()->hexName(LColor::preview) << ' '
+          << theApp()->hexName(LColor::background);
 
        string const command = support::libScriptSearch(cs.str());