]> git.lyx.org Git - lyx.git/blobdiff - src/BufferView_pimpl.C
Fix working of the spellchecker dialog with ispell when there are no
[lyx.git] / src / BufferView_pimpl.C
index 55018badf723cced18f4a37f9671f6358dbe267c..8bdaaff6bfc18e513421f11c5c6a5b2abc932d83 100644 (file)
@@ -208,6 +208,7 @@ void BufferView::Pimpl::buffer(Buffer * b)
                // hidden. This should go here because some dialogs (eg ToC)
                // require bv_->text.
                owner_->getDialogs()->updateBufferDependent(true);
+               workarea_.show();
                redraw();
                insetWakeup();
        } else {
@@ -366,10 +367,7 @@ int BufferView::Pimpl::resizeCurrentBuffer()
 
        /// clear the "Formatting Document" message 
        owner_->message("");
-       /// get rid of the splash screen if it's not gone already
-       owner_->getDialogs()->destroySplash();
+
        return 0;
 }
 
@@ -2738,7 +2736,7 @@ bool BufferView::Pimpl::Dispatch(kb_action action, string const & argument)
                if (floatList.typeExist(argument)) {
                        insertAndEditInset(new InsetFloat(argument));
                } else {
-                       lyxerr << "Non-existant float type: "
+                       lyxerr << "Non-existent float type: "
                               << argument << endl;
                }
                break;
@@ -2754,7 +2752,7 @@ bool BufferView::Pimpl::Dispatch(kb_action action, string const & argument)
                        else
                                delete new_inset;
                } else {
-                       lyxerr << "Non-existant float type: "
+                       lyxerr << "Non-existent float type: "
                               << argument << endl;
                }
                
@@ -2933,9 +2931,7 @@ bool BufferView::Pimpl::Dispatch(kb_action action, string const & argument)
                // The argument can be up to two tokens separated 
                // by a space. The first one is the bibstyle.
                string const db       = token(argument, ' ', 0);
-               string bibstyle = token(argument, ' ', 1);
-               if (bibstyle.empty())
-                       bibstyle = "plain";
+               string const bibstyle = token(argument, ' ', 1);
 
                InsetCommandParams p( "BibTeX", db, bibstyle );
                InsetBibtex * inset = new InsetBibtex(p);
@@ -2984,11 +2980,7 @@ bool BufferView::Pimpl::Dispatch(kb_action action, string const & argument)
                InsetCommandParams p("index");
                if (argument.empty()) {
                        string const idxstring(bv_->getLyXText()->getStringToIndex(bv_));
-                       if (!idxstring.empty()) {
-                               p.setContents(idxstring);
-                       } else {
-                               break;
-                       }
+                       p.setContents(idxstring);
                } else {
                        p.setContents(argument);
                }
@@ -3077,13 +3069,14 @@ bool BufferView::Pimpl::Dispatch(kb_action action, string const & argument)
                string arg = argument;
 
                if (arg.empty()) {
-                       arg = bv_->getLyXText()->selectionAsString(buffer_);
+                       arg = bv_->getLyXText()->selectionAsString(buffer_,
+                                                                  false);
  
                        // FIXME
                        if (arg.size() > 100 || arg.empty()) {
                                // Get word or selection
                                bv_->getLyXText()->selectWordWhenUnderCursor(bv_, LyXText::WHOLE_WORD);
-                               arg = bv_->getLyXText()->selectionAsString(buffer_);
+                               arg = bv_->getLyXText()->selectionAsString(buffer_, false);
                                // FIXME: where is getLyXText()->unselect(bv_) ?
                        }
                }
@@ -3245,6 +3238,8 @@ void BufferView::Pimpl::specialChar(InsetSpecialChar::Kind kind)
                InsetSpecialChar * new_inset = 
                        new InsetSpecialChar(kind);
                insertInset(new_inset);
+               // Ok, what happens here if we are unable to insert
+               // the inset? Leak it?
        }
 }