summaryrefslogtreecommitdiff
path: root/src/rtfparser.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/rtfparser.cpp')
-rw-r--r--src/rtfparser.cpp11
1 files changed, 6 insertions, 5 deletions
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 <stdlib.h>
#include <stdio.h>
#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();