diff options
author | Tom Sepez <tsepez@chromium.org> | 2018-08-14 18:22:06 +0000 |
---|---|---|
committer | Chromium commit bot <commit-bot@chromium.org> | 2018-08-14 18:22:06 +0000 |
commit | b9c3e2712f75363372622282023143b86b72f2df (patch) | |
tree | b8b4443fbf792143ade73b0fdd2ccf3e50c9a1e1 /xfa | |
parent | f46d49b52d39f8a56e40a95e0d9d2b574301fa04 (diff) | |
download | pdfium-b9c3e2712f75363372622282023143b86b72f2df.tar.xz |
Remove more default arg = nullptr cases.
Bring in line with standards.
Remove argument entirely for mac code that is always nullptr.
Change-Id: I0710bdbd51fc0bc2e1d428ef44976be39a631147
Reviewed-on: https://pdfium-review.googlesource.com/40091
Reviewed-by: Lei Zhang <thestig@chromium.org>
Commit-Queue: Tom Sepez <tsepez@chromium.org>
Diffstat (limited to 'xfa')
-rw-r--r-- | xfa/fxfa/cxfa_ffwidgethandler.cpp | 35 | ||||
-rw-r--r-- | xfa/fxfa/cxfa_ffwidgethandler.h | 2 | ||||
-rw-r--r-- | xfa/fxfa/parser/cxfa_pattern.cpp | 2 | ||||
-rw-r--r-- | xfa/fxgraphics/cxfa_gepattern.h | 2 |
4 files changed, 21 insertions, 20 deletions
diff --git a/xfa/fxfa/cxfa_ffwidgethandler.cpp b/xfa/fxfa/cxfa_ffwidgethandler.cpp index eb9a4ca63a..212a029f26 100644 --- a/xfa/fxfa/cxfa_ffwidgethandler.cpp +++ b/xfa/fxfa/cxfa_ffwidgethandler.cpp @@ -332,32 +332,32 @@ CXFA_Node* CXFA_FFWidgetHandler::CreateWidgetFormItem( CXFA_Node* CXFA_FFWidgetHandler::CreatePushButton(CXFA_Node* pParent, CXFA_Node* pBefore) const { CXFA_Node* pField = CreateField(XFA_Element::Button, pParent, pBefore); - CXFA_Node* pCaption = CreateCopyNode(XFA_Element::Caption, pField); - CXFA_Node* pValue = CreateCopyNode(XFA_Element::Value, pCaption); - CXFA_Node* pText = CreateCopyNode(XFA_Element::Text, pValue); + CXFA_Node* pCaption = CreateCopyNode(XFA_Element::Caption, pField, nullptr); + CXFA_Node* pValue = CreateCopyNode(XFA_Element::Value, pCaption, nullptr); + CXFA_Node* pText = CreateCopyNode(XFA_Element::Text, pValue, nullptr); pText->JSObject()->SetContent(L"Button", L"Button", false, false, true); - CXFA_Node* pPara = CreateCopyNode(XFA_Element::Para, pCaption); + CXFA_Node* pPara = CreateCopyNode(XFA_Element::Para, pCaption, nullptr); pPara->JSObject()->SetEnum(XFA_Attribute::VAlign, XFA_AttributeEnum::Middle, false); pPara->JSObject()->SetEnum(XFA_Attribute::HAlign, XFA_AttributeEnum::Center, false); CreateFontNode(pCaption); - CXFA_Node* pBorder = CreateCopyNode(XFA_Element::Border, pField); + CXFA_Node* pBorder = CreateCopyNode(XFA_Element::Border, pField, nullptr); pBorder->JSObject()->SetEnum(XFA_Attribute::Hand, XFA_AttributeEnum::Right, false); - CXFA_Node* pEdge = CreateCopyNode(XFA_Element::Edge, pBorder); + CXFA_Node* pEdge = CreateCopyNode(XFA_Element::Edge, pBorder, nullptr); pEdge->JSObject()->SetEnum(XFA_Attribute::Stroke, XFA_AttributeEnum::Raised, false); - CXFA_Node* pFill = CreateCopyNode(XFA_Element::Fill, pBorder); - CXFA_Node* pColor = CreateCopyNode(XFA_Element::Color, pFill); + CXFA_Node* pFill = CreateCopyNode(XFA_Element::Fill, pBorder, nullptr); + CXFA_Node* pColor = CreateCopyNode(XFA_Element::Color, pFill, nullptr); pColor->JSObject()->SetCData(XFA_Attribute::Value, L"212, 208, 200", false, false); - CXFA_Node* pBind = CreateCopyNode(XFA_Element::Bind, pField); + CXFA_Node* pBind = CreateCopyNode(XFA_Element::Bind, pField, nullptr); pBind->JSObject()->SetEnum(XFA_Attribute::Match, XFA_AttributeEnum::None, false); @@ -439,7 +439,7 @@ CXFA_Node* CXFA_FFWidgetHandler::CreateImageField(CXFA_Node* pParent, CXFA_Node* CXFA_FFWidgetHandler::CreatePasswordEdit(CXFA_Node* pParent, CXFA_Node* pBefore) const { CXFA_Node* pField = CreateField(XFA_Element::PasswordEdit, pParent, pBefore); - CXFA_Node* pBind = CreateCopyNode(XFA_Element::Bind, pField); + CXFA_Node* pBind = CreateCopyNode(XFA_Element::Bind, pField, nullptr); pBind->JSObject()->SetEnum(XFA_Attribute::Match, XFA_AttributeEnum::None, false); return pField; @@ -449,7 +449,8 @@ CXFA_Node* CXFA_FFWidgetHandler::CreateField(XFA_Element eElement, CXFA_Node* pParent, CXFA_Node* pBefore) const { CXFA_Node* pField = CreateFormItem(XFA_Element::Field, pParent, pBefore); - CreateCopyNode(eElement, CreateCopyNode(XFA_Element::Ui, pField)); + CreateCopyNode(eElement, CreateCopyNode(XFA_Element::Ui, pField, nullptr), + nullptr); CreateFontNode(pField); return pField; } @@ -468,7 +469,7 @@ CXFA_Node* CXFA_FFWidgetHandler::CreateImage(CXFA_Node* pParent, CXFA_Node* pBefore) const { CXFA_Node* pField = CreateDraw(XFA_Element::Image, pParent, pBefore); CreateCopyNode(XFA_Element::ImageEdit, - CreateCopyNode(XFA_Element::Ui, pField)); + CreateCopyNode(XFA_Element::Ui, pField, nullptr), nullptr); return pField; } @@ -481,7 +482,7 @@ CXFA_Node* CXFA_FFWidgetHandler::CreateText(CXFA_Node* pParent, CXFA_Node* pBefore) const { CXFA_Node* pField = CreateDraw(XFA_Element::Text, pParent, pBefore); CreateCopyNode(XFA_Element::TextEdit, - CreateCopyNode(XFA_Element::Ui, pField)); + CreateCopyNode(XFA_Element::Ui, pField, nullptr), nullptr); CreateFontNode(pField); return pField; } @@ -543,7 +544,7 @@ CXFA_Node* CXFA_FFWidgetHandler::CreateTemplateNode(XFA_Element eElement, } CXFA_Node* CXFA_FFWidgetHandler::CreateFontNode(CXFA_Node* pParent) const { - CXFA_Node* pFont = CreateCopyNode(XFA_Element::Font, pParent); + CXFA_Node* pFont = CreateCopyNode(XFA_Element::Font, pParent, nullptr); pFont->JSObject()->SetCData(XFA_Attribute::Typeface, L"Myriad Pro", false, false); return pFont; @@ -552,7 +553,7 @@ CXFA_Node* CXFA_FFWidgetHandler::CreateFontNode(CXFA_Node* pParent) const { CXFA_Node* CXFA_FFWidgetHandler::CreateMarginNode(CXFA_Node* pParent, uint32_t dwFlags, float fInsets[4]) const { - CXFA_Node* pMargin = CreateCopyNode(XFA_Element::Margin, pParent); + CXFA_Node* pMargin = CreateCopyNode(XFA_Element::Margin, pParent, nullptr); if (dwFlags & 0x01) pMargin->JSObject()->SetMeasure(XFA_Attribute::LeftInset, CXFA_Measurement(fInsets[0], XFA_Unit::Pt), @@ -574,8 +575,8 @@ CXFA_Node* CXFA_FFWidgetHandler::CreateMarginNode(CXFA_Node* pParent, CXFA_Node* CXFA_FFWidgetHandler::CreateValueNode(XFA_Element eValue, CXFA_Node* pParent) const { - CXFA_Node* pValue = CreateCopyNode(XFA_Element::Value, pParent); - CreateCopyNode(eValue, pValue); + CXFA_Node* pValue = CreateCopyNode(XFA_Element::Value, pParent, nullptr); + CreateCopyNode(eValue, pValue, nullptr); return pValue; } diff --git a/xfa/fxfa/cxfa_ffwidgethandler.h b/xfa/fxfa/cxfa_ffwidgethandler.h index 58e531f098..283e6d5933 100644 --- a/xfa/fxfa/cxfa_ffwidgethandler.h +++ b/xfa/fxfa/cxfa_ffwidgethandler.h @@ -112,7 +112,7 @@ class CXFA_FFWidgetHandler { CXFA_Node* pBefore) const; CXFA_Node* CreateCopyNode(XFA_Element eElement, CXFA_Node* pParent, - CXFA_Node* pBefore = nullptr) const; + CXFA_Node* pBefore) const; CXFA_Node* CreateTemplateNode(XFA_Element eElement, CXFA_Node* pParent, CXFA_Node* pBefore) const; diff --git a/xfa/fxfa/parser/cxfa_pattern.cpp b/xfa/fxfa/parser/cxfa_pattern.cpp index f5809258a0..81391c9b64 100644 --- a/xfa/fxfa/parser/cxfa_pattern.cpp +++ b/xfa/fxfa/parser/cxfa_pattern.cpp @@ -79,7 +79,7 @@ void CXFA_Pattern::Draw(CXFA_Graphics* pGS, break; } - CXFA_GEPattern pattern(iHatch, crEnd, crStart); + CXFA_GEPattern pattern(iHatch, crEnd, crStart, nullptr); pGS->SaveGraphState(); pGS->SetFillColor(CXFA_GEColor(&pattern, 0x0)); diff --git a/xfa/fxgraphics/cxfa_gepattern.h b/xfa/fxgraphics/cxfa_gepattern.h index 0f4ced20ea..499d4ff277 100644 --- a/xfa/fxgraphics/cxfa_gepattern.h +++ b/xfa/fxgraphics/cxfa_gepattern.h @@ -19,7 +19,7 @@ class CXFA_GEPattern { CXFA_GEPattern(FX_HatchStyle hatchStyle, const FX_ARGB foreArgb, const FX_ARGB backArgb, - CFX_Matrix* matrix = nullptr); + CFX_Matrix* matrix); virtual ~CXFA_GEPattern(); |