summaryrefslogtreecommitdiff
path: root/xfa/fwl/core/cfwl_edit.cpp
diff options
context:
space:
mode:
authordsinclair <dsinclair@chromium.org>2016-11-15 12:33:06 -0800
committerCommit bot <commit-bot@chromium.org>2016-11-15 12:33:06 -0800
commit38eaf4b11383e24a00192132b683cc07e38622a6 (patch)
tree169f9d48784035519ddee9191aa412cc817a4531 /xfa/fwl/core/cfwl_edit.cpp
parent05b9a317d66c29f740e4b0e89ea87143a11d61fc (diff)
downloadpdfium-38eaf4b11383e24a00192132b683cc07e38622a6.tar.xz
Cleanup cfwl_* files.
This Cl cleans up the visibility, method usage and return values in the remaining CFWL files. Review-Url: https://codereview.chromium.org/2498163002
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;
}