summaryrefslogtreecommitdiff
path: root/xfa/fxfa/cxfa_fwltheme.cpp
diff options
context:
space:
mode:
authorDan Sinclair <dsinclair@chromium.org>2017-12-14 21:14:14 +0000
committerChromium commit bot <commit-bot@chromium.org>2017-12-14 21:14:14 +0000
commit9a2c6552460c82417de13e86f07e23dc8c8cef74 (patch)
tree9b1971968c9d371b226457090ab0f73efe45bca4 /xfa/fxfa/cxfa_fwltheme.cpp
parent8eb2722e764fff0a39d0d1dc0c59473aa938b31f (diff)
downloadpdfium-9a2c6552460c82417de13e86f07e23dc8c8cef74.tar.xz
Fold CXFA_ParaData into CXFA_Para
This CL removes the CXFA_ParaData wrapper and folds the code into CXFA_Para. Change-Id: I86d139f1df48dcc80d28c7516b1bda95a59e94bd Reviewed-on: https://pdfium-review.googlesource.com/21270 Reviewed-by: Henrique Nakashima <hnakashima@chromium.org> Commit-Queue: dsinclair <dsinclair@chromium.org>
Diffstat (limited to 'xfa/fxfa/cxfa_fwltheme.cpp')
-rw-r--r--xfa/fxfa/cxfa_fwltheme.cpp17
1 files changed, 9 insertions, 8 deletions
diff --git a/xfa/fxfa/cxfa_fwltheme.cpp b/xfa/fxfa/cxfa_fwltheme.cpp
index 88aeef68c5..8330ed49d8 100644
--- a/xfa/fxfa/cxfa_fwltheme.cpp
+++ b/xfa/fxfa/cxfa_fwltheme.cpp
@@ -24,6 +24,7 @@
#include "xfa/fwl/cfwl_themetext.h"
#include "xfa/fxfa/cxfa_ffapp.h"
#include "xfa/fxfa/cxfa_ffwidget.h"
+#include "xfa/fxfa/parser/cxfa_para.h"
#include "xfa/fxgraphics/cxfa_gecolor.h"
namespace {
@@ -154,11 +155,11 @@ CFX_RectF CXFA_FWLTheme::GetUIMargin(CFWL_ThemePart* pThemePart) const {
CXFA_LayoutItem* pItem = pWidget;
CXFA_WidgetAcc* pWidgetAcc = pWidget->GetDataAcc();
rect = pWidgetAcc->GetUIMargin();
- CXFA_ParaData paraData = pWidgetAcc->GetParaData();
- if (paraData.HasValidNode()) {
- rect.left += paraData.GetMarginLeft();
+ CXFA_Para* para = pWidgetAcc->GetPara();
+ if (para) {
+ rect.left += para->GetMarginLeft();
if (pWidgetAcc->IsMultiLine())
- rect.width += paraData.GetMarginRight();
+ rect.width += para->GetMarginRight();
}
if (!pItem->GetPrev()) {
if (pItem->GetNext())
@@ -213,10 +214,10 @@ CFX_SizeF CXFA_FWLTheme::GetSpaceAboveBelow(CFWL_ThemePart* pThemePart) const {
CFX_SizeF sizeAboveBelow;
if (CXFA_FFWidget* pWidget = XFA_ThemeGetOuterWidget(pThemePart->m_pWidget)) {
CXFA_WidgetAcc* pWidgetAcc = pWidget->GetDataAcc();
- CXFA_ParaData paraData = pWidgetAcc->GetParaData();
- if (paraData.HasValidNode()) {
- sizeAboveBelow.width = paraData.GetSpaceAbove();
- sizeAboveBelow.height = paraData.GetSpaceBelow();
+ CXFA_Para* para = pWidgetAcc->GetPara();
+ if (para) {
+ sizeAboveBelow.width = para->GetSpaceAbove();
+ sizeAboveBelow.height = para->GetSpaceBelow();
}
}
return sizeAboveBelow;