diff options
author | Tom Sepez <tsepez@chromium.org> | 2018-06-21 17:28:24 +0000 |
---|---|---|
committer | Chromium commit bot <commit-bot@chromium.org> | 2018-06-21 17:28:24 +0000 |
commit | 3d8131535e6b127c7ededdbd2e76662688997272 (patch) | |
tree | 656faaadbaf0139f8a299b672f6530e7a004b6bb /fxjs/cjs_event_context.h | |
parent | a964f2a5ab09dc01d09fad78f940ee8e0e5c0c04 (diff) | |
download | pdfium-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.h')
-rw-r--r-- | fxjs/cjs_event_context.h | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/fxjs/cjs_event_context.h b/fxjs/cjs_event_context.h index 3cfc6da775..29bbd5a853 100644 --- a/fxjs/cjs_event_context.h +++ b/fxjs/cjs_event_context.h @@ -52,38 +52,38 @@ class CJS_EventContext : public IJS_EventContext { void OnField_Focus(bool bModifier, bool bShift, CPDF_FormField* pTarget, - const WideString& Value) override; + WideString* Value) override; void OnField_Blur(bool bModifier, bool bShift, CPDF_FormField* pTarget, - const WideString& Value) override; + WideString* Value) override; void OnField_Calculate(CPDF_FormField* pSource, CPDF_FormField* pTarget, - WideString& Value, - bool& bRc) override; + WideString* pValue, + bool* pRc) override; void OnField_Format(CPDF_FormField* pTarget, - WideString& Value, + WideString* Value, bool bWillCommit) override; - void OnField_Keystroke(WideString& strChange, + void 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) override; - void OnField_Validate(WideString& strChange, + bool* bRc) override; + void OnField_Validate(WideString* strChange, const WideString& strChangeEx, bool bKeyDown, bool bModifier, bool bShift, CPDF_FormField* pTarget, - WideString& Value, - bool& bRc) override; + WideString* Value, + bool* bRc) override; void OnScreen_Focus(bool bModifier, bool bShift, CPDFSDK_Annot* pScreen) override; |