summaryrefslogtreecommitdiff
path: root/xfa/fxfa/parser
diff options
context:
space:
mode:
authorthestig <thestig@chromium.org>2016-04-13 13:18:21 -0700
committerCommit bot <commit-bot@chromium.org>2016-04-13 13:18:21 -0700
commit9f3dbbc54c6981f069b57e6714393ac6c0c64231 (patch)
tree9f76b6cee117e34a737bd46f146356931786d3cc /xfa/fxfa/parser
parentf063abf4d50ab466080714df584660854ceb8709 (diff)
downloadpdfium-9f3dbbc54c6981f069b57e6714393ac6c0c64231.tar.xz
Cleanup CPDFXFA_Page.
- Use std::unique_ptr. - Make dtor protected. - Simplify logic. - Remove unused bits from CXFA_FFPageView as well. Review URL: https://codereview.chromium.org/1878963004
Diffstat (limited to 'xfa/fxfa/parser')
-rw-r--r--xfa/fxfa/parser/xfa_doclayout.h2
-rw-r--r--xfa/fxfa/parser/xfa_document_layout_imp.cpp4
2 files changed, 4 insertions, 2 deletions
diff --git a/xfa/fxfa/parser/xfa_doclayout.h b/xfa/fxfa/parser/xfa_doclayout.h
index 0bae0184ec..267f79980b 100644
--- a/xfa/fxfa/parser/xfa_doclayout.h
+++ b/xfa/fxfa/parser/xfa_doclayout.h
@@ -57,7 +57,7 @@ class CXFA_ContainerLayoutItem : public CXFA_LayoutItem {
CXFA_LayoutProcessor* GetLayout() const;
int32_t GetPageIndex() const;
- void GetPageSize(CFX_SizeF& size);
+ void GetPageSize(CFX_SizeF& size) const;
CXFA_Node* GetMasterPage() const;
CXFA_Node* m_pOldSubform;
diff --git a/xfa/fxfa/parser/xfa_document_layout_imp.cpp b/xfa/fxfa/parser/xfa_document_layout_imp.cpp
index 79037d7ec7..eea99ece88 100644
--- a/xfa/fxfa/parser/xfa_document_layout_imp.cpp
+++ b/xfa/fxfa/parser/xfa_document_layout_imp.cpp
@@ -180,7 +180,8 @@ int32_t CXFA_ContainerLayoutItem::GetPageIndex() const {
->GetLayoutPageMgr()
->GetPageIndex(this);
}
-void CXFA_ContainerLayoutItem::GetPageSize(CFX_SizeF& size) {
+
+void CXFA_ContainerLayoutItem::GetPageSize(CFX_SizeF& size) const {
size.clear();
CXFA_Node* pMedium = m_pFormNode->GetFirstChildByClass(XFA_ELEMENT_Medium);
if (!pMedium)
@@ -193,6 +194,7 @@ void CXFA_ContainerLayoutItem::GetPageSize(CFX_SizeF& size) {
size = CFX_SizeF(size.y, size.x);
}
}
+
CXFA_Node* CXFA_ContainerLayoutItem::GetMasterPage() const {
return m_pFormNode;
}