Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(338)

Unified Diff: fpdfsdk/fpdf_transformpage.cpp

Issue 1977093002: Make CFX_ByteString(const CFX_ByteStringC&) explicit. (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: Rebase, nit Created 4 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « fpdfsdk/formfiller/cba_fontmap.cpp ('k') | fpdfsdk/fpdfppo.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: fpdfsdk/fpdf_transformpage.cpp
diff --git a/fpdfsdk/fpdf_transformpage.cpp b/fpdfsdk/fpdf_transformpage.cpp
index d47cb02b1d3ffd5eb50790070ac9d30788d87242..5fe6e4ebccf99a46578f8bdfc560f6641903b367 100644
--- a/fpdfsdk/fpdf_transformpage.cpp
+++ b/fpdfsdk/fpdf_transformpage.cpp
@@ -20,36 +20,34 @@
namespace {
void SetBoundingBox(CPDF_Page* page,
- const CFX_ByteStringC& key,
+ const CFX_ByteString& key,
float left,
float bottom,
float right,
float top) {
- CPDF_Dictionary* pPageDict = page->m_pFormDict;
CPDF_Array* pBoundingBoxArray = new CPDF_Array;
pBoundingBoxArray->Add(new CPDF_Number(left));
pBoundingBoxArray->Add(new CPDF_Number(bottom));
pBoundingBoxArray->Add(new CPDF_Number(right));
pBoundingBoxArray->Add(new CPDF_Number(top));
- pPageDict->SetAt(key, pBoundingBoxArray);
+ page->m_pFormDict->SetAt(key, pBoundingBoxArray);
}
-FPDF_BOOL GetBoundingBox(CPDF_Page* page,
- const CFX_ByteStringC& key,
- float* left,
- float* bottom,
- float* right,
- float* top) {
- CPDF_Dictionary* pPageDict = page->m_pFormDict;
- CPDF_Array* pArray = pPageDict->GetArrayBy(key);
+bool GetBoundingBox(CPDF_Page* page,
+ const CFX_ByteString& key,
+ float* left,
+ float* bottom,
+ float* right,
+ float* top) {
+ CPDF_Array* pArray = page->m_pFormDict->GetArrayBy(key);
if (!pArray)
- return FALSE;
+ return false;
*left = pArray->GetFloatAt(0);
*bottom = pArray->GetFloatAt(1);
*right = pArray->GetFloatAt(2);
*top = pArray->GetFloatAt(3);
- return TRUE;
+ return true;
}
} // namespace
« no previous file with comments | « fpdfsdk/formfiller/cba_fontmap.cpp ('k') | fpdfsdk/fpdfppo.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698