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

Unified Diff: core/fpdfapi/fpdf_parser/fpdf_parser_decode.cpp

Issue 2334323005: Rename dictionary set and get methods (Closed)
Patch Set: Created 4 years, 3 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 | « core/fpdfapi/fpdf_parser/cpdf_syntax_parser.cpp ('k') | core/fpdfapi/fpdf_parser/fpdf_parser_utility.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: core/fpdfapi/fpdf_parser/fpdf_parser_decode.cpp
diff --git a/core/fpdfapi/fpdf_parser/fpdf_parser_decode.cpp b/core/fpdfapi/fpdf_parser/fpdf_parser_decode.cpp
index 40ba362ad66b264259ab3c6d8499a11f8a701686..72a9518ca956a5a14537f768d13aa421a3b67e67 100644
--- a/core/fpdfapi/fpdf_parser/fpdf_parser_decode.cpp
+++ b/core/fpdfapi/fpdf_parser/fpdf_parser_decode.cpp
@@ -239,12 +239,12 @@ CCodec_ScanlineDecoder* FPDFAPI_CreateFaxDecoder(
int Columns = 1728;
int Rows = 0;
if (pParams) {
- K = pParams->GetIntegerBy("K");
- EndOfLine = pParams->GetIntegerBy("EndOfLine");
- ByteAlign = pParams->GetIntegerBy("EncodedByteAlign");
- BlackIs1 = pParams->GetIntegerBy("BlackIs1");
- Columns = pParams->GetIntegerBy("Columns", 1728);
- Rows = pParams->GetIntegerBy("Rows");
+ K = pParams->GetIntegerFor("K");
+ EndOfLine = pParams->GetIntegerFor("EndOfLine");
+ ByteAlign = pParams->GetIntegerFor("EncodedByteAlign");
+ BlackIs1 = pParams->GetIntegerFor("BlackIs1");
+ Columns = pParams->GetIntegerFor("Columns", 1728);
+ Rows = pParams->GetIntegerFor("Rows");
if (Rows > USHRT_MAX) {
Rows = 0;
}
@@ -290,10 +290,10 @@ CCodec_ScanlineDecoder* FPDFAPI_CreateFlateDecoder(
int predictor = 0;
int Colors = 0, BitsPerComponent = 0, Columns = 0;
if (pParams) {
- predictor = pParams->GetIntegerBy("Predictor");
- Colors = pParams->GetIntegerBy("Colors", 1);
- BitsPerComponent = pParams->GetIntegerBy("BitsPerComponent", 8);
- Columns = pParams->GetIntegerBy("Columns", 1);
+ predictor = pParams->GetIntegerFor("Predictor");
+ Colors = pParams->GetIntegerFor("Colors", 1);
+ BitsPerComponent = pParams->GetIntegerFor("BitsPerComponent", 8);
+ Columns = pParams->GetIntegerFor("Columns", 1);
if (!CheckFlateDecodeParams(Colors, BitsPerComponent, Columns)) {
return nullptr;
}
@@ -314,11 +314,11 @@ uint32_t FPDFAPI_FlateOrLZWDecode(FX_BOOL bLZW,
FX_BOOL bEarlyChange = TRUE;
int Colors = 0, BitsPerComponent = 0, Columns = 0;
if (pParams) {
- predictor = pParams->GetIntegerBy("Predictor");
- bEarlyChange = pParams->GetIntegerBy("EarlyChange", 1);
- Colors = pParams->GetIntegerBy("Colors", 1);
- BitsPerComponent = pParams->GetIntegerBy("BitsPerComponent", 8);
- Columns = pParams->GetIntegerBy("Columns", 1);
+ predictor = pParams->GetIntegerFor("Predictor");
+ bEarlyChange = pParams->GetIntegerFor("EarlyChange", 1);
+ Colors = pParams->GetIntegerFor("Colors", 1);
+ BitsPerComponent = pParams->GetIntegerFor("BitsPerComponent", 8);
+ Columns = pParams->GetIntegerFor("Columns", 1);
if (!CheckFlateDecodeParams(Colors, BitsPerComponent, Columns)) {
return (uint32_t)-1;
}
@@ -337,12 +337,12 @@ FX_BOOL PDF_DataDecode(const uint8_t* src_buf,
CPDF_Dictionary*& pImageParms,
uint32_t last_estimated_size,
FX_BOOL bImageAcc) {
- CPDF_Object* pDecoder = pDict ? pDict->GetDirectObjectBy("Filter") : nullptr;
+ CPDF_Object* pDecoder = pDict ? pDict->GetDirectObjectFor("Filter") : nullptr;
if (!pDecoder || (!pDecoder->IsArray() && !pDecoder->IsName()))
return FALSE;
CPDF_Object* pParams =
- pDict ? pDict->GetDirectObjectBy("DecodeParms") : nullptr;
+ pDict ? pDict->GetDirectObjectFor("DecodeParms") : nullptr;
std::vector<std::pair<CFX_ByteString, CPDF_Object*>> DecoderArray;
if (CPDF_Array* pDecoders = pDecoder->AsArray()) {
« no previous file with comments | « core/fpdfapi/fpdf_parser/cpdf_syntax_parser.cpp ('k') | core/fpdfapi/fpdf_parser/fpdf_parser_utility.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698