summaryrefslogtreecommitdiff
path: root/xfa/fxfa/parser/cxfa_datadata.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'xfa/fxfa/parser/cxfa_datadata.cpp')
-rw-r--r--xfa/fxfa/parser/cxfa_datadata.cpp15
1 files changed, 6 insertions, 9 deletions
diff --git a/xfa/fxfa/parser/cxfa_datadata.cpp b/xfa/fxfa/parser/cxfa_datadata.cpp
index 28bb0a8b02..8429dd4e5e 100644
--- a/xfa/fxfa/parser/cxfa_datadata.cpp
+++ b/xfa/fxfa/parser/cxfa_datadata.cpp
@@ -69,14 +69,11 @@ XFA_Element CXFA_DataData::GetElementType() const {
return m_pNode ? m_pNode->GetElementType() : XFA_Element::Unknown;
}
-bool CXFA_DataData::TryMeasure(XFA_Attribute eAttr,
- float& fValue,
- bool bUseDefault) const {
+pdfium::Optional<float> CXFA_DataData::TryMeasureAsFloat(
+ XFA_Attribute attr) const {
pdfium::Optional<CXFA_Measurement> measure =
- m_pNode->JSNode()->TryMeasure(eAttr, bUseDefault);
- if (!measure)
- return false;
-
- fValue = measure->ToUnit(XFA_Unit::Pt);
- return true;
+ m_pNode->JSNode()->TryMeasure(attr, false);
+ if (measure)
+ return {measure->ToUnit(XFA_Unit::Pt)};
+ return {};
}