diff options
author | George Hazan <george.hazan@gmail.com> | 2023-10-19 18:15:45 +0300 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2023-10-19 18:15:45 +0300 |
commit | ec9b7581909991cacbcd291becdf17ccbf6194b8 (patch) | |
tree | 9a017a6f8f60b80b8a573a3706da4ddb0a96de1a /plugins/NewStory/src/history_array.cpp | |
parent | b6f4df821380405c6bfa4a53f9db3874173e4b32 (diff) |
mTextControl: RTF code redesign
Diffstat (limited to 'plugins/NewStory/src/history_array.cpp')
-rw-r--r-- | plugins/NewStory/src/history_array.cpp | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/plugins/NewStory/src/history_array.cpp b/plugins/NewStory/src/history_array.cpp index efd3fe9267..72d2b2e4ea 100644 --- a/plugins/NewStory/src/history_array.cpp +++ b/plugins/NewStory/src/history_array.cpp @@ -372,10 +372,12 @@ void ItemData::load(bool bFullLoad) void ItemData::setText() { - if (m_bRtf) - data = MTextCreateEx(htuLog, (void*)TplFormatRtf(getTemplate(), hContact, this).c_str(), MTEXT_FLG_RTF); - else - data = MTextCreateW(htuLog, Proto_GetBaseAccountName(hContact), TplFormatString(getTemplate(), hContact, this)); + if (m_bRtf) { + NSRtfProvider prov(this); + data = MTextCreateEx(htuLog, &prov, MTEXT_FLG_RTF); + } + else data = MTextCreateW(htuLog, Proto_GetBaseAccountName(hContact), TplFormatString(getTemplate(), hContact, this)); + savedHeight = -1; } |