From e9988dd65e743a9b70482aa3007cec2c9789f679 Mon Sep 17 00:00:00 2001 From: npm Date: Fri, 16 Sep 2016 13:57:22 -0700 Subject: Reduce duplicated code in CPDF_Document by adding auxiliary methods ProcessbCJK and CalculateFontDesc methods are used to reduce the code duplication between AddFont and AddWindowsFont methods. Review-Url: https://codereview.chromium.org/2341373003 --- core/fpdfapi/fpdf_parser/include/cpdf_document.h | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'core/fpdfapi/fpdf_parser/include') diff --git a/core/fpdfapi/fpdf_parser/include/cpdf_document.h b/core/fpdfapi/fpdf_parser/include/cpdf_document.h index 494868ef13..0b865cb7f2 100644 --- a/core/fpdfapi/fpdf_parser/include/cpdf_document.h +++ b/core/fpdfapi/fpdf_parser/include/cpdf_document.h @@ -7,6 +7,7 @@ #ifndef CORE_FPDFAPI_FPDF_PARSER_INCLUDE_CPDF_DOCUMENT_H_ #define CORE_FPDFAPI_FPDF_PARSER_INCLUDE_CPDF_DOCUMENT_H_ +#include #include #include "core/fpdfapi/fpdf_parser/include/cpdf_indirect_object_holder.h" @@ -128,6 +129,12 @@ class CPDF_Document : public CPDF_IndirectObjectHolder { void LoadDocInternal(); size_t CalculateEncodingDict(int charset, CPDF_Dictionary* pBaseDict); CPDF_Dictionary* GetPagesDict() const; + CPDF_Dictionary* ProcessbCJK( + CPDF_Dictionary* pBaseDict, + int charset, + FX_BOOL bVert, + CFX_ByteString basefont, + std::function Insert); }; #endif // CORE_FPDFAPI_FPDF_PARSER_INCLUDE_CPDF_DOCUMENT_H_ -- cgit v1.2.3