]> git.lyx.org Git - lyx.git/blobdiff - src/Buffer.cpp
After a hiatus, I'm returning to the rewrite of InsetCommandParams, the purpose of...
[lyx.git] / src / Buffer.cpp
index 31c5783e33de8958ca02cd1e560ec15e8d1d5388..3a074cba943e6663a491b42c2dbff92c057c593c 100644 (file)
@@ -203,6 +203,9 @@ public:
        /// A cache for the bibfiles (including bibfiles of loaded child
        /// documents), needed for appropriate update of natbib labels.
        mutable EmbeddedFileList bibfilesCache_;
+       
+       ///
+       WordList words_;
 };
 
 /// Creates the per buffer temporary directory
@@ -1184,19 +1187,19 @@ void Buffer::writeLaTeXSource(odocstream & os,
 
 bool Buffer::isLatex() const
 {
-       return params().getTextClass().outputType() == LATEX;
+       return params().textClass().outputType() == LATEX;
 }
 
 
 bool Buffer::isLiterate() const
 {
-       return params().getTextClass().outputType() == LITERATE;
+       return params().textClass().outputType() == LITERATE;
 }
 
 
 bool Buffer::isDocBook() const
 {
-       return params().getTextClass().outputType() == DOCBOOK;
+       return params().textClass().outputType() == DOCBOOK;
 }
 
 
@@ -1227,7 +1230,7 @@ void Buffer::writeDocBookSource(odocstream & os, string const & fname,
 
        d->texrow.reset();
 
-       TextClass const & tclass = params().getTextClass();
+       TextClass const & tclass = params().textClass();
        string const top_element = tclass.latexname();
 
        if (!only_body) {
@@ -1282,7 +1285,7 @@ void Buffer::writeDocBookSource(odocstream & os, string const & fname,
            << " file was created by LyX " << lyx_version
            << "\n  See http://www.lyx.org/ for more information -->\n";
 
-       params().getTextClass().counters().reset();
+       params().textClass().counters().reset();
 
        loadChildDocuments();
 
@@ -2533,7 +2536,7 @@ vector<Format const *> Buffer::exportableFormats(bool only_viewable) const
 vector<string> Buffer::backends() const
 {
        vector<string> v;
-       if (params().getTextClass().isTeXClassAvailable()) {
+       if (params().textClass().isTeXClassAvailable()) {
                v.push_back(bufferFormat());
                // FIXME: Don't hardcode format names here, but use a flag
                if (v.back() == "latex")
@@ -2667,7 +2670,13 @@ void Buffer::bufferErrors(TeXErrors const & terr, ErrorList & errorList) const
 
 void Buffer::registerWord(docstring const & word)
 {
-       words_.insert(word);
+       d->words_.insert(word);
+}
+
+
+WordList const & Buffer::registeredWords() const
+{
+       return d->words_;
 }
 
 } // namespace lyx