commit 0bcb9732c535e2f3d829be77581eb718159d862b
Author: Richard Heck <rgh...@lyx.org>
Date:   Sun Oct 15 22:14:08 2017 -0400

    Rename Paragraph::setBuffer to Paragraph::setInsetBuffers, to avoid
    confusion about what this routine does.
---
 src/Compare.cpp          |    2 +-
 src/CutAndPaste.cpp      |    6 +++---
 src/Paragraph.cpp        |    2 +-
 src/Paragraph.h          |    2 +-
 src/Undo.cpp             |    2 +-
 src/insets/InsetText.cpp |    2 +-
 6 files changed, 8 insertions(+), 8 deletions(-)

diff --git a/src/Compare.cpp b/src/Compare.cpp
index 796eb19..214f25c 100644
--- a/src/Compare.cpp
+++ b/src/Compare.cpp
@@ -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());
        }
 
diff --git a/src/CutAndPaste.cpp b/src/CutAndPaste.cpp
index d79ef5a..daa6475 100644
--- a/src/CutAndPaste.cpp
+++ b/src/CutAndPaste.cpp
@@ -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);
diff --git a/src/Paragraph.cpp b/src/Paragraph.cpp
index c9a234d..7620251 100644
--- a/src/Paragraph.cpp
+++ b/src/Paragraph.cpp
@@ -3673,7 +3673,7 @@ InsetList const & Paragraph::insetList() const
 }
 
 
-void Paragraph::setBuffer(Buffer & b)
+void Paragraph::setInsetBuffers(Buffer & b)
 {
        d->insetlist_.setBuffer(b);
 }
diff --git a/src/Paragraph.h b/src/Paragraph.h
index d462f4c..790c3f2 100644
--- a/src/Paragraph.h
+++ b/src/Paragraph.h
@@ -397,7 +397,7 @@ public:
        ///
        InsetList const & insetList() const;
        ///
-       void setBuffer(Buffer &);
+       void setInsetBuffers(Buffer &);
        ///
        void resetBuffer();
 
diff --git a/src/Undo.cpp b/src/Undo.cpp
index 31072ba..33e0370 100644
--- a/src/Undo.cpp
+++ b/src/Undo.cpp
@@ -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;
diff --git a/src/insets/InsetText.cpp b/src/insets/InsetText.cpp
index 28484a4..4cc7a0a 100644
--- a/src/insets/InsetText.cpp
+++ b/src/insets/InsetText.cpp
@@ -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);
 }
 

Reply via email to