From: Abdelrazak Younes Date: Fri, 15 Jun 2007 13:13:49 +0000 (+0000) Subject: Saves some compile time by diminishing Buffer.h header dependencies: X-Git-Tag: 1.6.10~9384 X-Git-Url: https://git.lyx.org/gitweb/?a=commitdiff_plain;h=b025e9a2495415ec9a8120abc182d89be6c8b96c;p=features.git Saves some compile time by diminishing Buffer.h header dependencies: - 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 --- diff --git a/src/Buffer.cpp b/src/Buffer.cpp index 1d33af4039..3d81631e34 100644 --- a/src/Buffer.cpp +++ b/src/Buffer.cpp @@ -193,6 +193,9 @@ public: /// TocBackend toc_backend; + + /// Container for all sort of Buffer dependant errors. + map 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::const_iterator I = errorLists_.find(type); - if (I == errorLists_.end()) + std::map::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]; } diff --git a/src/Buffer.h b/src/Buffer.h index 8a81bb0703..2ce9ae6508 100644 --- a/src/Buffer.h +++ b/src/Buffer.h @@ -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 bibfilesCache_; - - /// Container for all sort of Buffer dependant errors. - std::map errorLists_; }; diff --git a/src/Converter.cpp b/src/Converter.cpp index 8aa0b4bbfa..65189d41a1 100644 --- a/src/Converter.cpp +++ b/src/Converter.cpp @@ -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" diff --git a/src/insets/ExternalSupport.cpp b/src/insets/ExternalSupport.cpp index a4ed7de42f..ecfd61797c 100644 --- a/src/insets/ExternalSupport.cpp +++ b/src/insets/ExternalSupport.cpp @@ -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" diff --git a/src/insets/InsetGraphics.cpp b/src/insets/InsetGraphics.cpp index a5cff0d6f8..477f884e2e 100644 --- a/src/insets/InsetGraphics.cpp +++ b/src/insets/InsetGraphics.cpp @@ -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"