summaryrefslogtreecommitdiff
path: root/xfa/fxfa/parser/cxfa_margindata.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'xfa/fxfa/parser/cxfa_margindata.cpp')
-rw-r--r--xfa/fxfa/parser/cxfa_margindata.cpp20
1 files changed, 4 insertions, 16 deletions
diff --git a/xfa/fxfa/parser/cxfa_margindata.cpp b/xfa/fxfa/parser/cxfa_margindata.cpp
index 3af8352263..c8baf2d05a 100644
--- a/xfa/fxfa/parser/cxfa_margindata.cpp
+++ b/xfa/fxfa/parser/cxfa_margindata.cpp
@@ -25,29 +25,17 @@ float CXFA_MarginData::GetBottomInset() const {
}
pdfium::Optional<float> CXFA_MarginData::TryLeftInset() const {
- float value = 0;
- if (TryMeasure(XFA_Attribute::LeftInset, value))
- return {value};
- return {};
+ return TryMeasureAsFloat(XFA_Attribute::LeftInset);
}
pdfium::Optional<float> CXFA_MarginData::TryTopInset() const {
- float value = 0;
- if (TryMeasure(XFA_Attribute::TopInset, value))
- return {value};
- return {};
+ return TryMeasureAsFloat(XFA_Attribute::TopInset);
}
pdfium::Optional<float> CXFA_MarginData::TryRightInset() const {
- float value = 0;
- if (TryMeasure(XFA_Attribute::RightInset, value))
- return {value};
- return {};
+ return TryMeasureAsFloat(XFA_Attribute::RightInset);
}
pdfium::Optional<float> CXFA_MarginData::TryBottomInset() const {
- float value = 0;
- if (TryMeasure(XFA_Attribute::BottomInset, value))
- return {value};
- return {};
+ return TryMeasureAsFloat(XFA_Attribute::BottomInset);
}