diff options
author | dsinclair <dsinclair@chromium.org> | 2016-03-31 20:03:08 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2016-03-31 20:03:08 -0700 |
commit | 777b333109db7fceb5f2ca1fc521ced7f863fa18 (patch) | |
tree | f5968b42f43c90bc20af39a845718877cf80e064 /core/include/fpdfdoc | |
parent | 47ca692c8150cb39abef5737e866b91e6a105b80 (diff) | |
download | pdfium-777b333109db7fceb5f2ca1fc521ced7f863fa18.tar.xz |
Split core/include/fpdfdoc/fpdf_ap.h
This CL splits the fpdf_ap.h file apart into individual pieces and moves the
implementations to their own CPP files.
Review URL: https://codereview.chromium.org/1840413002
Diffstat (limited to 'core/include/fpdfdoc')
-rw-r--r-- | core/include/fpdfdoc/fpdf_ap.h | 100 | ||||
-rw-r--r-- | core/include/fpdfdoc/fpdf_doc.h | 2 | ||||
-rw-r--r-- | core/include/fpdfdoc/fpdf_vt.h | 19 |
3 files changed, 0 insertions, 121 deletions
diff --git a/core/include/fpdfdoc/fpdf_ap.h b/core/include/fpdfdoc/fpdf_ap.h deleted file mode 100644 index b468d14d20..0000000000 --- a/core/include/fpdfdoc/fpdf_ap.h +++ /dev/null @@ -1,100 +0,0 @@ -// Copyright 2014 PDFium Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -// Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com - -#ifndef CORE_INCLUDE_FPDFDOC_FPDF_AP_H_ -#define CORE_INCLUDE_FPDFDOC_FPDF_AP_H_ - -#include "core/include/fpdfdoc/fpdf_vt.h" - -class IPVT_FontMap { - public: - virtual ~IPVT_FontMap() {} - virtual CPDF_Font* GetPDFFont(int32_t nFontIndex) = 0; - virtual CFX_ByteString GetPDFFontAlias(int32_t nFontIndex) = 0; -}; - -struct CPVT_Dash { - CPVT_Dash(int32_t dash, int32_t gap, int32_t phase) - : nDash(dash), nGap(gap), nPhase(phase) {} - - int32_t nDash; - int32_t nGap; - int32_t nPhase; -}; - -struct CPVT_Color { - enum Type { kTransparent = 0, kGray, kRGB, kCMYK }; - - CPVT_Color(Type type = kTransparent, - FX_FLOAT color1 = 0.0f, - FX_FLOAT color2 = 0.0f, - FX_FLOAT color3 = 0.0f, - FX_FLOAT color4 = 0.0f) - : nColorType(type), - fColor1(color1), - fColor2(color2), - fColor3(color3), - fColor4(color4) {} - - Type nColorType; - FX_FLOAT fColor1; - FX_FLOAT fColor2; - FX_FLOAT fColor3; - FX_FLOAT fColor4; -}; - -class CPVT_Provider : public IPDF_VariableText_Provider { - public: - CPVT_Provider(IPVT_FontMap* pFontMap); - ~CPVT_Provider() override; - - // IPDF_VariableText_Provider - int32_t GetCharWidth(int32_t nFontIndex, - uint16_t word, - int32_t nWordStyle) override; - int32_t GetTypeAscent(int32_t nFontIndex) override; - int32_t GetTypeDescent(int32_t nFontIndex) override; - int32_t GetWordFontIndex(uint16_t word, - int32_t charset, - int32_t nFontIndex) override; - FX_BOOL IsLatinWord(uint16_t word) override; - int32_t GetDefaultFontIndex() override; - - private: - IPVT_FontMap* m_pFontMap; -}; - -class CPVT_GenerateAP { - public: - static FX_BOOL GenerateTextFieldAP(CPDF_Document* pDoc, - CPDF_Dictionary* pAnnotDict); - - static FX_BOOL GenerateComboBoxAP(CPDF_Document* pDoc, - CPDF_Dictionary* pAnnotDict); - - static FX_BOOL GenerateListBoxAP(CPDF_Document* pDoc, - CPDF_Dictionary* pAnnotDict); - - static CFX_ByteString GenerateEditAP(IPVT_FontMap* pFontMap, - IPDF_VariableText_Iterator* pIterator, - const CFX_FloatPoint& ptOffset, - FX_BOOL bContinuous, - uint16_t SubWord = 0, - const CPVT_WordRange* pVisible = NULL); - - static CFX_ByteString GenerateBorderAP(const CFX_FloatRect& rect, - FX_FLOAT fWidth, - const CPVT_Color& color, - const CPVT_Color& crLeftTop, - const CPVT_Color& crRightBottom, - int32_t nStyle, - const CPVT_Dash& dash); - - static CFX_ByteString GenerateColorAP(const CPVT_Color& color, - const FX_BOOL& bFillOrStroke); -}; - -#endif // CORE_INCLUDE_FPDFDOC_FPDF_AP_H_ diff --git a/core/include/fpdfdoc/fpdf_doc.h b/core/include/fpdfdoc/fpdf_doc.h index 5939966995..f7788b7c9e 100644 --- a/core/include/fpdfdoc/fpdf_doc.h +++ b/core/include/fpdfdoc/fpdf_doc.h @@ -947,8 +947,6 @@ class CPDF_FormNotify { virtual void AfterFormImportData(CPDF_InterForm* pForm) {} }; -FX_BOOL FPDF_GenerateAP(CPDF_Document* pDoc, CPDF_Dictionary* pAnnotDict); - class CPDF_PageLabel { public: explicit CPDF_PageLabel(CPDF_Document* pDocument) : m_pDocument(pDocument) {} diff --git a/core/include/fpdfdoc/fpdf_vt.h b/core/include/fpdfdoc/fpdf_vt.h index d79cad42d6..1e0d351fee 100644 --- a/core/include/fpdfdoc/fpdf_vt.h +++ b/core/include/fpdfdoc/fpdf_vt.h @@ -261,26 +261,7 @@ struct CPVT_Section { CPVT_WordProps WordProps; }; -class IPDF_VariableText_Provider { - public: - virtual ~IPDF_VariableText_Provider() {} - - virtual int32_t GetCharWidth(int32_t nFontIndex, - uint16_t word, - int32_t nWordStyle) = 0; - - virtual int32_t GetTypeAscent(int32_t nFontIndex) = 0; - - virtual int32_t GetTypeDescent(int32_t nFontIndex) = 0; - virtual int32_t GetWordFontIndex(uint16_t word, - int32_t charset, - int32_t nFontIndex) = 0; - - virtual FX_BOOL IsLatinWord(uint16_t word) = 0; - - virtual int32_t GetDefaultFontIndex() = 0; -}; class IPDF_VariableText_Iterator { public: virtual ~IPDF_VariableText_Iterator() {} |