Index: xfa/fwl/core/cfwl_edit.cpp |
diff --git a/xfa/fwl/core/cfwl_edit.cpp b/xfa/fwl/core/cfwl_edit.cpp |
index c7acf18f7722e5715ba1aef685c32b7bdae3c930..dc01e2213acaa379b2a516a7eef474c958cb899f 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; |
} |