summaryrefslogtreecommitdiff
path: root/xfa/fwl/cfwl_barcode.cpp
diff options
context:
space:
mode:
authorDan Sinclair <dsinclair@chromium.org>2018-05-29 19:42:39 +0000
committerChromium commit bot <commit-bot@chromium.org>2018-05-29 19:42:39 +0000
commit6af5369477ec05554ef9e73ae6762860095f09e9 (patch)
tree0a9d28f4e3f89ca5b141954913169fdff63bf59c /xfa/fwl/cfwl_barcode.cpp
parent162a31a6af1538acf7ac9835111626161287d742 (diff)
downloadpdfium-6af5369477ec05554ef9e73ae6762860095f09e9.tar.xz
[xfa] Propagate the xfa change data for text to JS and back.
This CL adds the necessary plumbing to propagate the change information for a text widget from FWL out to JS and handle the returned value as necessary. Bug: pdfium:1066 Change-Id: I78fd81761b90294f1836e9f09dba12ed238963cc Reviewed-on: https://pdfium-review.googlesource.com/33070 Reviewed-by: Ryan Harrison <rharrison@chromium.org> Commit-Queue: dsinclair <dsinclair@chromium.org>
Diffstat (limited to 'xfa/fwl/cfwl_barcode.cpp')
-rw-r--r--xfa/fwl/cfwl_barcode.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/xfa/fwl/cfwl_barcode.cpp b/xfa/fwl/cfwl_barcode.cpp
index 74ac7dd9c2..649dea0c8e 100644
--- a/xfa/fwl/cfwl_barcode.cpp
+++ b/xfa/fwl/cfwl_barcode.cpp
@@ -67,10 +67,11 @@ void CFWL_Barcode::SetType(BC_TYPE type) {
m_dwStatus = XFA_BCS_NeedUpdate;
}
-void CFWL_Barcode::SetText(const WideString& wsText) {
+void CFWL_Barcode::SetText(const WideString& wsText,
+ CFDE_TextEditEngine::RecordOperation op) {
m_pBarcodeEngine.reset();
m_dwStatus = XFA_BCS_NeedUpdate;
- CFWL_Edit::SetText(wsText);
+ CFWL_Edit::SetText(wsText, op);
}
bool CFWL_Barcode::IsProtectedType() const {
@@ -86,7 +87,7 @@ bool CFWL_Barcode::IsProtectedType() const {
}
void CFWL_Barcode::OnProcessEvent(CFWL_Event* pEvent) {
- if (pEvent->GetType() == CFWL_Event::Type::TextChanged) {
+ if (pEvent->GetType() == CFWL_Event::Type::TextWillChange) {
m_pBarcodeEngine.reset();
m_dwStatus = XFA_BCS_NeedUpdate;
}