summaryrefslogtreecommitdiff
path: root/core/src/fpdfapi/fpdf_edit/fpdf_edit_doc.cpp
diff options
context:
space:
mode:
authorWei Li <weili@chromium.org>2016-01-29 15:44:20 -0800
committerWei Li <weili@chromium.org>2016-01-29 15:44:20 -0800
commit9b76113ae4567eb998618d049afde26d3f0175d5 (patch)
treeede02b9835770dafe91eaee727e328765e4ffd52 /core/src/fpdfapi/fpdf_edit/fpdf_edit_doc.cpp
parent47f7199eee69abdd48c5ab16a5b8f5aef433a003 (diff)
downloadpdfium-9b76113ae4567eb998618d049afde26d3f0175d5.tar.xz
Merge to XFA: Member function name refactoring
This is needed by Cl 1634373003 as the name collision with virtual functions will be shown as warnings on Linux. Also, it is better to use different names for different cases. R=thestig@chromium.org Review URL: https://codereview.chromium.org/1644633003 . (cherry picked from commit d45e7a51904164fb22049f0a7a80d2a94c06936b) Review URL: https://codereview.chromium.org/1648233002 .
Diffstat (limited to 'core/src/fpdfapi/fpdf_edit/fpdf_edit_doc.cpp')
-rw-r--r--core/src/fpdfapi/fpdf_edit/fpdf_edit_doc.cpp30
1 files changed, 15 insertions, 15 deletions
diff --git a/core/src/fpdfapi/fpdf_edit/fpdf_edit_doc.cpp b/core/src/fpdfapi/fpdf_edit/fpdf_edit_doc.cpp
index 9fa196fd34..3595c99428 100644
--- a/core/src/fpdfapi/fpdf_edit/fpdf_edit_doc.cpp
+++ b/core/src/fpdfapi/fpdf_edit/fpdf_edit_doc.cpp
@@ -197,7 +197,7 @@ static void _InsertWidthArray(HDC hDC,
break;
}
if (i == size) {
- int first = pWidthArray->GetInteger(pWidthArray->GetCount() - 1);
+ int first = pWidthArray->GetIntegerAt(pWidthArray->GetCount() - 1);
pWidthArray->AddInteger(first + size - 1);
pWidthArray->AddInteger(*widths);
} else {
@@ -533,7 +533,7 @@ static void _InsertWidthArray(CTFontRef font,
break;
}
if (i == size) {
- int first = pWidthArray->GetInteger(pWidthArray->GetCount() - 1);
+ int first = pWidthArray->GetIntegerAt(pWidthArray->GetCount() - 1);
pWidthArray->AddInteger(first + size - 1);
pWidthArray->AddInteger(*widths);
} else {
@@ -811,7 +811,7 @@ static void _InsertWidthArray1(CFX_Font* pFont,
break;
}
if (i == size) {
- int first = pWidthArray->GetInteger(pWidthArray->GetCount() - 1);
+ int first = pWidthArray->GetIntegerAt(pWidthArray->GetCount() - 1);
pWidthArray->AddInteger(first + size - 1);
pWidthArray->AddInteger(*widths);
} else {
@@ -1018,14 +1018,14 @@ static int InsertDeletePDFPage(CPDF_Document* pDoc,
CPDF_Dictionary* pPage,
FX_BOOL bInsert,
CFX_ArrayTemplate<CPDF_Dictionary*>& stackList) {
- CPDF_Array* pKidList = pPages->GetArray("Kids");
+ CPDF_Array* pKidList = pPages->GetArrayBy("Kids");
if (!pKidList) {
return -1;
}
int nKids = pKidList->GetCount();
for (int i = 0; i < nKids; i++) {
- CPDF_Dictionary* pKid = pKidList->GetDict(i);
- if (pKid->GetString("Type") == "Page") {
+ CPDF_Dictionary* pKid = pKidList->GetDictAt(i);
+ if (pKid->GetStringBy("Type") == "Page") {
if (nPagesToGo == 0) {
if (bInsert) {
pKidList->InsertAt(i, new CPDF_Reference(pDoc, pPage->GetObjNum()));
@@ -1033,13 +1033,13 @@ static int InsertDeletePDFPage(CPDF_Document* pDoc,
} else {
pKidList->RemoveAt(i);
}
- pPages->SetAtInteger("Count",
- pPages->GetInteger("Count") + (bInsert ? 1 : -1));
+ pPages->SetAtInteger(
+ "Count", pPages->GetIntegerBy("Count") + (bInsert ? 1 : -1));
return 1;
}
nPagesToGo--;
} else {
- int nPages = pKid->GetInteger("Count");
+ int nPages = pKid->GetIntegerBy("Count");
if (nPagesToGo < nPages) {
int stackCount = stackList.GetSize();
for (int j = 0; j < stackCount; ++j) {
@@ -1053,8 +1053,8 @@ static int InsertDeletePDFPage(CPDF_Document* pDoc,
return -1;
}
stackList.RemoveAt(stackCount);
- pPages->SetAtInteger("Count",
- pPages->GetInteger("Count") + (bInsert ? 1 : -1));
+ pPages->SetAtInteger(
+ "Count", pPages->GetIntegerBy("Count") + (bInsert ? 1 : -1));
return 1;
}
nPagesToGo -= nPages;
@@ -1070,7 +1070,7 @@ static int InsertNewPage(CPDF_Document* pDoc,
if (!pRoot) {
return -1;
}
- CPDF_Dictionary* pPages = pRoot->GetDict("Pages");
+ CPDF_Dictionary* pPages = pRoot->GetDictBy("Pages");
if (!pPages) {
return -1;
}
@@ -1079,7 +1079,7 @@ static int InsertNewPage(CPDF_Document* pDoc,
return -1;
}
if (iPage == nPages) {
- CPDF_Array* pPagesList = pPages->GetArray("Kids");
+ CPDF_Array* pPagesList = pPages->GetArrayBy("Kids");
if (!pPagesList) {
pPagesList = new CPDF_Array;
pPages->SetAt("Kids", pPagesList);
@@ -1121,11 +1121,11 @@ void CPDF_Document::DeletePage(int iPage) {
if (!pRoot) {
return;
}
- CPDF_Dictionary* pPages = pRoot->GetDict("Pages");
+ CPDF_Dictionary* pPages = pRoot->GetDictBy("Pages");
if (!pPages) {
return;
}
- int nPages = pPages->GetInteger("Count");
+ int nPages = pPages->GetIntegerBy("Count");
if (iPage < 0 || iPage >= nPages) {
return;
}