]> git.lyx.org Git - lyx.git/blobdiff - src/paragraph.h
namespace grfx -> lyx::graphics
[lyx.git] / src / paragraph.h
index 23df61ad70fa6d616f93fe20aea17868d253e84a..5c9ba843c3858caae9f60fad1929e90adcdea7cd 100644 (file)
@@ -20,8 +20,6 @@
 
 #include "LString.h"
 
-#include <boost/optional.hpp>
-
 class Buffer;
 class BufferParams;
 class BufferView;
@@ -33,6 +31,7 @@ class LatexRunParams;
 class ParagraphParameters;
 class TexRow;
 class ParagraphList;
+class UpdatableInset;
 
 /// A Paragraph holds all text, attributes and insets in a text paragraph
 class Paragraph  {
@@ -57,7 +56,7 @@ public:
        ///
        Paragraph(Paragraph const &);
        ///
-       //void operator=(Paragraph const &);
+       void operator=(Paragraph const &);
        /// the destructor removes the new paragraph from the list
        ~Paragraph();
 
@@ -107,9 +106,9 @@ public:
        void makeSameLayout(Paragraph const & par);
 
        ///
-       Inset * inInset() const;
+       UpdatableInset * inInset() const;
        ///
-       void setInsetOwner(Inset * i);
+       void setInsetOwner(UpdatableInset * inset);
        ///
        void deleteInsetsLyXText(BufferView *);
        ///
@@ -284,24 +283,22 @@ public:
        ///
        int stripLeadingSpaces();
 
-       ///
+       /// return true if we allow multiple spaces
        bool isFreeSpacing() const;
 
+       /// return true if we allow this par to stay empty
+       bool allowEmpty() const;
+
        ///
        ParagraphParameters & params();
        ///
        ParagraphParameters const & params() const;
        ///
        InsetList insetlist;
-       ///
-       void owningBuffer(Buffer const & b) {
-               buffer_.reset(&b);
-       }
+
 private:
        ///
        LyXLayout_ptr layout_;
-       ///
-       boost::optional<Buffer const *> buffer_;
 
        struct Pimpl;
        ///