mirror of
https://git.lyx.org/repos/lyx.git
synced 2025-01-09 02:28:19 +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>
|
2001-09-21 Angus Leeming <a.leeming@ic.ac.uk>
|
||||||
|
|
||||||
* lyxtext.h, text.C (selectNextWord): renamed as
|
* 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>
|
2001-09-21 Angus Leeming <a.leeming@ic.ac.uk>
|
||||||
|
|
||||||
* various files (selectNextWord): renamed as
|
* various files (selectNextWord): renamed as
|
||||||
|
@ -175,7 +175,7 @@ public:
|
|||||||
///
|
///
|
||||||
void close(BufferView *) const;
|
void close(BufferView *) const;
|
||||||
///
|
///
|
||||||
string const selectNextWordToSpellcheck(BufferView * bv, float & value) const;
|
string const selectNextWordToSpellcheck(BufferView *, float &) const;
|
||||||
|
|
||||||
void selectSelectedWord(BufferView * bv) {
|
void selectSelectedWord(BufferView * bv) {
|
||||||
inset.selectSelectedWord(bv);
|
inset.selectSelectedWord(bv);
|
||||||
|
@ -582,3 +582,10 @@ void InsetERT::close(BufferView * bv) const
|
|||||||
return;
|
return;
|
||||||
status(bv, Collapsed);
|
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;
|
void close(BufferView *) const;
|
||||||
///
|
///
|
||||||
|
string const selectNextWordToSpellcheck(BufferView *, float &) const;
|
||||||
|
///
|
||||||
bool inlined() const { return status_ == Inlined; }
|
bool inlined() const { return status_ == Inlined; }
|
||||||
///
|
///
|
||||||
int ascent(BufferView *, LyXFont const &) const;
|
int ascent(BufferView *, LyXFont const &) const;
|
||||||
|
@ -2306,9 +2306,7 @@ string const LyXText::selectNextWordToSpellcheck(BufferView * bview,
|
|||||||
while ((cursor.par()->size() > cursor.pos()
|
while ((cursor.par()->size() > cursor.pos()
|
||||||
&& (!cursor.par()->isLetter(cursor.pos()))
|
&& (!cursor.par()->isLetter(cursor.pos()))
|
||||||
&& (!cursor.par()->isInset(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()->size() == cursor.pos()
|
||||||
&& cursor.par()->next()))
|
&& cursor.par()->next()))
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user