summaryrefslogtreecommitdiffstats
path: root/kopete/plugins/latex/latexplugin.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'kopete/plugins/latex/latexplugin.cpp')
-rw-r--r--kopete/plugins/latex/latexplugin.cpp24
1 files changed, 12 insertions, 12 deletions
diff --git a/kopete/plugins/latex/latexplugin.cpp b/kopete/plugins/latex/latexplugin.cpp
index 11537aba..61fab8a6 100644
--- a/kopete/plugins/latex/latexplugin.cpp
+++ b/kopete/plugins/latex/latexplugin.cpp
@@ -41,8 +41,8 @@
typedef KGenericFactory<LatexPlugin> LatexPluginFactory;
K_EXPORT_COMPONENT_FACTORY( kopete_latex, LatexPluginFactory( "kopete_latex" ) )
-LatexPlugin::LatexPlugin( TQObject *parent, const char *name, const TQStringList &/*args*/ )
-: Kopete::Plugin( LatexPluginFactory::instance(), parent, name )
+LatexPlugin::LatexPlugin( TQObject *tqparent, const char *name, const TQStringList &/*args*/ )
+: Kopete::Plugin( LatexPluginFactory::instance(), tqparent, name )
{
// kdDebug() << k_funcinfo << endl;
if( !s_pluginStatic )
@@ -101,7 +101,7 @@ void LatexPlugin::slotMessageAboutToShow( Kopete::Message& msg )
}
TQString messageText = msg.plainBody();
- if( !messageText.contains("$$"))
+ if( !messageText.tqcontains("$$"))
return;
//kdDebug() << k_funcinfo << " Using converter: " << m_convScript << endl;
@@ -132,7 +132,7 @@ void LatexPlugin::slotMessageAboutToShow( Kopete::Message& msg )
if(!securityCheck(formul))
continue;
- TQString fileName=handleLatex(formul.replace("$$",""));
+ TQString fileName=handleLatex(formul.tqreplace("$$",""));
// get the image and encode it with base64
#if ENCODED_IMAGE_MODE
@@ -145,7 +145,7 @@ void LatexPlugin::slotMessageAboutToShow( Kopete::Message& msg )
TQBuffer buffer( ba );
buffer.open( IO_WriteOnly );
renderedImage.save( &buffer, "PNG" );
- TQString imageURL = TQString::fromLatin1("data:image/png;base64,%1").arg( KCodecs::base64Encode( ba ) );
+ TQString imageURL = TQString::tqfromLatin1("data:image/png;base64,%1").tqarg( KCodecs::base64Encode( ba ) );
replaceMap[match] = imageURL;
}
#else
@@ -167,8 +167,8 @@ void LatexPlugin::slotMessageAboutToShow( Kopete::Message& msg )
continue;
imagePxWidth = theImage.width();
imagePxHeight = theImage.height();
- TQString escapedLATEX=TQStyleSheet::escape(it.key()).replace("\"","&quot;"); //we need the escape quotes because that string will be in a title="" argument, but not the \n
- messageText.replace(Kopete::Message::escape(it.key()), " <img width=\"" + TQString::number(imagePxWidth) + "\" height=\"" + TQString::number(imagePxHeight) + "\" src=\"" + (*it) + "\" alt=\"" + escapedLATEX +"\" title=\"" + escapedLATEX +"\" /> ");
+ TQString escapedLATEX=TQStyleSheet::escape(it.key()).tqreplace("\"","&quot;"); //we need the escape quotes because that string will be in a title="" argument, but not the \n
+ messageText.tqreplace(Kopete::Message::escape(it.key()), " <img width=\"" + TQString::number(imagePxWidth) + "\" height=\"" + TQString::number(imagePxHeight) + "\" src=\"" + (*it) + "\" alt=\"" + escapedLATEX +"\" title=\"" + escapedLATEX +"\" /> ");
}
msg.setBody( messageText, Kopete::Message::RichText );
@@ -187,7 +187,7 @@ void LatexPlugin::slotMessageAboutToSend( Kopete::Message& msg)
return;
TQString messageText = msg.plainBody();
- if( !messageText.contains("$$"))
+ if( !messageText.tqcontains("$$"))
return;
/* if( msg.from()->protocol()->pluginId()!="MSNProtocol" )
return;*/
@@ -206,7 +206,7 @@ void LatexPlugin::slotMessageAboutToSend( Kopete::Message& msg)
if(!url.isNull())
{
- TQString escapedLATEX= TQStyleSheet::escape(messageText).replace("\"","&quot;");
+ TQString escapedLATEX= TQStyleSheet::escape(messageText).tqreplace("\"","&quot;");
TQString messageText="<img src=\"" + url + "\" alt=\"" + escapedLATEX + "\" title=\"" + escapedLATEX +"\" />";
msg.setBody( messageText, Kopete::Message::RichText );
}
@@ -230,9 +230,9 @@ TQString LatexPlugin::handleLatex(const TQString &latexFormula)
int hDPI, vDPI;
hDPI = LatexConfig::self()->horizontalDPI();
vDPI = LatexConfig::self()->verticalDPI();
- p << m_convScript << argumentRes.arg(TQString::number(hDPI), TQString::number(vDPI)) << argumentOut.arg(fileName) /*<< argumentFormat*/ << latexFormula ;
+ p << m_convScript << argumentRes.tqarg(TQString::number(hDPI), TQString::number(vDPI)) << argumentOut.tqarg(fileName) /*<< argumentFormat*/ << latexFormula ;
- kdDebug() << k_funcinfo << " Rendering " << m_convScript << " " << argumentRes.arg(TQString::number(hDPI), TQString::number(vDPI)) << " " << argumentOut.arg(fileName) << endl;
+ kdDebug() << k_funcinfo << " Rendering " << m_convScript << " " << argumentRes.tqarg(TQString::number(hDPI), TQString::number(vDPI)) << " " << argumentOut.tqarg(fileName) << endl;
// FIXME our sucky sync filter API limitations :-)
p.start(KProcess::Block);
@@ -241,7 +241,7 @@ TQString LatexPlugin::handleLatex(const TQString &latexFormula)
bool LatexPlugin::securityCheck(const TQString &latexFormula)
{
- return !latexFormula.contains(TQRegExp("\\\\(def|let|futurelet|newcommand|renewcomment|else|fi|write|input|include"
+ return !latexFormula.tqcontains(TQRegExp("\\\\(def|let|futurelet|newcommand|renewcomment|else|fi|write|input|include"
"|chardef|catcode|makeatletter|noexpand|toksdef|every|errhelp|errorstopmode|scrollmode|nonstopmode|batchmode"
"|read|csname|newhelp|relax|afterground|afterassignment|expandafter|noexpand|special|command|loop|repeat|toks"
"|output|line|mathcode|name|item|section|mbox|DeclareRobustCommand)[^a-zA-Z]"));