summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHenrique Nakashima <hnakashima@chromium.org>2017-06-27 13:38:48 -0400
committerChromium commit bot <commit-bot@chromium.org>2017-06-27 20:01:27 +0000
commit508aa5753c0e8e827fd03cdf9b016c4552ccba03 (patch)
treea24cae4c7242307a23365b697b2ca7476eb42007
parentd60e9ad5194e13475ccb21575a7c57de1e2e22c4 (diff)
downloadpdfium-508aa5753c0e8e827fd03cdf9b016c4552ccba03.tar.xz
Converting CFX_ByteTextBuf to ostringstream in cfx_fontmapper.cpp.
Bug: pdfium:731 Change-Id: I9453f28a17dd34908e6dcc97ea27e5ee84eda2d1 Reviewed-on: https://pdfium-review.googlesource.com/7011 Commit-Queue: dsinclair <dsinclair@chromium.org> Reviewed-by: dsinclair <dsinclair@chromium.org>
-rw-r--r--core/fxge/ge/cfx_fontmapper.cpp9
1 files changed, 5 insertions, 4 deletions
diff --git a/core/fxge/ge/cfx_fontmapper.cpp b/core/fxge/ge/cfx_fontmapper.cpp
index 4d5e9c4831..5b4ceaac59 100644
--- a/core/fxge/ge/cfx_fontmapper.cpp
+++ b/core/fxge/ge/cfx_fontmapper.cpp
@@ -8,6 +8,7 @@
#include <algorithm>
#include <memory>
+#include <sstream>
#include <utility>
#include <vector>
@@ -225,16 +226,16 @@ CFX_ByteString GetFontFamily(CFX_ByteString fontName, int nStyle) {
}
CFX_ByteString ParseStyle(const char* pStyle, int iLen, int iIndex) {
- CFX_ByteTextBuf buf;
+ std::ostringstream buf;
if (!iLen || iLen <= iIndex)
- return buf.MakeString();
+ return CFX_ByteString(buf);
while (iIndex < iLen) {
if (pStyle[iIndex] == ',')
break;
- buf.AppendChar(pStyle[iIndex]);
+ buf << pStyle[iIndex];
++iIndex;
}
- return buf.MakeString();
+ return CFX_ByteString(buf);
}
int32_t GetStyleType(const CFX_ByteString& bsStyle, bool bReverse) {