summaryrefslogtreecommitdiff
path: root/core/src/fpdfapi/fpdf_parser
diff options
context:
space:
mode:
Diffstat (limited to 'core/src/fpdfapi/fpdf_parser')
-rw-r--r--core/src/fpdfapi/fpdf_parser/fpdf_parser_decode.cpp4
-rw-r--r--core/src/fpdfapi/fpdf_parser/fpdf_parser_fdf.cpp6
-rw-r--r--core/src/fpdfapi/fpdf_parser/fpdf_parser_objects.cpp2
3 files changed, 4 insertions, 8 deletions
diff --git a/core/src/fpdfapi/fpdf_parser/fpdf_parser_decode.cpp b/core/src/fpdfapi/fpdf_parser/fpdf_parser_decode.cpp
index 9514065eeb..0bb66da209 100644
--- a/core/src/fpdfapi/fpdf_parser/fpdf_parser_decode.cpp
+++ b/core/src/fpdfapi/fpdf_parser/fpdf_parser_decode.cpp
@@ -436,10 +436,6 @@ CFX_WideString PDF_DecodeText(FX_LPCBYTE src_data, FX_DWORD src_len, CFX_CharMap
}
return result;
}
-CFX_WideString PDF_DecodeText(const CFX_ByteString& bstr, CFX_CharMap* pCharMap)
-{
- return PDF_DecodeText((FX_LPCBYTE)bstr.c_str(), bstr.GetLength(), pCharMap);
-}
CFX_ByteString PDF_EncodeText(FX_LPCWSTR pString, int len, CFX_CharMap* pCharMap)
{
if (len == -1) {
diff --git a/core/src/fpdfapi/fpdf_parser/fpdf_parser_fdf.cpp b/core/src/fpdfapi/fpdf_parser/fpdf_parser_fdf.cpp
index db4d0dba43..5bacfd7393 100644
--- a/core/src/fpdfapi/fpdf_parser/fpdf_parser_fdf.cpp
+++ b/core/src/fpdfapi/fpdf_parser/fpdf_parser_fdf.cpp
@@ -141,7 +141,7 @@ void FPDF_FileSpec_SetWin32Path(CPDF_Object* pFileSpec, const CFX_WideString& fi
} else if (filepath.GetLength() > 1 && filepath[0] == '\\' && filepath[1] == '\\') {
result = ChangeSlash(filepath.c_str() + 1);
} else {
- result = ChangeSlash(filepath);
+ result = ChangeSlash(filepath.c_str());
}
if (pFileSpec->GetType() == PDFOBJ_STRING) {
pFileSpec->SetString(CFX_ByteString::FromUnicode(result));
@@ -173,7 +173,7 @@ CFX_WideString FPDF_FileSpec_GetWin32Path(const CPDF_Object* pFileSpec)
wsFileName = CFX_WideString::FromLocal(pFileSpec->GetString());
}
if (wsFileName[0] != '/') {
- return ChangeSlash(wsFileName);
+ return ChangeSlash(wsFileName.c_str());
}
if (wsFileName[2] == '/') {
CFX_WideString result;
@@ -184,7 +184,7 @@ CFX_WideString FPDF_FileSpec_GetWin32Path(const CPDF_Object* pFileSpec)
} else {
CFX_WideString result;
result += '\\';
- result += ChangeSlash(wsFileName);
+ result += ChangeSlash(wsFileName.c_str());
return result;
}
}
diff --git a/core/src/fpdfapi/fpdf_parser/fpdf_parser_objects.cpp b/core/src/fpdfapi/fpdf_parser/fpdf_parser_objects.cpp
index 912af297f5..008349c61c 100644
--- a/core/src/fpdfapi/fpdf_parser/fpdf_parser_objects.cpp
+++ b/core/src/fpdfapi/fpdf_parser/fpdf_parser_objects.cpp
@@ -375,7 +375,7 @@ void CPDF_Number::SetNumber(FX_FLOAT value)
m_Float = value;
}
CPDF_String::CPDF_String(const CFX_WideString& str) : CPDF_Object(PDFOBJ_STRING), m_bHex(FALSE) {
- m_String = PDF_EncodeText(str, str.GetLength());
+ m_String = PDF_EncodeText(str);
}
CPDF_Array::~CPDF_Array()
{