Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(642)

Unified Diff: fpdfsdk/include/fxedit/fx_edit.h

Issue 1860063002: Remove core/include/fpdfdoc/fpdf_vt.h (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: Created 4 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: fpdfsdk/include/fxedit/fx_edit.h
diff --git a/fpdfsdk/include/fxedit/fx_edit.h b/fpdfsdk/include/fxedit/fx_edit.h
index 2adf97b8828f4e7bbb09dc9c2aa332417720a95e..2d1b1be8ab33ea02bd105bf9e428adf0ff1fc337 100644
--- a/fpdfsdk/include/fxedit/fx_edit.h
+++ b/fpdfsdk/include/fxedit/fx_edit.h
@@ -7,18 +7,18 @@
#ifndef FPDFSDK_INCLUDE_FXEDIT_FX_EDIT_H_
#define FPDFSDK_INCLUDE_FXEDIT_FX_EDIT_H_
+#include "core/fpdfdoc/include/cpdf_variabletext.h"
#include "core/fxcrt/include/fx_basic.h"
-#include "core/include/fpdfdoc/fpdf_vt.h"
#include "core/include/fxge/fx_dib.h"
-class CFX_RenderDevice;
class CPDF_Font;
-class CFX_Matrix;
class CPDF_PageObjectHolder;
-class CFX_FloatPoint;
class CPDF_TextObject;
+class CFX_FloatPoint;
+class CFX_Matrix;
+class CFX_RenderDevice;
class IFX_Edit;
-class IFX_Edit_FontMap;
+class IPVT_FontMap;
class IFX_Edit_Iterator;
class IFX_Edit_Notify;
class IFX_Edit_UndoItem;
@@ -51,23 +51,6 @@ struct CPVT_WordRange;
#define DEFAULT_CHARSET 1
#endif
-class IFX_Edit_FontMap {
- public:
- virtual ~IFX_Edit_FontMap() {}
- // map a fontindex to pdf font.
- virtual CPDF_Font* GetPDFFont(int32_t nFontIndex) = 0;
- // get the alias of a pdf font.
- virtual CFX_ByteString GetPDFFontAlias(int32_t nFontIndex) = 0;
- // get the index of a font that can show a word.
- virtual int32_t GetWordFontIndex(uint16_t word,
- int32_t charset,
- int32_t nFontIndex) = 0;
- // get the charcode of word from unicode
- virtual int32_t CharCodeFromUnicode(int32_t nFontIndex, uint16_t word) = 0;
- // get the charset of unicode
- virtual int32_t CharSetFromUnicode(uint16_t word, int32_t nOldCharset) = 0;
-};
-
class IFX_Edit_Notify {
public:
virtual ~IFX_Edit_Notify() {}
@@ -183,11 +166,11 @@ class IFX_Edit {
static IFX_Edit* NewEdit();
static void DelEdit(IFX_Edit* pEdit);
- // set a IFX_Edit_FontMap pointer implemented by user.
- virtual void SetFontMap(IFX_Edit_FontMap* pFontMap) = 0;
+ // set a IPVT_FontMap pointer implemented by user.
Tom Sepez 2016/04/05 16:58:23 nit: blank line before each new // comment here, a
dsinclair 2016/04/05 17:29:20 Done.
+ virtual void SetFontMap(IPVT_FontMap* pFontMap) = 0;
// if user don't like to use FontMap, implement VTProvider and set it
// directly.
- virtual void SetVTProvider(IPDF_VariableText::Provider* pProvider) = 0;
+ virtual void SetVTProvider(CPDF_VariableText::Provider* pProvider) = 0;
// set a IFX_Edit_Notify pointer implemented by user.
virtual void SetNotify(IFX_Edit_Notify* pNotify) = 0;
virtual void SetOprNotify(IFX_Edit_OprNotify* pOprNotify) = 0;
@@ -195,9 +178,9 @@ class IFX_Edit {
// contents of edit, but don't need to release.
virtual IFX_Edit_Iterator* GetIterator() = 0;
// get a VT pointer relative to this edit.
- virtual IPDF_VariableText* GetVariableText() = 0;
- // get the IFX_Edit_FontMap pointer set by user.
- virtual IFX_Edit_FontMap* GetFontMap() = 0;
+ virtual CPDF_VariableText* GetVariableText() = 0;
+ // get the IPVT_FontMap pointer set by user.
+ virtual IPVT_FontMap* GetFontMap() = 0;
// initialize the edit.
virtual void Initialize() = 0;
@@ -257,7 +240,8 @@ class IFX_Edit {
virtual FX_BOOL SetRichTextColor(FX_COLORREF dwColor) = 0;
// set the text script type of selected text. (0:normal 1:superscript
// 2:subscript)
- virtual FX_BOOL SetRichTextScript(int32_t nScriptType) = 0;
+ virtual FX_BOOL SetRichTextScript(
+ CPDF_VariableText::ScriptType nScriptType) = 0;
// set the bold font style of selected text.
virtual FX_BOOL SetRichTextBold(FX_BOOL bBold = TRUE) = 0;
// set the italic font style of selected text.
@@ -512,7 +496,7 @@ class IFX_List {
static IFX_List* NewList();
static void DelList(IFX_List* pList);
- virtual void SetFontMap(IFX_Edit_FontMap* pFontMap) = 0;
+ virtual void SetFontMap(IPVT_FontMap* pFontMap) = 0;
virtual void SetNotify(IFX_List_Notify* pNotify) = 0;
virtual void SetPlateRect(const CFX_FloatRect& rect) = 0;
@@ -568,7 +552,7 @@ class IFX_List {
virtual ~IFX_List() {}
};
-CFX_ByteString GetPDFWordString(IFX_Edit_FontMap* pFontMap,
+CFX_ByteString GetPDFWordString(IPVT_FontMap* pFontMap,
int32_t nFontIndex,
uint16_t Word,
uint16_t SubWord);

Powered by Google App Engine
This is Rietveld 408576698