summaryrefslogtreecommitdiff
path: root/src/backend/filters/thmltohtml.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/backend/filters/thmltohtml.cpp')
-rw-r--r--src/backend/filters/thmltohtml.cpp17
1 files changed, 9 insertions, 8 deletions
diff --git a/src/backend/filters/thmltohtml.cpp b/src/backend/filters/thmltohtml.cpp
index 12f42bf..0bf6e63 100644
--- a/src/backend/filters/thmltohtml.cpp
+++ b/src/backend/filters/thmltohtml.cpp
@@ -2,7 +2,7 @@
*
* This file is part of BibleTime's source code, http://www.bibletime.info/.
*
-* Copyright 1999-2011 by the BibleTime developers.
+* Copyright 1999-2014 by the BibleTime developers.
* The BibleTime source code is licensed under the GNU General Public License version 2.0.
*
**********/
@@ -13,10 +13,11 @@
#include <QRegExp>
#include <QUrl>
#include <QTextCodec>
-#include "backend/config/cbtconfig.h"
+#include "backend/config/btconfig.h"
#include "backend/drivers/cswordmoduleinfo.h"
#include "backend/managers/clanguagemgr.h"
#include "backend/managers/referencemanager.h"
+#include "backend/managers/cswordbackend.h"
// Sword includes:
#include <swmodule.h>
@@ -46,7 +47,7 @@ char ThmlToHtml::processText(sword::SWBuf &buf, const sword::SWKey *key,
{
sword::ThMLHTML::processText(buf, key, module);
- CSwordModuleInfo* m = CSwordBackend::instance()->findModuleByName( module->Name() );
+ CSwordModuleInfo* m = CSwordBackend::instance()->findModuleByName( module->getName() );
if (m && !(m->has(CSwordModuleInfo::lemmas) || m->has(CSwordModuleInfo::strongNumbers))) { //only parse if the module has strongs or lemmas
return 1;
@@ -230,7 +231,7 @@ bool ThmlToHtml::handleToken(sword::SWBuf &buf, const char *token,
if (!tag.isEndTag() && !tag.isEmpty()) {
//appending is faster than appendFormatted
buf.append(" <span class=\"footnote\" note=\"");
- buf.append(myModule->Name());
+ buf.append(myModule->getName());
buf.append('/');
buf.append(myUserData->key->getShortText());
buf.append('/');
@@ -259,13 +260,13 @@ bool ThmlToHtml::handleToken(sword::SWBuf &buf, const char *token,
}
else { // like "<scripRef>John 3:16</scripRef>"
- CSwordModuleInfo* mod = CBTConfig::get(CBTConfig::standardBible);
+ CSwordModuleInfo* mod = btConfig().getDefaultSwordModuleByType("standardBible");
//Q_ASSERT(mod); tested later
if (mod) {
ReferenceManager::ParseOptions options;
options.refBase = QString::fromUtf8(myUserData->key->getText()); //current module key
options.refDestinationModule = QString(mod->name());
- options.sourceLanguage = QString(myModule->Lang());
+ options.sourceLanguage = QString(myModule->getLanguage());
options.destinationLanguage = QString("en");
//it's ok to split the reference, because to descriptive text is given
@@ -318,13 +319,13 @@ bool ThmlToHtml::handleToken(sword::SWBuf &buf, const char *token,
const char* ref = tag.getAttribute("passage");
Q_ASSERT(ref);
- CSwordModuleInfo* mod = CBTConfig::get(CBTConfig::standardBible);
+ CSwordModuleInfo* mod = btConfig().getDefaultSwordModuleByType("standardBible");
//Q_ASSERT(mod); tested later
ReferenceManager::ParseOptions options;
options.refBase = QString::fromUtf8(myUserData->key->getText());
- options.sourceLanguage = myModule->Lang();
+ options.sourceLanguage = myModule->getLanguage();
options.destinationLanguage = QString("en");
const QString completeRef = ReferenceManager::parseVerseReference(QString::fromUtf8(ref), options);