mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-22 01:59:02 +00:00
Rename Paragraph::setBuffer to Paragraph::setInsetBuffers, to avoid
confusion about what this routine does.
This commit is contained in:
parent
66e1819ad1
commit
0bcb9732c5
@ -736,7 +736,7 @@ bool Compare::Impl::diff(Buffer const * new_buf, Buffer const * old_buf,
|
||||
diff_i(rp_new);
|
||||
|
||||
for (pit_type p = 0; p < (pit_type)dest_pars_->size(); ++p) {
|
||||
(*dest_pars_)[p].setBuffer(const_cast<Buffer &>(*dest_buf));
|
||||
(*dest_pars_)[p].setInsetBuffers(const_cast<Buffer &>(*dest_buf));
|
||||
(*dest_pars_)[p].setInsetOwner(&dest_buf_->inset());
|
||||
}
|
||||
|
||||
|
@ -422,7 +422,7 @@ pasteSelectionHelper(DocIterator const & cur, ParagraphList const & parlist,
|
||||
// Set paragraph buffers. It's important to do this right away
|
||||
// before something calls Inset::buffer() and causes a crash.
|
||||
for (pit_type p = startpit; p <= pit; ++p)
|
||||
pars[p].setBuffer(const_cast<Buffer &>(buffer));
|
||||
pars[p].setInsetBuffers(const_cast<Buffer &>(buffer));
|
||||
|
||||
// Join (conditionally) last pasted paragraph with next one, i.e.,
|
||||
// the tail of the spliced document paragraph
|
||||
@ -631,7 +631,7 @@ void copySelectionHelper(Buffer const & buf, Text const & text,
|
||||
// do not have a proper buffer reference. It makes
|
||||
// sense to add them temporarily, because the
|
||||
// operations below depend on that (acceptChanges included).
|
||||
it->setBuffer(const_cast<Buffer &>(buf));
|
||||
it->setInsetBuffers(const_cast<Buffer &>(buf));
|
||||
// PassThru paragraphs have the Language
|
||||
// latex_language. This is invalid for others, so we
|
||||
// need to change it to the buffer language.
|
||||
@ -827,7 +827,7 @@ vector<docstring> availableSelections(Buffer const * buf)
|
||||
for (; pit != pend; ++pit) {
|
||||
Paragraph par(*pit, 0, 46);
|
||||
// adapt paragraph to current buffer.
|
||||
par.setBuffer(const_cast<Buffer &>(*buf));
|
||||
par.setInsetBuffers(const_cast<Buffer &>(*buf));
|
||||
textSel += par.asString(AS_STR_INSETS);
|
||||
if (textSel.size() > 45) {
|
||||
support::truncateWithEllipsis(textSel,45);
|
||||
|
@ -3673,7 +3673,7 @@ InsetList const & Paragraph::insetList() const
|
||||
}
|
||||
|
||||
|
||||
void Paragraph::setBuffer(Buffer & b)
|
||||
void Paragraph::setInsetBuffers(Buffer & b)
|
||||
{
|
||||
d->insetlist_.setBuffer(b);
|
||||
}
|
||||
|
@ -397,7 +397,7 @@ public:
|
||||
///
|
||||
InsetList const & insetList() const;
|
||||
///
|
||||
void setBuffer(Buffer &);
|
||||
void setInsetBuffers(Buffer &);
|
||||
///
|
||||
void resetBuffer();
|
||||
|
||||
|
@ -504,7 +504,7 @@ void Undo::Private::doTextUndoOrRedo(CursorData & cur, UndoElementStack & stack,
|
||||
ParagraphList::iterator fend = fpit;
|
||||
advance(fend, undo.pars->size());
|
||||
for (; fpit != fend; ++fpit)
|
||||
fpit->setBuffer(buffer_);
|
||||
fpit->setInsetBuffers(buffer_);
|
||||
|
||||
delete undo.pars;
|
||||
undo.pars = 0;
|
||||
|
@ -97,7 +97,7 @@ void InsetText::setBuffer(Buffer & buf)
|
||||
{
|
||||
ParagraphList::iterator end = paragraphs().end();
|
||||
for (ParagraphList::iterator it = paragraphs().begin(); it != end; ++it)
|
||||
it->setBuffer(buf);
|
||||
it->setInsetBuffers(buf);
|
||||
Inset::setBuffer(buf);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user