#include "buffer.h"
#include "gettext.h"
+using lyx::pos_type;
+
+
///
// locally used enum
///
/// returns true if the specified string is at the specified position
-bool IsStringInText(Paragraph * par, Paragraph::pos_type pos,
+bool IsStringInText(Paragraph * par, pos_type pos,
string const & str, bool const & = true,
bool const & = false);
else {
text = bv->getLyXText();
Paragraph * par = text->cursor.par();
- Paragraph::pos_type pos = text->cursor.pos();
+ pos_type pos = text->cursor.pos();
if (forward) {
if (pos < par->size() - 1)
++pos;
// returns true if the specified string is at the specified position
-bool IsStringInText(Paragraph * par, Paragraph::pos_type pos,
+bool IsStringInText(Paragraph * par, pos_type pos,
string const & str, bool const & cs,
bool const & mw)
{
return false;
string::size_type size = str.length();
- Paragraph::pos_type i = 0;
+ pos_type i = 0;
while (((pos + i) < par->size())
&& (string::size_type(i) < size)
&& (cs ? (str[i] == par->getChar(pos + i))
if (!mw)
return true;
if ((pos <= 0 || !IsLetterCharOrDigit(par->getChar(pos - 1)))
- && (pos + Paragraph::pos_type(size) >= par->size()
+ && (pos + pos_type(size) >= par->size()
|| !IsLetterCharOrDigit(par->getChar(pos + size)))) {
return true;
}
bool const & cs, bool const & mw)
{
Paragraph * par = text->cursor.par();
- Paragraph::pos_type pos = text->cursor.pos();
+ pos_type pos = text->cursor.pos();
UpdatableInset * inset;
while (par && !IsStringInText(par, pos, str, cs, mw)) {
bool const & cs, bool const & mw)
{
Paragraph * par = text->cursor.par();
- Paragraph::pos_type pos = text->cursor.pos();
+ pos_type pos = text->cursor.pos();
do {
if (pos > 0)