summaryrefslogtreecommitdiff
path: root/xfa/fgas/layout/fgas_textbreak.h
diff options
context:
space:
mode:
authorTom Sepez <tsepez@chromium.org>2017-03-01 14:41:25 -0800
committerChromium commit bot <commit-bot@chromium.org>2017-03-02 14:08:12 +0000
commit4a21114e3a95d3798c5027de33b8e90550fc0eb7 (patch)
tree493a167f34a0116e9b5c93bddf2b36e5ca70f5aa /xfa/fgas/layout/fgas_textbreak.h
parent65ec174225546abdc977c8f4c92e792e44ca4e0a (diff)
downloadpdfium-4a21114e3a95d3798c5027de33b8e90550fc0eb7.tar.xz
Use std::deque for CFX_TPOArray
They both encompass the same concept: a segmented array that can grow without copying. Change-Id: Ifc02207385b1bc106df41932c7b78ec2e9cc2146 Reviewed-on: https://pdfium-review.googlesource.com/2894 Reviewed-by: dsinclair <dsinclair@chromium.org> Commit-Queue: dsinclair <dsinclair@chromium.org>
Diffstat (limited to 'xfa/fgas/layout/fgas_textbreak.h')
-rw-r--r--xfa/fgas/layout/fgas_textbreak.h14
1 files changed, 10 insertions, 4 deletions
diff --git a/xfa/fgas/layout/fgas_textbreak.h b/xfa/fgas/layout/fgas_textbreak.h
index cadfcf12bc..b64a2422eb 100644
--- a/xfa/fgas/layout/fgas_textbreak.h
+++ b/xfa/fgas/layout/fgas_textbreak.h
@@ -7,6 +7,7 @@
#ifndef XFA_FGAS_LAYOUT_FGAS_TEXTBREAK_H_
#define XFA_FGAS_LAYOUT_FGAS_TEXTBREAK_H_
+#include <deque>
#include <memory>
#include <vector>
@@ -14,13 +15,13 @@
#include "core/fxge/cfx_renderdevice.h"
#include "third_party/base/stl_util.h"
#include "xfa/fgas/crt/fgas_utils.h"
-#include "xfa/fgas/layout/fgas_unicode.h"
class CFX_Char;
class CFGAS_GEFont;
class CFX_TxtChar;
class CFX_TxtPiece;
class IFX_TxtAccess;
+struct FDE_TEXTEDITPIECE;
#define FX_TXTBREAKPOLICY_None 0x00
#define FX_TXTBREAKPOLICY_Pagination 0x01
@@ -74,7 +75,12 @@ class IFX_TxtAccess;
#define FX_TXTLINEALIGNMENT_HigherMask 0x0C
#define FX_TXTBREAK_MinimumTabWidth 160000
-struct FDE_TEXTEDITPIECE;
+struct FX_TPO {
+ int32_t index;
+ int32_t pos;
+
+ bool operator<(const FX_TPO& that) const { return pos < that.pos; }
+};
class IFX_TxtAccess {
public:
@@ -252,8 +258,8 @@ class CFX_TxtBreak {
bool EndBreak_SplitLine(CFX_TxtLine* pNextLine,
bool bAllChars,
uint32_t dwStatus);
- void EndBreak_BidiLine(CFX_TPOArray& tpos, uint32_t dwStatus);
- void EndBreak_Alignment(CFX_TPOArray& tpos,
+ void EndBreak_BidiLine(std::deque<FX_TPO>* tpos, uint32_t dwStatus);
+ void EndBreak_Alignment(const std::deque<FX_TPO>& tpos,
bool bAllChars,
uint32_t dwStatus);
int32_t GetBreakPos(std::vector<CFX_TxtChar>& ca,