From 988599c5d81bbb568f949454580ec6001258f806 Mon Sep 17 00:00:00 2001 From: tsepez Date: Tue, 13 Dec 2016 12:45:56 -0800 Subject: Replace CFX_FloatArray with std::vector Review-Url: https://codereview.chromium.org/2567503002 --- xfa/fgas/layout/fgas_rtfbreak.cpp | 5 +++-- xfa/fgas/layout/fgas_rtfbreak.h | 4 +++- 2 files changed, 6 insertions(+), 3 deletions(-) (limited to 'xfa/fgas') diff --git a/xfa/fgas/layout/fgas_rtfbreak.cpp b/xfa/fgas/layout/fgas_rtfbreak.cpp index ef65bf9779..8e4fbf7969 100644 --- a/xfa/fgas/layout/fgas_rtfbreak.cpp +++ b/xfa/fgas/layout/fgas_rtfbreak.cpp @@ -10,6 +10,7 @@ #include "core/fxcrt/fx_arabic.h" #include "core/fxcrt/fx_arb.h" +#include "third_party/base/stl_util.h" #include "xfa/fgas/font/cfgas_gefont.h" #include "xfa/fgas/layout/fgas_linebreak.h" #include "xfa/fgas/layout/fgas_unicode.h" @@ -152,9 +153,9 @@ void CFX_RTFBreak::AddPositionedTab(FX_FLOAT fTabPos) { m_bOrphanLine = false; } } -void CFX_RTFBreak::SetPositionedTabs(const CFX_FloatArray& tabs) { +void CFX_RTFBreak::SetPositionedTabs(const std::vector& tabs) { m_PositionedTabs.RemoveAll(); - int32_t iCount = tabs.GetSize(); + int32_t iCount = pdfium::CollectionSize(tabs); m_PositionedTabs.SetSize(iCount); int32_t iLineEnd = m_iBoundaryEnd; int32_t iTabPos; diff --git a/xfa/fgas/layout/fgas_rtfbreak.h b/xfa/fgas/layout/fgas_rtfbreak.h index d75bbc1d31..de2497ed1d 100644 --- a/xfa/fgas/layout/fgas_rtfbreak.h +++ b/xfa/fgas/layout/fgas_rtfbreak.h @@ -7,6 +7,8 @@ #ifndef XFA_FGAS_LAYOUT_FGAS_RTFBREAK_H_ #define XFA_FGAS_LAYOUT_FGAS_RTFBREAK_H_ +#include + #include "core/fxcrt/fx_basic.h" #include "core/fxcrt/fx_ucd.h" #include "xfa/fgas/crt/fgas_memory.h" @@ -224,7 +226,7 @@ class CFX_RTFBreak { void SetFontSize(FX_FLOAT fFontSize); void SetTabWidth(FX_FLOAT fTabWidth); void AddPositionedTab(FX_FLOAT fTabPos); - void SetPositionedTabs(const CFX_FloatArray& tabs); + void SetPositionedTabs(const std::vector& tabs); void ClearPositionedTabs(); void SetDefaultChar(FX_WCHAR wch); void SetLineBreakChar(FX_WCHAR wch); -- cgit v1.2.3