diff options
author | Dan Sinclair <dsinclair@chromium.org> | 2017-11-14 21:19:44 +0000 |
---|---|---|
committer | Chromium commit bot <commit-bot@chromium.org> | 2017-11-14 21:19:44 +0000 |
commit | aee28693976cc246eea8230a999906802e52cab7 (patch) | |
tree | 612e6dbc9b79c978208a623138f70f881acb539f /xfa/fxfa/parser/cxfa_strokedata.cpp | |
parent | 5a423ef8708e61d43f1556ab09c2e09f496d700d (diff) | |
download | pdfium-aee28693976cc246eea8230a999906802e52cab7.tar.xz |
Cleanup XFA default value code
This CL adds helper methods to CXFA_Node to retrieve the default values
for attributes with the correct data types.
Change-Id: I644435b4b430819f1060a95fa4fffe4ba2826cfe
Reviewed-on: https://pdfium-review.googlesource.com/18450
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
Diffstat (limited to 'xfa/fxfa/parser/cxfa_strokedata.cpp')
-rw-r--r-- | xfa/fxfa/parser/cxfa_strokedata.cpp | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/xfa/fxfa/parser/cxfa_strokedata.cpp b/xfa/fxfa/parser/cxfa_strokedata.cpp index 93247e3537..76798cb4bb 100644 --- a/xfa/fxfa/parser/cxfa_strokedata.cpp +++ b/xfa/fxfa/parser/cxfa_strokedata.cpp @@ -32,9 +32,7 @@ float CXFA_StrokeData::GetThickness() const { CXFA_Measurement CXFA_StrokeData::GetMSThickness() const { return m_pNode ? m_pNode->JSNode()->GetMeasure(XFA_Attribute::Thickness) - : XFA_GetAttributeDefaultValue_Measure( - XFA_Element::Edge, XFA_Attribute::Thickness, - XFA_XDPPACKET_Form); + : CXFA_Measurement(0.5, XFA_Unit::Pt); } void CXFA_StrokeData::SetMSThickness(CXFA_Measurement msThinkness) { @@ -52,9 +50,9 @@ FX_ARGB CXFA_StrokeData::GetColor() const { if (!pNode) return 0xFF000000; - WideStringView wsColor; + WideString wsColor; pNode->JSNode()->TryCData(XFA_Attribute::Value, wsColor, true); - return CXFA_DataData::ToColor(wsColor); + return CXFA_DataData::ToColor(wsColor.AsStringView()); } void CXFA_StrokeData::SetColor(FX_ARGB argb) { |