summaryrefslogtreecommitdiff
path: root/xfa/fxfa/parser/cxfa_margindata.cpp
diff options
context:
space:
mode:
authorDan Sinclair <dsinclair@chromium.org>2017-11-20 22:23:50 +0000
committerChromium commit bot <commit-bot@chromium.org>2017-11-20 22:23:50 +0000
commit120c19b6a19377c341658c342c4351eccbb59741 (patch)
tree6799a4d504efd2eb1c7a036bf7959a9352c199e4 /xfa/fxfa/parser/cxfa_margindata.cpp
parent2501ae2474c1f097a06634d647de2eb3fb730864 (diff)
downloadpdfium-120c19b6a19377c341658c342c4351eccbb59741.tar.xz
Rename CXFA_MarginData methodschromium/3274
This CL renames the CXFA_MarginData::Get*Inset methods to CXFA_MarginData::Try*Inset to match the fact that they may fail. The default value has been removed and all the callers correctly set the default values. Change-Id: Ib0dc8dc35807b60a0ddc0e5724604cb39845fcea Reviewed-on: https://pdfium-review.googlesource.com/18771 Reviewed-by: Henrique Nakashima <hnakashima@chromium.org> Commit-Queue: dsinclair <dsinclair@chromium.org>
Diffstat (limited to 'xfa/fxfa/parser/cxfa_margindata.cpp')
-rw-r--r--xfa/fxfa/parser/cxfa_margindata.cpp12
1 files changed, 4 insertions, 8 deletions
diff --git a/xfa/fxfa/parser/cxfa_margindata.cpp b/xfa/fxfa/parser/cxfa_margindata.cpp
index 08cc9fd844..2c5689cfa0 100644
--- a/xfa/fxfa/parser/cxfa_margindata.cpp
+++ b/xfa/fxfa/parser/cxfa_margindata.cpp
@@ -8,22 +8,18 @@
CXFA_MarginData::CXFA_MarginData(CXFA_Node* pNode) : CXFA_DataData(pNode) {}
-bool CXFA_MarginData::GetLeftInset(float& fInset, float fDefInset) const {
- fInset = fDefInset;
+bool CXFA_MarginData::TryLeftInset(float& fInset) const {
return TryMeasure(XFA_Attribute::LeftInset, fInset);
}
-bool CXFA_MarginData::GetTopInset(float& fInset, float fDefInset) const {
- fInset = fDefInset;
+bool CXFA_MarginData::TryTopInset(float& fInset) const {
return TryMeasure(XFA_Attribute::TopInset, fInset);
}
-bool CXFA_MarginData::GetRightInset(float& fInset, float fDefInset) const {
- fInset = fDefInset;
+bool CXFA_MarginData::TryRightInset(float& fInset) const {
return TryMeasure(XFA_Attribute::RightInset, fInset);
}
-bool CXFA_MarginData::GetBottomInset(float& fInset, float fDefInset) const {
- fInset = fDefInset;
+bool CXFA_MarginData::TryBottomInset(float& fInset) const {
return TryMeasure(XFA_Attribute::BottomInset, fInset);
}