]> git.lyx.org Git - lyx.git/blobdiff - src/BufferView_pimpl.C
fix linking problem with boost
[lyx.git] / src / BufferView_pimpl.C
index eeb0c4383a0ed51847c71ec2faecbed2428a9b9a..a191d219d9d23c57737d4c10d78f9c0a24ab7080 100644 (file)
@@ -297,6 +297,8 @@ int BufferView::Pimpl::resizeCurrentBuffer()
                        //      bv_->text->owner(bv_);
                        if (lyxerr.debugging())
                                textcache.show(lyxerr, "resizeCurrentBuffer");
+                       buffer_->resizeInsets(bv_);
                } else {
                        bv_->text = new LyXText(bv_);
                        bv_->text->init(bv_);
@@ -393,11 +395,12 @@ void BufferView::Pimpl::scroll(int lines)
        LyXText const * t = bv_->text;
        int const line_height = t->defaultHeight();
 
-       int const disp = lines * line_height;
+       // The new absolute coordinate
+       int new_first_y = t->first_y + lines * line_height;
 
        // Restrict to a valid value
-       int new_first_y = std::min(t->height - 4 * line_height, disp);
-       new_first_y = std::max(0, disp);
+       new_first_y = std::min(t->height - 4 * line_height, new_first_y);
+       new_first_y = std::max(0, new_first_y);
 
        scrollDocView(new_first_y);
 
@@ -602,10 +605,6 @@ void BufferView::Pimpl::cursorToggle()
                return;
        }
 
-       /* FIXME */
-       extern void reapSpellchecker(void);
-       reapSpellchecker();
-
        if (!bv_->theLockingInset()) {
                screen().cursorToggle(bv_);
        } else {
@@ -641,7 +640,7 @@ void BufferView::Pimpl::savePosition(unsigned int i)
        if (i > 0) {
                ostringstream str;
                str << _("Saved bookmark") << ' ' << i;
-               owner_->message(str.str().c_str());
+               owner_->message(STRCONV(str.str()));
        }
 }
 
@@ -673,7 +672,7 @@ void BufferView::Pimpl::restorePosition(unsigned int i)
        if (i > 0) {
                ostringstream str;
                str << _("Moved to bookmark") << ' ' << i;
-               owner_->message(str.str().c_str());
+               owner_->message(STRCONV(str.str()));
        }
 }
 
@@ -882,18 +881,18 @@ void BufferView::Pimpl::MenuInsertLyXFile(string const & filen)
        ostringstream s1;
        s1 << _("Inserting document") << ' '
           << disp_fn << " ...";
-       owner_->message(s1.str().c_str());
+       owner_->message(STRCONV(s1.str()));
        bool const res = bv_->insertLyXFile(filename);
        if (res) {
                ostringstream str;
                str << _("Document") << ' ' << disp_fn
                    << ' ' << _("inserted.");
-               owner_->message(str.str().c_str());
+               owner_->message(STRCONV(str.str()));
        } else {
                ostringstream str;
                str << _("Could not insert document") << ' '
                    << disp_fn;
-               owner_->message(str.str().c_str());
+               owner_->message(STRCONV(str.str()));
        }
 }
 
@@ -911,7 +910,7 @@ bool BufferView::Pimpl::dispatch(FuncRequest const & ev)
        // e.g. Qt mouse press when no buffer
        if (!buffer_)
                return false;
+
        LyXTextClass const & tclass = buffer_->params.getLyXTextClass();
 
        switch (ev.action) {
@@ -1129,7 +1128,7 @@ bool BufferView::Pimpl::dispatch(FuncRequest const & ev)
                        inset->setLoadingBuffer(bv_->buffer(), false);
                        updateInset(inset, true);
                }
-               
+
        }
        break;
 
@@ -1178,7 +1177,7 @@ bool BufferView::Pimpl::dispatch(FuncRequest const & ev)
        {
                InsetBibtex * inset =
                        static_cast<InsetBibtex*>(getInsetByCode(Inset::BIBTEX_CODE));
-               if (inset) 
+               if (inset)
                        inset->setOptions(ev.argument);
        }
        break;