]> git.lyx.org Git - lyx.git/blobdiff - src/BufferView_pimpl.C
last Friday's text*.C -> text_func shuffle
[lyx.git] / src / BufferView_pimpl.C
index be1cea275f09d5c462bef46fe7b97f43b238296d..e2892808d5d2cced7a3f62df0910de98dea93b9a 100644 (file)
@@ -3,6 +3,7 @@
  * Copyright 2002 the LyX Team
  * Read the file COPYING
  *
+ * \author Lars Gullik Bjønnes
  * \author various
  */
 
@@ -75,6 +76,7 @@ using std::make_pair;
 using std::min;
 
 using lyx::pos_type;
+using namespace lyx::support;
 using namespace bv_funcs;
 
 extern BufferList bufferlist;
@@ -168,7 +170,7 @@ bool BufferView::Pimpl::loadLyXFile(string const & filename, bool tolastfiles)
        Buffer * b = bufferlist.newBuffer(s);
 
        //attach to the error signal in the buffer
-       b->parseError.connect(boost::bind(&BufferView::Pimpl::addError, 
+       b->parseError.connect(boost::bind(&BufferView::Pimpl::addError,
                                          this, _1));
 
        bool loaded = ::loadLyXFile(b, s);
@@ -187,7 +189,7 @@ bool BufferView::Pimpl::loadLyXFile(string const & filename, bool tolastfiles)
                else
                        return false;
 
-       } 
+       }
 
        buffer(b);
 
@@ -258,7 +260,7 @@ void BufferView::Pimpl::buffer(Buffer * b)
                }
 
                // FIXME: needed when ?
-               bv_->text->top_y(screen().topCursorVisible(bv_->text->cursor, bv_->text->top_y()));
+               bv_->text->top_y(screen().topCursorVisible(bv_->text));
 
                // Buffer-dependent dialogs should be updated or
                // hidden. This should go here because some dialogs (eg ToC)
@@ -358,7 +360,7 @@ int BufferView::Pimpl::resizeCurrentBuffer()
                mark_set = bv_->text->selection.mark();
                the_locking_inset = bv_->theLockingInset();
                buffer_->resizeInsets(bv_);
-               // I don't think the delete and new are necessary here we 
+               // I don't think the delete and new are necessary here we
                // just could call only init! (Jug 20020419)
                delete bv_->text;
                bv_->text = new LyXText(bv_);
@@ -409,7 +411,7 @@ int BufferView::Pimpl::resizeCurrentBuffer()
                bv_->theLockingInset(the_locking_inset);
        }
 
-       bv_->text->top_y(screen().topCursorVisible(bv_->text->cursor, bv_->text->top_y()));
+       bv_->text->top_y(screen().topCursorVisible(bv_->text));
 
        switchKeyMap();
        owner_->busy(false);
@@ -617,7 +619,7 @@ void BufferView::Pimpl::update(LyXText * text, BufferView::UpdateCodes f)
                text->selection.cursor = text->cursor;
        }
 
-       text->fullRebreak();
+       text->partialRebreak();
 
        if (text->inset_owner) {
                text->inset_owner->setUpdateStatus(bv_, InsetText::NONE);
@@ -636,7 +638,7 @@ void BufferView::Pimpl::update(BufferView::UpdateCodes f)
                text->selection.cursor = text->cursor;
        }
 
-       text->fullRebreak();
+       text->partialRebreak();
 
        if (text->inset_owner) {
                text->inset_owner->setUpdateStatus(bv_, InsetText::NONE);
@@ -720,7 +722,7 @@ void BufferView::Pimpl::restorePosition(unsigned int i)
                        b = bufferlist.newBuffer(fname);
                        ::loadLyXFile(b, fname); // don't ask, just load it
                }
-               if (b != 0) 
+               if (b != 0)
                        buffer(b);
        }
 
@@ -1257,7 +1259,7 @@ bool BufferView::Pimpl::dispatch(FuncRequest const & ev_in)
                        // FIXME
                        if (arg.size() > 100 || arg.empty()) {
                                // Get word or selection
-                               bv_->getLyXText()->selectWordWhenUnderCursor(LyXText::WHOLE_WORD);
+                               bv_->getLyXText()->selectWordWhenUnderCursor(lyx::WHOLE_WORD);
                                arg = bv_->getLyXText()->selectionAsString(buffer_, false);
                                // FIXME: where is getLyXText()->unselect(bv_) ?
                        }