summaryrefslogtreecommitdiffstats
path: root/quanta/parsers/dtd/dtd.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'quanta/parsers/dtd/dtd.cpp')
-rw-r--r--quanta/parsers/dtd/dtd.cpp60
1 files changed, 30 insertions, 30 deletions
diff --git a/quanta/parsers/dtd/dtd.cpp b/quanta/parsers/dtd/dtd.cpp
index 2783acca..5008dcff 100644
--- a/quanta/parsers/dtd/dtd.cpp
+++ b/quanta/parsers/dtd/dtd.cpp
@@ -51,7 +51,7 @@ TQStringList DTD::getTags()
AttributeList* DTD::getTagAttributes(TQString tag)
{
- return tagAttributes.tqfind(tag);
+ return tagAttributes.find(tag);
}
@@ -195,14 +195,14 @@ void DTD::parseDTDEntity(TQString line) {
TQString name;
TQString *value;
- line.tqreplace("\\end", " ");
+ line.replace("\\end", " ");
name = line.mid(11);
- int firstSpace = name.tqfind(' ');
+ int firstSpace = name.find(' ');
name = name.remove(firstSpace, name.length()-firstSpace);
value = new TQString(line.mid(11+firstSpace));
- value->remove(0, value->tqfind("\"")+1);
- value->remove(value->tqfindRev("\""), value->length());
+ value->remove(0, value->find("\"")+1);
+ value->remove(value->findRev("\""), value->length());
parseDTDReplace(value);
stripSpaces(value);
@@ -217,14 +217,14 @@ void DTD::parseDTDElement(const TQString &l) {
TQString *value;
TQString line = l;
- line.tqreplace("\\end", " ");
+ line.replace("\\end", " ");
name = line.mid(10);
- int firstSpace = name.tqfind(' ');
+ int firstSpace = name.find(' ');
name.remove(firstSpace, name.length()-firstSpace);
value = new TQString(line.mid(10+firstSpace));
- //value->remove(0, value->tqfind("\"")+1);
- value->remove(value->tqfind(">"), 10000);
+ //value->remove(0, value->find("\"")+1);
+ value->remove(value->find(">"), 10000);
parseDTDReplace(&name);
parseDTDReplace(value);
@@ -254,14 +254,14 @@ void DTD::parseDTDAttlist(const TQString &l) {
TQString *value;
TQString line = l;
- line.tqreplace("\\end", " ");
+ line.replace("\\end", " ");
name = line.mid(10);
- int firstSpace = name.tqfind(' ');
+ int firstSpace = name.find(' ');
name.remove(firstSpace, name.length()-firstSpace);
value = new TQString(line.mid(10+firstSpace));
- //value->remove(0, value->tqfind("\"")+1);
- value->remove(value->tqfind(">"), 10000);
+ //value->remove(0, value->find("\"")+1);
+ value->remove(value->find(">"), 10000);
parseDTDReplace(&name);
parseDTDReplace(value);
@@ -362,51 +362,51 @@ void DTD::parseTagAttributeValues(const TQString &name, TQString *value) {
void DTD::parseDTDReplace(TQString *value) {
int begin, end;
- begin = value->tqfind("%");
- end = value->tqfind(";");
+ begin = value->find("%");
+ end = value->find(";");
while (begin != -1 && end != -1) {
TQString replaceText = value->mid(begin+1, end-begin-1);
- TQString *replaceValue = entities.tqfind(replaceText);
+ TQString *replaceValue = entities.find(replaceText);
if (replaceValue != 0L) {
- value->tqreplace(begin, end-begin+1, *replaceValue);
+ value->replace(begin, end-begin+1, *replaceValue);
} else {
kdDebug(24000) << "Can not find entity: " << replaceText << endl;
return;
}
- begin = value->tqfind("%");
- end = value->tqfind(";");
+ begin = value->find("%");
+ end = value->find(";");
}
}
void DTD::stripSpaces(TQString *value) {
int index=-1;
- while ( (index=value->tqfind(' ',++index)) != -1 ) {
- if ( value->tqfindRev('(',index) != -1 && value->tqfind(')',index) != -1)
+ while ( (index=value->find(' ',++index)) != -1 ) {
+ if ( value->findRev('(',index) != -1 && value->find(')',index) != -1)
value->remove(index,1);
}
}
void DTD::removeComments(TQString &value) {
int begin, end;
- begin = value.tqfind("<!--");
- end = value.tqfind("-->",begin+2);
+ begin = value.find("<!--");
+ end = value.find("-->",begin+2);
while (begin != -1 && end != -1) {
value.remove(begin, end-begin+3);
- begin = value.tqfind("<!--");
- end = value.tqfind("-->",begin+2);
+ begin = value.find("<!--");
+ end = value.find("-->",begin+2);
}
- begin = value.tqfind("--");
- end = value.tqfind("--",begin+2);
+ begin = value.find("--");
+ end = value.find("--",begin+2);
while (begin != -1 && end != -1) {
value.remove(begin, end-begin+2);
- begin = value.tqfind("--");
- end = value.tqfind("--",begin+2);
+ begin = value.find("--");
+ end = value.find("--",begin+2);
}
- value.tqreplace(TQRegExp("<!>"), "");
+ value.replace(TQRegExp("<!>"), "");
}
bool DTD::parseDTD()