summaryrefslogtreecommitdiff
path: root/plugins/IEView/src
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/IEView/src')
-rw-r--r--plugins/IEView/src/IEView.cpp2
-rw-r--r--plugins/IEView/src/MUCCHTMLBuilder.cpp2
-rw-r--r--plugins/IEView/src/ScriverHTMLBuilder.cpp6
-rw-r--r--plugins/IEView/src/TextToken.cpp12
-rw-r--r--plugins/IEView/src/TextToken.h14
5 files changed, 13 insertions, 23 deletions
diff --git a/plugins/IEView/src/IEView.cpp b/plugins/IEView/src/IEView.cpp
index 28b19a3562..260b9b007d 100644
--- a/plugins/IEView/src/IEView.cpp
+++ b/plugins/IEView/src/IEView.cpp
@@ -1122,7 +1122,7 @@ void IEView::saveDocument()
VARIANT vValue;
vValue.vt = VT_BOOL;
- vValue.boolVal = TRUE;
+ vValue.boolVal = VARIANT_TRUE;
VARIANT_BOOL vb;
document->execCommand(BSTR_PTR(L"SaveAs"), VARIANT_FALSE, vValue, &vb);
diff --git a/plugins/IEView/src/MUCCHTMLBuilder.cpp b/plugins/IEView/src/MUCCHTMLBuilder.cpp
index f7885430c1..b2bd3968f4 100644
--- a/plugins/IEView/src/MUCCHTMLBuilder.cpp
+++ b/plugins/IEView/src/MUCCHTMLBuilder.cpp
@@ -199,7 +199,7 @@ void MUCCHTMLBuilder::appendEventNonTemplate(IEView *view, IEVIEWEVENT *event)
str.AppendFormat("<div class=\"%s\">", isSent ? "divOut" : "divIn");
if (dwData & IEEDD_MUCC_SHOW_TIME || dwData & IEEDD_MUCC_SHOW_DATE)
- str.AppendFormat("<span class=\"%s\">%s </span>", isSent ? "timestamp" : "timestamp", timestampToString(dwData, eventData->time));
+ str.AppendFormat("<span class=\"%s\">%s </span>", "timestamp", timestampToString(dwData, eventData->time));
if (dwData & IEEDD_MUCC_SHOW_NICK)
str.AppendFormat("<span class=\"%s\">%s: </span>", isSent ? "nameOut" : "nameIn", szName.get());
diff --git a/plugins/IEView/src/ScriverHTMLBuilder.cpp b/plugins/IEView/src/ScriverHTMLBuilder.cpp
index bcb7096ba5..7086f35447 100644
--- a/plugins/IEView/src/ScriverHTMLBuilder.cpp
+++ b/plugins/IEView/src/ScriverHTMLBuilder.cpp
@@ -302,15 +302,15 @@ void ScriverHTMLBuilder::appendEventNonTemplate(IEView *view, IEVIEWEVENT *event
/* Scriver-specific formatting */
if ((dwFlags & SMF_LOG_DRAWLINES) && isGroupBreak && getLastEventType() != -1) {
if (eventData->iType == IEED_EVENT_MESSAGE)
- className = isRTL ? isSent ? "divOutGridRTL" : "divInGridRTL" : isSent ? "divOutGrid" : "divInGrid";
+ className = isRTL ? (isSent ? "divOutGridRTL" : "divInGridRTL") : (isSent ? "divOutGrid" : "divInGrid");
else
- className = isRTL ? isSent ? "divNoticeGridRTL" : "divNoticeGridRTL" : isSent ? "divNoticeGrid" : "divNoticeGrid";
+ className = isRTL ? "divNoticeGridRTL" : "divNoticeGrid";
}
else {
if (eventData->iType == IEED_EVENT_MESSAGE)
className = isRTL ? (isSent ? "divOutRTL" : "divInRTL") : (isSent ? "divOut" : "divIn");
else
- className = isRTL ? "divNoticeRTL" : (isSent ? "divNotice" : "divNotice");
+ className = isRTL ? "divNoticeRTL" : "divNotice";
}
CMStringA str;
diff --git a/plugins/IEView/src/TextToken.cpp b/plugins/IEView/src/TextToken.cpp
index aebc99d09f..0e322d00ec 100644
--- a/plugins/IEView/src/TextToken.cpp
+++ b/plugins/IEView/src/TextToken.cpp
@@ -23,26 +23,16 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
TextToken::TextToken(int _type, const char *_text, int _len)
{
- next = nullptr;
- tag = 0;
- end = false;
type = _type;
text = mir_strndup(_text, _len);
wtext = mir_a2u(text);
- link = nullptr;
- wlink = nullptr;
}
TextToken::TextToken(int _type, const wchar_t *_wtext, int _len)
{
- next = nullptr;
- tag = 0;
- end = false;
type = _type;
wtext = mir_wstrndup(_wtext, _len);
text = mir_u2a(wtext);
- link = nullptr;
- wlink = nullptr;
}
TextToken::~TextToken()
@@ -520,7 +510,7 @@ void TextToken::toString(CMStringW &str)
match = wcsstr(match + 11, L"v=");
if (match != nullptr) {
match += 2;
- wchar_t *match2 = wcsstr(match, L"&");
+ wchar_t *match2 = wcschr(match, '&');
int len = match2 != nullptr ? match2 - match : (int)mir_wstrlen(match);
match = mir_wstrdup(match);
match[len] = 0;
diff --git a/plugins/IEView/src/TextToken.h b/plugins/IEView/src/TextToken.h
index 7e5ef3260c..8cc048e18a 100644
--- a/plugins/IEView/src/TextToken.h
+++ b/plugins/IEView/src/TextToken.h
@@ -25,15 +25,15 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
class TextToken {
private:
int type;
- bool end;
- int tag;
- DWORD value;
+ bool end = false;
+ int tag = 0;
+ DWORD value = 0;
wchar_t *wtext;
char *text;
- wchar_t *wlink;
- char *link;
- TextToken *next;
- static TextToken* tokenizeBBCodes(const wchar_t *text, int len);
+ wchar_t *wlink = nullptr;
+ char *link = nullptr;
+ TextToken *next = nullptr;
+ static TextToken* tokenizeBBCodes(const wchar_t *text, int len);
public:
enum TOKENS {
END = 0,