From 0354ccf37f05f25b1bf64fd60bb3b48efab4d7d0 Mon Sep 17 00:00:00 2001 From: dan sinclair Date: Thu, 24 Nov 2016 10:45:29 -0500 Subject: Change TxtEdtEngine to return CFX_WideString MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This Cl updates the TxtEdtEngine and TxtEdtBuf to return CFX_WideStrings on a Get instead of taking an out param. The change is propagated out through the various Get methods that call into the edit engine. Change-Id: Iccf10a8ee06678ae3b59f3afd6e65308dacd16bd Reviewed-on: https://pdfium-review.googlesource.com/2070 Commit-Queue: ooo 11-24 -- 12-05 (dsinclair) Reviewed-by: Nicolás Peña --- xfa/fxfa/app/xfa_ffchoicelist.cpp | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'xfa/fxfa/app/xfa_ffchoicelist.cpp') diff --git a/xfa/fxfa/app/xfa_ffchoicelist.cpp b/xfa/fxfa/app/xfa_ffchoicelist.cpp index b289a39eb3..c9a513607e 100644 --- a/xfa/fxfa/app/xfa_ffchoicelist.cpp +++ b/xfa/fxfa/app/xfa_ffchoicelist.cpp @@ -160,8 +160,10 @@ void CXFA_FFListBox::OnSelectChanged(CFWL_Widget* pWidget, CFWL_ListBox* pListBox = (CFWL_ListBox*)m_pNormalWidget; int32_t iSels = pListBox->CountSelItems(); if (iSels > 0) { - pListBox->GetItemText(nullptr, pListBox->GetSelItem(0), eParam.m_wsNewText); + eParam.m_wsNewText = + pListBox->GetItemText(nullptr, pListBox->GetSelItem(0)); } + m_pDataAcc->ProcessEvent(XFA_ATTRIBUTEENUM_Change, &eParam); } void CXFA_FFListBox::SetItemState(int32_t nIndex, bool bSelected) { @@ -316,8 +318,7 @@ bool CXFA_FFComboBox::CommitData() { } bool CXFA_FFComboBox::IsDataChanged() { CFWL_ComboBox* pFWLcombobox = ((CFWL_ComboBox*)m_pNormalWidget); - CFX_WideString wsText; - pFWLcombobox->GetEditText(wsText); + CFX_WideString wsText = pFWLcombobox->GetEditText(); int32_t iCursel = pFWLcombobox->GetCurSel(); if (iCursel >= 0) { CFX_WideString wsSel; @@ -338,7 +339,7 @@ void CXFA_FFComboBox::FWLEventSelChange(CXFA_EventParam* pParam) { pParam->m_eType = XFA_EVENT_Change; pParam->m_pTarget = m_pDataAcc; CFWL_ComboBox* pFWLcombobox = ((CFWL_ComboBox*)m_pNormalWidget); - pFWLcombobox->GetEditText(pParam->m_wsNewText); + pParam->m_wsNewText = pFWLcombobox->GetEditText(); m_pDataAcc->ProcessEvent(XFA_ATTRIBUTEENUM_Change, pParam); } uint32_t CXFA_FFComboBox::GetAlignment() { -- cgit v1.2.3