]> git.lyx.org Git - lyx.git/blobdiff - src/insets/InsetListings.cpp
Fix bug #7983: Do not modify params before we know we have
[lyx.git] / src / insets / InsetListings.cpp
index cb3e9b56cbde4774f05a398620a393c25b812b6e..a8b56d0773d27cdc2c121c4e9ffbfaedb5add992 100644 (file)
@@ -158,8 +158,7 @@ void InsetListings::latex(otexstream & os, OutputParams const & runparams) const
                        (outer_language->encoding()->hasFixedWidth()) ?
                                outer_language->encoding() 
                                : encodings.fromLyXName("iso8859-1");
-               pair<bool, int> const c = switchEncoding(os.os(),
-                               buffer().params(), runparams, *lstenc, true);
+               switchEncoding(os.os(), buffer().params(), runparams, *lstenc, true);
                runparams.encoding = lstenc;
                encoding_switched = true;
        }
@@ -250,8 +249,7 @@ void InsetListings::latex(otexstream & os, OutputParams const & runparams) const
 
        if (encoding_switched){
                // Switch back
-               pair<bool, int> const c = switchEncoding(os.os(),
-                               buffer().params(), runparams, *save_enc, true);
+               switchEncoding(os.os(), buffer().params(), runparams, *save_enc, true);
                runparams.encoding = save_enc;
        }
 
@@ -302,9 +300,9 @@ docstring InsetListings::xhtml(XHTMLStream & os, OutputParams const & rp) const
 }
 
 
-docstring InsetListings::contextMenuName() const
+string InsetListings::contextMenuName() const
 {
-       return from_ascii("context-listings");
+       return "context-listings";
 }