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/fxfa/cxfa_ffwidgethandler.cpp | |
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/fxfa/cxfa_ffwidgethandler.cpp')
-rw-r--r-- | xfa/fxfa/cxfa_ffwidgethandler.cpp | 35 |
1 files changed, 18 insertions, 17 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; } |