summaryrefslogtreecommitdiff
path: root/xfa/fxfa/cxfa_textparser.cpp
diff options
context:
space:
mode:
authorDan Sinclair <dsinclair@chromium.org>2017-11-07 20:59:30 +0000
committerChromium commit bot <commit-bot@chromium.org>2017-11-07 20:59:30 +0000
commit5fe712cb6c605e597f65f6b4cd0afa3213234639 (patch)
tree666bf236e5a213f7baa23fbd1d407baef794942e /xfa/fxfa/cxfa_textparser.cpp
parentc3ef52cf3c26d47877740dc46faa3088be44cfae (diff)
downloadpdfium-5fe712cb6c605e597f65f6b4cd0afa3213234639.tar.xz
Rename CXFA_Para to CXFA_ParaData
This CL renames CXFA_Para to CXFA_ParaData to show it is part of the data hierarchy. Change-Id: I71f58c87416b17d1e59252ca374aad13935fc430 Reviewed-on: https://pdfium-review.googlesource.com/17989 Commit-Queue: dsinclair <dsinclair@chromium.org> Reviewed-by: Tom Sepez <tsepez@chromium.org>
Diffstat (limited to 'xfa/fxfa/cxfa_textparser.cpp')
-rw-r--r--xfa/fxfa/cxfa_textparser.cpp28
1 files changed, 15 insertions, 13 deletions
diff --git a/xfa/fxfa/cxfa_textparser.cpp b/xfa/fxfa/cxfa_textparser.cpp
index ea5f62e81a..a95350da98 100644
--- a/xfa/fxfa/cxfa_textparser.cpp
+++ b/xfa/fxfa/cxfa_textparser.cpp
@@ -90,18 +90,18 @@ std::unique_ptr<CFX_CSSStyleSheet> CXFA_TextParser::LoadDefaultSheetStyle() {
RetainPtr<CFX_CSSComputedStyle> CXFA_TextParser::CreateRootStyle(
CXFA_TextProvider* pTextProvider) {
- CXFA_Para para = pTextProvider->GetParaNode();
+ CXFA_ParaData paraData = pTextProvider->GetParaData();
auto pStyle = m_pSelector->CreateComputedStyle(nullptr);
float fLineHeight = 0;
float fFontSize = 10;
- if (para) {
- fLineHeight = para.GetLineHeight();
+ if (paraData) {
+ fLineHeight = paraData.GetLineHeight();
CFX_CSSLength indent;
- indent.Set(CFX_CSSLengthUnit::Point, para.GetTextIndent());
+ indent.Set(CFX_CSSLengthUnit::Point, paraData.GetTextIndent());
pStyle->SetTextIndent(indent);
CFX_CSSTextAlign hAlign = CFX_CSSTextAlign::Left;
- switch (para.GetHorizontalAlign()) {
+ switch (paraData.GetHorizontalAlign()) {
case XFA_ATTRIBUTEENUM_Center:
hAlign = CFX_CSSTextAlign::Center;
break;
@@ -117,10 +117,12 @@ RetainPtr<CFX_CSSComputedStyle> CXFA_TextParser::CreateRootStyle(
}
pStyle->SetTextAlign(hAlign);
CFX_CSSRect rtMarginWidth;
- rtMarginWidth.left.Set(CFX_CSSLengthUnit::Point, para.GetMarginLeft());
- rtMarginWidth.top.Set(CFX_CSSLengthUnit::Point, para.GetSpaceAbove());
- rtMarginWidth.right.Set(CFX_CSSLengthUnit::Point, para.GetMarginRight());
- rtMarginWidth.bottom.Set(CFX_CSSLengthUnit::Point, para.GetSpaceBelow());
+ rtMarginWidth.left.Set(CFX_CSSLengthUnit::Point, paraData.GetMarginLeft());
+ rtMarginWidth.top.Set(CFX_CSSLengthUnit::Point, paraData.GetSpaceAbove());
+ rtMarginWidth.right.Set(CFX_CSSLengthUnit::Point,
+ paraData.GetMarginRight());
+ rtMarginWidth.bottom.Set(CFX_CSSLengthUnit::Point,
+ paraData.GetSpaceBelow());
pStyle->SetMarginWidth(rtMarginWidth);
}
@@ -289,8 +291,8 @@ std::unique_ptr<CXFA_TextParser::TagProvider> CXFA_TextParser::ParseTagInfo(
}
int32_t CXFA_TextParser::GetVAlign(CXFA_TextProvider* pTextProvider) const {
- CXFA_Para para = pTextProvider->GetParaNode();
- return para ? para.GetVerticalAlign() : XFA_ATTRIBUTEENUM_Top;
+ CXFA_ParaData paraData = pTextProvider->GetParaData();
+ return paraData ? paraData.GetVerticalAlign() : XFA_ATTRIBUTEENUM_Top;
}
float CXFA_TextParser::GetTabInterval(CFX_CSSComputedStyle* pStyle) const {
@@ -465,8 +467,8 @@ float CXFA_TextParser::GetLineHeight(CXFA_TextProvider* pTextProvider,
float fLineHeight = 0;
if (pStyle)
fLineHeight = pStyle->GetLineHeight();
- else if (CXFA_Para para = pTextProvider->GetParaNode())
- fLineHeight = para.GetLineHeight();
+ else if (CXFA_ParaData paraData = pTextProvider->GetParaData())
+ fLineHeight = paraData.GetLineHeight();
if (bFirst) {
float fFontSize = GetFontSize(pTextProvider, pStyle);