From: Frederik Gladhorn Date: Tue, 28 Aug 2007 15:29:11 +0000 (+0000) Subject: remove comment X-Git-Tag: v3.93.0~11 X-Git-Url: https://git.rmz.fi/?a=commitdiff_plain;h=7f358ed4a4209b85f74f1a45aa3c485438c6e3c1;p=libqmvoc.git remove comment svn path=/trunk/KDE/kdeedu/libkdeedu/; revision=705784 --- diff --git a/keduvocdocument/keduvockvtml2writer.cpp b/keduvocdocument/keduvockvtml2writer.cpp index 3736459..67097b0 100644 --- a/keduvocdocument/keduvockvtml2writer.cpp +++ b/keduvocdocument/keduvockvtml2writer.cpp @@ -97,232 +97,6 @@ bool KEduVocKvtml2Writer::writeDoc(KEduVocDocument *doc, const QString &generato domElementKvtml.appendChild(currentElement); } - //** NOTE: everything below this point has not been updated to use kvtml2 format**** - //if (!writeLesson(m_domDoc, domElementKvtml)) - // return false; - - //QList conjugations; - //for (int i = 0; i < m_doc->conjugationCount(); i++) - // conjugations.append(m_doc->conjugation(i)); - //if (conjugations.count() > 0) { - // if (!writeConjugHeader(m_domDoc, domElementKvtml, conjugations)) - // return false; - //} - - //if (!writeOption(m_domDoc, domElementKvtml)) - // return false; - - //if (!writeType(m_domDoc, domElementKvtml)) - // return false; - - //if (!writeTense(m_domDoc, domElementKvtml)) - // return false; - - //if (!writeUsage(m_domDoc, domElementKvtml)) - // return false; - - //QString q_org, q_trans; - //m_doc->queryIdentifier(q_org, q_trans); - - //int entryCount = m_doc->entryCount(); - - //for (int i = 0; i < entryCount; i++) - //{ - // KEduVocExpression *entry = m_doc->entry(i); - // QDomElement domElementExpression = m_domDoc.createElement(KV_EXPR); - - // if (entry->lesson() != 0) - // { - // int lm = entry->lesson(); - // if (lm > m_doc->lessonDescriptions().count()) - // { - // // should not be - // kError() << "index of lesson member too high: " << lm << endl; - // lm = 0; - // } - // domElementExpression.setAttribute(KV_LESS_MEMBER, lm); - // } - - // if (entry->isInQuery()) - // domElementExpression.setAttribute(KV_SELECTED, 1); - - // 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 = m_domDoc.createElement(KV_ORG); - // if (first_expr) - // { - // // save space, only tell language in first entry - // QString s; - // domElementOriginal.setAttribute(KV_SIZEHINT, m_doc->sizeHint(0)); - - // s = m_doc->identifier(0).simplified(); - // if (s.isEmpty() ) - // s = "original"; - // domElementOriginal.setAttribute(KV_LANG, s); - // if (s == q_org) - // domElementOriginal.setAttribute(KV_QUERY, (QString) KV_O); - // else if (s == q_trans) - // domElementOriginal.setAttribute(KV_QUERY, (QString) KV_T); - // } - - // if (!entry->translation(0).comment().isEmpty() ) - // domElementOriginal.setAttribute(KV_REMARK, entry->translation(0).comment()); - - // if (!entry->translation(0).synonym().isEmpty() ) - // domElementOriginal.setAttribute(KV_SYNONYM, entry->translation(0).synonym()); - - // if (!entry->translation(0).example().isEmpty() ) - // domElementOriginal.setAttribute(KV_EXAMPLE, entry->translation(0).example()); - - // if (!entry->translation(0).usageLabel().isEmpty() ) - // domElementOriginal.setAttribute(KV_USAGE, entry->translation(0).usageLabel()); - - // if (!entry->translation(0).paraphrase().isEmpty() ) - // domElementOriginal.setAttribute(KV_PARAPHRASE, entry->translation(0).paraphrase()); - - // if (!entry->translation(0).antonym().isEmpty() ) - // domElementOriginal.setAttribute(KV_ANTONYM, entry->translation(0).antonym()); - - // 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 (!writeMultipleChoice(m_domDoc, domElementOriginal, entry->translation(0).multipleChoice())) - // return false; - - // QString s; - // QString entype = s = entry->translation(0).type(); - // int pos; - // if (pos >= 0) - // entype = s.left(pos); - // else - // entype = s; - - // if (entry->translation(0).conjugation().entryCount() > 0) - // { - // KEduVocConjugation conj = entry->translation(0).conjugation(); - // if (!writeConjugEntry(m_domDoc, domElementOriginal, conj)) - // return false; - // } - // else if (!entry->translation(0).comparison().isEmpty()) - // { - // KEduVocComparison comp = entry->translation(0).comparison(); - // if (!writeComparison(m_domDoc, domElementOriginal, comp)) - // return false; - // } - - // QDomText domTextOriginal = m_domDoc.createTextNode(entry->translation(0).translation()); - // domElementOriginal.appendChild(domTextOriginal); - // domElementExpression.appendChild(domElementOriginal); - - // int trans = 1; - // while (trans < m_doc->identifierCount()) - // { - // QDomElement domElementTranslation = m_domDoc.createElement(KV_TRANS); - // if (first_expr) - // { - // // save space, only tell language in first entry - // QString s; - // domElementTranslation.setAttribute(KV_SIZEHINT, m_doc->sizeHint(trans)); - - // s = m_doc->identifier(trans).simplified(); - // if (s.isEmpty() ) - // { - // s.setNum(trans); - // s.prepend("translation "); - // } - // domElementTranslation.setAttribute(KV_LANG, s); - // if (s == q_org) - // domElementTranslation.setAttribute(KV_QUERY, (QString) KV_O); - // else if (s == q_trans) - // domElementTranslation.setAttribute(KV_QUERY, (QString) KV_T); - // } - - // if (entry->translation(trans).gradeFrom(0).grade() != 0 || entry->translation(0).gradeFrom(trans).grade() != 0) - // domElementTranslation.setAttribute(KV_GRADE, QString::number(entry->translation(trans).gradeFrom(0).grade()) + ';' + QString::number(entry->translation(0).gradeFrom(trans).grade())); - - // if (entry->translation(trans).gradeFrom(0).queryCount() != 0 || entry->translation(0).gradeFrom(trans).queryCount() != 0) - // domElementTranslation.setAttribute(KV_COUNT, QString::number(entry->translation(trans).gradeFrom(0).queryCount()) + ';' + QString::number(entry->translation(0).gradeFrom(trans).queryCount())); - - // if (entry->translation(trans).gradeFrom(0).badCount() != 0 || entry->translation(0).gradeFrom(trans).badCount() != 0) - // domElementTranslation.setAttribute(KV_BAD, QString::number(entry->translation(trans).gradeFrom(0).badCount()) + ';' + QString::number(entry->translation(0).gradeFrom(trans).badCount())); - - // if (entry->translation(trans).gradeFrom(0).queryDate().toTime_t() != 0 || entry->translation(0).gradeFrom(trans).queryDate().toTime_t() != 0) - // domElementTranslation.setAttribute(KV_DATE, QString::number(entry->translation(trans).gradeFrom(0).queryDate().toTime_t()) + ';' + QString::number(entry->translation(0).gradeFrom(trans).queryDate().toTime_t())); - - // if (!entry->translation(trans).comment().isEmpty() ) - // domElementTranslation.setAttribute(KV_REMARK, entry->translation(trans).comment()); - - // if (!entry->translation(trans).falseFriend(0).isEmpty() ) - // domElementTranslation.setAttribute(KV_FAUX_AMI_F, entry->translation(trans).falseFriend(0)); - - // if (!entry->translation(0).falseFriend(trans).isEmpty() ) - // domElementTranslation.setAttribute(KV_FAUX_AMI_T, entry->translation(0).falseFriend(trans)); - - // if (!entry->translation(trans).synonym().isEmpty() ) - // domElementTranslation.setAttribute(KV_SYNONYM, entry->translation(trans).synonym()); - - // if (!entry->translation(trans).example().isEmpty() ) - // domElementTranslation.setAttribute(KV_EXAMPLE, entry->translation(trans).example()); - - // if (!entry->translation(trans).usageLabel().isEmpty() ) - // domElementTranslation.setAttribute(KV_USAGE, entry->translation(trans).usageLabel()); - - // if (!entry->translation(trans).paraphrase().isEmpty() ) - // domElementTranslation.setAttribute(KV_PARAPHRASE, entry->translation(trans).paraphrase()); - - // if (!entry->translation(trans).antonym().isEmpty() ) - // domElementTranslation.setAttribute(KV_ANTONYM, entry->translation(trans).antonym()); - - // 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 (!writeMultipleChoice(m_domDoc, domElementTranslation, entry->translation(trans).multipleChoice())) - // return false; - - // QString s; - // QString entype = s = entry->translation(0).type(); - // int pos; - // if (pos >= 0) - // entype = s.left (pos); - // else - // entype = s; - - // if (entry->translation(trans).conjugation().entryCount() > 0) - // { - // KEduVocConjugation conj = entry->translation(trans).conjugation(); - // if (!writeConjugEntry(m_domDoc, domElementTranslation, conj)) - // return false; - // } - - // if (!entry->translation(trans).comparison().isEmpty()) - // { - // KEduVocComparison comp = entry->translation(trans).comparison(); - // if (!writeComparison(m_domDoc, domElementTranslation, comp)) - // return false; - // } - - // QDomText domTextTranslation = m_domDoc.createTextNode(entry->translation(trans).translation()); - // domElementTranslation.appendChild(domTextTranslation); - // domElementExpression.appendChild(domElementTranslation); - - // trans++; - // } - - // domElementKvtml.appendChild(domElementExpression); - - // first_expr = false; - //} - m_domDoc.appendChild(domElementKvtml); QTextStream ts(m_outputFile); diff --git a/keduvocdocument/keduvockvtmlwriter.cpp b/keduvocdocument/keduvockvtmlwriter.cpp index 7a13c5d..79acf21 100644 --- a/keduvocdocument/keduvockvtmlwriter.cpp +++ b/keduvocdocument/keduvockvtmlwriter.cpp @@ -148,7 +148,7 @@ bool KEduVocKvtmlWriter::writeDoc(KEduVocDocument *doc, const QString &generator if (!entry->translation(0).example().isEmpty() ) domElementOriginal.setAttribute(KV_EXAMPLE, entry->translation(0).example()); -///@todo enable writing of usages into a qstringlist +///@todo enable writing of usages /* if (!entry->translation(0).usageLabel().isEmpty() ) domElementOriginal.setAttribute(KV_USAGE, entry->translation(0).usageLabel());