summaryrefslogtreecommitdiffstats
path: root/src/translators/bibtexexporter.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/translators/bibtexexporter.cpp')
-rw-r--r--src/translators/bibtexexporter.cpp40
1 files changed, 20 insertions, 20 deletions
diff --git a/src/translators/bibtexexporter.cpp b/src/translators/bibtexexporter.cpp
index f79f79e..2135c67 100644
--- a/src/translators/bibtexexporter.cpp
+++ b/src/translators/bibtexexporter.cpp
@@ -30,7 +30,7 @@
#include <tqregexp.h>
#include <tqcheckbox.h>
-#include <layout.h>
+#include <tqlayout.h>
#include <tqgroupbox.h>
#include <tqwhatsthis.h>
#include <tqlabel.h>
@@ -69,7 +69,7 @@ bool BibtexExporter::exec() {
TQString crossRefField;
bool hasCrossRefs = false;
- const TQString bibtex = TQString::fromLatin1("bibtex");
+ const TQString bibtex = TQString::tqfromLatin1("bibtex");
// keep a list of all the 'ordinary' fields to iterate through later
Data::FieldVec fields;
Data::FieldVec vec = coll->fields();
@@ -98,12 +98,12 @@ bool BibtexExporter::exec() {
return false;
}
- TQString text = TQString::fromLatin1("@comment{Generated by Tellico ")
- + TQString::fromLatin1(VERSION)
- + TQString::fromLatin1("}\n\n");
+ TQString text = TQString::tqfromLatin1("@comment{Generated by Tellico ")
+ + TQString::tqfromLatin1(VERSION)
+ + TQString::tqfromLatin1("}\n\n");
if(!coll->preamble().isEmpty()) {
- text += TQString::fromLatin1("@preamble{") + coll->preamble() + TQString::fromLatin1("}\n\n");
+ text += TQString::tqfromLatin1("@preamble{") + coll->preamble() + TQString::tqfromLatin1("}\n\n");
}
const TQStringList macros = coll->macroList().keys();
@@ -111,11 +111,11 @@ bool BibtexExporter::exec() {
TQMap<TQString, TQString>::ConstIterator macroIt;
for(macroIt = coll->macroList().constBegin(); macroIt != coll->macroList().constEnd(); ++macroIt) {
if(!macroIt.data().isEmpty()) {
- text += TQString::fromLatin1("@string{")
+ text += TQString::tqfromLatin1("@string{")
+ macroIt.key()
- + TQString::fromLatin1("=")
+ + TQString::tqfromLatin1("=")
+ BibtexHandler::exportText(macroIt.data(), macros)
- + TQString::fromLatin1("}\n\n");
+ + TQString::tqfromLatin1("}\n\n");
}
}
}
@@ -236,7 +236,7 @@ TQWidget* BibtexExporter::widget(TQWidget* parent_, const char* name_/*=0*/) {
}
void BibtexExporter::readOptions(KConfig* config_) {
- KConfigGroup group(config_, TQString::fromLatin1("ExportOptions - %1").arg(formatString()));
+ KConfigGroup group(config_, TQString::tqfromLatin1("ExportOptions - %1").tqarg(formatString()));
m_expandMacros = group.readBoolEntry("Expand Macros", m_expandMacros);
m_packageURL = group.readBoolEntry("URL Package", m_packageURL);
m_skipEmptyKeys = group.readBoolEntry("Skip Empty Keys", m_skipEmptyKeys);
@@ -249,7 +249,7 @@ void BibtexExporter::readOptions(KConfig* config_) {
}
void BibtexExporter::saveOptions(KConfig* config_) {
- KConfigGroup group(config_, TQString::fromLatin1("ExportOptions - %1").arg(formatString()));
+ KConfigGroup group(config_, TQString::tqfromLatin1("ExportOptions - %1").tqarg(formatString()));
m_expandMacros = m_checkExpandMacros->isChecked();
group.writeEntry("Expand Macros", m_expandMacros);
m_packageURL = m_checkPackageURL->isChecked();
@@ -269,8 +269,8 @@ void BibtexExporter::saveOptions(KConfig* config_) {
void BibtexExporter::writeEntryText(TQString& text_, const Data::FieldVec& fields_, const Data::Entry& entry_,
const TQString& type_, const TQString& key_) {
const TQStringList macros = static_cast<const Data::BibtexCollection*>(Data::Document::self()->collection().data())->macroList().keys();
- const TQString bibtex = TQString::fromLatin1("bibtex");
- const TQString bibtexSep = TQString::fromLatin1("bibtex-separator");
+ const TQString bibtex = TQString::tqfromLatin1("bibtex");
+ const TQString bibtexSep = TQString::tqfromLatin1("bibtex-separator");
text_ += '@' + type_ + '{' + key_;
@@ -287,7 +287,7 @@ void BibtexExporter::writeEntryText(TQString& text_, const Data::FieldVec& field
// insert "and" in between them (e.g. author and editor)
if(fIt->formatFlag() == Data::Field::FormatName
&& fIt->flags() & Data::Field::AllowMultiple) {
- value.replace(Data::Field::delimiter(), TQString::fromLatin1(" and "));
+ value.replace(Data::Field::delimiter(), TQString::tqfromLatin1(" and "));
} else if(fIt->flags() & Data::Field::AllowMultiple) {
TQString bibsep = fIt->property(bibtexSep);
if(!bibsep.isEmpty()) {
@@ -295,11 +295,11 @@ void BibtexExporter::writeEntryText(TQString& text_, const Data::FieldVec& field
}
} else if(fIt->type() == Data::Field::Para) {
// strip HTML from bibtex export
- TQRegExp stripHTML(TQString::fromLatin1("<.*>"), true);
+ TQRegExp stripHTML(TQString::tqfromLatin1("<.*>"), true);
stripHTML.setMinimal(true);
value.remove(stripHTML);
} else if(fIt->property(bibtex) == Latin1Literal("pages")) {
- TQRegExp rx(TQString::fromLatin1("(\\d)-(\\d)"));
+ TQRegExp rx(TQString::tqfromLatin1("(\\d)-(\\d)"));
for(int pos = rx.search(value); pos > -1; pos = rx.search(value, pos+2)) {
value.replace(pos, 3, rx.cap(1)+"--"+rx.cap(2));
}
@@ -308,19 +308,19 @@ void BibtexExporter::writeEntryText(TQString& text_, const Data::FieldVec& field
if(m_packageURL && fIt->type() == Data::Field::URL) {
bool b = BibtexHandler::s_quoteStyle == BibtexHandler::BRACES;
value = (b ? TQChar('{') : TQChar('"'))
- + TQString::fromLatin1("\\url{") + BibtexHandler::exportText(value, macros) + TQChar('}')
+ + TQString::tqfromLatin1("\\url{") + BibtexHandler::exportText(value, macros) + TQChar('}')
+ (b ? TQChar('}') : TQChar('"'));
} else if(fIt->type() != Data::Field::Number) {
// numbers aren't escaped, nor will they have macros
// if m_expandMacros is true, then macros is empty, so this is ok even then
value = BibtexHandler::exportText(value, macros);
}
- text_ += TQString::fromLatin1(",\n ")
+ text_ += TQString::tqfromLatin1(",\n ")
+ fIt->property(bibtex)
- + TQString::fromLatin1(" = ")
+ + TQString::tqfromLatin1(" = ")
+ value;
}
- text_ += TQString::fromLatin1("\n}\n\n");
+ text_ += TQString::tqfromLatin1("\n}\n\n");
}
#include "bibtexexporter.moc"