summaryrefslogtreecommitdiff
path: root/xfa/fde/tto
diff options
context:
space:
mode:
authortsepez <tsepez@chromium.org>2017-01-24 06:12:34 -0800
committerCommit bot <commit-bot@chromium.org>2017-01-24 06:12:34 -0800
commit3d328767f9c0c04b62173aac03c35aab3fb87ffe (patch)
tree18a1a71ee987831e427b0dd62d26745861258a22 /xfa/fde/tto
parente73fea598f088151213fb11100798c615543ca2f (diff)
downloadpdfium-3d328767f9c0c04b62173aac03c35aab3fb87ffe.tar.xz
Use std::vector for CFX_RectF arrays
Review-Url: https://codereview.chromium.org/2653743002
Diffstat (limited to 'xfa/fde/tto')
-rw-r--r--xfa/fde/tto/fde_textout.cpp6
-rw-r--r--xfa/fde/tto/fde_textout.h2
2 files changed, 4 insertions, 4 deletions
diff --git a/xfa/fde/tto/fde_textout.cpp b/xfa/fde/tto/fde_textout.cpp
index 4d207fb734..ca5aa566e1 100644
--- a/xfa/fde/tto/fde_textout.cpp
+++ b/xfa/fde/tto/fde_textout.cpp
@@ -814,8 +814,8 @@ int32_t CFDE_TextOut::GetDisplayPos(FDE_TTOPIECE* pPiece) {
int32_t CFDE_TextOut::GetCharRects(const FDE_TTOPIECE* pPiece) {
FX_TXTRUN tr = ToTextRun(pPiece);
- m_rectArray.RemoveAll();
- return m_pTxtBreak->GetCharRects(&tr, m_rectArray);
+ m_rectArray.clear();
+ return m_pTxtBreak->GetCharRects(&tr, &m_rectArray);
}
FX_TXTRUN CFDE_TextOut::ToTextRun(const FDE_TTOPIECE* pPiece) {
@@ -886,7 +886,7 @@ void CFDE_TextOut::DrawLine(const FDE_TTOPIECE* pPiece, CFDE_Pen*& pPen) {
int32_t iCharIndex = m_hotKeys.GetAt(i);
if (iCharIndex >= pPiece->iStartChar &&
iCharIndex < pPiece->iStartChar + pPiece->iChars) {
- CFX_RectF rect = m_rectArray.GetAt(iCharIndex - pPiece->iStartChar);
+ CFX_RectF rect = m_rectArray[iCharIndex - pPiece->iStartChar];
if (bVertical) {
pt1.x = rect.left;
pt1.y = rect.top;
diff --git a/xfa/fde/tto/fde_textout.h b/xfa/fde/tto/fde_textout.h
index 084af42acf..e1eb71cf3b 100644
--- a/xfa/fde/tto/fde_textout.h
+++ b/xfa/fde/tto/fde_textout.h
@@ -180,7 +180,7 @@ class CFDE_TextOut {
std::vector<FXTEXT_CHARPOS> m_CharPos;
std::unique_ptr<CFDE_RenderDevice> m_pRenderDevice;
CFX_ArrayTemplate<int32_t> m_hotKeys;
- CFX_RectFArray m_rectArray;
+ std::vector<CFX_RectF> m_rectArray;
};
#endif // XFA_FDE_TTO_FDE_TEXTOUT_H_