diff options
Diffstat (limited to 'fpdfsdk/fpdf_transformpage.cpp')
-rw-r--r-- | fpdfsdk/fpdf_transformpage.cpp | 24 |
1 files changed, 11 insertions, 13 deletions
diff --git a/fpdfsdk/fpdf_transformpage.cpp b/fpdfsdk/fpdf_transformpage.cpp index d47cb02b1d..5fe6e4ebcc 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 |