]> git.lyx.org Git - lyx.git/blobdiff - src/Buffer.cpp
remove unused declaration
[lyx.git] / src / Buffer.cpp
index e192c1466514241988da7565f8b2f22b7c5d05bc..e24d3e38578409937ac37cc9c8ac0e65f74497ce 100644 (file)
@@ -154,7 +154,7 @@ namespace fs = boost::filesystem;
 
 namespace {
 
-int const LYX_FORMAT = 294; //pavel pdfoptions
+int const LYX_FORMAT = 295; //Uwe: htmlurl, href
 
 } // namespace anon
 
@@ -165,9 +165,7 @@ class Buffer::Impl
 {
 public:
        Impl(Buffer & parent, FileName const & file, bool readonly);
-
-       limited_stack<Undo> undostack;
-       limited_stack<Undo> redostack;
+       
        BufferParams params;
        LyXVC lyxvc;
        string temppath;
@@ -219,6 +217,9 @@ public:
 
        ///
        frontend::WorkAreaManager * wa_;
+
+       ///
+       Undo undo_;
 };
 
 
@@ -226,7 +227,7 @@ Buffer::Impl::Impl(Buffer & parent, FileName const & file, bool readonly_)
        : lyx_clean(true), bak_clean(true), unnamed(false), read_only(readonly_),
          filename(file), file_fully_loaded(false), inset(params),
          toc_backend(&parent), embedded_files(&parent), timestamp_(0),
-         checksum_(0), wa_(0)
+         checksum_(0), wa_(0), undo_(parent)
 {
        inset.setAutoBreakRows(true);
        lyxvc.buffer(&parent);
@@ -304,30 +305,6 @@ Inset & Buffer::inset() const
 }
 
 
-limited_stack<Undo> & Buffer::undostack()
-{
-       return pimpl_->undostack;
-}
-
-
-limited_stack<Undo> const & Buffer::undostack() const
-{
-       return pimpl_->undostack;
-}
-
-
-limited_stack<Undo> & Buffer::redostack()
-{
-       return pimpl_->redostack;
-}
-
-
-limited_stack<Undo> const & Buffer::redostack() const
-{
-       return pimpl_->redostack;
-}
-
-
 BufferParams & Buffer::params()
 {
        return pimpl_->params;
@@ -405,6 +382,12 @@ EmbeddedFiles const & Buffer::embeddedFiles() const
        return pimpl_->embedded_files;
 }
 
+Undo & Buffer::undo()
+{
+       return pimpl_->undo_;
+}
+
+
 
 string const Buffer::getLatexName(bool const no_path) const
 {
@@ -750,7 +733,7 @@ Buffer::ReadStatus Buffer::readFile(Lexer & lex, FileName const & filename,
        }
 
        lex.next();
-       string const token(lex.getString());
+       string const token = lex.getString();
 
        if (!lex) {
                Alert::error(_("Document could not be read"),
@@ -1834,10 +1817,8 @@ void Buffer::buildMacros()
 
 
 void Buffer::changeRefsIfUnique(docstring const & from, docstring const & to,
-       int inset_code)
+       InsetCode code)
 {
-       InsetCode code = static_cast<InsetCode>(inset_code);
-
        //FIXME: This does not work for child documents yet.
        BOOST_ASSERT(code == CITE_CODE || code == REF_CODE);
        // Check if the label 'from' appears more than once