summaryrefslogtreecommitdiff
path: root/plugins/NewStory/src/history_array.cpp
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2023-10-19 18:15:45 +0300
committerGeorge Hazan <george.hazan@gmail.com>2023-10-19 18:15:45 +0300
commitec9b7581909991cacbcd291becdf17ccbf6194b8 (patch)
tree9a017a6f8f60b80b8a573a3706da4ddb0a96de1a /plugins/NewStory/src/history_array.cpp
parentb6f4df821380405c6bfa4a53f9db3874173e4b32 (diff)
mTextControl: RTF code redesign
Diffstat (limited to 'plugins/NewStory/src/history_array.cpp')
-rw-r--r--plugins/NewStory/src/history_array.cpp10
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;
}