mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-10 20:04:46 +00:00
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:
parent
a33f68e37f
commit
40df686312
@ -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();
|
||||
|
@ -103,7 +103,7 @@ public:
|
||||
///
|
||||
MINIPAGE_CODE,
|
||||
///
|
||||
SPACE_CODE,
|
||||
SPACE_CODE,
|
||||
///
|
||||
SPECIALCHAR_CODE, // 25
|
||||
///
|
||||
|
@ -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);
|
||||
}
|
||||
|
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user