diff options
author | Lei Zhang <thestig@chromium.org> | 2015-06-11 13:03:09 -0700 |
---|---|---|
committer | Lei Zhang <thestig@chromium.org> | 2015-06-11 13:03:09 -0700 |
commit | eda202769e5c79eba1d2fb5090f6e9cf176e2d4a (patch) | |
tree | 733bb60ff089513182403a5ced5ea32f1d330eb0 /fpdfsdk/include | |
parent | 677b8fffb0c76c009ad808ed91a27738e5420254 (diff) | |
download | pdfium-eda202769e5c79eba1d2fb5090f6e9cf176e2d4a.tar.xz |
Cleanup: Get this rid of "this->" in fpdfsdk/
Also remove commented out code and trailing whitespaces.
R=tsepez@chromium.org
Review URL: https://codereview.chromium.org/1179653005.
Diffstat (limited to 'fpdfsdk/include')
-rw-r--r-- | fpdfsdk/include/fxedit/fxet_edit.h | 18 | ||||
-rw-r--r-- | fpdfsdk/include/fxedit/fxet_list.h | 79 | ||||
-rw-r--r-- | fpdfsdk/include/pdfwindow/PWL_ListBox.h | 21 | ||||
-rw-r--r-- | fpdfsdk/include/pdfwindow/PWL_Wnd.h | 2 |
4 files changed, 60 insertions, 60 deletions
diff --git a/fpdfsdk/include/fxedit/fxet_edit.h b/fpdfsdk/include/fxedit/fxet_edit.h index 0a3617f4e4..d92f29067a 100644 --- a/fpdfsdk/include/fxedit/fxet_edit.h +++ b/fpdfsdk/include/fxedit/fxet_edit.h @@ -162,7 +162,7 @@ public: virtual ~CFX_Edit_RectArray() { - this->Empty(); + Empty(); } void Empty() @@ -170,7 +170,7 @@ public: for (int32_t i = 0, sz = m_Rects.GetSize(); i < sz; i++) delete m_Rects.GetAt(i); - this->m_Rects.RemoveAll(); + m_Rects.RemoveAll(); } void Add(const CPDF_Rect & rect) @@ -242,7 +242,7 @@ public: CPVT_WordRange ConvertToWordRange() const { - return CPVT_WordRange(this->BeginPos,this->EndPos); + return CPVT_WordRange(BeginPos, EndPos); } void Default() @@ -253,28 +253,28 @@ public: void Set(const CPVT_WordPlace & begin,const CPVT_WordPlace & end) { - this->BeginPos = begin; - this->EndPos = end; + BeginPos = begin; + EndPos = end; } void SetBeginPos(const CPVT_WordPlace & begin) { - this->BeginPos = begin; + BeginPos = begin; } void SetEndPos(const CPVT_WordPlace & end) { - this->EndPos = end; + EndPos = end; } FX_BOOL IsExist() const { - return this->BeginPos != this->EndPos; + return BeginPos != EndPos; } FX_BOOL operator != (const CPVT_WordRange & wr) const { - return wr.BeginPos != this->BeginPos || wr.EndPos != this->EndPos; + return wr.BeginPos != BeginPos || wr.EndPos != EndPos; } CPVT_WordPlace BeginPos,EndPos; diff --git a/fpdfsdk/include/fxedit/fxet_list.h b/fpdfsdk/include/fxedit/fxet_list.h index 02028f2cff..fe75b0fc35 100644 --- a/fpdfsdk/include/fxedit/fxet_list.h +++ b/fpdfsdk/include/fxedit/fxet_list.h @@ -19,10 +19,10 @@ public: { } - CLST_Size(FX_FLOAT x,FX_FLOAT y) + CLST_Size(FX_FLOAT other_x, FX_FLOAT other_y) { - this->x = x; - this->y = y; + x = other_x; + y = other_y; } void Default() @@ -47,22 +47,24 @@ public: left = top = right = bottom = 0.0f; } - CLST_Rect(FX_FLOAT left,FX_FLOAT top, - FX_FLOAT right,FX_FLOAT bottom) - { - this->left = left; - this->top = top; - this->right = right; - this->bottom = bottom; - } - - CLST_Rect(const CPDF_Rect & rect) - { - this->left = rect.left; - this->top = rect.top; - this->right = rect.right; - this->bottom = rect.bottom; - } + CLST_Rect(FX_FLOAT other_left, + FX_FLOAT other_top, + FX_FLOAT other_right, + FX_FLOAT other_bottom) + { + left = other_left; + top = other_top; + right = other_right; + bottom = other_bottom; + } + + CLST_Rect(const CPDF_Rect & rect) + { + left = rect.left; + top = rect.top; + right = rect.right; + bottom = rect.bottom; + } void Default() { @@ -71,10 +73,10 @@ public: const CLST_Rect operator = (const CPDF_Rect & rect) { - this->left = rect.left; - this->top = rect.top; - this->right = rect.right; - this->bottom = rect.bottom; + left = rect.left; + top = rect.top; + right = rect.right; + bottom = rect.bottom; return *this; } @@ -91,15 +93,14 @@ public: FX_FLOAT Width() const { - return this->right - this->left; + return right - left; } FX_FLOAT Height() const { - if (this->top > this->bottom) - return this->top - this->bottom; - else - return this->bottom - this->top; + if (top > bottom) + return top - bottom; + return bottom - top; } CPDF_Point LeftTop() const @@ -114,20 +115,20 @@ public: const CLST_Rect operator += (const CPDF_Point & point) { - this->left += point.x; - this->right += point.x; - this->top += point.y; - this->bottom += point.y; + left += point.x; + right += point.x; + top += point.y; + bottom += point.y; return *this; } const CLST_Rect operator -= (const CPDF_Point & point) { - this->left -= point.x; - this->right -= point.x; - this->top -= point.y; - this->bottom -= point.y; + left -= point.x; + right -= point.x; + top -= point.y; + bottom -= point.y; return *this; } @@ -263,10 +264,10 @@ private: struct CPLST_Select_Item { - CPLST_Select_Item(int32_t nItemIndex,int32_t nState) + CPLST_Select_Item(int32_t other_nItemIndex, int32_t other_nState) { - this->nItemIndex = nItemIndex; - this->nState = nState; + nItemIndex = other_nItemIndex; + nState = other_nState; } int32_t nItemIndex; diff --git a/fpdfsdk/include/pdfwindow/PWL_ListBox.h b/fpdfsdk/include/pdfwindow/PWL_ListBox.h index bbb9f35125..97a4529af9 100644 --- a/fpdfsdk/include/pdfwindow/PWL_ListBox.h +++ b/fpdfsdk/include/pdfwindow/PWL_ListBox.h @@ -1,7 +1,7 @@ // Copyright 2014 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 FPDFSDK_INCLUDE_PDFWINDOW_PWL_LISTBOX_H_ @@ -21,11 +21,11 @@ public: CPWL_List_Notify(CPWL_ListBox * pList); virtual ~CPWL_List_Notify(); - void IOnSetScrollInfoX(FX_FLOAT fPlateMin, FX_FLOAT fPlateMax, - FX_FLOAT fContentMin, FX_FLOAT fContentMax, + void IOnSetScrollInfoX(FX_FLOAT fPlateMin, FX_FLOAT fPlateMax, + FX_FLOAT fContentMin, FX_FLOAT fContentMax, FX_FLOAT fSmallStep, FX_FLOAT fBigStep){} - void IOnSetScrollInfoY(FX_FLOAT fPlateMin, FX_FLOAT fPlateMax, - FX_FLOAT fContentMin, FX_FLOAT fContentMax, + void IOnSetScrollInfoY(FX_FLOAT fPlateMin, FX_FLOAT fPlateMax, + FX_FLOAT fContentMin, FX_FLOAT fContentMax, FX_FLOAT fSmallStep, FX_FLOAT fBigStep); void IOnSetScrollPosX(FX_FLOAT fx){} void IOnSetScrollPosY(FX_FLOAT fy); @@ -34,7 +34,7 @@ public: void IOnInvalidateRect(CPDF_Rect * pRect); private: - CPWL_ListBox* m_pList; + CPWL_ListBox* m_pList; }; class PWL_CLASS CPWL_ListBox : public CPWL_Wnd @@ -59,15 +59,14 @@ public: virtual void OnNotify(CPWL_Wnd* pWnd, FX_DWORD msg, intptr_t wParam = 0, intptr_t lParam = 0); virtual void RePosChildWnd(); - virtual void SetText(const FX_WCHAR* csText,FX_BOOL bRefresh = TRUE); - virtual CFX_WideString GetText() const; + virtual CFX_WideString GetText() const; virtual CPDF_Rect GetFocusRect() const; virtual void SetFontSize(FX_FLOAT fFontSize); virtual FX_FLOAT GetFontSize() const; void OnNotifySelChanged(FX_BOOL bKeyDown, FX_BOOL & bExit , FX_DWORD nFlag); - void AddString(const FX_WCHAR* string); + void AddString(const FX_WCHAR* string); void SetTopVisibleIndex(int32_t nItemIndex); void ScrollToListItem(int32_t nItemIndex); void ResetContent(); @@ -75,7 +74,7 @@ public: void Select(int32_t nItemIndex); void SetCaret(int32_t nItemIndex); void SetHoverSel(FX_BOOL bHoverSel); - + int32_t GetCount() const; FX_BOOL IsMultipleSel() const; int32_t GetCaretIndex() const; @@ -83,7 +82,7 @@ public: FX_BOOL IsItemSelected(int32_t nItemIndex) const; int32_t GetTopVisibleIndex() const; int32_t FindNext(int32_t nIndex,FX_WCHAR nChar) const; - CPDF_Rect GetContentRect() const; + CPDF_Rect GetContentRect() const; FX_FLOAT GetFirstHeight() const; CPDF_Rect GetListRect() const; diff --git a/fpdfsdk/include/pdfwindow/PWL_Wnd.h b/fpdfsdk/include/pdfwindow/PWL_Wnd.h index 9f089e6fa4..e74dc88c5c 100644 --- a/fpdfsdk/include/pdfwindow/PWL_Wnd.h +++ b/fpdfsdk/include/pdfwindow/PWL_Wnd.h @@ -125,7 +125,7 @@ struct PWL_CLASS CPWL_Color nColorType(COLORTYPE_RGB), fColor1(r/255.0f), fColor2(g/255.0f), fColor3(b/255.0f), fColor4(0) {} - void ConvertColorType(int32_t nColorType); + void ConvertColorType(int32_t other_nColorType); /* COLORTYPE_TRANSPARENT |