ultimatepp/uppdev/Parser/test.cpp
cxl 132e974caf License fixes
git-svn-id: svn://ultimatepp.org/upp/trunk@501 f0d560ea-af0d-0410-9eb7-867de7ffcac7
2008-10-02 10:30:18 +00:00

29 lines
605 B
C++

#include <RichEdit/RichEdit.h>
struct FindBrokenRefIterator : RichTxt::Iterator {
int cursor;
Uuid itemstyle;
virtual bool operator()(int pos, const RichPara& para)
{
if(pos >= cursor) {
if(para.format.label != "noref") {
if(IsNull(para.format.label))
return true;
String nest;
String key;
if(!SplitNestKey(para.format.label, nest, key))
return true;
int q = BrowserBase().Find(nest);
if(q < 0 || BrowserBase()[q].key.Find(key) < 0)
return true;
}
cursor = pos;
}
return false;
}
FindBrokenRefIterator() {
}
};