summaryrefslogtreecommitdiff
path: root/xfa/fxfa/cxfa_ffpasswordedit.cpp
diff options
context:
space:
mode:
authorDan Sinclair <dsinclair@chromium.org>2017-11-23 17:02:23 +0000
committerChromium commit bot <commit-bot@chromium.org>2017-11-23 17:02:23 +0000
commit6aec70bc09cb65b169fe6ca1af65e8929aeea43a (patch)
tree34d55cf15cba0fe71e87a896184ecdc891d4752f /xfa/fxfa/cxfa_ffpasswordedit.cpp
parentd49254bc9323883deba14d27026ec2bb9af096fa (diff)
downloadpdfium-6aec70bc09cb65b169fe6ca1af65e8929aeea43a.tar.xz
Cleanup CXFA_WidgetDatachromium/3277
This CL cleans up return values, out-params and changes simple methods to boolean checks where possible in CXFA_WidgetData. Change-Id: I29daa67993730f3e9d61cb6fdf918a886cc9120e Reviewed-on: https://pdfium-review.googlesource.com/19230 Reviewed-by: Henrique Nakashima <hnakashima@chromium.org> Commit-Queue: dsinclair <dsinclair@chromium.org>
Diffstat (limited to 'xfa/fxfa/cxfa_ffpasswordedit.cpp')
-rw-r--r--xfa/fxfa/cxfa_ffpasswordedit.cpp13
1 files changed, 5 insertions, 8 deletions
diff --git a/xfa/fxfa/cxfa_ffpasswordedit.cpp b/xfa/fxfa/cxfa_ffpasswordedit.cpp
index 8cbe265b7a..3bb2eb5b90 100644
--- a/xfa/fxfa/cxfa_ffpasswordedit.cpp
+++ b/xfa/fxfa/cxfa_ffpasswordedit.cpp
@@ -32,9 +32,7 @@ bool CXFA_FFPasswordEdit::LoadWidget() {
m_pNormalWidget->SetDelegate(this);
m_pNormalWidget->LockUpdate();
- WideString wsText;
- m_pDataAcc->GetValue(wsText, XFA_VALUEPICTURE_Display);
- pWidget->SetText(wsText);
+ pWidget->SetText(m_pDataAcc->GetValue(XFA_VALUEPICTURE_Display));
UpdateWidgetProperty();
m_pNormalWidget->UnlockUpdate();
return CXFA_FFField::LoadWidget();
@@ -50,11 +48,10 @@ void CXFA_FFPasswordEdit::UpdateWidgetProperty() {
FWL_STYLEEXT_EDT_Password;
dwExtendedStyle |= UpdateUIProperty();
- WideString wsPassWord;
- m_pDataAcc->GetPasswordChar(wsPassWord);
- if (!wsPassWord.IsEmpty())
- pWidget->SetAliasChar(wsPassWord[0]);
- if (m_pDataAcc->GetHorizontalScrollPolicy() != XFA_ATTRIBUTEENUM_Off)
+ WideString password = m_pDataAcc->GetPasswordChar();
+ if (!password.IsEmpty())
+ pWidget->SetAliasChar(password[0]);
+ if (!m_pDataAcc->IsHorizontalScrollPolicyOff())
dwExtendedStyle |= FWL_STYLEEXT_EDT_AutoHScroll;
if (!m_pDataAcc->IsOpenAccess() ||
!m_pDataAcc->GetDoc()->GetXFADoc()->IsInteractive()) {