]> git.lyx.org Git - lyx.git/blobdiff - src/LaTeXFeatures.cpp
When we use InPremable styles, we want to write as many versions
[lyx.git] / src / LaTeXFeatures.cpp
index 4fa2c829412aee1bb826b189f0fa9a836d3dffe7..c66d66b3ed0143b9113de0a350e86313bd291b6a 100644 (file)
@@ -579,11 +579,12 @@ bool LaTeXFeatures::isAvailable(string const & name)
 }
 
 
-void LaTeXFeatures::addPreambleSnippet(string const & preamble)
+void LaTeXFeatures::addPreambleSnippet(string const & preamble,
+               bool allowdupes)
 {
        SnippetList::const_iterator begin = preamble_snippets_.begin();
        SnippetList::const_iterator end   = preamble_snippets_.end();
-       if (find(begin, end, preamble) == end)
+       if (allowdupes || find(begin, end, preamble) == end)
                preamble_snippets_.push_back(preamble);
 }