summaryrefslogtreecommitdiff
path: root/xfa/fxfa/parser/cxfa_fill.cpp
diff options
context:
space:
mode:
authorDan Sinclair <dsinclair@chromium.org>2017-11-02 18:32:08 +0000
committerChromium commit bot <commit-bot@chromium.org>2017-11-02 18:32:08 +0000
commita95fd60b7902b9f893d05189aa6c877eb2e73e90 (patch)
tree59c7e977600be1fe1f40a792fbe369708d7797b8 /xfa/fxfa/parser/cxfa_fill.cpp
parent92492c1455e59c18f274c1f2b3ecfe9d042509fa (diff)
downloadpdfium-a95fd60b7902b9f893d05189aa6c877eb2e73e90.tar.xz
Remove default value from CJX_Node::GetProperty
This CL removes the GetProperty default value and inlines into the callers. Change-Id: I0e18f27b51046fdf37ddc57f34a31154729c8db0 Reviewed-on: https://pdfium-review.googlesource.com/17510 Commit-Queue: dsinclair <dsinclair@chromium.org> Reviewed-by: Tom Sepez <tsepez@chromium.org>
Diffstat (limited to 'xfa/fxfa/parser/cxfa_fill.cpp')
-rw-r--r--xfa/fxfa/parser/cxfa_fill.cpp15
1 files changed, 10 insertions, 5 deletions
diff --git a/xfa/fxfa/parser/cxfa_fill.cpp b/xfa/fxfa/parser/cxfa_fill.cpp
index f3d045ad30..4cce86fd43 100644
--- a/xfa/fxfa/parser/cxfa_fill.cpp
+++ b/xfa/fxfa/parser/cxfa_fill.cpp
@@ -17,7 +17,8 @@ int32_t CXFA_Fill::GetPresence() {
}
void CXFA_Fill::SetColor(FX_ARGB color) {
- CXFA_Node* pNode = m_pNode->JSNode()->GetProperty(0, XFA_Element::Color);
+ CXFA_Node* pNode =
+ m_pNode->JSNode()->GetProperty(0, XFA_Element::Color, true);
WideString wsColor;
int a;
int r;
@@ -52,7 +53,8 @@ XFA_Element CXFA_Fill::GetFillType() {
}
int32_t CXFA_Fill::GetPattern(FX_ARGB& foreColor) {
- CXFA_Node* pNode = m_pNode->JSNode()->GetProperty(0, XFA_Element::Pattern);
+ CXFA_Node* pNode =
+ m_pNode->JSNode()->GetProperty(0, XFA_Element::Pattern, true);
if (CXFA_Node* pColor = pNode->GetChild(0, XFA_Element::Color)) {
WideStringView wsColor;
pColor->JSNode()->TryCData(XFA_ATTRIBUTE_Value, wsColor, false);
@@ -64,7 +66,8 @@ int32_t CXFA_Fill::GetPattern(FX_ARGB& foreColor) {
}
int32_t CXFA_Fill::GetStipple(FX_ARGB& stippleColor) {
- CXFA_Node* pNode = m_pNode->JSNode()->GetProperty(0, XFA_Element::Stipple);
+ CXFA_Node* pNode =
+ m_pNode->JSNode()->GetProperty(0, XFA_Element::Stipple, true);
int32_t eAttr = 50;
pNode->JSNode()->TryInteger(XFA_ATTRIBUTE_Rate, eAttr);
if (CXFA_Node* pColor = pNode->GetChild(0, XFA_Element::Color)) {
@@ -78,7 +81,8 @@ int32_t CXFA_Fill::GetStipple(FX_ARGB& stippleColor) {
}
int32_t CXFA_Fill::GetLinear(FX_ARGB& endColor) {
- CXFA_Node* pNode = m_pNode->JSNode()->GetProperty(0, XFA_Element::Linear);
+ CXFA_Node* pNode =
+ m_pNode->JSNode()->GetProperty(0, XFA_Element::Linear, true);
XFA_ATTRIBUTEENUM eAttr = XFA_ATTRIBUTEENUM_ToRight;
pNode->JSNode()->TryEnum(XFA_ATTRIBUTE_Type, eAttr);
if (CXFA_Node* pColor = pNode->GetChild(0, XFA_Element::Color)) {
@@ -92,7 +96,8 @@ int32_t CXFA_Fill::GetLinear(FX_ARGB& endColor) {
}
int32_t CXFA_Fill::GetRadial(FX_ARGB& endColor) {
- CXFA_Node* pNode = m_pNode->JSNode()->GetProperty(0, XFA_Element::Radial);
+ CXFA_Node* pNode =
+ m_pNode->JSNode()->GetProperty(0, XFA_Element::Radial, true);
XFA_ATTRIBUTEENUM eAttr = XFA_ATTRIBUTEENUM_ToEdge;
pNode->JSNode()->TryEnum(XFA_ATTRIBUTE_Type, eAttr);
if (CXFA_Node* pColor = pNode->GetChild(0, XFA_Element::Color)) {