diff options
Diffstat (limited to 'fpdfsdk/pdfwindow')
-rw-r--r-- | fpdfsdk/pdfwindow/DEPS | 1 | ||||
-rw-r--r-- | fpdfsdk/pdfwindow/PWL_Edit.cpp | 5 | ||||
-rw-r--r-- | fpdfsdk/pdfwindow/PWL_EditCtrl.cpp | 4 | ||||
-rw-r--r-- | fpdfsdk/pdfwindow/PWL_FontMap.cpp | 1 | ||||
-rw-r--r-- | fpdfsdk/pdfwindow/PWL_FontMap.h | 5 | ||||
-rw-r--r-- | fpdfsdk/pdfwindow/PWL_Label.cpp | 1 | ||||
-rw-r--r-- | fpdfsdk/pdfwindow/PWL_Utils.cpp | 6 | ||||
-rw-r--r-- | fpdfsdk/pdfwindow/PWL_Utils.h | 9 | ||||
-rw-r--r-- | fpdfsdk/pdfwindow/PWL_Wnd.cpp | 2 | ||||
-rw-r--r-- | fpdfsdk/pdfwindow/PWL_Wnd.h | 6 |
10 files changed, 25 insertions, 15 deletions
diff --git a/fpdfsdk/pdfwindow/DEPS b/fpdfsdk/pdfwindow/DEPS index 8e0928c269..cf99b35f95 100644 --- a/fpdfsdk/pdfwindow/DEPS +++ b/fpdfsdk/pdfwindow/DEPS @@ -1,3 +1,4 @@ include_rules = [ '+core/fpdfapi/fpdf_font/include', + '+core/fpdfdoc/include', ] diff --git a/fpdfsdk/pdfwindow/PWL_Edit.cpp b/fpdfsdk/pdfwindow/PWL_Edit.cpp index 64588f2dff..b5e2093483 100644 --- a/fpdfsdk/pdfwindow/PWL_Edit.cpp +++ b/fpdfsdk/pdfwindow/PWL_Edit.cpp @@ -9,6 +9,7 @@ #include <vector> #include "core/fpdfapi/fpdf_font/include/cpdf_font.h" +#include "core/fpdfdoc/include/cpvt_word.h" #include "core/fxcrt/include/fx_safe_types.h" #include "core/fxcrt/include/fx_xml.h" #include "core/include/fxge/fx_ge.h" @@ -811,7 +812,7 @@ void CPWL_Edit::SetCharArray(int32_t nCharArray) { m_pEdit->SetTextOverflow(TRUE); if (HasFlag(PWS_AUTOFONTSIZE)) { - if (IFX_Edit_FontMap* pFontMap = GetFontMap()) { + if (IPVT_FontMap* pFontMap = GetFontMap()) { FX_FLOAT fFontSize = GetCharArrayAutoFontSize( pFontMap->GetPDFFont(0), GetClientRect(), nCharArray); if (fFontSize > 0.0f) { @@ -978,7 +979,7 @@ FX_BOOL CPWL_Edit::OnChar(uint16_t nChar, uint32_t nFlag) { if (bExit) return FALSE; - if (IFX_Edit_FontMap* pFontMap = GetFontMap()) { + if (IPVT_FontMap* pFontMap = GetFontMap()) { int32_t nOldCharSet = GetCharSet(); int32_t nNewCharSet = pFontMap->CharSetFromUnicode(nChar, DEFAULT_CHARSET); if (nOldCharSet != nNewCharSet) { diff --git a/fpdfsdk/pdfwindow/PWL_EditCtrl.cpp b/fpdfsdk/pdfwindow/PWL_EditCtrl.cpp index fe9dab98e0..af7e5837a3 100644 --- a/fpdfsdk/pdfwindow/PWL_EditCtrl.cpp +++ b/fpdfsdk/pdfwindow/PWL_EditCtrl.cpp @@ -6,6 +6,8 @@ #include "fpdfsdk/pdfwindow/PWL_EditCtrl.h" +#include "core/fpdfdoc/include/cpvt_section.h" +#include "core/fpdfdoc/include/cpvt_word.h" #include "fpdfsdk/pdfwindow/PWL_Caret.h" #include "fpdfsdk/pdfwindow/PWL_FontMap.h" #include "fpdfsdk/pdfwindow/PWL_ScrollBar.h" @@ -466,7 +468,7 @@ CPDF_Font* CPWL_EditCtrl::GetCaretFont() const { } } - if (IFX_Edit_FontMap* pFontMap = GetFontMap()) + if (IPVT_FontMap* pFontMap = GetFontMap()) return pFontMap->GetPDFFont(nFontIndex); return NULL; diff --git a/fpdfsdk/pdfwindow/PWL_FontMap.cpp b/fpdfsdk/pdfwindow/PWL_FontMap.cpp index 3f149e7193..42beab7d21 100644 --- a/fpdfsdk/pdfwindow/PWL_FontMap.cpp +++ b/fpdfsdk/pdfwindow/PWL_FontMap.cpp @@ -10,6 +10,7 @@ #include "core/fpdfapi/fpdf_font/include/cpdf_fontencoding.h" #include "core/fpdfapi/fpdf_parser/include/cpdf_document.h" #include "core/fpdfapi/include/cpdf_modulemgr.h" +#include "core/fpdfdoc/include/ipvt_fontmap.h" #include "fpdfsdk/pdfwindow/PWL_Wnd.h" namespace { diff --git a/fpdfsdk/pdfwindow/PWL_FontMap.h b/fpdfsdk/pdfwindow/PWL_FontMap.h index b344e4fef2..70806ebdbc 100644 --- a/fpdfsdk/pdfwindow/PWL_FontMap.h +++ b/fpdfsdk/pdfwindow/PWL_FontMap.h @@ -7,6 +7,7 @@ #ifndef FPDFSDK_PDFWINDOW_PWL_FONTMAP_H_ #define FPDFSDK_PDFWINDOW_PWL_FONTMAP_H_ +#include "core/fpdfdoc/include/ipvt_fontmap.h" #include "fpdfsdk/include/fxedit/fx_edit.h" #include "public/fpdf_sysfontinfo.h" @@ -48,12 +49,12 @@ struct CPWL_FontMap_Native { #endif -class CPWL_FontMap : public IFX_Edit_FontMap { +class CPWL_FontMap : public IPVT_FontMap { public: CPWL_FontMap(IFX_SystemHandler* pSystemHandler); ~CPWL_FontMap() override; - // IFX_Edit_FontMap + // IPVT_FontMap CPDF_Font* GetPDFFont(int32_t nFontIndex) override; CFX_ByteString GetPDFFontAlias(int32_t nFontIndex) override; int32_t GetWordFontIndex(uint16_t word, diff --git a/fpdfsdk/pdfwindow/PWL_Label.cpp b/fpdfsdk/pdfwindow/PWL_Label.cpp index 8c5b0676d7..0e9a9f687d 100644 --- a/fpdfsdk/pdfwindow/PWL_Label.cpp +++ b/fpdfsdk/pdfwindow/PWL_Label.cpp @@ -4,6 +4,7 @@ // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com +#include "fpdfsdk/include/fxedit/fx_edit.h" #include "fpdfsdk/pdfwindow/PWL_Label.h" #include "fpdfsdk/pdfwindow/PWL_Utils.h" #include "fpdfsdk/pdfwindow/PWL_Wnd.h" diff --git a/fpdfsdk/pdfwindow/PWL_Utils.cpp b/fpdfsdk/pdfwindow/PWL_Utils.cpp index 3622a84912..acd362a29c 100644 --- a/fpdfsdk/pdfwindow/PWL_Utils.cpp +++ b/fpdfsdk/pdfwindow/PWL_Utils.cpp @@ -8,7 +8,9 @@ #include <algorithm> +#include "core/fpdfdoc/include/cpvt_word.h" #include "core/include/fxge/fx_ge.h" +#include "fpdfsdk/include/fxedit/fx_edit.h" #include "fpdfsdk/pdfwindow/PWL_Icon.h" #include "fpdfsdk/pdfwindow/PWL_Wnd.h" @@ -575,7 +577,7 @@ CFX_ByteString CPWL_Utils::GetSpellCheckAppStream( } CFX_ByteString CPWL_Utils::GetTextAppStream(const CFX_FloatRect& rcBBox, - IFX_Edit_FontMap* pFontMap, + IPVT_FontMap* pFontMap, const CFX_WideString& sText, int32_t nAlignmentH, int32_t nAlignmentV, @@ -613,7 +615,7 @@ CFX_ByteString CPWL_Utils::GetTextAppStream(const CFX_FloatRect& rcBBox, } CFX_ByteString CPWL_Utils::GetPushButtonAppStream(const CFX_FloatRect& rcBBox, - IFX_Edit_FontMap* pFontMap, + IPVT_FontMap* pFontMap, CPDF_Stream* pIconStream, CPDF_IconFit& IconFit, const CFX_WideString& sLabel, diff --git a/fpdfsdk/pdfwindow/PWL_Utils.h b/fpdfsdk/pdfwindow/PWL_Utils.h index 6917083661..76c3c478b7 100644 --- a/fpdfsdk/pdfwindow/PWL_Utils.h +++ b/fpdfsdk/pdfwindow/PWL_Utils.h @@ -7,11 +7,12 @@ #ifndef FPDFSDK_PDFWINDOW_PWL_UTILS_H_ #define FPDFSDK_PDFWINDOW_PWL_UTILS_H_ -#include "core/include/fpdfdoc/fpdf_vt.h" -#include "fpdfsdk/include/fxedit/fx_edit.h" +#include "core/fpdfdoc/include/cpvt_wordrange.h" #include "fpdfsdk/pdfwindow/PWL_Wnd.h" class CFX_PathData; +class IFX_Edit; + struct CPWL_Color; template <class T> @@ -153,7 +154,7 @@ class CPWL_Utils { const CPWL_Color& color); static CFX_ByteString GetPushButtonAppStream(const CFX_FloatRect& rcBBox, - IFX_Edit_FontMap* pFontMap, + IPVT_FontMap* pFontMap, CPDF_Stream* pIconStream, CPDF_IconFit& IconFit, const CFX_WideString& sLabel, @@ -182,7 +183,7 @@ class CPWL_Utils { const CFX_FloatPoint& ptOffset, const CPVT_WordRange* pRange = NULL); static CFX_ByteString GetTextAppStream(const CFX_FloatRect& rcBBox, - IFX_Edit_FontMap* pFontMap, + IPVT_FontMap* pFontMap, const CFX_WideString& sText, int32_t nAlignmentH, int32_t nAlignmentV, diff --git a/fpdfsdk/pdfwindow/PWL_Wnd.cpp b/fpdfsdk/pdfwindow/PWL_Wnd.cpp index cb0955cb5f..538651797e 100644 --- a/fpdfsdk/pdfwindow/PWL_Wnd.cpp +++ b/fpdfsdk/pdfwindow/PWL_Wnd.cpp @@ -815,7 +815,7 @@ IPWL_Provider* CPWL_Wnd::GetProvider() const { return m_sPrivateParam.pProvider; } -IFX_Edit_FontMap* CPWL_Wnd::GetFontMap() const { +IPVT_FontMap* CPWL_Wnd::GetFontMap() const { return m_sPrivateParam.pFontMap; } diff --git a/fpdfsdk/pdfwindow/PWL_Wnd.h b/fpdfsdk/pdfwindow/PWL_Wnd.h index d07adba092..f05b1e6784 100644 --- a/fpdfsdk/pdfwindow/PWL_Wnd.h +++ b/fpdfsdk/pdfwindow/PWL_Wnd.h @@ -18,7 +18,7 @@ class CPWL_ScrollBar; class CPWL_Timer; class CPWL_TimerHandler; class CPWL_Wnd; -class IFX_Edit_FontMap; +class IPVT_FontMap; class IFX_SystemHandler; class IPWL_Provider; class IPWL_SpellCheck; @@ -230,7 +230,7 @@ struct PWL_CREATEPARAM { CFX_FloatRect rcRectWnd; // required IFX_SystemHandler* pSystemHandler; // required - IFX_Edit_FontMap* pFontMap; // required for text window + IPVT_FontMap* pFontMap; // required for text window IPWL_Provider* pProvider; // required for self coordinate IPWL_FocusHandler* pFocusHandler; // optional uint32_t dwFlags; // optional @@ -366,7 +366,7 @@ class CPWL_Wnd : public CPWL_TimerHandler { FX_BOOL IsReadOnly() const; CPWL_ScrollBar* GetVScrollBar() const; - IFX_Edit_FontMap* GetFontMap() const; + IPVT_FontMap* GetFontMap() const; IPWL_Provider* GetProvider() const; IPWL_FocusHandler* GetFocusHandler() const; |