]> git.lyx.org Git - features.git/commitdiff
Saves some compile time by diminishing Buffer.h header dependencies:
authorAbdelrazak Younes <younes@lyx.org>
Fri, 15 Jun 2007 13:13:49 +0000 (13:13 +0000)
committerAbdelrazak Younes <younes@lyx.org>
Fri, 15 Jun 2007 13:13:49 +0000 (13:13 +0000)
- delete unneeded InsetList.h
- transfer the errorList to the private implementation.

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@18782 a592a061-630c-0410-9148-cb99ea01b6c8

src/Buffer.cpp
src/Buffer.h
src/Converter.cpp
src/insets/ExternalSupport.cpp
src/insets/InsetGraphics.cpp

index 1d33af40391f3d225e7c75fa38e6a10174651a48..3d81631e34080a962c9e48e402402b823d886973 100644 (file)
@@ -193,6 +193,9 @@ public:
 
        ///
        TocBackend toc_backend;
+
+       /// Container for all sort of Buffer dependant errors.
+       map<string, ErrorList> errorLists;
 };
 
 
@@ -433,7 +436,7 @@ int Buffer::readHeader(Lexer & lex)
                params().temp_bullet(i) = ITEMIZE_DEFAULTS[i];
        }
 
-       ErrorList & errorList = errorLists_["Parse"];
+       ErrorList & errorList = pimpl_->errorLists["Parse"];
 
        while (lex.isOK()) {
                lex.next();
@@ -484,7 +487,7 @@ int Buffer::readHeader(Lexer & lex)
 // Returns false if "\end_document" is not read (Asger)
 bool Buffer::readDocument(Lexer & lex)
 {
-       ErrorList & errorList = errorLists_["Parse"];
+       ErrorList & errorList = pimpl_->errorLists["Parse"];
        errorList.clear();
 
        lex.next();
@@ -1211,7 +1214,7 @@ int Buffer::runChktex()
                Alert::error(_("chktex failure"),
                             _("Could not run chktex successfully."));
        } else if (res > 0) {
-               ErrorList & errorList = errorLists_["ChkTeX"];
+               ErrorList & errorList = pimpl_->errorLists["ChkTeX"];
                // Clear out old errors
                errorList.clear();
                // Fill-in the error list with the TeX errors
@@ -1774,8 +1777,8 @@ void Buffer::getSourceCode(odocstream & os, pit_type par_begin,
 ErrorList const & Buffer::errorList(string const & type) const
 {
        static ErrorList const emptyErrorList;
-       std::map<string, ErrorList>::const_iterator I = errorLists_.find(type);
-       if (I == errorLists_.end())
+       std::map<string, ErrorList>::const_iterator I = pimpl_->errorLists.find(type);
+       if (I == pimpl_->errorLists.end())
                return emptyErrorList;
 
        return I->second;
@@ -1784,7 +1787,7 @@ ErrorList const & Buffer::errorList(string const & type) const
 
 ErrorList & Buffer::errorList(string const & type)
 {
-       return errorLists_[type];
+       return pimpl_->errorLists[type];
 }
 
 
index 8a81bb07039e5e2c374715a9015ce7f53bb7dfea..2ce9ae6508337687ba2c2b9a3be86312b2d6235d 100644 (file)
@@ -12,9 +12,6 @@
 #ifndef BUFFER_H
 #define BUFFER_H
 
-#include "ErrorList.h"
-#include "InsetList.h"
-
 #include "DocIterator.h"
 
 #include "support/FileName.h"
@@ -37,6 +34,7 @@ namespace lyx {
 
 class BufferParams;
 class ErrorItem;
+class ErrorList;
 class FuncRequest;
 class Inset;
 class InsetText;
@@ -410,9 +408,6 @@ private:
        /// A cache for the bibfiles (including bibfiles of loaded child
        /// documents), needed for appropriate update of natbib labels.
        mutable std::vector<support::FileName> bibfilesCache_;
-
-       /// Container for all sort of Buffer dependant errors.
-       std::map<std::string, ErrorList> errorLists_;
 };
 
 
index 8aa0b4bbfaee99877730b3277d451dc0096ad55c..65189d41a11a09de9bfecdfb3bda5953961634fd 100644 (file)
@@ -17,6 +17,7 @@
 #include "buffer_funcs.h"
 #include "BufferParams.h"
 #include "debug.h"
+#include "ErrorList.h"
 #include "Format.h"
 #include "gettext.h"
 #include "Language.h"
index a4ed7de42ff76b9475b923b2cc88d1feb775d5a6..ecfd61797c6ce4e45af0e386e6c728f388940078 100644 (file)
@@ -19,6 +19,7 @@
 #include "Buffer.h"
 #include "Converter.h"
 #include "debug.h"
+#include "ErrorList.h"
 #include "Exporter.h"
 #include "Format.h"
 #include "Mover.h"
index a5cff0d6f8a40f58346076a2a3150f0836a5836a..477f884e2e34fb3a963f33e656c4cbd24f7a3d54 100644 (file)
@@ -58,6 +58,7 @@ TODO
 #include "Cursor.h"
 #include "debug.h"
 #include "DispatchResult.h"
+#include "ErrorList.h"
 #include "Exporter.h"
 #include "Format.h"
 #include "FuncRequest.h"