summaryrefslogtreecommitdiff
path: root/fxjs/cjs_event_context.cpp
diff options
context:
space:
mode:
authorTom Sepez <tsepez@chromium.org>2018-06-21 17:28:24 +0000
committerChromium commit bot <commit-bot@chromium.org>2018-06-21 17:28:24 +0000
commit3d8131535e6b127c7ededdbd2e76662688997272 (patch)
tree656faaadbaf0139f8a299b672f6530e7a004b6bb /fxjs/cjs_event_context.cpp
parenta964f2a5ab09dc01d09fad78f940ee8e0e5c0c04 (diff)
downloadpdfium-3d8131535e6b127c7ededdbd2e76662688997272.tar.xz
Pass output parameters as pointers in ijs_event_context
It is hard to tell if there is some unsavory stuff going on with references otherwise. Avoids some const_casts in the process. Add some UnownedPtrs along the way to check caller's storage duration. Change-Id: Ic8d85802083f0b27e07993ea25f8f1c15fca1712 Reviewed-on: https://pdfium-review.googlesource.com/35750 Reviewed-by: dsinclair <dsinclair@chromium.org> Commit-Queue: Tom Sepez <tsepez@chromium.org>
Diffstat (limited to 'fxjs/cjs_event_context.cpp')
-rw-r--r--fxjs/cjs_event_context.cpp28
1 files changed, 14 insertions, 14 deletions
diff --git a/fxjs/cjs_event_context.cpp b/fxjs/cjs_event_context.cpp
index 70f06771d1..3d40c9dc5a 100644
--- a/fxjs/cjs_event_context.cpp
+++ b/fxjs/cjs_event_context.cpp
@@ -136,55 +136,55 @@ void CJS_EventContext::OnField_MouseUp(bool bModifier,
void CJS_EventContext::OnField_Focus(bool bModifier,
bool bShift,
CPDF_FormField* pTarget,
- const WideString& Value) {
+ WideString* Value) {
m_pEventHandler->OnField_Focus(bModifier, bShift, pTarget, Value);
}
void CJS_EventContext::OnField_Blur(bool bModifier,
bool bShift,
CPDF_FormField* pTarget,
- const WideString& Value) {
+ WideString* Value) {
m_pEventHandler->OnField_Blur(bModifier, bShift, pTarget, Value);
}
void CJS_EventContext::OnField_Calculate(CPDF_FormField* pSource,
CPDF_FormField* pTarget,
- WideString& Value,
- bool& bRc) {
- m_pEventHandler->OnField_Calculate(pSource, pTarget, Value, bRc);
+ WideString* pValue,
+ bool* pRc) {
+ m_pEventHandler->OnField_Calculate(pSource, pTarget, pValue, pRc);
}
void CJS_EventContext::OnField_Format(CPDF_FormField* pTarget,
- WideString& Value,
+ WideString* Value,
bool bWillCommit) {
m_pEventHandler->OnField_Format(pTarget, Value, bWillCommit);
}
-void CJS_EventContext::OnField_Keystroke(WideString& strChange,
+void CJS_EventContext::OnField_Keystroke(WideString* strChange,
const WideString& strChangeEx,
bool bKeyDown,
bool bModifier,
- int& nSelEnd,
- int& nSelStart,
+ int* nSelEnd,
+ int* nSelStart,
bool bShift,
CPDF_FormField* pTarget,
- WideString& Value,
+ WideString* Value,
bool bWillCommit,
bool bFieldFull,
- bool& bRc) {
+ bool* bRc) {
m_pEventHandler->OnField_Keystroke(
strChange, strChangeEx, bKeyDown, bModifier, nSelEnd, nSelStart, bShift,
pTarget, Value, bWillCommit, bFieldFull, bRc);
}
-void CJS_EventContext::OnField_Validate(WideString& strChange,
+void CJS_EventContext::OnField_Validate(WideString* strChange,
const WideString& strChangeEx,
bool bKeyDown,
bool bModifier,
bool bShift,
CPDF_FormField* pTarget,
- WideString& Value,
- bool& bRc) {
+ WideString* Value,
+ bool* bRc) {
m_pEventHandler->OnField_Validate(strChange, strChangeEx, bKeyDown, bModifier,
bShift, pTarget, Value, bRc);
}