Skip to content

Commit

Permalink
html exporter: centered
Browse files Browse the repository at this point in the history
  • Loading branch information
andreas-mausch committed Dec 25, 2014
1 parent 0f2e483 commit f9ad3d3
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 3 deletions.
4 changes: 3 additions & 1 deletion resources/chat_export.html.template
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,15 @@
<html>
<head>
<meta charset="utf-8"/>
<title>Exported Chat XXX</title>
<title>%TITLE%</title>
<style type="text/css">
.chat {
width: 600px;
background-color: #D4D1D1;
font-family: "Verdana", sans-serif;
padding: 10px;
margin-left: auto;
margin-right: auto;
}

.chat_header {
Expand Down
4 changes: 3 additions & 1 deletion source/Exporters/ChatExporterHtml.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,9 @@ void ChatExporterHtml::exportChat(const std::string &filename)
}

std::string html = templateHtml;
replacePlaceholder(html, "%HEADING%", "WhatsApp Chat");
std::string heading = "WhatsApp Chat";
replacePlaceholder(html, "%HEADING%", heading);
replacePlaceholder(html, "%TITLE%", heading + " " + contact);
replacePlaceholder(html, "%CONTACT%", contact);
replacePlaceholder(html, "%MESSAGES%", messages);
replacePlaceholder(html, "%EMOTICON_STYLES%", buildEmoticonStyles(usedEmoticons));
Expand Down
2 changes: 1 addition & 1 deletion source/Libraries/SQLite/SQLiteDatabase.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

SQLiteDatabase::SQLiteDatabase(const std::string &filename)
{
if(sqlite3_open(filename.c_str(), &database) != SQLITE_OK)
if (sqlite3_open(filename.c_str(), &database) != SQLITE_OK)
{
throw SQLiteException("Could not open SQLite database", *this);
}
Expand Down

0 comments on commit f9ad3d3

Please sign in to comment.