diff options
Diffstat (limited to 'src/translators/bibtexhandler.cpp')
-rw-r--r-- | src/translators/bibtexhandler.cpp | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/src/translators/bibtexhandler.cpp b/src/translators/bibtexhandler.cpp index e6c07fa..873dc27 100644 --- a/src/translators/bibtexhandler.cpp +++ b/src/translators/bibtexhandler.cpp @@ -103,7 +103,7 @@ TQString BibtexHandler::bibtexKey(const TQString& author_, const TQString& title TQString key; // if no comma, take the last word if(!author_.isEmpty()) { - if(author_.tqfind(',') == -1) { + if(author_.find(',') == -1) { key += author_.section(' ', -1).lower() + '-'; } else { // if there is a comma, take the string up to the first comma @@ -116,7 +116,7 @@ TQString BibtexHandler::bibtexKey(const TQString& author_, const TQString& title } key += year_; // bibtex key may only contain [0-9a-zA-Z-] - return key.tqreplace(s_badKeyChars, TQString()); + return key.replace(s_badKeyChars, TQString()); } void BibtexHandler::loadTranslationMaps() { @@ -155,7 +155,7 @@ TQString BibtexHandler::importText(char* text_) { TQString str = TQString::fromUtf8(text_); for(StringListMap::Iterator it = s_utf8LatexMap->begin(); it != s_utf8LatexMap->end(); ++it) { for(TQStringList::Iterator sit = it.data().begin(); sit != it.data().end(); ++sit) { - str.tqreplace(*sit, it.key()); + str.replace(*sit, it.key()); } } @@ -166,7 +166,7 @@ TQString BibtexHandler::importText(char* text_) { TQRegExp rx(TQString::tqfromLatin1("\\{([A-Z]+)\\}")); rx.setMinimal(true); - str.tqreplace(rx, TQString::tqfromLatin1("\\1")); + str.replace(rx, TQString::tqfromLatin1("\\1")); return str; } @@ -191,7 +191,7 @@ TQString BibtexHandler::exportText(const TQString& text_, const TQStringList& ma TQString text = text_; for(StringListMap::Iterator it = s_utf8LatexMap->begin(); it != s_utf8LatexMap->end(); ++it) { - text.tqreplace(it.key(), it.data()[0]); + text.replace(it.key(), it.data()[0]); } if(macros_.isEmpty()) { @@ -209,7 +209,7 @@ TQString BibtexHandler::exportText(const TQString& text_, const TQStringList& ma TQStringList tokens = TQStringList::split('#', text, true); for(TQStringList::Iterator it = tokens.begin(); it != tokens.end(); ++it) { // check to see if token is a macro - if(macros_.tqfindIndex((*it).stripWhiteSpace()) == -1) { + if(macros_.findIndex((*it).stripWhiteSpace()) == -1) { // the token is NOT a macro, add braces around whole words and also around capitals list << lquote + addBraces(*it) + rquote; } else { @@ -219,7 +219,7 @@ TQString BibtexHandler::exportText(const TQString& text_, const TQStringList& ma const TQChar octo = '#'; text = list.join(octo); - text.tqreplace(TQString(rquote)+octo+lquote, octo); + text.replace(TQString(rquote)+octo+lquote, octo); return text; } @@ -264,7 +264,7 @@ bool BibtexHandler::setFieldValue(Data::EntryPtr entry_, const TQString& bibtexF // special case keywords, replace commas with semi-colons so they get separated TQString value = value_; if(field->property(TQString::tqfromLatin1("bibtex")).startsWith(TQString::tqfromLatin1("keyword"))) { - value.tqreplace(',', ';'); + value.replace(',', ';'); // special case refbase bibtex export, with multiple keywords fields TQString oValue = entry_->field(field); if(!oValue.isEmpty()) { @@ -279,9 +279,9 @@ TQString& BibtexHandler::cleanText(TQString& text_) { // TQRegExp rx(TQString::tqfromLatin1("(?=[^\\\\])\\\\.+\\{")); TQRegExp rx(TQString::tqfromLatin1("\\\\.+\\{")); rx.setMinimal(true); - text_.tqreplace(rx, TQString()); - text_.tqreplace(TQRegExp(TQString::tqfromLatin1("[{}]")), TQString()); - text_.tqreplace('~', ' '); + text_.replace(rx, TQString()); + text_.replace(TQRegExp(TQString::tqfromLatin1("[{}]")), TQString()); + text_.replace('~', ' '); return text_; } |