#include "LString.h"
-#include <boost/optional.hpp>
-
class Buffer;
class BufferParams;
class BufferView;
class ParagraphParameters;
class TexRow;
class ParagraphList;
+class UpdatableInset;
/// A Paragraph holds all text, attributes and insets in a text paragraph
class Paragraph {
///
Paragraph(Paragraph const &);
///
- //void operator=(Paragraph const &);
+ void operator=(Paragraph const &);
/// the destructor removes the new paragraph from the list
~Paragraph();
void makeSameLayout(Paragraph const & par);
///
- Inset * inInset() const;
+ UpdatableInset * inInset() const;
///
- void setInsetOwner(Inset * i);
+ void setInsetOwner(UpdatableInset * inset);
///
void deleteInsetsLyXText(BufferView *);
///
///
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;
///