From 275e260a6cd4a8e506ba974feb85ebcd926c1739 Mon Sep 17 00:00:00 2001 From: Ryan Harrison Date: Mon, 18 Sep 2017 14:23:18 -0400 Subject: Convert string class names Automated using git grep & sed. Replace StringC classes with StringView classes. Remove the CFX_ prefix and put string classes in fxcrt namespace. Change AsStringC() to AsStringView(). Rename tests from TEST(fxcrt, *String*Foo) to TEST(*String*, Foo). Couple of tests needed to have their names regularlized. BUG=pdfium:894 Change-Id: I7ca038685c8d803795f3ed02545124f7a224c83d Reviewed-on: https://pdfium-review.googlesource.com/14151 Reviewed-by: Tom Sepez Commit-Queue: Ryan Harrison --- fpdfsdk/javascript/cjs_event_context.cpp | 29 ++++++++++++++--------------- 1 file changed, 14 insertions(+), 15 deletions(-) (limited to 'fpdfsdk/javascript/cjs_event_context.cpp') diff --git a/fpdfsdk/javascript/cjs_event_context.cpp b/fpdfsdk/javascript/cjs_event_context.cpp index 9537ac984e..b820bc309b 100644 --- a/fpdfsdk/javascript/cjs_event_context.cpp +++ b/fpdfsdk/javascript/cjs_event_context.cpp @@ -24,8 +24,7 @@ CPDFSDK_FormFillEnvironment* CJS_EventContext::GetFormFillEnv() { return m_pRuntime->GetFormFillEnv(); } -bool CJS_EventContext::RunScript(const CFX_WideString& script, - CFX_WideString* info) { +bool CJS_EventContext::RunScript(const WideString& script, WideString* info) { v8::Isolate::Scope isolate_scope(m_pRuntime->GetIsolate()); v8::HandleScope handle_scope(m_pRuntime->GetIsolate()); v8::Local context = m_pRuntime->NewLocalContext(); @@ -47,7 +46,7 @@ bool CJS_EventContext::RunScript(const CFX_WideString& script, return false; } - CFX_WideString sErrorMessage; + WideString sErrorMessage; int nRet = 0; if (script.GetLength() > 0) nRet = m_pRuntime->ExecuteScript(script.c_str(), &sErrorMessage); @@ -67,7 +66,7 @@ void CJS_EventContext::OnApp_Init() { } void CJS_EventContext::OnDoc_Open(CPDFSDK_FormFillEnvironment* pFormFillEnv, - const CFX_WideString& strTargetName) { + const WideString& strTargetName) { m_pEventHandler->OnDoc_Open(pFormFillEnv, strTargetName); } @@ -141,39 +140,39 @@ void CJS_EventContext::OnField_MouseUp(bool bModifier, void CJS_EventContext::OnField_Focus(bool bModifier, bool bShift, CPDF_FormField* pTarget, - const CFX_WideString& Value) { + const WideString& Value) { m_pEventHandler->OnField_Focus(bModifier, bShift, pTarget, Value); } void CJS_EventContext::OnField_Blur(bool bModifier, bool bShift, CPDF_FormField* pTarget, - const CFX_WideString& Value) { + const WideString& Value) { m_pEventHandler->OnField_Blur(bModifier, bShift, pTarget, Value); } void CJS_EventContext::OnField_Calculate(CPDF_FormField* pSource, CPDF_FormField* pTarget, - CFX_WideString& Value, + WideString& Value, bool& bRc) { m_pEventHandler->OnField_Calculate(pSource, pTarget, Value, bRc); } void CJS_EventContext::OnField_Format(CPDF_FormField* pTarget, - CFX_WideString& Value, + WideString& Value, bool bWillCommit) { m_pEventHandler->OnField_Format(pTarget, Value, bWillCommit); } -void CJS_EventContext::OnField_Keystroke(CFX_WideString& strChange, - const CFX_WideString& strChangeEx, +void CJS_EventContext::OnField_Keystroke(WideString& strChange, + const WideString& strChangeEx, bool bKeyDown, bool bModifier, int& nSelEnd, int& nSelStart, bool bShift, CPDF_FormField* pTarget, - CFX_WideString& Value, + WideString& Value, bool bWillCommit, bool bFieldFull, bool& bRc) { @@ -182,13 +181,13 @@ void CJS_EventContext::OnField_Keystroke(CFX_WideString& strChange, pTarget, Value, bWillCommit, bFieldFull, bRc); } -void CJS_EventContext::OnField_Validate(CFX_WideString& strChange, - const CFX_WideString& strChangeEx, +void CJS_EventContext::OnField_Validate(WideString& strChange, + const WideString& strChangeEx, bool bKeyDown, bool bModifier, bool bShift, CPDF_FormField* pTarget, - CFX_WideString& Value, + WideString& Value, bool& bRc) { m_pEventHandler->OnField_Validate(strChange, strChangeEx, bKeyDown, bModifier, bShift, pTarget, Value, bRc); @@ -276,6 +275,6 @@ void CJS_EventContext::OnBatchExec(CPDFSDK_FormFillEnvironment* pFormFillEnv) { } void CJS_EventContext::OnMenu_Exec(CPDFSDK_FormFillEnvironment* pFormFillEnv, - const CFX_WideString& strTargetName) { + const WideString& strTargetName) { m_pEventHandler->OnMenu_Exec(pFormFillEnv, strTargetName); } -- cgit v1.2.3