diff options
author | Mataes <mataes2007@gmail.com> | 2020-05-01 18:09:37 +0300 |
---|---|---|
committer | Mataes <mataes2007@gmail.com> | 2020-05-01 18:09:37 +0300 |
commit | 7ce5ce71c631671061ba13fd30b97075fa5f3e63 (patch) | |
tree | 3b7c2536e9ec8e4b30a8a2468ca4aee9bf0f28cc /libs/mTextControl/src | |
parent | 77c1864bf0b2b2085cd55f4413e860f3b433fa2f (diff) |
mtextcontrol: uncomment color bbcode
newstory: test bbcode color
Diffstat (limited to 'libs/mTextControl/src')
-rw-r--r-- | libs/mTextControl/src/fancy_rtf.cpp | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/libs/mTextControl/src/fancy_rtf.cpp b/libs/mTextControl/src/fancy_rtf.cpp index 8746d2fc65..4fe3cf822b 100644 --- a/libs/mTextControl/src/fancy_rtf.cpp +++ b/libs/mTextControl/src/fancy_rtf.cpp @@ -49,6 +49,13 @@ static bool bbCodeSimpleFunc(IFormattedTextDraw *ftd, CHARRANGE range, wchar_t * case BBS_STRIKEOUT_E: cf.dwMask = CFM_STRIKEOUT; break; + case BBS_COLOR_S: + cf.dwMask = CFM_COLOR; + cf.dwEffects = CFE_AUTOCOLOR; + break; + case BBS_COLOR_E: + cf.dwMask = CFM_COLOR; + break; } ITextServices *ts = ftd->getTextService(); @@ -96,8 +103,8 @@ static BBCodeInfo bbCodes[] = { L"[s]", nullptr, bbCodeSimpleFunc, BBS_STRIKEOUT_S }, { L"[/s]", nullptr, bbCodeSimpleFunc, BBS_STRIKEOUT_E }, - // { L"[color=", L"]", bbCodeSimpleFunc, BBS_COLOR_S }, - // { L"[/color]", 0, bbCodeSimpleFunc, BBS_COLOR_E } + { L"[color=", L"]", bbCodeSimpleFunc, BBS_COLOR_S }, + { L"[/color]", 0, bbCodeSimpleFunc, BBS_COLOR_E }, { L"[$hicon=", L"$]", bbCodeImageFunc, 0 } |