diff options
author | Nico Weber <thakis@chromium.org> | 2015-08-04 13:00:21 -0700 |
---|---|---|
committer | Nico Weber <thakis@chromium.org> | 2015-08-04 13:00:21 -0700 |
commit | 9d8ec5a6e37e8d1d4d4edca9040de234e2d4728f (patch) | |
tree | c97037f398d714665aefccb6eb54d0969ad7030c /xfa/src/fxfa/src/fm2js/xfa_fm2jsapi.cpp | |
parent | 780cee82236d1b3b0f9b01a22424e4b8ec9a6f12 (diff) | |
download | pdfium-9d8ec5a6e37e8d1d4d4edca9040de234e2d4728f.tar.xz |
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
Diffstat (limited to 'xfa/src/fxfa/src/fm2js/xfa_fm2jsapi.cpp')
-rw-r--r-- | xfa/src/fxfa/src/fm2js/xfa_fm2jsapi.cpp | 77 |
1 files changed, 39 insertions, 38 deletions
diff --git a/xfa/src/fxfa/src/fm2js/xfa_fm2jsapi.cpp b/xfa/src/fxfa/src/fm2js/xfa_fm2jsapi.cpp index 42035efd14..85b600bb49 100644 --- a/xfa/src/fxfa/src/fm2js/xfa_fm2jsapi.cpp +++ b/xfa/src/fxfa/src/fm2js/xfa_fm2jsapi.cpp @@ -6,51 +6,52 @@ #include "xfa_fm2js.h"
#ifdef __cplusplus
-extern "C"
-{
+extern "C" {
#endif
-int32_t XFA_FM2JS_Translate(const CFX_WideStringC& wsFormcalc, CFX_WideTextBuf& wsJavascript, CFX_WideString& wsError)
-{
- if (wsFormcalc.IsEmpty()) {
- wsJavascript.Clear();
- wsError.Empty();
- return 0;
- }
- int32_t status = 0;
- CXFA_FMProgram program;
- status = program.Init(wsFormcalc);
- if(status) {
- wsError = program.GetError().message;
- return status;
- }
- status = program.ParseProgram();
- if(status) {
- wsError = program.GetError().message;
- return status;
- }
- program.TranslateProgram(wsJavascript);
+int32_t XFA_FM2JS_Translate(const CFX_WideStringC& wsFormcalc,
+ CFX_WideTextBuf& wsJavascript,
+ CFX_WideString& wsError) {
+ if (wsFormcalc.IsEmpty()) {
+ wsJavascript.Clear();
+ wsError.Empty();
return 0;
+ }
+ int32_t status = 0;
+ CXFA_FMProgram program;
+ status = program.Init(wsFormcalc);
+ if (status) {
+ wsError = program.GetError().message;
+ return status;
+ }
+ status = program.ParseProgram();
+ if (status) {
+ wsError = program.GetError().message;
+ return status;
+ }
+ program.TranslateProgram(wsJavascript);
+ return 0;
}
-XFA_HFM2JSCONTEXT XFA_FM2JS_ContextCreate()
-{
- return (XFA_HFM2JSCONTEXT)CXFA_FM2JSContext::Create();
+XFA_HFM2JSCONTEXT XFA_FM2JS_ContextCreate() {
+ return (XFA_HFM2JSCONTEXT)CXFA_FM2JSContext::Create();
}
-void XFA_FM2JS_ContextInitialize(XFA_HFM2JSCONTEXT hFM2JSContext, FXJSE_HRUNTIME hScriptRuntime,
+void XFA_FM2JS_ContextInitialize(XFA_HFM2JSCONTEXT hFM2JSContext,
+ FXJSE_HRUNTIME hScriptRuntime,
FXJSE_HCONTEXT hScriptContext,
- CXFA_Document* pDocument)
-{
- CXFA_FM2JSContext *pContext = reinterpret_cast<CXFA_FM2JSContext*>(hFM2JSContext);
- pContext->Initialize(hScriptRuntime, hScriptContext, pDocument);
+ CXFA_Document* pDocument) {
+ CXFA_FM2JSContext* pContext =
+ reinterpret_cast<CXFA_FM2JSContext*>(hFM2JSContext);
+ pContext->Initialize(hScriptRuntime, hScriptContext, pDocument);
}
-void XFA_FM2JS_GlobalPropertyGetter(XFA_HFM2JSCONTEXT hFM2JSContext, FXJSE_HVALUE hValue)
-{
- CXFA_FM2JSContext *pContext = reinterpret_cast<CXFA_FM2JSContext*>(hFM2JSContext);
- pContext->GlobalPropertyGetter(hValue);
+void XFA_FM2JS_GlobalPropertyGetter(XFA_HFM2JSCONTEXT hFM2JSContext,
+ FXJSE_HVALUE hValue) {
+ CXFA_FM2JSContext* pContext =
+ reinterpret_cast<CXFA_FM2JSContext*>(hFM2JSContext);
+ pContext->GlobalPropertyGetter(hValue);
}
-void XFA_FM2JS_ContextRelease(XFA_HFM2JSCONTEXT hFM2JSContext)
-{
- CXFA_FM2JSContext *pContext = reinterpret_cast<CXFA_FM2JSContext*>(hFM2JSContext);
- pContext->Release();
+void XFA_FM2JS_ContextRelease(XFA_HFM2JSCONTEXT hFM2JSContext) {
+ CXFA_FM2JSContext* pContext =
+ reinterpret_cast<CXFA_FM2JSContext*>(hFM2JSContext);
+ pContext->Release();
}
#ifdef __cplusplus
}
|