]> git.lyx.org Git - lyx.git/blobdiff - src/TocBackend.h
Free line setting in tabulars. FILE FORMAT CHANGE.
[lyx.git] / src / TocBackend.h
index 0ade8432808d3f7b4f30cc940340cda370328b42..9704352922e8ef80bfe5261ab99de9e5144e9975 100644 (file)
@@ -70,7 +70,8 @@ protected:
 
 
 ///
-typedef std::vector<TocItem> Toc;
+class Toc : public std::vector<TocItem> {};
+
 typedef Toc::const_iterator TocIterator;
 
 /// The ToC list.
@@ -85,7 +86,7 @@ class TocBackend
 {
 public:
        ///
-       TocBackend(Buffer const * buffer = NULL) : buffer_(buffer) {}
+       TocBackend(Buffer const * buffer) : buffer_(buffer) {}
        ///
        void setBuffer(Buffer const * buffer) { buffer_ = buffer; }
        ///
@@ -95,11 +96,13 @@ public:
 
        ///
        TocList const & tocs() const { return tocs_; }
+       TocList & tocs() { return tocs_; }
 
        ///
        Toc const & toc(std::string const & type) const;
-       /// Return the first Toc Item before the cursor
+       Toc & toc(std::string const & type);
 
+       /// Return the first Toc Item before the cursor
        TocIterator item(
                std::string const & type, ///< Type of Toc.
                ParConstIterator const & ///< The cursor location in the document.