]> git.lyx.org Git - lyx.git/blobdiff - src/insets/InsetListingsParams.cpp
Pure HTML output for math macros.
[lyx.git] / src / insets / InsetListingsParams.cpp
index 99ecbb0fdfac1d60f7b198d26797f108406c9ab7..f82c44f63ab9ea3b9c67e0ab6550bf08f1e54a6c 100644 (file)
@@ -18,7 +18,6 @@
 
 #include "support/convert.h"
 #include "support/gettext.h"
-#include "support/lassert.h"
 #include "support/lstrings.h"
 #include "support/textutils.h"
 
@@ -715,7 +714,7 @@ void InsetListingsParams::write(ostream & os) const
 void InsetListingsParams::read(Lexer & lex)
 {
        lex >> inline_;
-       int s = Inset::Collapsed;
+       int s = InsetCollapsable::Collapsed;
        lex >> s;
        status_ = static_cast<InsetCollapsable::CollapseStatus>(s);
        string par;
@@ -741,14 +740,15 @@ string InsetListingsParams::params(string const & sep) const
 }
 
 
-void InsetListingsParams::addParam(string const & key, string const & value)
+void InsetListingsParams::addParam(string const & key, 
+               string const & value, bool replace)
 {
        if (key.empty())
                return;
 
        // duplicate parameters!
        string keyname = key;
-       if (params_.find(key) != params_.end())
+       if (!replace && params_.find(key) != params_.end())
                // key=value,key=value1 is allowed in listings
                // use key_, key__, key___ etc to avoid name conflict
                while (params_.find(keyname += '_') != params_.end()) { }