| 29 | } |
| 30 | |
| 31 | BOOL SChatEdit::AppendFormatText(const SStringW & strMsg,BOOL bNewLine,BOOL bCanUndo) |
| 32 | { |
| 33 | BOOL bRet = FALSE; |
| 34 | SStringW strBuf= L"<msg>"+strMsg+L"</msg>"; |
| 35 | LPWSTR pszBuf = strBuf.GetBuffer(strBuf.GetLength()); |
| 36 | { |
| 37 | pugi::xml_document doc; |
| 38 | if(doc.load_buffer_inplace(pszBuf,strBuf.GetLength()*2,pugi::parse_default,pugi::encoding_utf16)) |
| 39 | { |
| 40 | bRet = AppendFormatText(doc.child(L"msg"),bNewLine,bCanUndo); |
| 41 | } |
| 42 | } |
| 43 | strBuf.ReleaseBuffer(); |
| 44 | return bRet; |
| 45 | } |
| 46 | |
| 47 | BOOL SChatEdit::AppendFormatText(const pugi::xml_node xmlMsg,BOOL bNewLine,BOOL bCanUndo) |
| 48 | { |
no test coverage detected