summaryrefslogtreecommitdiff
path: root/src/backend/filters/bt_osishtml.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/backend/filters/bt_osishtml.cpp')
-rw-r--r--src/backend/filters/bt_osishtml.cpp37
1 files changed, 16 insertions, 21 deletions
diff --git a/src/backend/filters/bt_osishtml.cpp b/src/backend/filters/bt_osishtml.cpp
index 9026a94..7525aca 100644
--- a/src/backend/filters/bt_osishtml.cpp
+++ b/src/backend/filters/bt_osishtml.cpp
@@ -7,25 +7,20 @@
*
**********/
-//BibleTime includes
-#include "bt_osishtml.h"
-#include "backend/managers/clanguagemgr.h"
-#include "backend/managers/creferencemanager.h"
-#include "backend/drivers/cswordmoduleinfo.h"
+#include "backend/filters/bt_osishtml.h"
+#include <QString>
#include "backend/config/cbtconfig.h"
+#include "backend/drivers/cswordmoduleinfo.h"
+#include "backend/managers/clanguagemgr.h"
+#include "backend/managers/referencemanager.h"
#include "util/cpointers.h"
-//Sword
-#include <swmodule.h>
+// Sword includes:
#include <swbuf.h>
+#include <swmodule.h>
#include <utilxml.h>
-//Qt
-#include <QString>
-
-//KDE
-
Filters::BT_OSISHTML::BT_OSISHTML() : sword::OSISHTMLHREF() {
setPassThruUnknownEscapeString(true); //the HTML widget will render the HTML escape codes
@@ -39,7 +34,7 @@ Filters::BT_OSISHTML::BT_OSISHTML() : sword::OSISHTMLHREF() {
// addTokenSubstitute("divineName", "<span class=\"name\"><span class=\"divine\">");
// addTokenSubstitute("/divineName", "</span></span>");
- //TODO Move that down to the real tag handling, segs without the type morph would generate incorrect markup, as the end span is always inserted
+ /// \todo Move that down to the real tag handling, segs without the type morph would generate incorrect markup, as the end span is always inserted
// addTokenSubstitute("seg type=\"morph\"", "<span class=\"morphSegmentation\">");
// addTokenSubstitute("/seg", "</span>");
@@ -112,11 +107,11 @@ bool Filters::BT_OSISHTML::handleToken(sword::SWBuf &buf, const char *token, swo
if ((attrib = tag.getAttribute("lemma"))) {
char splitChar = '|';
const int countSplit1 = tag.getAttributePartCount("lemma", '|');
- const int countSplit2 = tag.getAttributePartCount("lemma", ' '); //TODO: not allowed, remove soon
+ const int countSplit2 = tag.getAttributePartCount("lemma", ' '); /// \todo not allowed, remove soon
int count = 0;
if (countSplit1 > countSplit2) { //| split char
- splitChar = '|'; //TODO: not allowed, remove soon
+ splitChar = '|'; /// \todo not allowed, remove soon
count = countSplit1;
}
else {
@@ -153,7 +148,7 @@ bool Filters::BT_OSISHTML::handleToken(sword::SWBuf &buf, const char *token, swo
if ((attrib = tag.getAttribute("morph"))) {
char splitChar = '|';
const int countSplit1 = tag.getAttributePartCount("morph", '|');
- const int countSplit2 = tag.getAttributePartCount("morph", ' '); //TODO: not allowed, remove soon
+ const int countSplit2 = tag.getAttributePartCount("morph", ' '); /// \todo not allowed, remove soon
int count = 0;
if (countSplit1 > countSplit2) { //| split char
@@ -574,7 +569,7 @@ void Filters::BT_OSISHTML::renderReference(const char *osisRef, sword::SWBuf &bu
}
if (mod) {
- CReferenceManager::ParseOptions options;
+ ReferenceManager::ParseOptions options;
options.refBase = QString::fromUtf8(myUserData->key->getText());
options.refDestinationModule = QString(mod->name());
options.sourceLanguage = QString(myModule->Lang());
@@ -582,14 +577,14 @@ void Filters::BT_OSISHTML::renderReference(const char *osisRef, sword::SWBuf &bu
buf.append("<a href=\"");
buf.append( //create the hyperlink with key and mod
- CReferenceManager::encodeHyperlink(
+ ReferenceManager::encodeHyperlink(
mod->name(),
- CReferenceManager::parseVerseReference(hrefRef, options),
- CReferenceManager::typeFromModule(mod->type())
+ ReferenceManager::parseVerseReference(hrefRef, options),
+ ReferenceManager::typeFromModule(mod->type())
).toUtf8().constData()
);
buf.append("\" crossrefs=\"");
- buf.append((const char*)CReferenceManager::parseVerseReference(ref, options).toUtf8().constData()); //ref must contain the osisRef module marker if there was any
+ buf.append((const char*)ReferenceManager::parseVerseReference(ref, options).toUtf8().constData()); //ref must contain the osisRef module marker if there was any
buf.append("\">");
}
// should we add something if there were no referenced module available?