return string();
}
- return text->selectNextWord(this, value);
+ return text->selectNextWordToSpellcheck(this, value);
}
+2001-09-21 Angus Leeming <a.leeming@ic.ac.uk>
+
+ * lyxtext.h, text.C (selectNextWord): renamed as
+ selectNextWordToSpellcheck.
+
+ * text.C (selectNextWordToSpellcheck): Modified to not select
+ words inside an ERT inset.
+
2001-09-21 Jean-Marc Lasgouttes <Jean-Marc.Lasgouttes@inria.fr>
* lyx_cb.C (MenuLayoutSave): change a bit the question
2001-09-21 Angus Leeming <a.leeming@ic.ac.uk>
+ * various files (selectNextWord): renamed as
+ selectNextWordToSpellcheck.
+
* insetgraphics.C (draw): remove the previous change. Right place
is in imageLoaderXPM.C.
(draw): don't display the image if params.display == NONE.
}
-string const UpdatableInset::selectNextWord(BufferView *bv,
+string const UpdatableInset::selectNextWordToSpellcheck(BufferView *bv,
float & value) const
{
// we have to unlock ourself in this function by default!
///
// needed for spellchecking text
///
- virtual string const selectNextWord(BufferView *, float & value) const;
+ virtual string const selectNextWordToSpellcheck(BufferView *, float & value) const;
///
virtual void selectSelectedWord(BufferView *) { return; }
///
}
-string const InsetCollapsable::selectNextWord(BufferView * bv,
+string const InsetCollapsable::selectNextWordToSpellcheck(BufferView * bv,
float & value) const
{
- string const str = inset.selectNextWord(bv, value);
+ string const str = inset.selectNextWordToSpellcheck(bv, value);
if (first_after_edit && str.empty())
close(bv);
first_after_edit = false;
///
void close(BufferView *) const;
///
- string const selectNextWord(BufferView * bv, float & value) const;
+ string const selectNextWordToSpellcheck(BufferView * bv, float & value) const;
void selectSelectedWord(BufferView * bv) {
inset.selectSelectedWord(bv);
}
-string const InsetTabular::selectNextWord(BufferView * bv, float & value) const
+string const InsetTabular::selectNextWordToSpellcheck(BufferView * bv, float & value) const
{
if (the_locking_inset) {
- string const str(the_locking_inset->selectNextWord(bv, value));
+ string const str(the_locking_inset->selectNextWordToSpellcheck(bv, value));
if (!str.empty())
return str;
if (tabular->IsLastCell(actcell)) {
// when entering this function the inset should be ALWAYS locked!
lyx::Assert(the_locking_inset);
- string const str(the_locking_inset->selectNextWord(bv, value));
+ string const str(the_locking_inset->selectNextWordToSpellcheck(bv, value));
if (!str.empty())
return str;
///
LyXCursor const & cursor(BufferView *) const;
///
- string const selectNextWord(BufferView *, float & value) const;
+ string const selectNextWordToSpellcheck(BufferView *, float & value) const;
void selectSelectedWord(BufferView *);
void toggleSelection(BufferView *, bool kill_selection);
///
}
-string const InsetText::selectNextWord(BufferView * bv, float & value) const
+string const InsetText::selectNextWordToSpellcheck(BufferView * bv, float & value) const
{
bool clear = false;
string str;
clear = true;
}
if (the_locking_inset) {
- str = the_locking_inset->selectNextWord(bv, value);
+ str = the_locking_inset->selectNextWordToSpellcheck(bv, value);
if (!str.empty()) {
value += cy(bv);
if (clear)
// we have to go on checking so move cusor to the right
lt->cursor.pos(lt->cursor.pos() + 1);
}
- str = lt->selectNextWord(bv, value);
+ str = lt->selectNextWordToSpellcheck(bv, value);
if (str.empty())
bv->unlockInset(const_cast<InsetText *>(this));
else
///
void paragraph(Paragraph *);
///
- string const selectNextWord(BufferView *, float & value) const;
+ string const selectNextWordToSpellcheck(BufferView *, float & value) const;
void selectSelectedWord(BufferView *);
void toggleSelection(BufferView *, bool kill_selection);
///
to the beginning of this word.
With SelectSelectedWord can this be highlighted really
*/
- string const selectNextWord(BufferView *, float & value) const;
+ string const selectNextWordToSpellcheck(BufferView *, float & value) const;
///
void selectSelectedWord(BufferView *);
///
// This function is only used by the spellchecker for NextWord().
// It doesn't handle LYX_ACCENTs and probably never will.
-string const LyXText::selectNextWord(BufferView * bview,
+string const LyXText::selectNextWordToSpellcheck(BufferView * bview,
float & value) const
{
if (the_locking_inset) {
- string str = the_locking_inset->selectNextWord(bview, value);
+ string str = the_locking_inset->selectNextWordToSpellcheck(bview, value);
if (!str.empty()) {
value += float(cursor.y())/float(height);
return str;
while ((cursor.par()->size() > cursor.pos()
&& (!cursor.par()->isLetter(cursor.pos()))
&& (!cursor.par()->isInset(cursor.pos()) ||
- !cursor.par()->getInset(cursor.pos())->isTextInset()))
+ !(cursor.par()->getInset(cursor.pos())->isTextInset() &&
+ cursor.par()->getInset(cursor.pos())->lyxCode() !=
+ Inset::ERT_CODE)))
|| (cursor.par()->size() == cursor.pos()
&& cursor.par()->next()))
- {
+ {
if (cursor.pos() == cursor.par()->size()) {
cursor.par(cursor.par()->next());
cursor.pos(0);
// now check if we hit an inset so it has to be a inset containing text!
if (cursor.pos() < cursor.par()->size() &&
- cursor.par()->isInset(cursor.pos()))
+ cursor.par()->isInset(cursor.pos()))
{
// lock the inset!
cursor.par()->getInset(cursor.pos())->edit(bview);
// now call us again to do the above trick
// but obviously we have to start from down below ;)
- return bview->text->selectNextWord(bview, value);
+ return bview->text->selectNextWordToSpellcheck(bview, value);
}
// Update the value if we changed paragraphs