summaryrefslogtreecommitdiff
path: root/fpdfsdk
diff options
context:
space:
mode:
Diffstat (limited to 'fpdfsdk')
-rw-r--r--fpdfsdk/formfiller/cba_fontmap.cpp2
-rw-r--r--fpdfsdk/fpdfppo.cpp4
-rw-r--r--fpdfsdk/javascript/PublicMethods.cpp10
3 files changed, 7 insertions, 9 deletions
diff --git a/fpdfsdk/formfiller/cba_fontmap.cpp b/fpdfsdk/formfiller/cba_fontmap.cpp
index b195303800..577faf4b8f 100644
--- a/fpdfsdk/formfiller/cba_fontmap.cpp
+++ b/fpdfsdk/formfiller/cba_fontmap.cpp
@@ -221,7 +221,7 @@ CPDF_Font* CBA_FontMap::GetAnnotDefaultFont(CFX_ByteString* sAlias) {
CFX_ByteString sFontName(syntax.GetWord());
CFX_ByteString sDecodedFontName = PDF_NameDecode(sFontName);
- *sAlias = sDecodedFontName.Mid(1, sDecodedFontName.GetLength() - 1);
+ *sAlias = sDecodedFontName.Right(sDecodedFontName.GetLength() - 1);
CPDF_Dictionary* pFontDict = nullptr;
if (CPDF_Dictionary* pAPDict = m_pAnnotDict->GetDictFor("AP")) {
diff --git a/fpdfsdk/fpdfppo.cpp b/fpdfsdk/fpdfppo.cpp
index d05fab9c0b..bc3d769574 100644
--- a/fpdfsdk/fpdfppo.cpp
+++ b/fpdfsdk/fpdfppo.cpp
@@ -91,7 +91,7 @@ bool ParserPageRangeString(CFX_ByteString rangstring,
nStringTo = rangstring.Find(',', nStringFrom);
if (nStringTo == -1)
nStringTo = nLength;
- cbMidRange = rangstring.Mid(nStringFrom, nStringTo - nStringFrom);
+ cbMidRange = rangstring.Right(nStringTo - nStringFrom);
int nMid = cbMidRange.Find('-');
if (nMid == -1) {
long lPageNum = atol(cbMidRange.c_str());
@@ -99,7 +99,7 @@ bool ParserPageRangeString(CFX_ByteString rangstring,
return false;
pageArray->push_back((uint16_t)lPageNum);
} else {
- int nStartPageNum = atol(cbMidRange.Mid(0, nMid).c_str());
+ int nStartPageNum = atol(cbMidRange.Left(nMid).c_str());
if (nStartPageNum == 0)
return false;
diff --git a/fpdfsdk/javascript/PublicMethods.cpp b/fpdfsdk/javascript/PublicMethods.cpp
index bf84b9cd91..06ed64c7cc 100644
--- a/fpdfsdk/javascript/PublicMethods.cpp
+++ b/fpdfsdk/javascript/PublicMethods.cpp
@@ -980,11 +980,10 @@ bool CJS_PublicMethods::AFNumber_Keystroke(CJS_Runtime* pRuntime,
}
}
- CFX_WideString wprefix = wstrValue.Mid(0, pEvent->SelStart());
+ CFX_WideString wprefix = wstrValue.Left(pEvent->SelStart());
CFX_WideString wpostfix;
if (pEvent->SelEnd() < wstrValue.GetLength())
- wpostfix = wstrValue.Mid(pEvent->SelEnd(),
- wstrValue.GetLength() - pEvent->SelEnd());
+ wpostfix = wstrValue.Right(wstrValue.GetLength() - pEvent->SelEnd());
val = wprefix + wstrChange + wpostfix;
return true;
}
@@ -1532,14 +1531,13 @@ bool CJS_PublicMethods::AFMergeChange(CJS_Runtime* pRuntime,
CFX_WideString prefix, postfix;
if (pEventHandler->SelStart() >= 0)
- prefix = swValue.Mid(0, pEventHandler->SelStart());
+ prefix = swValue.Left(pEventHandler->SelStart());
else
prefix = L"";
if (pEventHandler->SelEnd() >= 0 &&
pEventHandler->SelEnd() <= swValue.GetLength())
- postfix = swValue.Mid(pEventHandler->SelEnd(),
- swValue.GetLength() - pEventHandler->SelEnd());
+ postfix = swValue.Right(swValue.GetLength() - pEventHandler->SelEnd());
else
postfix = L"";