XFA: clang-format all pdfium code.
No behavior change.
Generated by:
find . -name '*.cpp' -o -name '*.h' | \
grep -E -v 'third_party|thirdparties|lpng_v163|tiff_v403' | \
xargs ../../buildtools/mac/clang-format -i
Then manually merged https://codereview.chromium.org/1269223002/
See thread "tabs vs spaces" on pdfium@googlegroups.com for discussion.
BUG=none
diff --git a/fpdfsdk/src/javascript/resource.cpp b/fpdfsdk/src/javascript/resource.cpp
index 4375da3..5b6bd48 100644
--- a/fpdfsdk/src/javascript/resource.cpp
+++ b/fpdfsdk/src/javascript/resource.cpp
@@ -6,61 +6,59 @@
#include "../../include/javascript/resource.h"
-CFX_WideString JSGetStringFromID(CJS_Context* pContext, FX_UINT id)
-{
- switch (id)
- {
+CFX_WideString JSGetStringFromID(CJS_Context* pContext, FX_UINT id) {
+ switch (id) {
case IDS_STRING_JSALERT:
- return L"Alert";
+ return L"Alert";
case IDS_STRING_JSPARAMERROR:
- return L"Incorrect number of parameters passed to function.";
+ return L"Incorrect number of parameters passed to function.";
case IDS_STRING_JSAFNUMBER_KEYSTROKE:
- return L"The input value is invalid.";
+ return L"The input value is invalid.";
case IDS_STRING_JSPARAM_TOOLONG:
- return L"The input value is too long.";
+ return L"The input value is too long.";
case IDS_STRING_JSPARSEDATE:
- return L"The input value can't be parsed as a valid date/time (%s).";
+ return L"The input value can't be parsed as a valid date/time (%s).";
case IDS_STRING_JSRANGE1:
- return L"The input value must be greater than or equal to %s"
- L" and less than or equal to %s.";
+ return L"The input value must be greater than or equal to %s"
+ L" and less than or equal to %s.";
case IDS_STRING_JSRANGE2:
- return L"The input value must be greater than or equal to %s.";
+ return L"The input value must be greater than or equal to %s.";
case IDS_STRING_JSRANGE3:
- return L"The input value must be less than or equal to %s.";
+ return L"The input value must be less than or equal to %s.";
case IDS_STRING_NOTSUPPORT:
- return L"Operation not supported.";
+ return L"Operation not supported.";
case IDS_STRING_JSBUSY:
- return L"System is busy.";
+ return L"System is busy.";
case IDS_STRING_JSEVENT:
- return L"Duplicate formfield event found.";
+ return L"Duplicate formfield event found.";
case IDS_STRING_RUN:
- return L"Script ran successfully.";
+ return L"Script ran successfully.";
case IDS_STRING_JSPRINT1:
- return L"The second parameter can't be converted to a Date.";
+ return L"The second parameter can't be converted to a Date.";
case IDS_STRING_JSPRINT2:
- return L"The second parameter is an invalid Date!";
+ return L"The second parameter is an invalid Date!";
case IDS_STRING_JSNOGLOBAL:
- return L"Global value not found.";
+ return L"Global value not found.";
case IDS_STRING_JSREADONLY:
- return L"Cannot assign to readonly property.";
+ return L"Cannot assign to readonly property.";
case IDS_STRING_JSTYPEERROR:
- return L"Incorrect parameter type.";
+ return L"Incorrect parameter type.";
case IDS_STRING_JSVALUEERROR:
- return L"Incorrect parameter value.";
+ return L"Incorrect parameter value.";
default:
- return L"";
- }
+ return L"";
+ }
}
CFX_WideString JSFormatErrorString(const char* class_name,
const char* property_name,
const CFX_WideString& details) {
- CFX_WideString result = CFX_WideString::FromLocal(class_name);
- if (property_name) {
- result += L".";
- result += CFX_WideString::FromLocal(property_name);
- }
- result += L": ";
- result += details;
- return result;
+ CFX_WideString result = CFX_WideString::FromLocal(class_name);
+ if (property_name) {
+ result += L".";
+ result += CFX_WideString::FromLocal(property_name);
+ }
+ result += L": ";
+ result += details;
+ return result;
}