fix some small problems... kindo hackish...

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@7041 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Lars Gullik Bjønnes 2003-05-24 16:11:27 +00:00
parent a33f68e37f
commit 40df686312
4 changed files with 14 additions and 7 deletions

View File

@ -369,6 +369,7 @@ int Buffer::readParagraph(LyXLex & lex, string const & token,
lex.pushToken(token);
Paragraph par;
par.owningBuffer(*this);
par.params().depth(depth);
if (params.tracking_changes)
par.trackChanges();

View File

@ -103,7 +103,7 @@ public:
///
MINIPAGE_CODE,
///
SPACE_CODE,
SPACE_CODE,
///
SPECIALCHAR_CODE, // 25
///

View File

@ -67,9 +67,6 @@ Inset * minibuffer_inset;
} // namespace anon
extern BufferView * current_view;
Paragraph::Paragraph()
: pimpl_(new Paragraph::Pimpl(this))
{
@ -95,14 +92,14 @@ Paragraph::Paragraph(Paragraph const & lp, bool same_ids)
// this is because of the dummy layout of the paragraphs that
// follow footnotes
layout_ = lp.layout();
buffer_ = lp.buffer_;
// copy everything behind the break-position to the new paragraph
insetlist = lp.insetlist;
InsetList::iterator it = insetlist.begin();
InsetList::iterator end = insetlist.end();
for (; it != end; ++it) {
it.setInset(it.getInset()->clone(*current_view->buffer(),
same_ids));
it.setInset(it.getInset()->clone(**buffer_, same_ids));
// tell the new inset who is the boss now
it.getInset()->parOwner(this);
}

View File

@ -21,6 +21,8 @@
#include "ParagraphList.h"
#include "LString.h"
#include <boost/optional.hpp>
class BufferParams;
class BufferView;
class Counters;
@ -299,6 +301,10 @@ public:
InsetList insetlist;
///
//Counters & counters();
///
void owningBuffer(Buffer const & b) {
buffer_.reset(&b);
}
private:
///
LyXLayout_ptr layout_;
@ -308,6 +314,9 @@ private:
Paragraph * next_par_;
Paragraph * prev_par_;
#endif
///
boost::optional<Buffer const *> buffer_;
struct Pimpl;
///
friend struct Paragraph::Pimpl;