From 68eefa6a6f6bbab73000a29e2cac3e104be1cc81 Mon Sep 17 00:00:00 2001 From: Dan Sinclair Date: Wed, 30 Aug 2017 12:16:16 -0400 Subject: Rebuild CFDE_TextEditEngine. This CL rebuilds the text edit engine in a simpler fashion. Instead of depending on multiple pages, paragraphs and buffer fields there is a single text edit engine which contains a gap buffer. This makes the code easier to understand and follow. Change-Id: I10fe85603fa9ed15a647eaac2d931f113cd0c7b0 Reviewed-on: https://pdfium-review.googlesource.com/11990 Commit-Queue: dsinclair Reviewed-by: Henrique Nakashima Reviewed-by: Ryan Harrison --- xfa/fwl/cfwl_datetimepicker.h | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'xfa/fwl/cfwl_datetimepicker.h') diff --git a/xfa/fwl/cfwl_datetimepicker.h b/xfa/fwl/cfwl_datetimepicker.h index fa7653ecf0..ece489e276 100644 --- a/xfa/fwl/cfwl_datetimepicker.h +++ b/xfa/fwl/cfwl_datetimepicker.h @@ -8,6 +8,7 @@ #define XFA_FWL_CFWL_DATETIMEPICKER_H_ #include +#include #include "xfa/fwl/cfwl_datetimeedit.h" #include "xfa/fwl/cfwl_event.h" @@ -51,9 +52,10 @@ class CFWL_DateTimePicker : public CFWL_Widget { void SetEditText(const CFX_WideString& wsText); CFX_WideString GetEditText() const; - int32_t CountSelRanges() const { return m_pEdit->CountSelRanges(); } - int32_t GetSelRange(int32_t nIndex, int32_t* nStart) const { - return m_pEdit->GetSelRange(nIndex, nStart); + bool HasSelection() const { return m_pEdit->HasSelection(); } + // Returns indices of the selection. + std::pair GetSelection() const { + return m_pEdit->GetSelection(); } CFX_RectF GetBBox() const; -- cgit v1.2.3