diff --git a/build_number b/build_number index 8e44f67..26102a7 100644 --- a/build_number +++ b/build_number @@ -1 +1 @@ -812 \ No newline at end of file +818 \ No newline at end of file diff --git a/include/version.h b/include/version.h index 4016a8c..d6812f3 100644 --- a/include/version.h +++ b/include/version.h @@ -1 +1 @@ -#define BUILD 812 \ No newline at end of file +#define BUILD 818 \ No newline at end of file diff --git a/sources/exosheet.cpp b/sources/exosheet.cpp index d9fd949..586b040 100755 --- a/sources/exosheet.cpp +++ b/sources/exosheet.cpp @@ -331,15 +331,18 @@ QString ExoSheet::replaceMeta(QString path,QString str) while(index!=-1) { index = str.indexOf("%@",fromIndex); + QMessageBox::warning(0, QObject::tr("Error"),QObject::tr("index : %1").arg(index)); if (index==-1) return str; toIndex = str.indexOf("@",index+2); if (toIndex==-1) return str; text = str.mid(index+2,toIndex-index-2).trimmed(); -// QMessageBox::warning(0, QObject::tr("Error"),QObject::tr("index : %1\ntoIndex : %2\ntext : %3").arg(index).arg(toIndex).arg(text)); + QMessageBox::warning(0, QObject::tr("Error"),QObject::tr("index : %1\ntoIndex : %2\ntext : %3").arg(index).arg(toIndex).arg(text)); newText = domHandler->getExoMeta(path,text); -// QMessageBox::warning(0, QObject::tr("Error"),QObject::tr("newText : %1").arg(newText)); + int lenOld=QString("%@"+text+"@").size(); + int lenNew=newText.size(); str.replace("%@"+text+"@",newText); - fromIndex=toIndex; + fromIndex=toIndex+lenNew-lenOld; + } return str; }