#ifndef BUFFER_H
#define BUFFER_H
-#ifdef __GNUG__
-#pragma interface
-#endif
-
#include "LString.h"
#include "undo.h"
#include "support/limited_stack.h"
#include "texrow.h"
#include "ParagraphList.h"
#include "paragraph.h"
+#include "author.h"
-#include <boost/scoped_ptr.hpp>
#include <boost/shared_ptr.hpp>
class BufferView;
-class Counters;
class LyXRC;
class TeXErrors;
class LaTeXFeatures;
class Language;
class ParIterator;
+class ParConstIterator;
-#define NO_COMPABILITY 1
-
-///
-struct DEPCLEAN {
- ///
- bool clean;
- ///
- string master;
- ///
- DEPCLEAN * next;
-};
/** The buffer object.
This is the buffer object. It contains all the informations about
\param par if != 0 insert the file.
\return \c false if method fails.
*/
- bool readFile(LyXLex &, Paragraph * par = 0);
+ bool readFile(LyXLex &, string const &, Paragraph * par = 0);
/** Reads a file without header.
\param par if != 0 insert the file.
///
void insertStringAsLines(Paragraph *&, lyx::pos_type &,
LyXFont const &, string const &) const;
-#ifndef NO_COMPABILITY
- ///
- Inset * isErtInset(Paragraph * par, int pos) const;
- ///
- void insertErtContents(Paragraph * par, int & pos,
- bool set_inactive = true);
-#endif
///
Paragraph * getParFromID(int id) const;
private:
/** LaTeX all paragraphs from par to endpar.
\param \a endpar if == 0 then to the end
*/
- void latexParagraphs(std::ostream & os, Paragraph * par,
- Paragraph * endpar, TexRow & texrow, bool moving_arg = false) const;
+ void latexParagraphs(std::ostream & os,
+ ParagraphList::iterator par,
+ ParagraphList::iterator endpar,
+ TexRow & texrow, bool moving_arg = false) const;
///
void simpleDocBookOnePar(std::ostream &,
Paragraph * par, int & desc_on,
///
void makeDocBookFile(string const & filename,
bool nice, bool only_body = false);
- /// Open SGML/XML tag.
- int sgmlOpenTag(std::ostream & os, Paragraph::depth_type depth, bool mixcont,
- string const & latexname) const;
- /// Closes SGML/XML tag.
- int sgmlCloseTag(std::ostream & os, Paragraph::depth_type depth, bool mixcont,
- string const & latexname) const;
///
void sgmlError(Paragraph * par, int pos, string const & message) const;
*/
void validate(LaTeXFeatures &) const;
- ///
- string const getIncludeonlyList(char delim = ',');
- ///
- std::vector<std::pair<string, string> > const getBibkeyList() const;
+ /// return all bibkeys from buffer and its childs
+ void fillWithBibKeys(std::vector<std::pair<string, string> > & keys) const;
///
std::vector<string> const getLabelList() const;
/// Used when typesetting to place errorboxes.
TexRow texrow;
- /// Buffer-wide counter array
- Counters & counters() const;
+
+ /// the author list for the document
+ AuthorList & authors();
private:
+ typedef std::map<string, bool> DepClean;
+
+ /// need to regenerate .tex ?
+ DepClean dep_clean_;
+
+ /// the author list
+ AuthorList authorlist;
+
/// is save needed
mutable bool lyx_clean;
/// is this a unnamed file (New...)
bool unnamed;
- /// is regenerating #.tex# necessary
- DEPCLEAN * dep_clean;
-
/// buffer is r/o
bool read_only;
of the buffers in the list of users to do a #updateLayoutChoice#.
*/
BufferView * users;
-
- /// The pointer is const although its contents may not be
- boost::scoped_ptr<Counters> const ctrs;
-
public:
///
class inset_iterator {
///
ParIterator par_iterator_begin();
///
+ ParConstIterator par_iterator_begin() const;
+ ///
ParIterator par_iterator_end();
+ ///
+ ParConstIterator par_iterator_end() const;
///
Inset * getInsetFromID(int id_arg) const;