From 3d8131535e6b127c7ededdbd2e76662688997272 Mon Sep 17 00:00:00 2001 From: Tom Sepez Date: Thu, 21 Jun 2018 17:28:24 +0000 Subject: 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 Commit-Queue: Tom Sepez --- fxjs/cjs_event_context.h | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) (limited to 'fxjs/cjs_event_context.h') 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; -- cgit v1.2.3