From 740d8a6bcb6521e188361befa7f5636c880bf63b Mon Sep 17 00:00:00 2001 From: Stef Walter Date: Thu, 29 Jul 2004 22:52:30 +0000 Subject: - Moved to DOMC --- src/rtfparser.cpp | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'src/rtfparser.cpp') diff --git a/src/rtfparser.cpp b/src/rtfparser.cpp index c136e95..cf61496 100644 --- a/src/rtfparser.cpp +++ b/src/rtfparser.cpp @@ -41,6 +41,7 @@ #include #include #include "rtfparser.h" +#include "internal.h" /* ---------------------------------------------------------------------------------- @@ -197,10 +198,10 @@ void RtfParser::sendData(wchar_t ch) m_uniEat--; else - m_dataBuffer.append(1, ch); + transcode16to8(ch, m_dataBuffer); } -void RtfParser::sendData(wstring data) +void RtfParser::sendData(const wstring& data) { // Skip any unicode chars we've been asked to if(m_uniEat > 0) @@ -209,16 +210,16 @@ void RtfParser::sendData(wstring data) if(len > m_uniEat) len = m_uniEat; - m_dataBuffer.append(data.substr(len)); + transcode16to8(data.substr(len), m_dataBuffer); m_uniEat -= len; } else { - m_dataBuffer.append(data); + transcode16to8(data, m_dataBuffer); } } -void RtfParser::sendControlWord(string cw, int flags, int param) +void RtfParser::sendControlWord(const string& cw, int flags, int param) { flushData(); -- cgit v1.2.3