summaryrefslogtreecommitdiff
path: root/fpdfsdk/pdfwindow/cpwl_edit_ctrl.cpp
diff options
context:
space:
mode:
authorDan Sinclair <dsinclair@chromium.org>2017-07-05 16:00:48 -0400
committerChromium commit bot <commit-bot@chromium.org>2017-07-05 21:24:34 +0000
commit0fdd1aea658bc65e4d136c58818451b9ddad00e0 (patch)
tree7b435514a01e74198159de880f65408e1b77ab2e /fpdfsdk/pdfwindow/cpwl_edit_ctrl.cpp
parentd32623b507c7e78221eb9f5f62641e3113501a5c (diff)
downloadpdfium-0fdd1aea658bc65e4d136c58818451b9ddad00e0.tar.xz
Cleanup IOn* methods and CPWL_CBEdit
This CL removes various IOn* methods and consolidates code where possible. The CPWL_CBEdit class is also removed as it was a subclass of CPWL_Edit which added no extra functionality. Change-Id: Ifac579ab252b7ca64f8c9b3caeac443683a39c58 Reviewed-on: https://pdfium-review.googlesource.com/7279 Commit-Queue: dsinclair <dsinclair@chromium.org> Reviewed-by: Tom Sepez <tsepez@chromium.org>
Diffstat (limited to 'fpdfsdk/pdfwindow/cpwl_edit_ctrl.cpp')
-rw-r--r--fpdfsdk/pdfwindow/cpwl_edit_ctrl.cpp42
1 files changed, 1 insertions, 41 deletions
diff --git a/fpdfsdk/pdfwindow/cpwl_edit_ctrl.cpp b/fpdfsdk/pdfwindow/cpwl_edit_ctrl.cpp
index 59879bb274..ccc214ab00 100644
--- a/fpdfsdk/pdfwindow/cpwl_edit_ctrl.cpp
+++ b/fpdfsdk/pdfwindow/cpwl_edit_ctrl.cpp
@@ -299,8 +299,7 @@ void CPWL_EditCtrl::SetEditCaret(bool bVisible) {
if (bVisible)
GetCaretInfo(&ptHead, &ptFoot);
- CPVT_WordPlace wpTemp = m_pEdit->GetCaretWordPlace();
- IOnSetCaret(bVisible, ptHead, ptFoot, wpTemp);
+ SetCaret(bVisible, ptHead, ptFoot);
}
void CPWL_EditCtrl::GetCaretInfo(CFX_PointF* ptHead, CFX_PointF* ptFoot) const {
@@ -367,8 +366,6 @@ void CPWL_EditCtrl::PasteText() {}
void CPWL_EditCtrl::CutText() {}
-void CPWL_EditCtrl::ShowVScrollBar(bool bShow) {}
-
void CPWL_EditCtrl::InsertWord(uint16_t word, int32_t nCharset) {
if (!IsReadOnly())
m_pEdit->InsertWord(word, nCharset);
@@ -407,43 +404,6 @@ void CPWL_EditCtrl::Undo() {
m_pEdit->Undo();
}
-void CPWL_EditCtrl::IOnSetScrollInfoY(float fPlateMin,
- float fPlateMax,
- float fContentMin,
- float fContentMax,
- float fSmallStep,
- float fBigStep) {
- PWL_SCROLL_INFO Info;
- Info.fPlateWidth = fPlateMax - fPlateMin;
- Info.fContentMin = fContentMin;
- Info.fContentMax = fContentMax;
- Info.fSmallStep = fSmallStep;
- Info.fBigStep = fBigStep;
- SetScrollInfo(Info);
-
- if (IsFloatBigger(Info.fPlateWidth, Info.fContentMax - Info.fContentMin) ||
- IsFloatEqual(Info.fPlateWidth, Info.fContentMax - Info.fContentMin)) {
- ShowVScrollBar(false);
- } else {
- ShowVScrollBar(true);
- }
-}
-
-void CPWL_EditCtrl::IOnSetScrollPosY(float fy) {
- SetScrollPosition(fy);
-}
-
-void CPWL_EditCtrl::IOnSetCaret(bool bVisible,
- const CFX_PointF& ptHead,
- const CFX_PointF& ptFoot,
- const CPVT_WordPlace& place) {
- SetCaret(bVisible, ptHead, ptFoot);
-}
-
-void CPWL_EditCtrl::IOnInvalidateRect(CFX_FloatRect* pRect) {
- InvalidateRect(pRect);
-}
-
int32_t CPWL_EditCtrl::GetCharSet() const {
return m_nCharSet < 0 ? FX_CHARSET_Default : m_nCharSet;
}