[EMAIL PROTECTED] wrote:
Modified: lyx-devel/trunk/src/Paragraph.cpp
@@ -78,7 +79,7 @@
{
public:
///
- Private(Paragraph * owner);
+ Private(Paragraph * owner, Layout const & layout);
/// "Copy constructor"
Private(Private const &, Paragraph * owner);
@@ -189,8 +190,12 @@
///
InsetList insetlist_;
+ // This little bit of indirection is needed so that we can protect
+ // the layout as const but still be able to change layout_.
///
- LayoutPtr layout_;
+ Layout const & layout() const { return *layout_; }
+ ///
+ void setLayout(Layout const & layout) { layout_ = &layout; }
Private interface are meant to be used like normal members by the owner
class. You don't have to create interface for them. IOW, accessing
d->layout_ directly in Paragraph methods _is_ OK.
Abdel.