X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=src%2FTocBackend.h;h=9704352922e8ef80bfe5261ab99de9e5144e9975;hb=e01e14872d60935908ad42bc164bff1342277b22;hp=0ade8432808d3f7b4f30cc940340cda370328b42;hpb=69d566afea3bf2a9885412ec140b52bf0ef04c9a;p=lyx.git diff --git a/src/TocBackend.h b/src/TocBackend.h index 0ade843280..9704352922 100644 --- a/src/TocBackend.h +++ b/src/TocBackend.h @@ -70,7 +70,8 @@ protected: /// -typedef std::vector Toc; +class Toc : public std::vector {}; + 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.