Use InsetCode.

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@20940 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Abdelrazak Younes 2007-10-13 09:48:18 +00:00
parent ee038db36d
commit 87b112496c
3 changed files with 11 additions and 5 deletions

View File

@ -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)

View File

@ -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<value_type>(META_INSET);

View File

@ -30,6 +30,7 @@ class FuncStatus;
class Inset;
class Color_color;
class Cursor;
class Lexer;
class PainterInfo;
class Spacing;