diff options
author | George Hazan <ghazan@miranda.im> | 2017-10-30 15:10:50 +0300 |
---|---|---|
committer | George Hazan <ghazan@miranda.im> | 2017-10-30 15:10:57 +0300 |
commit | 1d0b695325e4a1d11c9986403766041e1be2ef4f (patch) | |
tree | 7a8b527e626c0476f1f31bbe2c3ec52daceaec98 /plugins/TabSRMM/src/msglog.cpp | |
parent | 7ed053c528020b73fe9f620a530a7c68f2d56433 (diff) |
fixes #1010 (custom colors do not appear in the IRC log)
Diffstat (limited to 'plugins/TabSRMM/src/msglog.cpp')
-rw-r--r-- | plugins/TabSRMM/src/msglog.cpp | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/plugins/TabSRMM/src/msglog.cpp b/plugins/TabSRMM/src/msglog.cpp index 512cd8373f..d96e3ddcbf 100644 --- a/plugins/TabSRMM/src/msglog.cpp +++ b/plugins/TabSRMM/src/msglog.cpp @@ -351,8 +351,10 @@ static void Build_RTF_Header(CMStringA &str, CTabBaseDlg *dat) }
// bbcode colors...
- for (i = 0; i < Utils::rtf_ctable_size; i++)
- str.AppendFormat("\\red%u\\green%u\\blue%u;", GetRValue(Utils::rtf_ctable[i].clr), GetGValue(Utils::rtf_ctable[i].clr), GetBValue(Utils::rtf_ctable[i].clr));
+ for (i = 0; i < Utils::rtf_clrs.getCount(); i++) {
+ auto &p = Utils::rtf_clrs[i];
+ str.AppendFormat("\\red%u\\green%u\\blue%u;", GetRValue(p.clr), GetGValue(p.clr), GetBValue(p.clr));
+ }
// paragraph header
str.AppendFormat("}");
@@ -1083,8 +1085,8 @@ void CTabBaseDlg::ReplaceIcons(LONG startAt, int fAppend, BOOL isSent) m_log.SendMsg(EM_REPLACESEL, FALSE, (LPARAM)L"");
UINT length = (unsigned int)_wtol(&trbuffer[7]);
int index = _wtol(&trbuffer[14]);
- if (length > 0 && length < 20000 && index >= RTF_CTABLE_DEFSIZE && index < Utils::rtf_ctable_size) {
- cf2.crTextColor = Utils::rtf_ctable[index].clr;
+ if (length > 0 && length < 20000 && index >= RTF_CTABLE_DEFSIZE && index < Utils::rtf_clrs.getCount()) {
+ cf2.crTextColor = Utils::rtf_clrs[index].clr;
cr.cpMin = fi.chrgText.cpMin;
cr.cpMax = cr.cpMin + length;
m_log.SendMsg(EM_EXSETSEL, 0, (LPARAM)&cr);
|