d->m_translations[index] = expr.simplified();
}
-bool KEduVocExpression::uniqueType() const
-{
- bool unique = true;
- QString type0 = d->m_translations[0].type();
- foreach (int i, translationIndices()) {
- if (type0 != d->m_translations[i].type()) {
- unique = false;
- }
- }
- return unique;
-}
int KEduVocExpression::lesson() const
{
if (!entry->isActive())
domElementExpression.setAttribute (KV_INACTIVE, 1);
- if (entry->uniqueType() && !entry->translation(0).type().isEmpty())
- domElementExpression.setAttribute (KV_EXPRTYPE, entry->translation(0).type());
-
QDomElement domElementOriginal = domDoc.createElement(KV_ORG);
if (first_expr)
{
if (!entry->translation(0).pronunciation().isEmpty() )
domElementOriginal.setAttribute(KV_PRONUNCE, entry->translation(0).pronunciation());
- if (!entry->uniqueType() && !entry->translation(0).type().isEmpty())
- domElementOriginal.setAttribute(KV_EXPRTYPE, entry->translation(0).type());
+ if (!entry->translation(0).type().isEmpty())
+ domElementOriginal.setAttribute(KV_EXPRTYPE, m_compability.oldType(entry->translation(0).type(), entry->translation(0).subType()));
if (!writeMultipleChoice(domDoc, domElementOriginal, entry->translation(0).multipleChoice()))
return false;
if (!entry->translation(trans).pronunciation().isEmpty() )
domElementTranslation.setAttribute(KV_PRONUNCE, entry->translation(trans).pronunciation());
- if (!entry->uniqueType() && !entry->translation(trans).type().isEmpty())
- domElementTranslation.setAttribute(KV_EXPRTYPE, entry->translation(trans).type());
+ if (!entry->translation(trans).type().isEmpty())
+ domElementTranslation.setAttribute(KV_EXPRTYPE, m_compability.oldType(entry->translation(trans).type(), entry->translation(trans).subType()));
if (!writeMultipleChoice(domDoc, domElementTranslation, entry->translation(trans).multipleChoice()))
return false;