diff options
author | tsepez <tsepez@chromium.org> | 2016-09-13 16:08:49 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2016-09-13 16:08:49 -0700 |
commit | 63f545c485c063831ecb58fb492f96fe5f462fd1 (patch) | |
tree | 8c57386bc84f7173b780a7e8bf79a19ec7c3231e /fpdfsdk/pdfwindow/PWL_EditCtrl.cpp | |
parent | f86ca3884886506c999a3b521078151e7cda0bf9 (diff) | |
download | pdfium-63f545c485c063831ecb58fb492f96fe5f462fd1.tar.xz |
CFX_FloatPoint default constructor and equals operatorschromium/2860
Review-Url: https://codereview.chromium.org/2341453002
Diffstat (limited to 'fpdfsdk/pdfwindow/PWL_EditCtrl.cpp')
-rw-r--r-- | fpdfsdk/pdfwindow/PWL_EditCtrl.cpp | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/fpdfsdk/pdfwindow/PWL_EditCtrl.cpp b/fpdfsdk/pdfwindow/PWL_EditCtrl.cpp index 575fd39089..9d8b16a53c 100644 --- a/fpdfsdk/pdfwindow/PWL_EditCtrl.cpp +++ b/fpdfsdk/pdfwindow/PWL_EditCtrl.cpp @@ -328,11 +328,10 @@ CFX_FloatRect CPWL_EditCtrl::GetContentRect() const { } void CPWL_EditCtrl::SetEditCaret(FX_BOOL bVisible) { - CFX_FloatPoint ptHead(0, 0), ptFoot(0, 0); - - if (bVisible) { + CFX_FloatPoint ptHead; + CFX_FloatPoint ptFoot; + if (bVisible) GetCaretInfo(ptHead, ptFoot); - } CPVT_WordPlace wpTemp = m_pEdit->GetCaretWordPlace(); IOnSetCaret(bVisible, ptHead, ptFoot, wpTemp); @@ -358,10 +357,9 @@ void CPWL_EditCtrl::GetCaretInfo(CFX_FloatPoint& ptHead, } void CPWL_EditCtrl::GetCaretPos(int32_t& x, int32_t& y) const { - CFX_FloatPoint ptHead(0, 0), ptFoot(0, 0); - + CFX_FloatPoint ptHead; + CFX_FloatPoint ptFoot; GetCaretInfo(ptHead, ptFoot); - PWLtoWnd(ptHead, x, y); } |