summaryrefslogtreecommitdiff
path: root/xfa/fxfa/parser/cxfa_layoutprocessor.h
diff options
context:
space:
mode:
authortsepez <tsepez@chromium.org>2017-01-05 19:21:39 -0800
committerCommit bot <commit-bot@chromium.org>2017-01-05 19:21:39 -0800
commit469f6da247ffe77d0ae6089e5d93db0b0c0bb37e (patch)
tree54ead40b8fedc1629f41f4797c34190064181b6f /xfa/fxfa/parser/cxfa_layoutprocessor.h
parent4a551f5570b3d465bba5c77e499b33cf4a47501a (diff)
downloadpdfium-469f6da247ffe77d0ae6089e5d93db0b0c0bb37e.tar.xz
use unique_ptr in cxfa_layoutprocessor.h
Review-Url: https://codereview.chromium.org/2617483005
Diffstat (limited to 'xfa/fxfa/parser/cxfa_layoutprocessor.h')
-rw-r--r--xfa/fxfa/parser/cxfa_layoutprocessor.h19
1 files changed, 10 insertions, 9 deletions
diff --git a/xfa/fxfa/parser/cxfa_layoutprocessor.h b/xfa/fxfa/parser/cxfa_layoutprocessor.h
index cf1b1e83b4..5861bf7048 100644
--- a/xfa/fxfa/parser/cxfa_layoutprocessor.h
+++ b/xfa/fxfa/parser/cxfa_layoutprocessor.h
@@ -7,6 +7,8 @@
#ifndef XFA_FXFA_PARSER_CXFA_LAYOUTPROCESSOR_H_
#define XFA_FXFA_PARSER_CXFA_LAYOUTPROCESSOR_H_
+#include <memory>
+
#include "core/fxcrt/fx_system.h"
#include "xfa/fxfa/parser/xfa_object.h"
@@ -30,23 +32,22 @@ class CXFA_LayoutProcessor {
int32_t CountPages() const;
CXFA_ContainerLayoutItem* GetPage(int32_t index) const;
CXFA_LayoutItem* GetLayoutItem(CXFA_Node* pFormItem);
-
void AddChangedContainer(CXFA_Node* pContainer);
void SetForceReLayout(bool bForceRestart) { m_bNeeLayout = bForceRestart; }
CXFA_ContainerLayoutItem* GetRootLayoutItem() const;
- CXFA_ItemLayoutProcessor* GetRootRootItemLayoutProcessor() {
- return m_pRootItemLayoutProcessor;
+ CXFA_ItemLayoutProcessor* GetRootRootItemLayoutProcessor() const {
+ return m_pRootItemLayoutProcessor.get();
+ }
+ CXFA_LayoutPageMgr* GetLayoutPageMgr() const {
+ return m_pLayoutPageMgr.get();
}
- CXFA_LayoutPageMgr* GetLayoutPageMgr() { return m_pLayoutPageMgr; }
private:
- void ClearLayoutData();
-
bool IsNeedLayout();
- CXFA_Document* m_pDocument;
- CXFA_ItemLayoutProcessor* m_pRootItemLayoutProcessor;
- CXFA_LayoutPageMgr* m_pLayoutPageMgr;
+ CXFA_Document* const m_pDocument;
+ std::unique_ptr<CXFA_ItemLayoutProcessor> m_pRootItemLayoutProcessor;
+ std::unique_ptr<CXFA_LayoutPageMgr> m_pLayoutPageMgr;
CXFA_NodeArray m_rgChangedContainers;
uint32_t m_nProgressCounter;
bool m_bNeeLayout;