From 38fd84428a1ea007a043be0b7d9b289e47aa5da0 Mon Sep 17 00:00:00 2001 From: dsinclair Date: Thu, 15 Sep 2016 10:15:32 -0700 Subject: Rename dictionary set and get methods This Cl makes the Get and Set methods consistenly use {G|S}etFor. BUG=pdfium:596 Review-Url: https://codereview.chromium.org/2334323005 --- fpdfsdk/fpdf_transformpage.cpp | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) (limited to 'fpdfsdk/fpdf_transformpage.cpp') diff --git a/fpdfsdk/fpdf_transformpage.cpp b/fpdfsdk/fpdf_transformpage.cpp index c77ece7b9d..7b2bf73871 100644 --- a/fpdfsdk/fpdf_transformpage.cpp +++ b/fpdfsdk/fpdf_transformpage.cpp @@ -31,7 +31,7 @@ void SetBoundingBox(CPDF_Page* page, pBoundingBoxArray->Add(new CPDF_Number(bottom)); pBoundingBoxArray->Add(new CPDF_Number(right)); pBoundingBoxArray->Add(new CPDF_Number(top)); - page->m_pFormDict->SetAt(key, pBoundingBoxArray); + page->m_pFormDict->SetFor(key, pBoundingBoxArray); } bool GetBoundingBox(CPDF_Page* page, @@ -40,7 +40,7 @@ bool GetBoundingBox(CPDF_Page* page, float* bottom, float* right, float* top) { - CPDF_Array* pArray = page->m_pFormDict->GetArrayBy(key); + CPDF_Array* pArray = page->m_pFormDict->GetArrayFor(key); if (!pArray) return false; @@ -119,9 +119,9 @@ DLLEXPORT FPDF_BOOL STDCALL FPDFPage_TransFormWithClip(FPDF_PAGE page, CPDF_Dictionary* pPageDic = pPage->m_pFormDict; CPDF_Object* pContentObj = - pPageDic ? pPageDic->GetObjectBy("Contents") : nullptr; + pPageDic ? pPageDic->GetObjectFor("Contents") : nullptr; if (!pContentObj) - pContentObj = pPageDic ? pPageDic->GetArrayBy("Contents") : nullptr; + pContentObj = pPageDic ? pPageDic->GetArrayFor("Contents") : nullptr; if (!pContentObj) return FALSE; @@ -159,16 +159,16 @@ DLLEXPORT FPDF_BOOL STDCALL FPDFPage_TransFormWithClip(FPDF_PAGE page, pContentArray->AddReference(pDoc, pStream->GetObjNum()); pContentArray->AddReference(pDoc, pDirectObj->GetObjNum()); pContentArray->AddReference(pDoc, pEndStream); - pPageDic->SetAtReference("Contents", pDoc, - pDoc->AddIndirectObject(pContentArray)); + pPageDic->SetReferenceFor("Contents", pDoc, + pDoc->AddIndirectObject(pContentArray)); } } } // Need to transform the patterns as well. - CPDF_Dictionary* pRes = pPageDic->GetDictBy("Resources"); + CPDF_Dictionary* pRes = pPageDic->GetDictFor("Resources"); if (pRes) { - CPDF_Dictionary* pPattenDict = pRes->GetDictBy("Pattern"); + CPDF_Dictionary* pPattenDict = pRes->GetDictFor("Pattern"); if (pPattenDict) { for (const auto& it : *pPattenDict) { CPDF_Object* pObj = it.second; @@ -183,10 +183,10 @@ DLLEXPORT FPDF_BOOL STDCALL FPDFPage_TransFormWithClip(FPDF_PAGE page, else continue; - CFX_Matrix m = pDict->GetMatrixBy("Matrix"); + CFX_Matrix m = pDict->GetMatrixFor("Matrix"); CFX_Matrix t = *(CFX_Matrix*)matrix; m.Concat(t); - pDict->SetAtMatrix("Matrix", m); + pDict->SetMatrixFor("Matrix", m); } } } @@ -277,9 +277,9 @@ DLLEXPORT void STDCALL FPDFPage_InsertClipPath(FPDF_PAGE page, CPDF_Dictionary* pPageDic = pPage->m_pFormDict; CPDF_Object* pContentObj = - pPageDic ? pPageDic->GetObjectBy("Contents") : nullptr; + pPageDic ? pPageDic->GetObjectFor("Contents") : nullptr; if (!pContentObj) - pContentObj = pPageDic ? pPageDic->GetArrayBy("Contents") : nullptr; + pContentObj = pPageDic ? pPageDic->GetArrayFor("Contents") : nullptr; if (!pContentObj) return; @@ -326,8 +326,8 @@ DLLEXPORT void STDCALL FPDFPage_InsertClipPath(FPDF_PAGE page, pContentArray = new CPDF_Array(); pContentArray->AddReference(pDoc, pStream->GetObjNum()); pContentArray->AddReference(pDoc, pDirectObj->GetObjNum()); - pPageDic->SetAtReference("Contents", pDoc, - pDoc->AddIndirectObject(pContentArray)); + pPageDic->SetReferenceFor("Contents", pDoc, + pDoc->AddIndirectObject(pContentArray)); } } } -- cgit v1.2.3