summaryrefslogtreecommitdiff
path: root/xfa/src/fxfa
diff options
context:
space:
mode:
authorJun Fang <jun_fang@foxitsoftware.com>2016-01-12 11:26:56 +0800
committerJun Fang <jun_fang@foxitsoftware.com>2016-01-12 11:26:56 +0800
commitb9bc6b79cba90c5c0e28ab31276029aa0d0c04cb (patch)
tree3de916a555a65529ce0e61ce508888d3d3247949 /xfa/src/fxfa
parentf3c9cf66d6a850b8225bc161722bed8aed440a2f (diff)
downloadpdfium-b9bc6b79cba90c5c0e28ab31276029aa0d0c04cb.tar.xz
Fix an assertion failure in CFX_RTFBreak::SetLineWidth()
BUG=pdfium:347 R=tsepez@chromium.org Review URL: https://codereview.chromium.org/1573893002 .
Diffstat (limited to 'xfa/src/fxfa')
-rw-r--r--xfa/src/fxfa/src/app/xfa_textlayout.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/xfa/src/fxfa/src/app/xfa_textlayout.cpp b/xfa/src/fxfa/src/app/xfa_textlayout.cpp
index 83fd9ddda5..4eddabc0bd 100644
--- a/xfa/src/fxfa/src/app/xfa_textlayout.cpp
+++ b/xfa/src/fxfa/src/app/xfa_textlayout.cpp
@@ -795,8 +795,8 @@ void CXFA_TextLayout::InitBreak(FX_FLOAT fLineWidth) {
fStartPos += fIndent;
}
}
- m_pBreak->SetLineWidth(fStart, fLineWidth);
- m_pBreak->SetLinePos(fStartPos);
+ m_pBreak->SetLineBoundary(fStart, fLineWidth);
+ m_pBreak->SetLineStartPos(fStartPos);
if (font.IsExistInXML()) {
m_pBreak->SetHorizontalScale((int32_t)font.GetHorizontalScale());
m_pBreak->SetVerticalScale((int32_t)font.GetVerticalScale());
@@ -868,12 +868,12 @@ void CXFA_TextLayout::InitBreak(IFDE_CSSComputedStyle* pStyle,
pStyle->GetBoundaryStyles()->SetMarginWidth(pNewRect);
}
}
- m_pBreak->SetLineWidth(fStart, fLineWidth);
+ m_pBreak->SetLineBoundary(fStart, fLineWidth);
FX_FLOAT fIndent = pParaStyle->GetTextIndent().GetValue();
if (fIndent > 0) {
fStart += fIndent;
}
- m_pBreak->SetLinePos(fStart);
+ m_pBreak->SetLineStartPos(fStart);
m_pBreak->SetTabWidth(m_textParser.GetTabInterval(pStyle));
if (m_pTabstopContext == NULL) {
m_pTabstopContext = new CXFA_TextTabstopsContext;
@@ -1840,7 +1840,7 @@ void CXFA_TextLayout::AppendTextLine(FX_DWORD dwStatus,
if (fSpaceBelow < 0.1f) {
fSpaceBelow = 0;
}
- m_pBreak->SetLinePos(fStartPos);
+ m_pBreak->SetLineStartPos(fStartPos);
fLinePos += fSpaceBelow;
}
}
@@ -1856,7 +1856,7 @@ void CXFA_TextLayout::AppendTextLine(FX_DWORD dwStatus,
if (fTextIndent < 0) {
fStart -= fTextIndent;
}
- m_pBreak->SetLinePos(fStart);
+ m_pBreak->SetLineStartPos(fStart);
pStyle->Release();
}
m_iLines++;