summaryrefslogtreecommitdiff
path: root/xfa/fxfa/parser/cxfa_margindata.cpp
diff options
context:
space:
mode:
authorDan Sinclair <dsinclair@chromium.org>2017-11-07 20:49:20 +0000
committerChromium commit bot <commit-bot@chromium.org>2017-11-07 20:49:20 +0000
commit2a69b9ef97ddf46fe01de432bd0ccc1b7ce92bcb (patch)
treed0138d82b52cc63e0956a12faebf6433dd9303fd /xfa/fxfa/parser/cxfa_margindata.cpp
parentc5a729ec5ada8ef0edc3f4d9976e96865f516598 (diff)
downloadpdfium-2a69b9ef97ddf46fe01de432bd0ccc1b7ce92bcb.tar.xz
Rename CXFA_Margin to CXFA_MarginData
This CL renames CXFA_Margin to CXFA_MarginData to reflect the fact this is part of the data hierarchy. Change-Id: I50d82d01fcaf35c621f13b8b68bc04d850ec885a Reviewed-on: https://pdfium-review.googlesource.com/17986 Commit-Queue: dsinclair <dsinclair@chromium.org> Reviewed-by: Tom Sepez <tsepez@chromium.org>
Diffstat (limited to 'xfa/fxfa/parser/cxfa_margindata.cpp')
-rw-r--r--xfa/fxfa/parser/cxfa_margindata.cpp29
1 files changed, 29 insertions, 0 deletions
diff --git a/xfa/fxfa/parser/cxfa_margindata.cpp b/xfa/fxfa/parser/cxfa_margindata.cpp
new file mode 100644
index 0000000000..9227668a68
--- /dev/null
+++ b/xfa/fxfa/parser/cxfa_margindata.cpp
@@ -0,0 +1,29 @@
+// Copyright 2016 PDFium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+// Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
+
+#include "xfa/fxfa/parser/cxfa_margindata.h"
+
+CXFA_MarginData::CXFA_MarginData(CXFA_Node* pNode) : CXFA_Data(pNode) {}
+
+bool CXFA_MarginData::GetLeftInset(float& fInset, float fDefInset) const {
+ fInset = fDefInset;
+ return TryMeasure(XFA_ATTRIBUTE_LeftInset, fInset);
+}
+
+bool CXFA_MarginData::GetTopInset(float& fInset, float fDefInset) const {
+ fInset = fDefInset;
+ return TryMeasure(XFA_ATTRIBUTE_TopInset, fInset);
+}
+
+bool CXFA_MarginData::GetRightInset(float& fInset, float fDefInset) const {
+ fInset = fDefInset;
+ return TryMeasure(XFA_ATTRIBUTE_RightInset, fInset);
+}
+
+bool CXFA_MarginData::GetBottomInset(float& fInset, float fDefInset) const {
+ fInset = fDefInset;
+ return TryMeasure(XFA_ATTRIBUTE_BottomInset, fInset);
+}