summaryrefslogtreecommitdiff
path: root/core/fpdfapi
diff options
context:
space:
mode:
Diffstat (limited to 'core/fpdfapi')
-rw-r--r--core/fpdfapi/font/cpdf_simplefont.cpp2
-rw-r--r--core/fpdfapi/page/cpdf_streamcontentparser.cpp6
2 files changed, 4 insertions, 4 deletions
diff --git a/core/fpdfapi/font/cpdf_simplefont.cpp b/core/fpdfapi/font/cpdf_simplefont.cpp
index 8c8520f0c4..56a4b13cb3 100644
--- a/core/fpdfapi/font/cpdf_simplefont.cpp
+++ b/core/fpdfapi/font/cpdf_simplefont.cpp
@@ -130,7 +130,7 @@ bool CPDF_SimpleFont::LoadCommon() {
}
if (m_pFontFile) {
if (m_BaseFont.GetLength() > 8 && m_BaseFont[7] == '+')
- m_BaseFont = m_BaseFont.Mid(8, m_BaseFont.GetLength() - 8);
+ m_BaseFont = m_BaseFont.Right(m_BaseFont.GetLength() - 8);
} else {
LoadSubstFont();
}
diff --git a/core/fpdfapi/page/cpdf_streamcontentparser.cpp b/core/fpdfapi/page/cpdf_streamcontentparser.cpp
index 5f571aa8d6..288f9d57a8 100644
--- a/core/fpdfapi/page/cpdf_streamcontentparser.cpp
+++ b/core/fpdfapi/page/cpdf_streamcontentparser.cpp
@@ -620,7 +620,7 @@ void CPDF_StreamContentParser::Handle_BeginImage() {
break;
}
auto word = m_pSyntax->GetWord();
- CFX_ByteString key(word.Mid(1, word.GetLength() - 1));
+ CFX_ByteString key(word.Right(word.GetLength() - 1));
auto pObj = m_pSyntax->ReadNextObject(false, false, 0);
if (!key.IsEmpty()) {
uint32_t dwObjNum = pObj ? pObj->GetObjNum() : 0;
@@ -1186,7 +1186,7 @@ CPDF_ColorSpace* CPDF_StreamContentParser::FindColorSpace(
}
if (name == "DeviceGray" || name == "DeviceCMYK" || name == "DeviceRGB") {
CFX_ByteString defname = "Default";
- defname += name.Mid(7, name.GetLength() - 7);
+ defname += name.Right(name.GetLength() - 7);
CPDF_Object* pDefObj = FindResourceObj("ColorSpace", defname);
if (!pDefObj) {
if (name == "DeviceGray") {
@@ -1525,7 +1525,7 @@ uint32_t CPDF_StreamContentParser::Parse(const uint8_t* pData,
break;
case CPDF_StreamParser::Name: {
auto word = syntax.GetWord();
- AddNameParam(word.Mid(1, word.GetLength() - 1));
+ AddNameParam(word.Right(word.GetLength() - 1));
break;
}
default: