mirror of
https://git.lyx.org/repos/lyx.git
synced 2025-01-07 09:46:54 +00:00
"Correct" way to prevent spellchecking in the ERT inset.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@2795 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
0e9148aa78
commit
506d970e27
@ -1,3 +1,8 @@
|
||||
2001-09-24 Angus Leeming <a.leeming@ic.ac.uk>
|
||||
|
||||
* text.C (selectNextWordToSpellcheck): reverted change to if-block.
|
||||
The ERT inset now returns string().
|
||||
|
||||
2001-09-21 Angus Leeming <a.leeming@ic.ac.uk>
|
||||
|
||||
* lyxtext.h, text.C (selectNextWord): renamed as
|
||||
|
@ -1,3 +1,8 @@
|
||||
2001-09-24 Angus Leeming <a.leeming@ic.ac.uk>
|
||||
|
||||
* insetert.[Ch] (selectNextWordToSpellcheck): new method.
|
||||
Returns string(), so nothing in an ERT inset is spellchecked.
|
||||
|
||||
2001-09-21 Angus Leeming <a.leeming@ic.ac.uk>
|
||||
|
||||
* various files (selectNextWord): renamed as
|
||||
|
@ -175,7 +175,7 @@ public:
|
||||
///
|
||||
void close(BufferView *) const;
|
||||
///
|
||||
string const selectNextWordToSpellcheck(BufferView * bv, float & value) const;
|
||||
string const selectNextWordToSpellcheck(BufferView *, float &) const;
|
||||
|
||||
void selectSelectedWord(BufferView * bv) {
|
||||
inset.selectSelectedWord(bv);
|
||||
|
@ -582,3 +582,10 @@ void InsetERT::close(BufferView * bv) const
|
||||
return;
|
||||
status(bv, Collapsed);
|
||||
}
|
||||
|
||||
|
||||
string const InsetERT::selectNextWordToSpellcheck(BufferView * bv,float &) const
|
||||
{
|
||||
bv->unlockInset(const_cast<InsetERT *>(this));
|
||||
return string();
|
||||
}
|
||||
|
@ -97,6 +97,8 @@ public:
|
||||
///
|
||||
void close(BufferView *) const;
|
||||
///
|
||||
string const selectNextWordToSpellcheck(BufferView *, float &) const;
|
||||
///
|
||||
bool inlined() const { return status_ == Inlined; }
|
||||
///
|
||||
int ascent(BufferView *, LyXFont const &) const;
|
||||
|
@ -2306,9 +2306,7 @@ string const LyXText::selectNextWordToSpellcheck(BufferView * bview,
|
||||
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())->lyxCode() !=
|
||||
Inset::ERT_CODE)))
|
||||
!cursor.par()->getInset(cursor.pos())->isTextInset()))
|
||||
|| (cursor.par()->size() == cursor.pos()
|
||||
&& cursor.par()->next()))
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user