Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1130)

Unified Diff: xfa/fwl/core/cfwl_edit.cpp

Issue 2498163002: Cleanup cfwl_* files. (Closed)
Patch Set: Review feedback Created 4 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « xfa/fwl/core/cfwl_edit.h ('k') | xfa/fwl/core/cfwl_listbox.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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;
}
« no previous file with comments | « xfa/fwl/core/cfwl_edit.h ('k') | xfa/fwl/core/cfwl_listbox.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698