diff options
Diffstat (limited to 'core/fpdfdoc')
-rw-r--r-- | core/fpdfdoc/cpvt_generateap.cpp | 2 | ||||
-rw-r--r-- | core/fpdfdoc/cpvt_generateap.h | 5 | ||||
-rw-r--r-- | core/fpdfdoc/cpvt_provider.h | 6 | ||||
-rw-r--r-- | core/fpdfdoc/doc_vt.cpp | 10 | ||||
-rw-r--r-- | core/fpdfdoc/include/ipdf_variabletext_provider.h | 28 | ||||
-rw-r--r-- | core/fpdfdoc/ipdf_variabletext_provider.cpp | 9 | ||||
-rw-r--r-- | core/fpdfdoc/pdf_vt.h | 14 |
7 files changed, 19 insertions, 55 deletions
diff --git a/core/fpdfdoc/cpvt_generateap.cpp b/core/fpdfdoc/cpvt_generateap.cpp index f9d6e9630b..dd935de61e 100644 --- a/core/fpdfdoc/cpvt_generateap.cpp +++ b/core/fpdfdoc/cpvt_generateap.cpp @@ -499,7 +499,7 @@ FX_BOOL CPVT_GenerateAP::GenerateListBoxAP(CPDF_Document* pDoc, // Static. CFX_ByteString CPVT_GenerateAP::GenerateEditAP( IPVT_FontMap* pFontMap, - IPDF_VariableText_Iterator* pIterator, + IPDF_VariableText::Iterator* pIterator, const CFX_FloatPoint& ptOffset, FX_BOOL bContinuous, uint16_t SubWord, diff --git a/core/fpdfdoc/cpvt_generateap.h b/core/fpdfdoc/cpvt_generateap.h index b97b38ad6b..79062cbfc3 100644 --- a/core/fpdfdoc/cpvt_generateap.h +++ b/core/fpdfdoc/cpvt_generateap.h @@ -12,6 +12,7 @@ #include "core/fxcrt/include/fx_coordinates.h" #include "core/fxcrt/include/fx_string.h" #include "core/fxcrt/include/fx_system.h" +#include "core/include/fpdfdoc/fpdf_vt.h" // border style #define PBS_SOLID 0 @@ -23,8 +24,8 @@ class CPDF_Dictionary; class CPDF_Document; -class IPDF_VariableText_Iterator; class IPVT_FontMap; + struct CPVT_WordRange; FX_BOOL FPDF_GenerateAP(CPDF_Document* pDoc, CPDF_Dictionary* pAnnotDict); @@ -38,7 +39,7 @@ class CPVT_GenerateAP { static FX_BOOL GenerateListBoxAP(CPDF_Document* pDoc, CPDF_Dictionary* pAnnotDict); static CFX_ByteString GenerateEditAP(IPVT_FontMap* pFontMap, - IPDF_VariableText_Iterator* pIterator, + IPDF_VariableText::Iterator* pIterator, const CFX_FloatPoint& ptOffset, FX_BOOL bContinuous, uint16_t SubWord = 0, diff --git a/core/fpdfdoc/cpvt_provider.h b/core/fpdfdoc/cpvt_provider.h index e7edd538e5..fb6ff94861 100644 --- a/core/fpdfdoc/cpvt_provider.h +++ b/core/fpdfdoc/cpvt_provider.h @@ -7,16 +7,16 @@ #ifndef CORE_FPDFDOC_CPVT_PROVIDER_H_ #define CORE_FPDFDOC_CPVT_PROVIDER_H_ -#include "core/fpdfdoc/include/ipdf_variabletext_provider.h" #include "core/fpdfdoc/ipvt_fontmap.h" #include "core/fxcrt/include/fx_system.h" +#include "core/include/fpdfdoc/fpdf_vt.h" -class CPVT_Provider : public IPDF_VariableText_Provider { +class CPVT_Provider : public IPDF_VariableText::Provider { public: CPVT_Provider(IPVT_FontMap* pFontMap); ~CPVT_Provider() override; - // IPDF_VariableText_Provider + // IPDF_VariableText::Provider int32_t GetCharWidth(int32_t nFontIndex, uint16_t word, int32_t nWordStyle) override; diff --git a/core/fpdfdoc/doc_vt.cpp b/core/fpdfdoc/doc_vt.cpp index 5977288d54..e91b945986 100644 --- a/core/fpdfdoc/doc_vt.cpp +++ b/core/fpdfdoc/doc_vt.cpp @@ -6,10 +6,10 @@ #include <algorithm> -#include "core/fpdfdoc/include/ipdf_variabletext_provider.h" #include "core/fpdfdoc/pdf_vt.h" #include "core/include/fpdfdoc/fpdf_doc.h" #include "core/include/fpdfdoc/fpdf_vt.h" +#include "core/include/fpdfdoc/fpdf_vt.h" const uint8_t gFontSizeSteps[] = {4, 6, 8, 9, 10, 12, 14, 18, 20, 25, 30, 35, 40, 45, 50, 55, 60, 70, @@ -1643,15 +1643,15 @@ int32_t CPDF_VariableText::GetDefaultFontIndex() { FX_BOOL CPDF_VariableText::IsLatinWord(uint16_t word) { return m_pVTProvider ? m_pVTProvider->IsLatinWord(word) : FALSE; } -IPDF_VariableText_Iterator* CPDF_VariableText::GetIterator() { +IPDF_VariableText::Iterator* CPDF_VariableText::GetIterator() { if (!m_pVTIterator) { m_pVTIterator = new CPDF_VariableText_Iterator(this); } return m_pVTIterator; } -IPDF_VariableText_Provider* CPDF_VariableText::SetProvider( - IPDF_VariableText_Provider* pProvider) { - IPDF_VariableText_Provider* pOld = m_pVTProvider; +IPDF_VariableText::Provider* CPDF_VariableText::SetProvider( + IPDF_VariableText::Provider* pProvider) { + IPDF_VariableText::Provider* pOld = m_pVTProvider; m_pVTProvider = pProvider; return pOld; } diff --git a/core/fpdfdoc/include/ipdf_variabletext_provider.h b/core/fpdfdoc/include/ipdf_variabletext_provider.h deleted file mode 100644 index 592c7da9d2..0000000000 --- a/core/fpdfdoc/include/ipdf_variabletext_provider.h +++ /dev/null @@ -1,28 +0,0 @@ -// Copyright 2016 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_FPDFDOC_INCLUDE_IPDF_VARIABLETEXT_PROVIDER_H_ -#define CORE_FPDFDOC_INCLUDE_IPDF_VARIABLETEXT_PROVIDER_H_ - -#include "core/fxcrt/include/fx_system.h" - -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 int32_t GetDefaultFontIndex() = 0; - virtual FX_BOOL IsLatinWord(uint16_t word) = 0; -}; - -#endif // CORE_FPDFDOC_INCLUDE_IPDF_VARIABLETEXT_PROVIDER_H_ diff --git a/core/fpdfdoc/ipdf_variabletext_provider.cpp b/core/fpdfdoc/ipdf_variabletext_provider.cpp deleted file mode 100644 index 82937f745a..0000000000 --- a/core/fpdfdoc/ipdf_variabletext_provider.cpp +++ /dev/null @@ -1,9 +0,0 @@ -// Copyright 2016 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 - -#include "core/fpdfdoc/include/ipdf_variabletext_provider.h" - -IPDF_VariableText_Provider::~IPDF_VariableText_Provider() {} diff --git a/core/fpdfdoc/pdf_vt.h b/core/fpdfdoc/pdf_vt.h index f97c48638f..73913f78f4 100644 --- a/core/fpdfdoc/pdf_vt.h +++ b/core/fpdfdoc/pdf_vt.h @@ -342,9 +342,9 @@ class CPDF_VariableText : public IPDF_VariableText, private CPDF_EditContainer { ~CPDF_VariableText() override; // IPDF_VariableText - IPDF_VariableText_Provider* SetProvider( - IPDF_VariableText_Provider* pProvider) override; - IPDF_VariableText_Iterator* GetIterator() override; + IPDF_VariableText::Provider* SetProvider( + IPDF_VariableText::Provider* pProvider) override; + IPDF_VariableText::Iterator* GetIterator() override; void SetPlateRect(const CFX_FloatRect& rect) override { CPDF_EditContainer::SetPlateRect(rect); } @@ -521,16 +521,16 @@ class CPDF_VariableText : public IPDF_VariableText, private CPDF_EditContainer { private: FX_BOOL m_bInitial; FX_BOOL m_bRichText; - IPDF_VariableText_Provider* m_pVTProvider; - CPDF_VariableText_Iterator* m_pVTIterator; + IPDF_VariableText::Provider* m_pVTProvider; + CPDF_VariableText::Iterator* m_pVTIterator; }; -class CPDF_VariableText_Iterator : public IPDF_VariableText_Iterator { +class CPDF_VariableText_Iterator : public IPDF_VariableText::Iterator { public: explicit CPDF_VariableText_Iterator(CPDF_VariableText* pVT); ~CPDF_VariableText_Iterator() override; - // IPDF_VariableText_Iterator + // IPDF_VariableText::Iterator FX_BOOL NextWord() override; FX_BOOL PrevWord() override; FX_BOOL NextLine() override; |