diff options
author | Wei Li <weili@chromium.org> | 2016-01-29 15:44:20 -0800 |
---|---|---|
committer | Wei Li <weili@chromium.org> | 2016-01-29 15:44:20 -0800 |
commit | 9b76113ae4567eb998618d049afde26d3f0175d5 (patch) | |
tree | ede02b9835770dafe91eaee727e328765e4ffd52 /core/src/fpdfapi/fpdf_edit | |
parent | 47f7199eee69abdd48c5ab16a5b8f5aef433a003 (diff) | |
download | pdfium-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')
-rw-r--r-- | core/src/fpdfapi/fpdf_edit/fpdf_edit_content.cpp | 2 | ||||
-rw-r--r-- | core/src/fpdfapi/fpdf_edit/fpdf_edit_create.cpp | 10 | ||||
-rw-r--r-- | core/src/fpdfapi/fpdf_edit/fpdf_edit_doc.cpp | 30 |
3 files changed, 21 insertions, 21 deletions
diff --git a/core/src/fpdfapi/fpdf_edit/fpdf_edit_content.cpp b/core/src/fpdfapi/fpdf_edit/fpdf_edit_content.cpp index a7df332337..555de449fa 100644 --- a/core/src/fpdfapi/fpdf_edit/fpdf_edit_content.cpp +++ b/core/src/fpdfapi/fpdf_edit/fpdf_edit_content.cpp @@ -61,7 +61,7 @@ CFX_ByteString CPDF_PageContentGenerator::RealizeResource( int objnum = m_pDocument->AddIndirectObject(m_pPage->m_pResources); m_pPage->m_pFormDict->SetAtReference("Resources", m_pDocument, objnum); } - CPDF_Dictionary* pResList = m_pPage->m_pResources->GetDict(szType); + CPDF_Dictionary* pResList = m_pPage->m_pResources->GetDictBy(szType); if (!pResList) { pResList = new CPDF_Dictionary; m_pPage->m_pResources->SetAt(szType, pResList); diff --git a/core/src/fpdfapi/fpdf_edit/fpdf_edit_create.cpp b/core/src/fpdfapi/fpdf_edit/fpdf_edit_create.cpp index 8d0f6210d8..50644706b6 100644 --- a/core/src/fpdfapi/fpdf_edit/fpdf_edit_create.cpp +++ b/core/src/fpdfapi/fpdf_edit/fpdf_edit_create.cpp @@ -964,7 +964,7 @@ int32_t CPDF_Creator::WriteIndirectObjectToStream(const CPDF_Object* pObj) { CPDF_Dictionary* pDict = pObj->GetDict(); if (pObj->IsStream()) { - if (pDict && pDict->GetString("Type") == "XRef") + if (pDict && pDict->GetStringBy("Type") == "XRef") return 0; return 1; } @@ -974,7 +974,7 @@ int32_t CPDF_Creator::WriteIndirectObjectToStream(const CPDF_Object* pObj) { return 1; if (IsSignatureDict(pDict)) return 1; - if (pDict->GetString("Type") == "Page") + if (pDict->GetStringBy("Type") == "Page") return 1; } @@ -1039,7 +1039,7 @@ int32_t CPDF_Creator::WriteStream(const CPDF_Object* pStream, encoder.m_dwSize)) { return -1; } - if ((FX_DWORD)encoder.m_pDict->GetInteger("Length") != encryptor.m_dwSize) { + if ((FX_DWORD)encoder.m_pDict->GetIntegerBy("Length") != encryptor.m_dwSize) { encoder.CloneDict(); encoder.m_pDict->SetAtInteger("Length", encryptor.m_dwSize); } @@ -1155,7 +1155,7 @@ int32_t CPDF_Creator::WriteDirectObj(FX_DWORD objnum, CPDF_Encryptor encryptor; CPDF_CryptoHandler* pHandler = m_pCryptoHandler; encryptor.Initialize(pHandler, objnum, encoder.m_pData, encoder.m_dwSize); - if ((FX_DWORD)encoder.m_pDict->GetInteger("Length") != + if ((FX_DWORD)encoder.m_pDict->GetIntegerBy("Length") != encryptor.m_dwSize) { encoder.CloneDict(); encoder.m_pDict->SetAtInteger("Length", encryptor.m_dwSize); @@ -2015,7 +2015,7 @@ void CPDF_Creator::InitID(FX_BOOL bDefault) { } m_pIDArray->Add(m_pIDArray->GetElement(0)->Clone()); if (m_pEncryptDict && !pOldIDArray && m_pParser && bNewId) { - if (m_pEncryptDict->GetString("Filter") == "Standard") { + if (m_pEncryptDict->GetStringBy("Filter") == "Standard") { CPDF_StandardSecurityHandler handler; CFX_ByteString user_pass = m_pParser->GetPassword(); FX_DWORD flag = PDF_ENCRYPT_CONTENT; 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; } |