Add constants for PDF 1.7 spec, table 3.4. Add constants/stream_dict_common.h. The header lists all the constants in the table in the same order. Constants that are not used at all are commented out. BUG=pdfium:1049 Change-Id: I6539090e0ad56319ea628883e388aeacef044e52 Reviewed-on: https://pdfium-review.googlesource.com/29090 Reviewed-by: dsinclair <dsinclair@chromium.org> Commit-Queue: Lei Zhang <thestig@chromium.org>
diff --git a/core/fpdfapi/page/cpdf_image.cpp b/core/fpdfapi/page/cpdf_image.cpp index ec826dc..68a6a32 100644 --- a/core/fpdfapi/page/cpdf_image.cpp +++ b/core/fpdfapi/page/cpdf_image.cpp
@@ -11,6 +11,7 @@ #include <utility> #include <vector> +#include "constants/stream_dict_common.h" #include "core/fpdfapi/cpdf_modulemgr.h" #include "core/fpdfapi/page/cpdf_page.h" #include "core/fpdfapi/parser/cpdf_array.h" @@ -105,7 +106,8 @@ pDict->SetNewFor<CPDF_Number>("BitsPerComponent", bits); pDict->SetNewFor<CPDF_Name>("Filter", "DCTDecode"); if (!color_trans) { - CPDF_Dictionary* pParms = pDict->SetNewFor<CPDF_Dictionary>("DecodeParms"); + CPDF_Dictionary* pParms = + pDict->SetNewFor<CPDF_Dictionary>(pdfium::stream::kDecodeParms); pParms->SetNewFor<CPDF_Number>("ColorTransform", 0); } m_bIsMask = false;