diff options
Diffstat (limited to 'src/docparser.cpp')
-rw-r--r-- | src/docparser.cpp | 121 |
1 files changed, 0 insertions, 121 deletions
diff --git a/src/docparser.cpp b/src/docparser.cpp index b974a26..75fe570 100644 --- a/src/docparser.cpp +++ b/src/docparser.cpp @@ -7328,128 +7328,7 @@ static QCString processCopyDoc(const char *data,uint &len) buf.addChar(0); return buf.get(); } -//--------------------------------------------------------------------------- -QString::Direction getTextDirByConfig(const QString &text) -{ - QCString configDir = Config_getEnum(OUTPUT_TEXT_DIRECTION); - if (configDir == "None") - return QString::DirNeutral; - if (configDir == "Context") - return text.basicDirection(); - if (configDir == "LTR") - { - QString::Direction textDir = text.direction(); - if (textDir == QString::DirMixed) - return QString::DirLTR; - return textDir; - } - if (configDir == "RTL") - { - QString::Direction textDir = text.direction(); - if (textDir == QString::DirMixed) - return QString::DirRTL; - return textDir; - } - return QString::DirNeutral; -} - -QString::Direction getTextDirByConfig(const DocNode *node) -{ - QCString configDir = Config_getEnum(OUTPUT_TEXT_DIRECTION); - if (configDir == "None") - return QString::DirNeutral; - if (configDir == "Context") - return node->getTextBasicDir(); - if (configDir == "LTR") - { - QString::Direction textDir = node->getTextDir(); - if (textDir == QString::DirMixed) - return QString::DirLTR; - return textDir; - } - if (configDir == "RTL") - { - QString::Direction textDir = node->getTextDir(); - if (textDir == QString::DirMixed) - return QString::DirRTL; - return textDir; - } - return QString::DirNeutral; -} -QString::Direction getTextDirByConfig(const DocPara *para, int nodeIndex) -{ - QCString configDir = Config_getEnum(OUTPUT_TEXT_DIRECTION); - if (configDir == "None") - return QString::DirNeutral; - if (configDir == "Context") - return para->getTextBasicDir(nodeIndex); - if (configDir == "LTR") - { - QString::Direction textDir = para->getTextDir(nodeIndex); - if (textDir == QString::DirMixed) - return QString::DirLTR; - return textDir; - } - if (configDir == "RTL") - { - QString::Direction textDir = para->getTextDir(nodeIndex); - if (textDir == QString::DirMixed) - return QString::DirRTL; - return textDir; - } - return QString::DirNeutral; -} - -QCString getDirHtmlClassOfNode(QString::Direction textDir, const QCString &initValue) -{ - QCString classFromDir; - if (textDir == QString::DirLTR) - classFromDir = "DocNodeLTR"; - else if (textDir == QString::DirRTL) - classFromDir = "DocNodeRTL"; - else - classFromDir = ""; - - if (initValue && !classFromDir.isEmpty()) - return QCString(" class=\"") + initValue + " " + classFromDir + "\""; - if (initValue) - return QCString(" class=\"") + initValue + "\""; - if (!classFromDir.isEmpty()) - return QCString(" class=\"") + classFromDir + "\""; - return ""; -} - -QCString getDirHtmlClassOfPage(QCString pageTitle) -{ - QCString result = ""; - result += " class=\"PageDoc"; - QString::Direction titleDir = getTextDirByConfig(pageTitle); - if (titleDir == QString::DirLTR) - result += " PageDocLTR-title"; - else if (titleDir == QString::DirRTL) - result += " PageDocRTL-title"; - result += "\""; - return result; -} - -QCString getHtmlDirEmbeddingChar(QString::Direction textDir) -{ - if (textDir == QString::DirLTR) - return "‪"; - if (textDir == QString::DirRTL) - return "‫"; - return ""; -} - -QCString getJsDirEmbeddingChar(QString::Direction textDir) -{ - if (textDir == QString::DirLTR) - return "\\u202A"; - if (textDir == QString::DirRTL) - return "\\u202B"; - return ""; -} //--------------------------------------------------------------------------- DocRoot *validatingParseDoc(const char *fileName,int startLine, |