summaryrefslogtreecommitdiff
path: root/fpdfsdk/fxedit/include
diff options
context:
space:
mode:
authordsinclair <dsinclair@chromium.org>2016-07-13 10:55:48 -0700
committerCommit bot <commit-bot@chromium.org>2016-07-13 10:55:49 -0700
commita2919b31197737d35e4e1df53b02f7ee7cb4cf5e (patch)
tree18cf18a9081ba48d35e218279d017a6be688f029 /fpdfsdk/fxedit/include
parent38506d3334fe114fb386ea9b719d432ff1760e42 (diff)
downloadpdfium-a2919b31197737d35e4e1df53b02f7ee7cb4cf5e.tar.xz
Remove RichText support from fpdfsdk/fxedit.
This CL removes the support code for RichText from fxedit as it is currently unused. Review-Url: https://codereview.chromium.org/2146503002
Diffstat (limited to 'fpdfsdk/fxedit/include')
-rw-r--r--fpdfsdk/fxedit/include/fx_edit.h79
-rw-r--r--fpdfsdk/fxedit/include/fxet_edit.h116
2 files changed, 0 insertions, 195 deletions
diff --git a/fpdfsdk/fxedit/include/fx_edit.h b/fpdfsdk/fxedit/include/fx_edit.h
index 710c06f809..cface7daa5 100644
--- a/fpdfsdk/fxedit/include/fx_edit.h
+++ b/fpdfsdk/fxedit/include/fx_edit.h
@@ -77,10 +77,6 @@ class IFX_Edit_Notify {
const CFX_FloatPoint& ptHead,
const CFX_FloatPoint& ptFoot,
const CPVT_WordPlace& place) = 0;
- // if the caret position is changed ,send the information of current postion
- // to user.
- virtual void IOnCaretChange(const CPVT_SecProps& secProps,
- const CPVT_WordProps& wordProps) = 0;
// if the text area is changed, send the information to user.
virtual void IOnContentChange(const CFX_FloatRect& rcContent) = 0;
// Invalidate the rectangle relative to the bounding box of edit.
@@ -242,54 +238,6 @@ class IFX_Edit {
virtual void SetTextOverflow(FX_BOOL bAllowed = FALSE,
FX_BOOL bPaint = TRUE) = 0;
- // query if the edit is richedit.
- virtual FX_BOOL IsRichText() const = 0;
-
- // set the edit is richedit.
- virtual void SetRichText(FX_BOOL bRichText = TRUE, FX_BOOL bPaint = TRUE) = 0;
-
- // set the fontsize of selected text.
- virtual FX_BOOL SetRichFontSize(FX_FLOAT fFontSize) = 0;
-
- // set the fontindex of selected text, user can change the font of selected
- // text.
- virtual FX_BOOL SetRichFontIndex(int32_t nFontIndex) = 0;
-
- // set the textcolor of selected text.
- 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(
- 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.
- virtual FX_BOOL SetRichTextItalic(FX_BOOL bItalic = TRUE) = 0;
-
- // set the underline style of selected text.
- virtual FX_BOOL SetRichTextUnderline(FX_BOOL bUnderline = TRUE) = 0;
-
- // set the crossout style of selected text.
- virtual FX_BOOL SetRichTextCrossout(FX_BOOL bCrossout = TRUE) = 0;
-
- // set the charspace of selected text, in user coordinate.
- virtual FX_BOOL SetRichTextCharSpace(FX_FLOAT fCharSpace) = 0;
-
- // set the horizontal scale of selected text, default value is 100.
- virtual FX_BOOL SetRichTextHorzScale(int32_t nHorzScale = 100) = 0;
-
- // set the leading of selected section, in user coordinate.
- virtual FX_BOOL SetRichTextLineLeading(FX_FLOAT fLineLeading) = 0;
-
- // set the indent of selected section, in user coordinate.
- virtual FX_BOOL SetRichTextLineIndent(FX_FLOAT fLineIndent) = 0;
-
- // set the alignment of selected section, nAlignment(0:left 1:middle 2:right)
- virtual FX_BOOL SetRichTextAlignment(int32_t nAlignment) = 0;
-
// set the selected range of text.
// if nStartChar == 0 and nEndChar == -1, select all the text.
virtual void SetSel(int32_t nStartChar, int32_t nEndChar) = 0;
@@ -413,9 +361,6 @@ class IFX_Edit {
// allow undo/redo?
virtual void EnableUndo(FX_BOOL bUndo) = 0;
- // allow notify?
- virtual void EnableNotify(FX_BOOL bNotify) = 0;
-
// allow opr notify?
virtual void EnableOprNotify(FX_BOOL bNotify) = 0;
@@ -493,19 +438,6 @@ class IFX_Edit {
const CPVT_WordRange* pRange,
CFX_SystemHandler* pSystemHandler,
void* pFFLData);
- static void DrawUnderline(CFX_RenderDevice* pDevice,
- CFX_Matrix* pUser2Device,
- IFX_Edit* pEdit,
- FX_COLORREF color,
- const CFX_FloatRect& rcClip,
- const CFX_FloatPoint& ptOffset,
- const CPVT_WordRange* pRange);
- static void DrawRichEdit(CFX_RenderDevice* pDevice,
- CFX_Matrix* pUser2Device,
- IFX_Edit* pEdit,
- const CFX_FloatRect& rcClip,
- const CFX_FloatPoint& ptOffset,
- const CPVT_WordRange* pRange);
static void GeneratePageObjects(
CPDF_PageObjectHolder* pObjectHolder,
IFX_Edit* pEdit,
@@ -513,17 +445,6 @@ class IFX_Edit {
const CPVT_WordRange* pRange,
FX_COLORREF crText,
CFX_ArrayTemplate<CPDF_TextObject*>& ObjArray);
- static void GenerateRichPageObjects(
- CPDF_PageObjectHolder* pObjectHolder,
- IFX_Edit* pEdit,
- const CFX_FloatPoint& ptOffset,
- const CPVT_WordRange* pRange,
- CFX_ArrayTemplate<CPDF_TextObject*>& ObjArray);
- static void GenerateUnderlineObjects(CPDF_PageObjectHolder* pObjectHolder,
- IFX_Edit* pEdit,
- const CFX_FloatPoint& ptOffset,
- const CPVT_WordRange* pRange,
- FX_COLORREF color);
protected:
virtual ~IFX_Edit() {}
diff --git a/fpdfsdk/fxedit/include/fxet_edit.h b/fpdfsdk/fxedit/include/fxet_edit.h
index aab26556b8..6f1a6d6530 100644
--- a/fpdfsdk/fxedit/include/fxet_edit.h
+++ b/fpdfsdk/fxedit/include/fxet_edit.h
@@ -331,34 +331,6 @@ class CFXEU_Clear : public CFX_Edit_UndoItem {
CFX_WideString m_swText;
};
-class CFXEU_ClearRich : public CFX_Edit_UndoItem {
- public:
- CFXEU_ClearRich(CFX_Edit* pEdit,
- const CPVT_WordPlace& wpOldPlace,
- const CPVT_WordPlace& wpNewPlace,
- const CPVT_WordRange& wrSel,
- uint16_t word,
- int32_t charset,
- const CPVT_SecProps& SecProps,
- const CPVT_WordProps& WordProps);
- ~CFXEU_ClearRich() override;
-
- // CFX_Edit_UndoItem
- void Redo() override;
- void Undo() override;
-
- private:
- CFX_Edit* m_pEdit;
-
- CPVT_WordPlace m_wpOld;
- CPVT_WordPlace m_wpNew;
- CPVT_WordRange m_wrSel;
- uint16_t m_Word;
- int32_t m_nCharset;
- CPVT_SecProps m_SecProps;
- CPVT_WordProps m_WordProps;
-};
-
class CFXEU_InsertText : public CFX_Edit_UndoItem {
public:
CFXEU_InsertText(CFX_Edit* pEdit,
@@ -385,58 +357,6 @@ class CFXEU_InsertText : public CFX_Edit_UndoItem {
CPVT_WordProps m_WordProps;
};
-class CFXEU_SetSecProps : public CFX_Edit_UndoItem {
- public:
- CFXEU_SetSecProps(CFX_Edit* pEdit,
- const CPVT_WordPlace& place,
- EDIT_PROPS_E ep,
- const CPVT_SecProps& oldsecprops,
- const CPVT_WordProps& oldwordprops,
- const CPVT_SecProps& newsecprops,
- const CPVT_WordProps& newwordprops,
- const CPVT_WordRange& range);
- ~CFXEU_SetSecProps() override;
-
- // CFX_Edit_UndoItem
- void Redo() override;
- void Undo() override;
-
- private:
- CFX_Edit* m_pEdit;
- CPVT_WordPlace m_wpPlace;
- CPVT_WordRange m_wrPlace;
- EDIT_PROPS_E m_eProps;
-
- CPVT_SecProps m_OldSecProps;
- CPVT_SecProps m_NewSecProps;
- CPVT_WordProps m_OldWordProps;
- CPVT_WordProps m_NewWordProps;
-};
-
-class CFXEU_SetWordProps : public CFX_Edit_UndoItem {
- public:
- CFXEU_SetWordProps(CFX_Edit* pEdit,
- const CPVT_WordPlace& place,
- EDIT_PROPS_E ep,
- const CPVT_WordProps& oldprops,
- const CPVT_WordProps& newprops,
- const CPVT_WordRange& range);
- ~CFXEU_SetWordProps() override;
-
- // CFX_Edit_UndoItem
- void Redo() override;
- void Undo() override;
-
- private:
- CFX_Edit* m_pEdit;
- CPVT_WordPlace m_wpPlace;
- CPVT_WordRange m_wrPlace;
- EDIT_PROPS_E m_eProps;
-
- CPVT_WordProps m_OldWordProps;
- CPVT_WordProps m_NewWordProps;
-};
-
class CFX_Edit : public IFX_Edit {
friend class CFX_Edit_Iterator;
friend class CFXEU_InsertWord;
@@ -444,9 +364,6 @@ class CFX_Edit : public IFX_Edit {
friend class CFXEU_Backspace;
friend class CFXEU_Delete;
friend class CFXEU_Clear;
- friend class CFXEU_ClearRich;
- friend class CFXEU_SetSecProps;
- friend class CFXEU_SetWordProps;
friend class CFXEU_InsertText;
public:
@@ -478,21 +395,6 @@ class CFX_Edit : public IFX_Edit {
void SetFontSize(FX_FLOAT fFontSize, FX_BOOL bPaint = TRUE) override;
void SetTextOverflow(FX_BOOL bAllowed = FALSE,
FX_BOOL bPaint = TRUE) override;
- FX_BOOL IsRichText() const override;
- void SetRichText(FX_BOOL bRichText = TRUE, FX_BOOL bPaint = TRUE) override;
- FX_BOOL SetRichFontSize(FX_FLOAT fFontSize) override;
- FX_BOOL SetRichFontIndex(int32_t nFontIndex) override;
- FX_BOOL SetRichTextColor(FX_COLORREF dwColor) override;
- FX_BOOL SetRichTextScript(CPDF_VariableText::ScriptType nScriptType) override;
- FX_BOOL SetRichTextBold(FX_BOOL bBold = TRUE) override;
- FX_BOOL SetRichTextItalic(FX_BOOL bItalic = TRUE) override;
- FX_BOOL SetRichTextUnderline(FX_BOOL bUnderline = TRUE) override;
- FX_BOOL SetRichTextCrossout(FX_BOOL bCrossout = TRUE) override;
- FX_BOOL SetRichTextCharSpace(FX_FLOAT fCharSpace) override;
- FX_BOOL SetRichTextHorzScale(int32_t nHorzScale = 100) override;
- FX_BOOL SetRichTextLineLeading(FX_FLOAT fLineLeading) override;
- FX_BOOL SetRichTextLineIndent(FX_FLOAT fLineIndent) override;
- FX_BOOL SetRichTextAlignment(int32_t nAlignment) override;
void OnMouseDown(const CFX_FloatPoint& point,
FX_BOOL bShift,
FX_BOOL bCtrl) override;
@@ -551,7 +453,6 @@ class CFX_Edit : public IFX_Edit {
void SelectNone() override;
FX_BOOL IsSelected() const override;
void Paint() override;
- void EnableNotify(FX_BOOL bNotify) override;
void EnableRefresh(FX_BOOL bRefresh) override;
void RefreshWordRange(const CPVT_WordRange& wr) override;
void SetCaret(int32_t nPos) override;
@@ -614,21 +515,6 @@ class CFX_Edit : public IFX_Edit {
const CPVT_WordProps* pWordProps,
FX_BOOL bAddUndo,
FX_BOOL bPaint);
- FX_BOOL SetRichTextProps(EDIT_PROPS_E eProps,
- const CPVT_SecProps* pSecProps,
- const CPVT_WordProps* pWordProps);
- FX_BOOL SetSecProps(EDIT_PROPS_E eProps,
- const CPVT_WordPlace& place,
- const CPVT_SecProps* pSecProps,
- const CPVT_WordProps* pWordProps,
- const CPVT_WordRange& wr,
- FX_BOOL bAddUndo);
- FX_BOOL SetWordProps(EDIT_PROPS_E eProps,
- const CPVT_WordPlace& place,
- const CPVT_WordProps* pWordProps,
- const CPVT_WordRange& wr,
- FX_BOOL bAddUndo);
- void PaintSetProps(EDIT_PROPS_E eProps, const CPVT_WordRange& wr);
void PaintInsertText(const CPVT_WordPlace& wpOld,
const CPVT_WordPlace& wpNew);
@@ -646,7 +532,6 @@ class CFX_Edit : public IFX_Edit {
void SetCaret(const CPVT_WordPlace& place);
void SetCaretInfo();
void SetCaretOrigin();
- void SetCaretChange();
CPVT_WordRange GetLatinWordsRange(const CPVT_WordPlace& place) const;
CPVT_WordRange CombineWordRange(const CPVT_WordRange& wr1,
@@ -685,7 +570,6 @@ class CFX_Edit : public IFX_Edit {
FX_BOOL m_bEnableRefresh;
CFX_FloatRect m_rcOldContent;
FX_BOOL m_bEnableUndo;
- FX_BOOL m_bNotify;
FX_BOOL m_bOprNotify;
CFX_Edit_GroupUndoItem* m_pGroupUndoItem;
};