summaryrefslogtreecommitdiffstats
path: root/lib/kformula
diff options
context:
space:
mode:
Diffstat (limited to 'lib/kformula')
-rw-r--r--lib/kformula/basicelement.cc18
-rw-r--r--lib/kformula/fontstyle.cc6
-rw-r--r--lib/kformula/formulacursor.cc2
-rw-r--r--lib/kformula/formulacursor.h2
-rw-r--r--lib/kformula/formulaelement.cc2
-rw-r--r--lib/kformula/kformulacommand.cc4
-rw-r--r--lib/kformula/kformulacommand.h2
-rw-r--r--lib/kformula/kformulaconfigpage.cc10
-rw-r--r--lib/kformula/kformuladocument.cc6
-rw-r--r--lib/kformula/kformulamathmlread.cc2
-rw-r--r--lib/kformula/matrixelement.cc26
-rw-r--r--lib/kformula/oasiscreationstrategy.cc2
-rw-r--r--lib/kformula/paddedelement.cc26
-rw-r--r--lib/kformula/prototype/gensymbolfontmap.py2
-rwxr-xr-xlib/kformula/prototype/unicode.py2
-rwxr-xr-xlib/kformula/scripts/bycodes.py10
-rwxr-xr-xlib/kformula/scripts/bynames.py8
-rwxr-xr-xlib/kformula/scripts/oper-dict.py8
-rw-r--r--lib/kformula/sequenceelement.cc20
-rw-r--r--lib/kformula/sequenceelement.h2
-rw-r--r--lib/kformula/sequenceparser.cc2
-rw-r--r--lib/kformula/symboltable.cc6
-rw-r--r--lib/kformula/symboltable.h2
23 files changed, 85 insertions, 85 deletions
diff --git a/lib/kformula/basicelement.cc b/lib/kformula/basicelement.cc
index da961df3..1d36193a 100644
--- a/lib/kformula/basicelement.cc
+++ b/lib/kformula/basicelement.cc
@@ -289,39 +289,39 @@ TQString BasicElement::toLatex()
*/
double BasicElement::getSize( const TQString& str, SizeType* st )
{
- int index = str.tqfind( "%" );
+ int index = str.find( "%" );
if ( index != -1 ) {
return str2size( str, st, index, RelativeSize ) / 100.0;
}
- index = str.tqfind( "pt", 0, false );
+ index = str.find( "pt", 0, false );
if ( index != -1 ) {
return str2size( str, st, index, AbsoluteSize );
}
- index = str.tqfind( "mm", 0, false );
+ index = str.find( "mm", 0, false );
if ( index != -1 ) {
return str2size( str, st, index, AbsoluteSize ) * 72.0 / 20.54;
}
- index = str.tqfind( "cm", 0, false );
+ index = str.find( "cm", 0, false );
if ( index != -1 ) {
return str2size( str, st, index, AbsoluteSize ) * 72.0 / 2.54;
}
- index = str.tqfind( "in", 0, false );
+ index = str.find( "in", 0, false );
if ( index != -1 ) {
return str2size( str, st, index, AbsoluteSize ) * 72.0;
}
- index = str.tqfind( "em", 0, false );
+ index = str.find( "em", 0, false );
if ( index != -1 ) {
return str2size( str, st, index, RelativeSize );
}
- index = str.tqfind( "ex", 0, false );
+ index = str.find( "ex", 0, false );
if ( index != -1 ) {
return str2size( str, st, index, RelativeSize );
}
- index = str.tqfind( "pc", 0, false );
+ index = str.find( "pc", 0, false );
if ( index != -1 ) {
return str2size( str, st, index, AbsoluteSize ) * 12.0;
}
- index = str.tqfind( "px", 0, false );
+ index = str.find( "px", 0, false );
if ( index != -1 ) {
return str2size( str, st, index, PixelSize );
}
diff --git a/lib/kformula/fontstyle.cc b/lib/kformula/fontstyle.cc
index 57088fef..0e37028a 100644
--- a/lib/kformula/fontstyle.cc
+++ b/lib/kformula/fontstyle.cc
@@ -56,11 +56,11 @@ public:
const TQStringList lst = db.tqfamilies();
for ( TQStringList::const_iterator it = lst.begin(), end = lst.end() ; it != end ; ++it ) {
const TQString name = *it;
- int i = name.tqfind('[');
+ int i = name.find('[');
TQString family = name;
// Remove foundry
if ( i > -1 ) {
- const int li = name.tqfindRev(']');
+ const int li = name.findRev(']');
if (i < li) {
if (name[i - 1] == ' ')
i--;
@@ -71,7 +71,7 @@ public:
}
}
bool hasFont( const TQString& fontName ) const {
- return m_fontNames.tqfind( fontName ) != m_fontNames.end();
+ return m_fontNames.find( fontName ) != m_fontNames.end();
}
TQStringList m_fontNames;
};
diff --git a/lib/kformula/formulacursor.cc b/lib/kformula/formulacursor.cc
index 6545b18c..b406a002 100644
--- a/lib/kformula/formulacursor.cc
+++ b/lib/kformula/formulacursor.cc
@@ -403,7 +403,7 @@ BasicElement* FormulaCursor::replaceByMainChildContent(Direction direction)
/**
- * Trys to find the element we are the main child of and tqreplace
+ * Trys to find the element we are the main child of and replace
* it with our content.
*
* This is simply another form of replaceByMainChildContent. You
diff --git a/lib/kformula/formulacursor.h b/lib/kformula/formulacursor.h
index 1aa5d8bf..9843abfa 100644
--- a/lib/kformula/formulacursor.h
+++ b/lib/kformula/formulacursor.h
@@ -182,7 +182,7 @@ public:
BasicElement* replaceByMainChildContent(Direction = beforeCursor);
/**
- * Trys to find the element we are the main child of and tqreplace
+ * Trys to find the element we are the main child of and replace
* it with our content.
*
* This is simply another form of replaceByMainChildContent. You
diff --git a/lib/kformula/formulaelement.cc b/lib/kformula/formulaelement.cc
index 29ae7cdd..19081093 100644
--- a/lib/kformula/formulaelement.cc
+++ b/lib/kformula/formulaelement.cc
@@ -282,7 +282,7 @@ void FormulaElement::convertNames( TQDomNode node )
TQDomNode sequence = node.parentNode();
TQDomDocument doc = sequence.ownerDocument();
TQDomElement nameseq = doc.createElement( "NAMESEQUENCE" );
- sequence.tqreplaceChild( nameseq, node );
+ sequence.replaceChild( nameseq, node );
bool inName = true;
while ( inName ) {
diff --git a/lib/kformula/kformulacommand.cc b/lib/kformula/kformulacommand.cc
index 2a5e7ddd..178ec399 100644
--- a/lib/kformula/kformulacommand.cc
+++ b/lib/kformula/kformulacommand.cc
@@ -207,7 +207,7 @@ void KFCAddToken::execute()
BasicElement* current = cursor->getElement();
while ( (element = it.current()) != 0 ) {
element->goInside( cursor );
- cursor->insert( *contentList.tqfind( element ), beforeCursor );
+ cursor->insert( *contentList.find( element ), beforeCursor );
++it;
}
setUnexecuteCursor( cursor );
@@ -249,7 +249,7 @@ void KFCAddToken::addToken( BasicElement* element )
{
tokenList.append( element );
contentList.insert( element, new TQPtrList< BasicElement > );
- contentList.tqfind( element )->setAutoDelete( true );
+ contentList.find( element )->setAutoDelete( true );
}
KFCReplaceToken::KFCReplaceToken(const TQString &name, Container* document)
diff --git a/lib/kformula/kformulacommand.h b/lib/kformula/kformulacommand.h
index 8b1d2555..a63053d7 100644
--- a/lib/kformula/kformulacommand.h
+++ b/lib/kformula/kformulacommand.h
@@ -256,7 +256,7 @@ public:
* Collect content for each token
*/
void addContent( BasicElement* element, BasicElement* content ) {
- contentList.tqfind( element )->append( content );
+ contentList.find( element )->append( content );
}
diff --git a/lib/kformula/kformulaconfigpage.cc b/lib/kformula/kformulaconfigpage.cc
index 143ce49d..add9c840 100644
--- a/lib/kformula/kformulaconfigpage.cc
+++ b/lib/kformula/kformulaconfigpage.cc
@@ -451,7 +451,7 @@ void ConfigurePage::slotChanged()
// TQValueVector<TQString>::iterator MathFontsConfigurePage::findUsedFont( TQString name )
// {
-// return std::tqfind( usedFontList.begin(), usedFontList.end(), name );
+// return std::find( usedFontList.begin(), usedFontList.end(), name );
// }
// void MathFontsConfigurePage::setupLists( const TQStringList& usedFonts )
@@ -463,7 +463,7 @@ void ConfigurePage::slotChanged()
// // symbolTable.findAvailableFonts( &fontMap );
// for ( TQStringList::const_iterator it = usedFonts.begin(); it != usedFonts.end(); ++it ) {
-// TQMap<TQString, TQString>::iterator font = fontMap.tqfind( *it );
+// TQMap<TQString, TQString>::iterator font = fontMap.find( *it );
// if ( font != fontMap.end() ) {
// fontMap.erase( font );
// new UsedFontItem( this, requestedFonts, *it );
@@ -493,7 +493,7 @@ void ConfigurePage::slotChanged()
// TQListViewItem* fontItem = requestedFonts->selectedItem();
// if ( fontItem ) {
// TQString fontName = fontItem->text( 0 );
-// TQValueVector<TQString>::iterator it = std::tqfind( usedFontList.begin(), usedFontList.end(), fontName );
+// TQValueVector<TQString>::iterator it = std::find( usedFontList.begin(), usedFontList.end(), fontName );
// if ( it != usedFontList.end() ) {
// usedFontList.erase( it );
// }
@@ -508,7 +508,7 @@ void ConfigurePage::slotChanged()
// TQListViewItem* fontItem = requestedFonts->selectedItem();
// if ( fontItem ) {
// TQString fontName = fontItem->text( 0 );
-// TQValueVector<TQString>::iterator it = std::tqfind( usedFontList.begin(), usedFontList.end(), fontName );
+// TQValueVector<TQString>::iterator it = std::find( usedFontList.begin(), usedFontList.end(), fontName );
// if ( it != usedFontList.end() ) {
// uint pos = it - usedFontList.begin();
// if ( pos > 0 ) {
@@ -525,7 +525,7 @@ void ConfigurePage::slotChanged()
// TQListViewItem* fontItem = requestedFonts->selectedItem();
// if ( fontItem ) {
// TQString fontName = fontItem->text( 0 );
-// TQValueVector<TQString>::iterator it = std::tqfind( usedFontList.begin(), usedFontList.end(), fontName );
+// TQValueVector<TQString>::iterator it = std::find( usedFontList.begin(), usedFontList.end(), fontName );
// if ( it != usedFontList.end() ) {
// uint pos = it - usedFontList.begin();
// if ( pos < usedFontList.size()-1 ) {
diff --git a/lib/kformula/kformuladocument.cc b/lib/kformula/kformuladocument.cc
index 3a19ac70..228b4017 100644
--- a/lib/kformula/kformuladocument.cc
+++ b/lib/kformula/kformuladocument.cc
@@ -106,7 +106,7 @@ TQPtrListIterator<Container> Document::formulas()
int Document::formulaPos( Container* formula )
{
- return formulae.tqfind( formula );
+ return formulae.find( formula );
}
@@ -968,7 +968,7 @@ void DocumentWrapper::makeGreek()
void DocumentWrapper::insertSymbol()
{
if ( hasFormula() &&
- m_document->m_contextStyle->symbolTable().tqcontains( m_selectedName ) ) {
+ m_document->m_contextStyle->symbolTable().contains( m_selectedName ) ) {
TQChar ch = m_document->m_contextStyle->symbolTable().tqunicode( m_selectedName );
if ( ch != TQChar::null ) {
TextCharRequest r( ch, true );
@@ -984,7 +984,7 @@ void DocumentWrapper::insertSymbol()
void DocumentWrapper::insertSymbol( TQString name )
{
if ( hasFormula() ) {
- if ( m_document->m_contextStyle->symbolTable().tqcontains( name ) ) {
+ if ( m_document->m_contextStyle->symbolTable().contains( name ) ) {
TQChar ch = m_document->m_contextStyle->symbolTable().tqunicode( name );
if ( ch != TQChar::null ) {
TextCharRequest r( ch, true );
diff --git a/lib/kformula/kformulamathmlread.cc b/lib/kformula/kformulamathmlread.cc
index f42e3ae1..fd3e43d2 100644
--- a/lib/kformula/kformulamathmlread.cc
+++ b/lib/kformula/kformulamathmlread.cc
@@ -1475,7 +1475,7 @@ bool MathML2KFormula::processElement( TQDomNode node, TQDomDocument& doc, TQDomN
TQDomNode n = element.firstChild();
TQDomElement op = n.toElement();
uint count = element.childNodes().count();
- //adding explicit brackets to tqreplace "apply"s implicit ones
+ //adding explicit brackets to replace "apply"s implicit ones
TQDomElement brackets = doc.createElement("BRACKET");
brackets.setAttribute("RIGHT", "41");
brackets.setAttribute("LEFT", "40");
diff --git a/lib/kformula/matrixelement.cc b/lib/kformula/matrixelement.cc
index 38020904..56062dcd 100644
--- a/lib/kformula/matrixelement.cc
+++ b/lib/kformula/matrixelement.cc
@@ -866,22 +866,22 @@ bool MatrixElement::readAttributesFromMathMLDom( const TQDomElement& element )
TQString alignStr = element.attribute( "align" ).lower();
if ( ! alignStr.isNull() ) {
- if ( alignStr.tqfind( "top" ) != -1 ) {
+ if ( alignStr.find( "top" ) != -1 ) {
m_align = TopAlign;
}
- else if ( alignStr.tqfind( "bottom" ) != -1 ) {
+ else if ( alignStr.find( "bottom" ) != -1 ) {
m_align = BottomAlign;
}
- else if ( alignStr.tqfind( "center" ) != -1 ) {
+ else if ( alignStr.find( "center" ) != -1 ) {
m_align = CenterAlign;
}
- else if ( alignStr.tqfind( "baseline" ) != -1 ) {
+ else if ( alignStr.find( "baseline" ) != -1 ) {
m_align = BaselineAlign;
}
- else if ( alignStr.tqfind( "axis" ) != -1 ) {
+ else if ( alignStr.find( "axis" ) != -1 ) {
m_align = AxisAlign;
}
- int index = alignStr.tqfindRev( ' ' );
+ int index = alignStr.findRev( ' ' );
if ( index != -1 ) {
m_rowNumber = alignStr.right( index + 1 ).toInt();
}
@@ -1891,7 +1891,7 @@ void KFCNewLine::execute()
{
FormulaCursor* cursor = getExecuteCursor();
MultilineElement* tqparent = static_cast<MultilineElement*>( m_line->getParent() );
- int linePos = tqparent->content.tqfind( m_line );
+ int linePos = tqparent->content.find( m_line );
tqparent->content.insert( linePos+1, m_newline );
// If there are tqchildren to be moved.
@@ -1926,7 +1926,7 @@ void KFCNewLine::unexecute()
{
FormulaCursor* cursor = getExecuteCursor();
MultilineElement* tqparent = static_cast<MultilineElement*>( m_line->getParent() );
- int linePos = tqparent->content.tqfind( m_line );
+ int linePos = tqparent->content.find( m_line );
// Now the command owns the new line again.
m_newline = tqparent->content.at( linePos+1 );
@@ -2225,7 +2225,7 @@ void MultilineElement::moveLeft( FormulaCursor* cursor, BasicElement* from )
else {
// Coming from one of the lines we go to the previous line
// or to the tqparent if there is none.
- int pos = content.tqfind( static_cast<MultilineSequenceElement*>( from ) );
+ int pos = content.find( static_cast<MultilineSequenceElement*>( from ) );
if ( pos > -1 ) {
if ( pos > 0 ) {
content.at( pos-1 )->moveLeft( cursor, this );
@@ -2252,7 +2252,7 @@ void MultilineElement::moveRight( FormulaCursor* cursor, BasicElement* from )
content.at( 0 )->moveRight(cursor, this);
}
else {
- int pos = content.tqfind( static_cast<MultilineSequenceElement*>( from ) );
+ int pos = content.find( static_cast<MultilineSequenceElement*>( from ) );
if ( pos > -1 ) {
uint upos = pos;
if ( upos < content.count() ) {
@@ -2287,7 +2287,7 @@ void MultilineElement::moveUp( FormulaCursor* cursor, BasicElement* from )
else {
// Coming from one of the lines we go to the previous line
// or to the tqparent if there is none.
- int pos = content.tqfind( static_cast<MultilineSequenceElement*>( from ) );
+ int pos = content.find( static_cast<MultilineSequenceElement*>( from ) );
if ( pos > -1 ) {
if ( pos > 0 ) {
//content.at( pos-1 )->moveLeft( cursor, this );
@@ -2343,7 +2343,7 @@ void MultilineElement::moveDown( FormulaCursor* cursor, BasicElement* from )
content.at( 0 )->moveRight(cursor, this);
}
else {
- int pos = content.tqfind( static_cast<MultilineSequenceElement*>( from ) );
+ int pos = content.find( static_cast<MultilineSequenceElement*>( from ) );
if ( pos > -1 ) {
uint upos = pos;
if ( upos < content.count() ) {
@@ -2566,7 +2566,7 @@ SequenceElement* MultilineElement::getMainChild()
void MultilineElement::selectChild(FormulaCursor* cursor, BasicElement* child)
{
- int pos = content.tqfind( dynamic_cast<MultilineSequenceElement*>( child ) );
+ int pos = content.find( dynamic_cast<MultilineSequenceElement*>( child ) );
if ( pos > -1 ) {
cursor->setTo( this, pos );
//content.at( pos )->moveRight( cursor, this );
diff --git a/lib/kformula/oasiscreationstrategy.cc b/lib/kformula/oasiscreationstrategy.cc
index 9f7949cb..7d7a65cc 100644
--- a/lib/kformula/oasiscreationstrategy.cc
+++ b/lib/kformula/oasiscreationstrategy.cc
@@ -185,7 +185,7 @@ BasicElement* OasisCreationStrategy::createOperatorElement( const TQDomElement&
}
if ( n.isText() ) {
TQString text = n.toText().data();
- if ( text.length() == 1 && TQString("()[]{}").tqcontains(text[0]) ) {
+ if ( text.length() == 1 && TQString("()[]{}").contains(text[0]) ) {
return new BracketElement();
}
}
diff --git a/lib/kformula/paddedelement.cc b/lib/kformula/paddedelement.cc
index d84bb064..5270a4f7 100644
--- a/lib/kformula/paddedelement.cc
+++ b/lib/kformula/paddedelement.cc
@@ -152,55 +152,55 @@ double PaddedElement::readSizeAttribute( const TQString& str, SizeType* st, bool
if ( str[0] == '+' || str[0] == '-' ) {
*relative = true;
}
- int index = str.tqfind( "width" );
+ int index = str.find( "width" );
if ( index != -1 ) {
- int index2 = str.tqfind( "%" );
+ int index2 = str.find( "%" );
if ( index2 != -1 ) {
return str2size( str.left( index2 ).stripWhiteSpace(), st, WidthRelativeSize ) / 100.0;
}
return str2size( str.left( index ).stripWhiteSpace(), st, WidthRelativeSize );
}
- index = str.tqfind( "height" );
+ index = str.find( "height" );
if ( index != -1 ) {
- int index2 = str.tqfind( "%" );
+ int index2 = str.find( "%" );
if ( index2 != -1 ) {
return str2size( str.left( index2 ).stripWhiteSpace(), st, HeightRelativeSize ) / 100.0;
}
return str2size( str.left( index ).stripWhiteSpace(), st, HeightRelativeSize );
}
- index = str.tqfind( "%" );
+ index = str.find( "%" );
if ( index != -1 ) {
return str2size( str.left( index ).stripWhiteSpace(), st, RelativeSize ) / 100.0;
}
- index = str.tqfind( "pt", 0, false );
+ index = str.find( "pt", 0, false );
if ( index != -1 ) {
return str2size( str.left( index ).stripWhiteSpace(), st, AbsoluteSize );
}
- index = str.tqfind( "mm", 0, false );
+ index = str.find( "mm", 0, false );
if ( index != -1 ) {
return str2size( str.left( index ).stripWhiteSpace(), st, AbsoluteSize ) * 72.0 / 20.54;
}
- index = str.tqfind( "cm", 0, false );
+ index = str.find( "cm", 0, false );
if ( index != -1 ) {
return str2size( str.left( index ).stripWhiteSpace(), st, AbsoluteSize ) * 72.0 / 2.54;
}
- index = str.tqfind( "in", 0, false );
+ index = str.find( "in", 0, false );
if ( index != -1 ) {
return str2size( str.left( index ).stripWhiteSpace(), st, AbsoluteSize ) * 72.0;
}
- index = str.tqfind( "em", 0, false );
+ index = str.find( "em", 0, false );
if ( index != -1 ) {
return str2size( str.left( index ).stripWhiteSpace(), st, RelativeSize );
}
- index = str.tqfind( "ex", 0, false );
+ index = str.find( "ex", 0, false );
if ( index != -1 ) {
return str2size( str.left( index ).stripWhiteSpace(), st, RelativeSize );
}
- index = str.tqfind( "pc", 0, false );
+ index = str.find( "pc", 0, false );
if ( index != -1 ) {
return str2size( str.left( index ).stripWhiteSpace(), st, AbsoluteSize ) * 12.0;
}
- index = str.tqfind( "px", 0, false );
+ index = str.find( "px", 0, false );
if ( index != -1 ) {
return str2size( str.left( index ).stripWhiteSpace(), st, PixelSize );
}
diff --git a/lib/kformula/prototype/gensymbolfontmap.py b/lib/kformula/prototype/gensymbolfontmap.py
index c06376d8..0f9f3a11 100644
--- a/lib/kformula/prototype/gensymbolfontmap.py
+++ b/lib/kformula/prototype/gensymbolfontmap.py
@@ -145,7 +145,7 @@ def make_tqunicode_table():
for key in tqunicodetable:
latexName, charClass = tqunicodetable[key]
if len(latexName) > 0:
- codes[key] = key + ', ' + charClass + ', ' + latexName.tqreplace('\\', '')
+ codes[key] = key + ', ' + charClass + ', ' + latexName.replace('\\', '')
else:
codes[key] = key + ', ' + charClass
diff --git a/lib/kformula/prototype/unicode.py b/lib/kformula/prototype/unicode.py
index 5f5f2138..2265635a 100755
--- a/lib/kformula/prototype/unicode.py
+++ b/lib/kformula/prototype/unicode.py
@@ -48,7 +48,7 @@ class Form1(QWidget):
return list
def setFont(self, fontName, font):
- fontName = fontName.tqreplace("%20", " ")
+ fontName = fontName.replace("%20", " ")
self.fontName = fontName
for i in self.chars:
charLabel, number, latexName, charClass = self.chars[i]
diff --git a/lib/kformula/scripts/bycodes.py b/lib/kformula/scripts/bycodes.py
index f5da0ae0..35b79a55 100755
--- a/lib/kformula/scripts/bycodes.py
+++ b/lib/kformula/scripts/bycodes.py
@@ -23,18 +23,18 @@ import string
import qt
def decode( fd, font, line ):
- begin = string.tqfind( line, '"' )
- end = string.tqfind( line, '"', begin + 1)
+ begin = string.find( line, '"' )
+ end = string.find( line, '"', begin + 1)
tqunicode = line[begin + 2:end] # Remove 'U' from string aswell
char_list = []
- separation = string.tqfind( tqunicode, '-' )
+ separation = string.find( tqunicode, '-' )
if separation != -1:
second = tqunicode
while separation != -1:
first = second[0:separation]
second = second[separation + 2:]
char_list.append( string.atoi( first, 16 ) )
- separation = string.tqfind( second, '-' )
+ separation = string.find( second, '-' )
if separation == -1:
char_list.append( string.atoi( second, 16 ) )
else:
@@ -51,7 +51,7 @@ def parse( file, font ):
fd2 = open( 'mathml.list', 'w' )
line = fd.readline()
while line != "":
- if string.tqfind( line, 'name' ) != -1:
+ if string.find( line, 'name' ) != -1:
decode( fd2, font, line )
line = fd.readline()
diff --git a/lib/kformula/scripts/bynames.py b/lib/kformula/scripts/bynames.py
index 50fac994..0829cf90 100755
--- a/lib/kformula/scripts/bynames.py
+++ b/lib/kformula/scripts/bynames.py
@@ -109,14 +109,14 @@ def name_cmp( a, b ):
def parse( fr, fw ):
line = fr.readline()
- while line != "" and string.tqfind( line, '<pre>' ) == -1:
+ while line != "" and string.find( line, '<pre>' ) == -1:
line = fr.readline()
- pos = string.tqfind( line, '<pre>' ) ### Ad-hoc detection
+ pos = string.find( line, '<pre>' ) ### Ad-hoc detection
if pos == -1:
return
line = line[pos + len('<pre>'):].strip() ### Ad-hoc detection
entries = []
- while line != "" and string.tqfind( line, ',' ) != -1:
+ while line != "" and string.find( line, ',' ) != -1:
fields = line.split(',')
name = fields[0].strip()
number = fields[1].strip()
@@ -124,7 +124,7 @@ def parse( fr, fw ):
# TODO: Support multicharacter entities, should also be supported by
# application. The best solution would probably to map to a single
# character provided by the font in the private area of Unicode
- if string.tqfind( number, '-' ) == -1:
+ if string.find( number, '-' ) == -1:
entries.append( [name, '0x' + number[1:]] )
line = fr.readline().strip()
diff --git a/lib/kformula/scripts/oper-dict.py b/lib/kformula/scripts/oper-dict.py
index a91a7971..49191ef6 100755
--- a/lib/kformula/scripts/oper-dict.py
+++ b/lib/kformula/scripts/oper-dict.py
@@ -190,12 +190,12 @@ def parse( fr, fw, entities ):
attr_list[10]: '"false"'
}
fields = line.split()
- name = string.tqreplace( fields[0], '&amp;', '&' )
+ name = string.replace( fields[0], '&amp;', '&' )
fields.pop(0) # Remove name
entities_found = True
while True:
- begin = string.tqfind( name, '&' )
- end = string.tqfind( name, ';' )
+ begin = string.find( name, '&' )
+ end = string.find( name, ';' )
if begin == -1 or end == -1:
break
###
@@ -204,7 +204,7 @@ def parse( fr, fw, entities ):
# character provided by the font in the private area of Unicode
entity_name = name[begin + 1:end]
if entities.has_key( entity_name ) :
- name = name.tqreplace( '&' + entity_name + ';', unichr(entities[entity_name]));
+ name = name.replace( '&' + entity_name + ';', unichr(entities[entity_name]));
else:
entities_found = False
break
diff --git a/lib/kformula/sequenceelement.cc b/lib/kformula/sequenceelement.cc
index 46c00817..78a95d95 100644
--- a/lib/kformula/sequenceelement.cc
+++ b/lib/kformula/sequenceelement.cc
@@ -129,10 +129,10 @@ BasicElement* SequenceElement::goToPos( FormulaCursor* cursor, bool& handled,
if (!handled) {
handled = true;
if ((point.x() - myPos.x()) < (e->getX() + e->getWidth()*2/3)) {
- cursor->setTo(this, tqchildren.tqfind(e));
+ cursor->setTo(this, tqchildren.find(e));
}
else {
- cursor->setTo(this, tqchildren.tqfind(e)+1);
+ cursor->setTo(this, tqchildren.find(e)+1);
}
}
return e;
@@ -482,7 +482,7 @@ void SequenceElement::moveLeft(FormulaCursor* cursor, BasicElement* from)
// The cursor came from one of our tqchildren or
// something is wrong.
else {
- int fromPos = tqchildren.tqfind(from);
+ int fromPos = tqchildren.find(from);
if ( fromPos > 0 ) {
tqchildren.at( fromPos - 1)->moveLeft( cursor, this );
}
@@ -533,7 +533,7 @@ void SequenceElement::moveRight(FormulaCursor* cursor, BasicElement* from)
// The cursor came from one of our tqchildren or
// something is wrong.
else {
- int fromPos = tqchildren.tqfind(from);
+ int fromPos = tqchildren.find(from);
if ( fromPos < tqchildren.count() - 1 ) {
tqchildren.at( fromPos + 1 )->moveDown( cursor, this );
}
@@ -658,7 +658,7 @@ void SequenceElement::moveHome(FormulaCursor* cursor)
while (element->getParent() != this) {
element = element->getParent();
}
- cursor->setMark(tqchildren.tqfind(element)+1);
+ cursor->setMark(tqchildren.find(element)+1);
}
}
cursor->setTo(this, 0);
@@ -681,7 +681,7 @@ void SequenceElement::moveEnd(FormulaCursor* cursor)
}
}
if (element != 0) {
- cursor->setMark(tqchildren.tqfind(element));
+ cursor->setMark(tqchildren.find(element));
}
}
}
@@ -735,7 +735,7 @@ bool SequenceElement::insert( uint index, BasicElement *child )
*/
// void SequenceElement::removeChild(FormulaCursor* cursor, BasicElement* child)
// {
-// int pos = tqchildren.tqfind(child);
+// int pos = tqchildren.find(child);
// formula()->elementRemoval(child, pos);
// cursor->setTo(this, pos);
// tqchildren.remove(pos);
@@ -890,7 +890,7 @@ BasicElement* SequenceElement::getChild( FormulaCursor* cursor, Direction direct
*/
void SequenceElement::selectChild(FormulaCursor* cursor, BasicElement* child)
{
- int pos = tqchildren.tqfind(child);
+ int pos = tqchildren.find(child);
if (pos > -1) {
cursor->setTo(this, pos+1, pos);
}
@@ -898,7 +898,7 @@ void SequenceElement::selectChild(FormulaCursor* cursor, BasicElement* child)
void SequenceElement::childWillVanish(FormulaCursor* cursor, BasicElement* child)
{
- int childPos = tqchildren.tqfind(child);
+ int childPos = tqchildren.find(child);
if (childPos > -1) {
int pos = cursor->getPos();
if (pos > childPos) {
@@ -1182,7 +1182,7 @@ KCommand* SequenceElement::buildCommand( Container* container, Request* request
if ((element != 0) && !element->isSymbol()) {
cursor->selectActiveElement();
const SymbolTable& table = container->document()->getSymbolTable();
- if (table.greekLetters().tqfind(element->getCharacter()) != -1) {
+ if (table.greekLetters().find(element->getCharacter()) != -1) {
KFCReplace* command = new KFCReplace( i18n( "Change Char to Symbol" ), container );
TextElement* symbol = creationStrategy->createTextElement( table.tqunicodeFromSymbolFont( element->getCharacter() ), true );
command->addElement( symbol );
diff --git a/lib/kformula/sequenceelement.h b/lib/kformula/sequenceelement.h
index ab6828fd..9696d3ad 100644
--- a/lib/kformula/sequenceelement.h
+++ b/lib/kformula/sequenceelement.h
@@ -318,7 +318,7 @@ public:
BasicElement* getChild(uint i) { return tqchildren.at(i); }
const BasicElement* getChild(uint i) const;
- int childPos( BasicElement* child ) { return tqchildren.tqfind( child ); }
+ int childPos( BasicElement* child ) { return tqchildren.find( child ); }
int childPos( const BasicElement* child ) const;
class ChildIterator {
diff --git a/lib/kformula/sequenceparser.cc b/lib/kformula/sequenceparser.cc
index 9a4ee8a2..bbc2f0b1 100644
--- a/lib/kformula/sequenceparser.cc
+++ b/lib/kformula/sequenceparser.cc
@@ -196,7 +196,7 @@ ElementType* SequenceParser::getPrimitive()
switch ( type ) {
case ORDINARY: {
// TQString text = getText();
-// if ( table.tqcontains( text ) || ( text == "\\quad" ) ) {
+// if ( table.contains( text ) || ( text == "\\quad" ) ) {
// return new NameType( this, text );
// }
// else {
diff --git a/lib/kformula/symboltable.cc b/lib/kformula/symboltable.cc
index 74f160e6..42c4a8e6 100644
--- a/lib/kformula/symboltable.cc
+++ b/lib/kformula/symboltable.cc
@@ -51,7 +51,7 @@ SymbolFontHelper::SymbolFontHelper()
TQChar SymbolFontHelper::tqunicodeFromSymbolFont( TQChar pos ) const
{
- if ( compatibility.tqcontains( pos ) ) {
+ if ( compatibility.contains( pos ) ) {
return compatibility[ pos.latin1() ];
}
return TQChar::null;
@@ -80,9 +80,9 @@ void SymbolTable::init( const TQFont& font )
}
}
-bool SymbolTable::tqcontains(TQString name) const
+bool SymbolTable::contains(TQString name) const
{
- return entries.tqfind( name ) != entries.end();
+ return entries.find( name ) != entries.end();
}
TQChar SymbolTable::tqunicode(TQString name) const
diff --git a/lib/kformula/symboltable.h b/lib/kformula/symboltable.h
index a7776adc..d4a19f03 100644
--- a/lib/kformula/symboltable.h
+++ b/lib/kformula/symboltable.h
@@ -85,7 +85,7 @@ public:
*/
void init( const TQFont& font );
- bool tqcontains( TQString name ) const;
+ bool contains( TQString name ) const;
/**
* @returns the char in the symbol font that belongs to