diff options
author | Nico Weber <thakis@chromium.org> | 2015-08-06 15:08:57 -0700 |
---|---|---|
committer | Nico Weber <thakis@chromium.org> | 2015-08-06 15:08:57 -0700 |
commit | 077f1a335560a8014e466c768c1e9d24c8a61ac9 (patch) | |
tree | 8d080d5e2fbef32e5d945129eb19ff9909b192f5 /xfa/src/fxfa | |
parent | 792d55cfe3cf046125fd69d8914ae459216a68ab (diff) | |
download | pdfium-077f1a335560a8014e466c768c1e9d24c8a61ac9.tar.xz |
XFA: clang-format all pdfium code, again.
Also add a presubmit that checks for this so I don't have to keep doing it.
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
R=thestig@chromium.org
Review URL: https://codereview.chromium.org/1277043002 .
Diffstat (limited to 'xfa/src/fxfa')
-rw-r--r-- | xfa/src/fxfa/src/app/xfa_ffdocview.cpp | 2 | ||||
-rw-r--r-- | xfa/src/fxfa/src/app/xfa_ffpushbutton.cpp | 4 | ||||
-rw-r--r-- | xfa/src/fxfa/src/fm2js/xfa_fmparse.cpp | 39 | ||||
-rw-r--r-- | xfa/src/fxfa/src/parser/xfa_layout_itemlayout.cpp | 6 | ||||
-rw-r--r-- | xfa/src/fxfa/src/parser/xfa_object_imp.cpp | 3 | ||||
-rw-r--r-- | xfa/src/fxfa/src/parser/xfa_parser_imp.cpp | 3 |
6 files changed, 25 insertions, 32 deletions
diff --git a/xfa/src/fxfa/src/app/xfa_ffdocview.cpp b/xfa/src/fxfa/src/app/xfa_ffdocview.cpp index 8585f6b7e9..1b3432a6cc 100644 --- a/xfa/src/fxfa/src/app/xfa_ffdocview.cpp +++ b/xfa/src/fxfa/src/app/xfa_ffdocview.cpp @@ -891,7 +891,7 @@ IXFA_WidgetAccIterator* XFA_WidgetAccIterator_Create( return NULL;
}
return new CXFA_WidgetAccIterator(pTravelRoot->GetDocView(),
- pTravelRoot->GetNode());
+ pTravelRoot->GetNode());
}
CXFA_WidgetAccIterator::CXFA_WidgetAccIterator(CXFA_FFDocView* pDocView,
CXFA_Node* pTravelRoot)
diff --git a/xfa/src/fxfa/src/app/xfa_ffpushbutton.cpp b/xfa/src/fxfa/src/app/xfa_ffpushbutton.cpp index 29f7bd6630..0c31fb18f2 100644 --- a/xfa/src/fxfa/src/app/xfa_ffpushbutton.cpp +++ b/xfa/src/fxfa/src/app/xfa_ffpushbutton.cpp @@ -144,8 +144,8 @@ void CXFA_FFPushButton::LoadHighlightCaption() { FX_BOOL bRichText;
if (m_pDataAcc->GetButtonRollover(wsRollover, bRichText)) {
if (m_pRollProvider == NULL) {
- m_pRollProvider = new CXFA_TextProvider(
- m_pDataAcc, XFA_TEXTPROVIDERTYPE_Rollover);
+ m_pRollProvider =
+ new CXFA_TextProvider(m_pDataAcc, XFA_TEXTPROVIDERTYPE_Rollover);
}
m_pRolloverTextLayout = new CXFA_TextLayout(m_pRollProvider);
}
diff --git a/xfa/src/fxfa/src/fm2js/xfa_fmparse.cpp b/xfa/src/fxfa/src/fm2js/xfa_fmparse.cpp index 595e6556c5..0a04aae137 100644 --- a/xfa/src/fxfa/src/fm2js/xfa_fmparse.cpp +++ b/xfa/src/fxfa/src/fm2js/xfa_fmparse.cpp @@ -147,8 +147,7 @@ CXFA_FMExpression* CXFA_FMParse::ParseFunction() { Check(TOKendfunc);
}
if (m_pErrorInfo->message.IsEmpty()) {
- e = new CXFA_FMFunctionDefinition(line, 0, ident, pArguments,
- pExpressions);
+ e = new CXFA_FMFunctionDefinition(line, 0, ident, pArguments, pExpressions);
} else {
int32_t size = 0;
int32_t index = 0;
@@ -537,8 +536,8 @@ CXFA_FMSimpleExpression* CXFA_FMParse::ParsePrimaryExpression() { if (m_pToken->m_type == TOKlbracket) {
CXFA_FMSimpleExpression* s = ParseIndexExpression();
if (s) {
- e = new CXFA_FMDotAccessorExpression(line, NULL, TOKdot,
- wsIdentifier, s);
+ e = new CXFA_FMDotAccessorExpression(line, NULL, TOKdot, wsIdentifier,
+ s);
}
NextToken();
} else {
@@ -606,7 +605,7 @@ CXFA_FMSimpleExpression* CXFA_FMParse::ParsePostExpression( CXFA_FMSimpleExpression* s = ParseIndexExpression();
if (s) {
e = new CXFA_FMDotAccessorExpression(line, e, TOKcall,
- FX_WSTRC(L""), s);
+ FX_WSTRC(L""), s);
} else {
delete e;
e = 0;
@@ -657,8 +656,7 @@ CXFA_FMSimpleExpression* CXFA_FMParse::ParsePostExpression( new CXFA_FMIdentifierExpressionn(tempLine, tempStr);
pExpCall =
new CXFA_FMCallExpression(line, pIdentifier, pArray, TRUE);
- e = new CXFA_FMMethodCallExpression(line, pExpAccessor,
- pExpCall);
+ e = new CXFA_FMMethodCallExpression(line, pExpAccessor, pExpCall);
NextToken();
if (m_pToken->m_type != TOKlbracket) {
continue;
@@ -666,7 +664,7 @@ CXFA_FMSimpleExpression* CXFA_FMParse::ParsePostExpression( CXFA_FMSimpleExpression* s = ParseIndexExpression();
if (s) {
e = new CXFA_FMDotAccessorExpression(line, e, TOKcall,
- FX_WSTRC(L""), s);
+ FX_WSTRC(L""), s);
} else {
delete e;
e = 0;
@@ -695,13 +693,12 @@ CXFA_FMSimpleExpression* CXFA_FMParse::ParsePostExpression( }
return e;
}
- e = new CXFA_FMDotAccessorExpression(tempLine, e, TOKdot,
- tempStr, s);
+ e = new CXFA_FMDotAccessorExpression(tempLine, e, TOKdot, tempStr,
+ s);
} else {
CXFA_FMSimpleExpression* s = new CXFA_FMIndexExpression(
tempLine, ACCESSOR_NO_INDEX, NULL, FALSE);
- e = new CXFA_FMDotAccessorExpression(line, e, TOKdot, tempStr,
- s);
+ e = new CXFA_FMDotAccessorExpression(line, e, TOKdot, tempStr, s);
continue;
}
} else {
@@ -731,12 +728,12 @@ CXFA_FMSimpleExpression* CXFA_FMParse::ParsePostExpression( return e;
}
e = new CXFA_FMDotDotAccessorExpression(tempLine, e, TOKdotdot,
- tempStr, s);
+ tempStr, s);
} else {
CXFA_FMSimpleExpression* s = new CXFA_FMIndexExpression(
tempLine, ACCESSOR_NO_INDEX, NULL, FALSE);
- e = new CXFA_FMDotDotAccessorExpression(line, e, TOKdotdot,
- tempStr, s);
+ e = new CXFA_FMDotDotAccessorExpression(line, e, TOKdotdot, tempStr,
+ s);
continue;
}
} else {
@@ -766,12 +763,12 @@ CXFA_FMSimpleExpression* CXFA_FMParse::ParsePostExpression( return e;
}
e = new CXFA_FMDotAccessorExpression(tempLine, e, TOKdotscream,
- tempStr, s);
+ tempStr, s);
} else {
CXFA_FMSimpleExpression* s = new CXFA_FMIndexExpression(
tempLine, ACCESSOR_NO_INDEX, NULL, FALSE);
- e = new CXFA_FMDotAccessorExpression(line, e, TOKdotscream,
- tempStr, s);
+ e = new CXFA_FMDotAccessorExpression(line, e, TOKdotscream, tempStr,
+ s);
continue;
}
} else {
@@ -785,7 +782,7 @@ CXFA_FMSimpleExpression* CXFA_FMParse::ParsePostExpression( CXFA_FMSimpleExpression* s =
new CXFA_FMIndexExpression(line, ACCESSOR_NO_INDEX, NULL, FALSE);
e = new CXFA_FMDotAccessorExpression(line, e, TOKdotstar,
- FX_WSTRC(L"*"), s);
+ FX_WSTRC(L"*"), s);
} break;
default:
return e;
@@ -963,7 +960,7 @@ CXFA_FMExpression* CXFA_FMParse::ParseIfExpression() { CXFA_FMIfExpression* pExp = 0;
if (m_pErrorInfo->message.IsEmpty()) {
pExp = new CXFA_FMIfExpression(line, pExpression, pIfExpression,
- pElseExpression);
+ pElseExpression);
} else {
if (pExpression) {
delete pExpression;
@@ -1061,7 +1058,7 @@ CXFA_FMExpression* CXFA_FMParse::ParseForExpression() { Check(TOKendfor);
if (m_pErrorInfo->message.IsEmpty()) {
e = new CXFA_FMForExpression(line, wsVariant, pAssignment, pAccessor,
- iDirection, pStep, pList);
+ iDirection, pStep, pList);
} else {
if (pAssignment) {
delete pAssignment;
diff --git a/xfa/src/fxfa/src/parser/xfa_layout_itemlayout.cpp b/xfa/src/fxfa/src/parser/xfa_layout_itemlayout.cpp index 7cf99b86d7..22f8941b18 100644 --- a/xfa/src/fxfa/src/parser/xfa_layout_itemlayout.cpp +++ b/xfa/src/fxfa/src/parser/xfa_layout_itemlayout.cpp @@ -2487,8 +2487,7 @@ XFA_ItemLayoutProcessorResult CXFA_ItemLayoutProcessor::DoLayoutFlowedContainer( } else if (m_pPageMgr &&
m_pPageMgr->ProcessBookendLeaderOrTrailer(
m_pCurChildNode, TRUE, pLeaderNode)) {
- pProcessor =
- new CXFA_ItemLayoutProcessor(pLeaderNode, m_pPageMgr);
+ pProcessor = new CXFA_ItemLayoutProcessor(pLeaderNode, m_pPageMgr);
#ifndef _XFA_LAYOUTITEM_ProcessCACHE_
pProcessor->m_pPageMgrCreateItem = m_pPageMgrCreateItem;
#endif
@@ -2517,8 +2516,7 @@ XFA_ItemLayoutProcessorResult CXFA_ItemLayoutProcessor::DoLayoutFlowedContainer( } else if (m_pPageMgr &&
m_pPageMgr->ProcessBookendLeaderOrTrailer(
m_pCurChildNode, FALSE, pTrailerNode)) {
- pProcessor =
- new CXFA_ItemLayoutProcessor(pTrailerNode, m_pPageMgr);
+ pProcessor = new CXFA_ItemLayoutProcessor(pTrailerNode, m_pPageMgr);
#ifndef _XFA_LAYOUTITEM_ProcessCACHE_
pProcessor->m_pPageMgrCreateItem = m_pPageMgrCreateItem;
#endif
diff --git a/xfa/src/fxfa/src/parser/xfa_object_imp.cpp b/xfa/src/fxfa/src/parser/xfa_object_imp.cpp index a6527db6f5..65f5f6fc8f 100644 --- a/xfa/src/fxfa/src/parser/xfa_object_imp.cpp +++ b/xfa/src/fxfa/src/parser/xfa_object_imp.cpp @@ -745,8 +745,7 @@ void CXFA_Node::Script_TreeClass_Nodes(FXJSE_HVALUE hValue, FXJSE_ThrowMessage(FX_BSTRC(""),
FX_UTF8Encode(wsMessage, wsMessage.GetLength()));
} else {
- CXFA_AttachNodeList* pNodeList =
- new CXFA_AttachNodeList(m_pDocument, this);
+ CXFA_AttachNodeList* pNodeList = new CXFA_AttachNodeList(m_pDocument, this);
FXJSE_Value_SetObject(hValue, (CXFA_Object*)pNodeList,
pScriptContext->GetJseNormalClass());
}
diff --git a/xfa/src/fxfa/src/parser/xfa_parser_imp.cpp b/xfa/src/fxfa/src/parser/xfa_parser_imp.cpp index 6f97305d1a..9e85c1f539 100644 --- a/xfa/src/fxfa/src/parser/xfa_parser_imp.cpp +++ b/xfa/src/fxfa/src/parser/xfa_parser_imp.cpp @@ -128,8 +128,7 @@ int32_t CXFA_SimpleParser::ParseXMLData(const CFX_WideString& wsXML, if (m_pXMLDoc == NULL) {
return XFA_PARSESTATUS_StatusErr;
}
- CXFA_XMLParser* pParser =
- new CXFA_XMLParser(m_pXMLDoc->GetRoot(), m_pStream);
+ CXFA_XMLParser* pParser = new CXFA_XMLParser(m_pXMLDoc->GetRoot(), m_pStream);
if (pParser == NULL) {
return XFA_PARSESTATUS_StatusErr;
}
|