summaryrefslogtreecommitdiff
path: root/xfa/fwl/core/cfwl_edit.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'xfa/fwl/core/cfwl_edit.cpp')
-rw-r--r--xfa/fwl/core/cfwl_edit.cpp12
1 files changed, 8 insertions, 4 deletions
diff --git a/xfa/fwl/core/cfwl_edit.cpp b/xfa/fwl/core/cfwl_edit.cpp
index c7acf18f77..dc01e2213a 100644
--- a/xfa/fwl/core/cfwl_edit.cpp
+++ b/xfa/fwl/core/cfwl_edit.cpp
@@ -17,6 +17,10 @@ IFWL_Edit* ToEdit(IFWL_Widget* widget) {
return static_cast<IFWL_Edit*>(widget);
}
+const IFWL_Edit* ToEdit(const IFWL_Widget* widget) {
+ return static_cast<const IFWL_Edit*>(widget);
+}
+
} // namespace
CFWL_Edit::CFWL_Edit(const IFWL_App* app) : CFWL_Widget(app) {}
@@ -39,20 +43,20 @@ void CFWL_Edit::SetText(const CFX_WideString& wsText) {
void CFWL_Edit::GetText(CFX_WideString& wsText,
int32_t nStart,
- int32_t nCount) {
+ int32_t nCount) const {
if (GetWidget())
ToEdit(GetWidget())->GetText(wsText, nStart, nCount);
}
-int32_t CFWL_Edit::CountSelRanges() {
+int32_t CFWL_Edit::CountSelRanges() const {
return GetWidget() ? ToEdit(GetWidget())->CountSelRanges() : 0;
}
-int32_t CFWL_Edit::GetSelRange(int32_t nIndex, int32_t& nStart) {
+int32_t CFWL_Edit::GetSelRange(int32_t nIndex, int32_t& nStart) const {
return GetWidget() ? ToEdit(GetWidget())->GetSelRange(nIndex, nStart) : 0;
}
-int32_t CFWL_Edit::GetLimit() {
+int32_t CFWL_Edit::GetLimit() const {
return GetWidget() ? ToEdit(GetWidget())->GetLimit() : -1;
}