Skip to content

Commit 22aa70a

Browse files
committed
adapt to newer libfolia
1 parent ec22a93 commit 22aa70a

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

src/tokenize.cxx

+5-5
Original file line numberDiff line numberDiff line change
@@ -1001,7 +1001,7 @@ namespace Tokenizer {
10011001
// there is already text at thus level, bail out.
10021002
return;
10031003
}
1004-
if ( root->isSubClass( folia::Linebreak_t ) ){
1004+
if ( root->isSubClass<folia::Linebreak>() ){
10051005
// exception
10061006
return;
10071007
}
@@ -1218,7 +1218,7 @@ namespace Tokenizer {
12181218
}
12191219
else {
12201220
const folia::FoliaElement *par = el->parent();
1221-
if ( par->element_id() == folia::BASE ){
1221+
if ( par->isinstance<folia::FoLiA>() ){
12221222
// we went all up without avail...
12231223
return "";
12241224
}
@@ -1308,7 +1308,7 @@ namespace Tokenizer {
13081308
}
13091309
else if ( (tok.role & BEGINOFSENTENCE)
13101310
&& root != sent
1311-
&& root->element_id() == folia::Sentence_t ){
1311+
&& root->isinstance<folia::Sentence>() ){
13121312
// Ok, another Sentence in a quote
13131313
if ( i > 0 && !(toks[i-1].role & BEGINQUOTE) ){
13141314
// close the current one, and start a new one.
@@ -1434,7 +1434,7 @@ namespace Tokenizer {
14341434
args["set"] = root->doc()->default_set( folia::AnnotationType::PARAGRAPH );
14351435
args["xml:id"] = root->doc()->id() + ".p." + TiCC::toString(++p_count);
14361436
folia::Paragraph *p = new folia::Paragraph( args, root->doc() );
1437-
if ( root->element_id() == folia::Text_t ){
1437+
if ( root->isinstance<folia::Text>() ){
14381438
if ( tokDebug > 5 ){
14391439
DBG << "append_to_folia, add paragraph to Text" << endl;
14401440
}
@@ -1801,7 +1801,7 @@ namespace Tokenizer {
18011801
// multiple sentences. We need an extra Paragraph.
18021802
// But first check if this is allowed!
18031803
folia::FoliaElement *rt;
1804-
if ( e->acceptable(folia::Paragraph_t) ){
1804+
if ( e->acceptable<folia::Paragraph>() ){
18051805
folia::KWargs args;
18061806
string e_id = e->id();
18071807
if ( !e_id.empty() ){

0 commit comments

Comments
 (0)