+2003-09-16 Angus Leeming <leeming@lyx.org>
+
+ * paragraph.C (IsInsetChar): new function in namespace anon, moved out of
+ support/textutils.h.
+ (isWord): move the contents of support/textutils.h's IsWordChar here.
+
+ * buffer.C:
+ * lyxfind.C:
+ * rowpainter.C:
+ * text.C:
+ * text2.C: add #include "paragraph.h".
+
+ * rowpainter.C:
+ * text.C: replace IsInsetChar(c) with a direct test of Paragraph::META_INSET.
+
2003-09-16 Lars Gullik Bjønnes <larsbj@gullik.net>
* main.C:
#include "lyxrc.h"
#include "lyxvc.h"
#include "messages.h"
+#include "paragraph.h"
#include "paragraph_funcs.h"
#include "ParagraphParameters.h"
#include "sgml.h"
#include "BufferView.h"
#include "gettext.h"
#include "lyxtext.h"
+#include "paragraph.h"
#include "frontends/Alert.h"
}
+namespace {
+
+/// return true if the char is a meta-character for an inset
+inline
+bool IsInsetChar(char c)
+{
+ return (c == Paragraph::META_INSET);
+}
+
+} // namespace anon
+
bool Paragraph::isHfill(pos_type pos) const
bool Paragraph::isWord(pos_type pos) const
{
- return IsWordChar(getChar(pos)) ;
+ unsigned char const c = getChar(pos);
+ return !(IsSeparatorChar(c)
+ || IsKommaChar(c)
+ || IsInsetChar(c));
}
#include "lyxrow.h"
#include "lyxrow_funcs.h"
#include "metricsinfo.h"
+#include "paragraph.h"
#include "paragraph_funcs.h"
#include "ParagraphParameters.h"
#include "vspace.h"
char const c = pit_->getChar(pos);
- if (IsInsetChar(c)) {
+ if (c == Paragraph::META_INSET) {
paintInset(pos);
++vpos;
paintForeignMark(orig_x, orig_font);
+2003-09-16 Angus Leeming <leeming@lyx.org>
+
+ * textutils.h: remove #include "paragraph.h". Remove functions IsInsetChar
+ and IsWordChar.
+
2003-09-15 Angus Leeming <leeming@lyx.org>
* copied_ptr.h: re-jig to something that resembles Herb Sutter's HolderPtr ---
#ifndef TEXTUTILS_H
#define TEXTUTILS_H
-#include "paragraph.h"
-
/// return true if the char is a word separator
inline
bool IsSeparatorChar(char c)
}
-/// return true if the char is a meta-character for an inset
-inline
-bool IsInsetChar(char c)
-{
- return (c == Paragraph::META_INSET);
-}
-
-
/// return true if the char is "punctuation"
inline
bool IsKommaChar(char c)
}
-/// return true if the char forms part of a word
-inline
-bool IsWordChar(unsigned char c)
-{
- return !(IsSeparatorChar(c)
- || IsKommaChar(c)
- || IsInsetChar(c));
-}
-
-
/// completely pointless FIXME
inline
bool IsDigit(unsigned char ch)
#include "lyxrc.h"
#include "lyxrow.h"
#include "lyxrow_funcs.h"
+#include "paragraph.h"
#include "paragraph_funcs.h"
#include "ParagraphParameters.h"
#include "rowpainter.h"
continue;
}
unsigned char c = pit->getChar(pos);
- if (!IsInsetChar(c)) {
+ if (c != Paragraph::META_INSET) {
switch (action) {
case text_lowercase:
c = lowercase(c);
#include "lyxrow.h"
#include "lyxrow_funcs.h"
#include "metricsinfo.h"
+#include "paragraph.h"
#include "paragraph_funcs.h"
#include "ParagraphParameters.h"
#include "undo_funcs.h"