From: Abdelrazak Younes Date: Sat, 13 Oct 2007 09:48:18 +0000 (+0000) Subject: Use InsetCode. X-Git-Tag: 1.6.10~7856 X-Git-Url: https://git.lyx.org/gitweb/?a=commitdiff_plain;h=87b112496c8befc87225f9a5171f4451e3502a4c;p=features.git Use InsetCode. git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@20940 a592a061-630c-0410-9148-cb99ea01b6c8 --- diff --git a/src/Paragraph.cpp b/src/Paragraph.cpp index df3805d733..71684202ed 100644 --- a/src/Paragraph.cpp +++ b/src/Paragraph.cpp @@ -2429,6 +2429,13 @@ void Paragraph::simpleDocBookOnePar(Buffer const & buf, } +bool Paragraph::isHfill(pos_type pos) const +{ + return isInset(pos) + && getInset(pos)->lyxCode() == HFILL_CODE; +} + + bool Paragraph::isNewline(pos_type pos) const { return isInset(pos) diff --git a/src/Paragraph.h b/src/Paragraph.h index 45e460a899..9059e2963a 100644 --- a/src/Paragraph.h +++ b/src/Paragraph.h @@ -20,7 +20,7 @@ #include "InsetList.h" #include "lyxlayout_ptr_fwd.h" -#include "insets/Inset.h" // only for InsetCode +#include "insets/InsetCode.h" namespace lyx { @@ -318,10 +318,8 @@ public: } /// - bool isHfill(pos_type pos) const { - return isInset(pos) - && getInset(pos)->lyxCode() == HFILL_CODE; - } + bool isHfill(pos_type pos) const; + /// hinted by profiler bool isInset(pos_type pos) const { return getChar(pos) == static_cast(META_INSET); diff --git a/src/Text.h b/src/Text.h index 0c432f8d9b..b542c36a15 100644 --- a/src/Text.h +++ b/src/Text.h @@ -30,6 +30,7 @@ class FuncStatus; class Inset; class Color_color; class Cursor; +class Lexer; class PainterInfo; class Spacing;