]> git.lyx.org Git - lyx.git/blobdiff - src/BufferView.C
make redoParagraph more independent of current cursor
[lyx.git] / src / BufferView.C
index f42d68981b8e84f3011588bb0a9553b668eb39ba..8a7bee84b17775a0551cb9843ed534cf10371ba5 100644 (file)
@@ -40,7 +40,6 @@
 
 #include "support/FileInfo.h"
 #include "support/filetools.h"
-#include "support/lyxfunctional.h" // equal_1st_in_pair
 #include "support/types.h"
 #include "support/lyxalgo.h" // lyx_count
 
@@ -626,8 +625,7 @@ bool BufferView::ChangeInsets(InsetOld::Code code,
                        // How to set the cursor corretly when it.size()>1 ??
                        if (it.size() == 1) {
                                text->setCursorIntern(it.pit(), 0);
-                               text->redoParagraphs(text->cursor,
-                                                    boost::next(text->cursor.par()));
+                               text->redoParagraph(text->cursor.par());
                                text->partialRebreak();
                        }
                }
@@ -650,21 +648,6 @@ bool BufferView::ChangeRefsIfUnique(string const & from, string const & to)
 }
 
 
-bool BufferView::ChangeCitationsIfUnique(string const & from, string const & to)
-{
-       typedef pair<string, string> StringPair;
-
-       vector<StringPair> keys;
-       buffer()->fillWithBibKeys(keys);
-       if (count_if(keys.begin(), keys.end(),
-                    lyx::equal_1st_in_pair<StringPair>(from))
-           > 1)
-               return false;
-
-       return ChangeInsets(InsetOld::CITE_CODE, from, to);
-}
-
-
 UpdatableInset * BufferView::theLockingInset() const
 {
        // If NULL is not allowed we should put an Assert here. (Lgb)