summaryrefslogtreecommitdiff
path: root/core
diff options
context:
space:
mode:
Diffstat (limited to 'core')
-rw-r--r--core/fpdfapi/font/cpdf_simplefont.cpp2
-rw-r--r--core/fpdfapi/page/cpdf_streamcontentparser.cpp6
-rw-r--r--core/fpdfdoc/cpvt_generateap.cpp4
-rw-r--r--core/fpdftext/cpdf_linkextract.cpp2
-rw-r--r--core/fpdftext/cpdf_textpage.cpp4
-rw-r--r--core/fpdftext/cpdf_textpagefind.cpp2
-rw-r--r--core/fxcrt/xml/cxml_parser.cpp4
-rw-r--r--core/fxge/cfx_fontmapper.cpp6
8 files changed, 15 insertions, 15 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:
diff --git a/core/fpdfdoc/cpvt_generateap.cpp b/core/fpdfdoc/cpvt_generateap.cpp
index 83c1f65587..956f91289b 100644
--- a/core/fpdfdoc/cpvt_generateap.cpp
+++ b/core/fpdfdoc/cpvt_generateap.cpp
@@ -66,7 +66,7 @@ bool GenerateWidgetAP(CPDF_Document* pDoc,
return false;
CPDF_Dictionary* pFontDict =
- pDRFontDict->GetDictFor(sFontName.Mid(1, sFontName.GetLength() - 1));
+ pDRFontDict->GetDictFor(sFontName.Right(sFontName.GetLength() - 1));
if (!pFontDict) {
pFontDict = pDoc->NewIndirect<CPDF_Dictionary>();
pFontDict->SetNewFor<CPDF_Name>("Type", "Font");
@@ -74,7 +74,7 @@ bool GenerateWidgetAP(CPDF_Document* pDoc,
pFontDict->SetNewFor<CPDF_Name>("BaseFont", "Helvetica");
pFontDict->SetNewFor<CPDF_Name>("Encoding", "WinAnsiEncoding");
pDRFontDict->SetNewFor<CPDF_Reference>(
- sFontName.Mid(1, sFontName.GetLength() - 1), pDoc,
+ sFontName.Right(sFontName.GetLength() - 1), pDoc,
pFontDict->GetObjNum());
}
CPDF_Font* pDefFont = pDoc->LoadFont(pFontDict);
diff --git a/core/fpdftext/cpdf_linkextract.cpp b/core/fpdftext/cpdf_linkextract.cpp
index 5179f732c9..e0bd4ae49f 100644
--- a/core/fpdftext/cpdf_linkextract.cpp
+++ b/core/fpdftext/cpdf_linkextract.cpp
@@ -154,7 +154,7 @@ void CPDF_LinkExtract::ParseLink() {
while (strBeCheck.GetLength() > 0) {
wchar_t ch = strBeCheck.GetAt(strBeCheck.GetLength() - 1);
if (ch == L')' || ch == L',' || ch == L'>' || ch == L'.') {
- strBeCheck = strBeCheck.Mid(0, strBeCheck.GetLength() - 1);
+ strBeCheck = strBeCheck.Left(strBeCheck.GetLength() - 1);
nCount--;
} else {
break;
diff --git a/core/fpdftext/cpdf_textpage.cpp b/core/fpdftext/cpdf_textpage.cpp
index 1dc03db4ff..8f0e376dbc 100644
--- a/core/fpdftext/cpdf_textpage.cpp
+++ b/core/fpdftext/cpdf_textpage.cpp
@@ -441,8 +441,8 @@ CFX_WideString CPDF_TextPage::GetPageText(int start, int nCount) const {
if (nCount == -1) {
nCount = pdfium::CollectionSize<int>(m_CharList) - start;
- return CFX_WideString(
- m_TextBuf.AsStringC().Mid(start, m_TextBuf.AsStringC().GetLength()));
+ CFX_WideStringC wsTextBuf = m_TextBuf.AsStringC();
+ return CFX_WideString(wsTextBuf.Right(wsTextBuf.GetLength() - start));
}
if (nCount <= 0 || m_CharList.empty())
return L"";
diff --git a/core/fpdftext/cpdf_textpagefind.cpp b/core/fpdftext/cpdf_textpagefind.cpp
index 058c293ac1..fe610abcd4 100644
--- a/core/fpdftext/cpdf_textpagefind.cpp
+++ b/core/fpdftext/cpdf_textpagefind.cpp
@@ -300,7 +300,7 @@ void CPDF_TextPageFind::ExtractFindWhat(const CFX_WideString& findwhat) {
continue;
}
if (pos > 0)
- m_csFindWhatArray.push_back(csWord.Mid(0, pos));
+ m_csFindWhatArray.push_back(csWord.Left(pos));
m_csFindWhatArray.push_back(curStr);
if (pos == csWord.GetLength() - 1) {
csWord.clear();
diff --git a/core/fxcrt/xml/cxml_parser.cpp b/core/fxcrt/xml/cxml_parser.cpp
index 0166ea8490..5ac1f82206 100644
--- a/core/fxcrt/xml/cxml_parser.cpp
+++ b/core/fxcrt/xml/cxml_parser.cpp
@@ -86,8 +86,8 @@ void FX_XML_SplitQualifiedName(const CFX_ByteStringC& bsFullName,
if (iStart == -1) {
bsName = bsFullName;
} else {
- bsSpace = bsFullName.Mid(0, iStart);
- bsName = bsFullName.Mid(iStart + 1, bsFullName.GetLength() - (iStart + 1));
+ bsSpace = bsFullName.Left(iStart);
+ bsName = bsFullName.Right(bsFullName.GetLength() - (iStart + 1));
}
}
diff --git a/core/fxge/cfx_fontmapper.cpp b/core/fxge/cfx_fontmapper.cpp
index 5c7b602fed..4c0073ab73 100644
--- a/core/fxge/cfx_fontmapper.cpp
+++ b/core/fxge/cfx_fontmapper.cpp
@@ -432,7 +432,7 @@ FXFT_Face CFX_FontMapper::FindSubstFont(const CFX_ByteString& name,
CFX_ByteString SubstName = name;
SubstName.Remove(' ');
if (bTrueType && name[0] == '@')
- SubstName = name.Mid(1, name.GetLength() - 1);
+ SubstName = name.Right(name.GetLength() - 1);
PDF_GetStandardFontName(&SubstName);
if (SubstName == "Symbol" && !bTrueType) {
pSubstFont->m_Family = "Chrome Symbol";
@@ -453,7 +453,7 @@ FXFT_Face CFX_FontMapper::FindSubstFont(const CFX_ByteString& name,
if (find >= 0) {
family = SubstName.Left(find);
PDF_GetStandardFontName(&family);
- style = SubstName.Mid(find + 1, SubstName.GetLength() - (find + 1));
+ style = SubstName.Right(SubstName.GetLength() - (find + 1));
bHasComma = true;
} else {
family = SubstName;
@@ -480,7 +480,7 @@ FXFT_Face CFX_FontMapper::FindSubstFont(const CFX_ByteString& name,
if (!bHasComma) {
find = family.ReverseFind('-');
if (find >= 0) {
- style = family.Mid(find + 1, family.GetLength() - (find + 1));
+ style = family.Right(family.GetLength() - (find + 1));
family = family.Left(find);
bHasHyphen = true;
}