]> git.lyx.org Git - lyx.git/blobdiff - src/insets/InsetListingsParams.cpp
Restore XHTML output for InsetListings.
[lyx.git] / src / insets / InsetListingsParams.cpp
index 99ecbb0fdfac1d60f7b198d26797f108406c9ab7..993562ef4b2e720506405c961dd2b5f0437d7b54 100644 (file)
@@ -715,7 +715,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 +741,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()) { }