summaryrefslogtreecommitdiff
path: root/fpdfsdk/fxedit/fxet_edit.h
diff options
context:
space:
mode:
authorDan Sinclair <dsinclair@chromium.org>2017-02-13 15:44:23 -0500
committerChromium commit bot <commit-bot@chromium.org>2017-02-13 22:09:20 +0000
commit4797c4240cb9e2d8cd36c583d46cd52ff94af95d (patch)
tree0c7e856a1c82812fcc3fa038e07ff4f22e424130 /fpdfsdk/fxedit/fxet_edit.h
parent58e4c5ac24a88f83d1ba8277dee87baf4cba36a0 (diff)
downloadpdfium-4797c4240cb9e2d8cd36c583d46cd52ff94af95d.tar.xz
Convert CFX_FloatPoint to CFX_PointF
The two classes store the same information, remove the CFX_FloatPoint variant. Change-Id: Ie598c2ba5af04fb2bb3347dd48c30fd5e4845e62 Reviewed-on: https://pdfium-review.googlesource.com/2612 Commit-Queue: dsinclair <dsinclair@chromium.org> Reviewed-by: Tom Sepez <tsepez@chromium.org>
Diffstat (limited to 'fpdfsdk/fxedit/fxet_edit.h')
-rw-r--r--fpdfsdk/fxedit/fxet_edit.h35
1 files changed, 16 insertions, 19 deletions
diff --git a/fpdfsdk/fxedit/fxet_edit.h b/fpdfsdk/fxedit/fxet_edit.h
index 555c58b0a3..448207894b 100644
--- a/fpdfsdk/fxedit/fxet_edit.h
+++ b/fpdfsdk/fxedit/fxet_edit.h
@@ -313,27 +313,26 @@ class CFXEU_InsertText : public CFX_Edit_UndoItem {
class CFX_Edit {
public:
static CFX_ByteString GetEditAppearanceStream(CFX_Edit* pEdit,
- const CFX_FloatPoint& ptOffset,
+ const CFX_PointF& ptOffset,
const CPVT_WordRange* pRange,
bool bContinuous,
uint16_t SubWord);
- static CFX_ByteString GetSelectAppearanceStream(
- CFX_Edit* pEdit,
- const CFX_FloatPoint& ptOffset,
- const CPVT_WordRange* pRange);
+ static CFX_ByteString GetSelectAppearanceStream(CFX_Edit* pEdit,
+ const CFX_PointF& ptOffset,
+ const CPVT_WordRange* pRange);
static void DrawEdit(CFX_RenderDevice* pDevice,
CFX_Matrix* pUser2Device,
CFX_Edit* pEdit,
FX_COLORREF crTextFill,
FX_COLORREF crTextStroke,
const CFX_FloatRect& rcClip,
- const CFX_FloatPoint& ptOffset,
+ const CFX_PointF& ptOffset,
const CPVT_WordRange* pRange,
CFX_SystemHandler* pSystemHandler,
CFFL_FormFiller* pFFLData);
static void GeneratePageObjects(CPDF_PageObjectHolder* pObjectHolder,
CFX_Edit* pEdit,
- const CFX_FloatPoint& ptOffset,
+ const CFX_PointF& ptOffset,
const CPVT_WordRange* pRange,
FX_COLORREF crText,
std::vector<CPDF_TextObject*>* ObjArray);
@@ -352,7 +351,7 @@ class CFX_Edit {
// Set the bounding box of the text area.
void SetPlateRect(const CFX_FloatRect& rect);
- void SetScrollPos(const CFX_FloatPoint& point);
+ void SetScrollPos(const CFX_PointF& point);
// Set the horizontal text alignment. (nFormat [0:left, 1:middle, 2:right])
void SetAlignmentH(int32_t nFormat, bool bPaint);
@@ -372,8 +371,8 @@ class CFX_Edit {
void SetAutoScroll(bool bAuto, bool bPaint);
void SetFontSize(FX_FLOAT fFontSize);
void SetTextOverflow(bool bAllowed, bool bPaint);
- void OnMouseDown(const CFX_FloatPoint& point, bool bShift, bool bCtrl);
- void OnMouseMove(const CFX_FloatPoint& point, bool bShift, bool bCtrl);
+ void OnMouseDown(const CFX_PointF& point, bool bShift, bool bCtrl);
+ void OnMouseMove(const CFX_PointF& point, bool bShift, bool bCtrl);
void OnVK_UP(bool bShift, bool bCtrl);
void OnVK_DOWN(bool bShift, bool bCtrl);
void OnVK_LEFT(bool bShift, bool bCtrl);
@@ -391,14 +390,14 @@ class CFX_Edit {
bool Undo();
int32_t WordPlaceToWordIndex(const CPVT_WordPlace& place) const;
CPVT_WordPlace WordIndexToWordPlace(int32_t index) const;
- CPVT_WordPlace SearchWordPlace(const CFX_FloatPoint& point) const;
+ CPVT_WordPlace SearchWordPlace(const CFX_PointF& point) const;
int32_t GetCaret() const;
CPVT_WordPlace GetCaretWordPlace() const;
CFX_WideString GetSelText() const;
CFX_WideString GetText() const;
FX_FLOAT GetFontSize() const;
uint16_t GetPasswordChar() const;
- CFX_FloatPoint GetScrollPos() const;
+ CFX_PointF GetScrollPos() const;
int32_t GetCharArray() const;
CFX_FloatRect GetContentRect() const;
CFX_WideString GetRangeText(const CPVT_WordRange& range) const;
@@ -472,8 +471,8 @@ class CFX_Edit {
void PaintInsertText(const CPVT_WordPlace& wpOld,
const CPVT_WordPlace& wpNew);
- inline CFX_FloatPoint VTToEdit(const CFX_FloatPoint& point) const;
- inline CFX_FloatPoint EditToVT(const CFX_FloatPoint& point) const;
+ inline CFX_PointF VTToEdit(const CFX_PointF& point) const;
+ inline CFX_PointF EditToVT(const CFX_PointF& point) const;
inline CFX_FloatRect VTToEdit(const CFX_FloatRect& rect) const;
void Refresh();
@@ -490,17 +489,15 @@ class CFX_Edit {
CPWL_EditCtrl* m_pNotify;
CPWL_Edit* m_pOprNotify;
std::unique_ptr<CFX_Edit_Provider> m_pVTProvider;
-
CPVT_WordPlace m_wpCaret;
CPVT_WordPlace m_wpOldCaret;
CFX_Edit_Select m_SelState;
-
- CFX_FloatPoint m_ptScrollPos;
- CFX_FloatPoint m_ptRefreshScrollPos;
+ CFX_PointF m_ptScrollPos;
+ CFX_PointF m_ptRefreshScrollPos;
bool m_bEnableScroll;
std::unique_ptr<CFX_Edit_Iterator> m_pIterator;
CFX_Edit_Refresh m_Refresh;
- CFX_FloatPoint m_ptCaret;
+ CFX_PointF m_ptCaret;
CFX_Edit_Undo m_Undo;
int32_t m_nAlignment;
bool m_bNotifyFlag;