]> git.lyx.org Git - lyx.git/blobdiff - src/paragraph_pimpl.h
fix reading the author field.
[lyx.git] / src / paragraph_pimpl.h
index 906e59a8b8a6a36d4f642fdfa284c7e20a0efb3d..325d0034a844e7fed291bba028f9a4e557e70eba 100644 (file)
 #include "changes.h"
 #include "lyxfont.h"
 #include "ParagraphParameters.h"
+#include "ShareContainer.h"
 
 #include <boost/scoped_ptr.hpp>
 
 class LyXLayout;
 
+
 struct Paragraph::Pimpl {
        ///
        Pimpl(Paragraph * owner);
-       /// Copy constructor
+       /// "Copy constructor"
        Pimpl(Pimpl const &, Paragraph * owner);
        ///
        void setContentsFromPar(Paragraph const & par);
+
+       //
+       // Change tracking
+       //
        /// set tracking mode
        void trackChanges(Change::Type type = Change::UNCHANGED);
        /// stop tracking
@@ -46,32 +52,25 @@ struct Paragraph::Pimpl {
        bool isChanged(lyx::pos_type start, lyx::pos_type end) const;
        /// is there a non-addition in this range ?
        bool isChangeEdited(lyx::pos_type start, lyx::pos_type end) const;
-
        /// set change at pos
        void setChange(lyx::pos_type pos, Change::Type type);
-
        /// mark as erased
        void markErased();
-
        /// accept change
        void acceptChange(lyx::pos_type start, lyx::pos_type end);
-
        /// reject change
        void rejectChange(lyx::pos_type start, lyx::pos_type end);
-
        /// are we tracking changes ?
-       bool tracking() const {
-               return changes_.get();
-       }
+       bool tracking() const { return changes_.get(); }
 
        ///
        value_type getChar(lyx::pos_type pos) const;
        ///
        void setChar(lyx::pos_type pos, value_type c);
        ///
-       void insertChar(lyx::pos_type pos, value_type c, LyXFont const & font, Change change = Change(Change::INSERTED));
+       void insertChar(lyx::pos_type pos, value_type c, Change change);
        ///
-       void insertInset(lyx::pos_type pos, InsetOld * inset, LyXFont const & font, Change change = Change(Change::INSERTED));
+       void insertInset(lyx::pos_type pos, InsetBase * inset, Change change);
        /// definite erase
        void eraseIntern(lyx::pos_type pos);
        /// erase the given position. Returns true if it was actually erased
@@ -96,9 +95,9 @@ struct Paragraph::Pimpl {
                ///
                FontTable(lyx::pos_type p, LyXFont const & f)
                        : pos_(p)
-                       {
-                               font_ = container.get(f);
-                       }
+               {
+                       font_ = container.get(f);
+               }
                ///
                lyx::pos_type pos() const { return pos_; }
                ///