summaryrefslogtreecommitdiff
path: root/xfa/fde/cfde_textout.cpp
diff options
context:
space:
mode:
authorLei Zhang <thestig@chromium.org>2018-01-16 21:32:26 +0000
committerChromium commit bot <commit-bot@chromium.org>2018-01-16 21:32:26 +0000
commite80576173df7488964e588f5ac52f9af4b046021 (patch)
tree6eefe802d130f4ebeea7e6c6f66ee3b49379b92c /xfa/fde/cfde_textout.cpp
parent027190ec8148a2f1edc18c37eae26e896f3a309a (diff)
downloadpdfium-e80576173df7488964e588f5ac52f9af4b046021.tar.xz
Clean up xfa/fde/cfde_textout.h.
- Move enums/structs other than CFDE_TextOut to a separate header. - Move CFDE_TTOLine into CFDE_TextOut. Change-Id: I63196ebe6c02bc88d1c20ecb625505013edbfa26 Reviewed-on: https://pdfium-review.googlesource.com/22930 Reviewed-by: Ryan Harrison <rharrison@chromium.org> Commit-Queue: Lei Zhang <thestig@chromium.org>
Diffstat (limited to 'xfa/fde/cfde_textout.cpp')
-rw-r--r--xfa/fde/cfde_textout.cpp17
1 files changed, 10 insertions, 7 deletions
diff --git a/xfa/fde/cfde_textout.cpp b/xfa/fde/cfde_textout.cpp
index 2f41525c00..19e7ae6934 100644
--- a/xfa/fde/cfde_textout.cpp
+++ b/xfa/fde/cfde_textout.cpp
@@ -15,6 +15,7 @@
#include "core/fxge/cfx_pathdata.h"
#include "third_party/base/ptr_util.h"
#include "third_party/base/stl_util.h"
+#include "xfa/fgas/font/cfgas_gefont.h"
#include "xfa/fgas/layout/cfx_txtbreak.h"
namespace {
@@ -530,16 +531,18 @@ int32_t CFDE_TextOut::GetDisplayPos(FDE_TTOPIECE* pPiece) {
return m_pTxtBreak->GetDisplayPos(&tr, m_CharPos.data());
}
-CFDE_TTOLine::CFDE_TTOLine() : m_bNewReload(false) {}
+CFDE_TextOut::CFDE_TTOLine::CFDE_TTOLine() : m_bNewReload(false) {}
-CFDE_TTOLine::CFDE_TTOLine(const CFDE_TTOLine& ttoLine) : m_pieces(5) {
+CFDE_TextOut::CFDE_TTOLine::CFDE_TTOLine(const CFDE_TTOLine& ttoLine)
+ : m_pieces(5) {
m_bNewReload = ttoLine.m_bNewReload;
m_pieces = ttoLine.m_pieces;
}
-CFDE_TTOLine::~CFDE_TTOLine() {}
+CFDE_TextOut::CFDE_TTOLine::~CFDE_TTOLine() {}
-int32_t CFDE_TTOLine::AddPiece(int32_t index, const FDE_TTOPIECE& ttoPiece) {
+int32_t CFDE_TextOut::CFDE_TTOLine::AddPiece(int32_t index,
+ const FDE_TTOPIECE& ttoPiece) {
if (index >= pdfium::CollectionSize<int32_t>(m_pieces)) {
m_pieces.push_back(ttoPiece);
return pdfium::CollectionSize<int32_t>(m_pieces);
@@ -548,15 +551,15 @@ int32_t CFDE_TTOLine::AddPiece(int32_t index, const FDE_TTOPIECE& ttoPiece) {
return index;
}
-int32_t CFDE_TTOLine::GetSize() const {
+int32_t CFDE_TextOut::CFDE_TTOLine::GetSize() const {
return pdfium::CollectionSize<int32_t>(m_pieces);
}
-FDE_TTOPIECE* CFDE_TTOLine::GetPtrAt(int32_t index) {
+FDE_TTOPIECE* CFDE_TextOut::CFDE_TTOLine::GetPtrAt(int32_t index) {
return pdfium::IndexInBounds(m_pieces, index) ? &m_pieces[index] : nullptr;
}
-void CFDE_TTOLine::RemoveLast(int32_t icount) {
+void CFDE_TextOut::CFDE_TTOLine::RemoveLast(int32_t icount) {
if (icount < 0)
return;
m_pieces.erase(