Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(818)

Side by Side Diff: xfa/fgas/layout/fgas_textbreak.h

Issue 1900743004: Store WideString, not raw pointer, in FX_TXTRUN (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: Created 4 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « xfa/fee/fde_txtedtpage.cpp ('k') | xfa/fgas/layout/fgas_textbreak.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 PDFium Authors. All rights reserved. 1 // Copyright 2014 PDFium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com 5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
6 6
7 #ifndef XFA_FGAS_LAYOUT_FGAS_TEXTBREAK_H_ 7 #ifndef XFA_FGAS_LAYOUT_FGAS_TEXTBREAK_H_
8 #define XFA_FGAS_LAYOUT_FGAS_TEXTBREAK_H_ 8 #define XFA_FGAS_LAYOUT_FGAS_TEXTBREAK_H_
9 9
10 #include "core/fxcrt/include/fx_ucd.h" 10 #include "core/fxcrt/include/fx_ucd.h"
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after
72 #define FX_TXTBREAK_MinimumTabWidth 160000 72 #define FX_TXTBREAK_MinimumTabWidth 160000
73 73
74 class IFX_TxtAccess { 74 class IFX_TxtAccess {
75 public: 75 public:
76 virtual ~IFX_TxtAccess() {} 76 virtual ~IFX_TxtAccess() {}
77 virtual FX_WCHAR GetChar(void* pIdentity, int32_t index) const = 0; 77 virtual FX_WCHAR GetChar(void* pIdentity, int32_t index) const = 0;
78 virtual int32_t GetWidth(void* pIdentity, int32_t index) const = 0; 78 virtual int32_t GetWidth(void* pIdentity, int32_t index) const = 0;
79 }; 79 };
80 80
81 struct FX_TXTRUN { 81 struct FX_TXTRUN {
82 FX_TXTRUN() { 82 FX_TXTRUN()
83 pAccess = NULL; 83 : pAccess(nullptr),
84 pIdentity = NULL; 84 pIdentity(nullptr),
85 pStr = NULL; 85 pWidths(nullptr),
86 pWidths = NULL; 86 iLength(0),
87 iLength = 0; 87 pFont(nullptr),
88 pFont = NULL; 88 fFontSize(12),
89 fFontSize = 12; 89 dwStyles(0),
90 dwStyles = 0; 90 iHorizontalScale(100),
91 iHorizontalScale = 100; 91 iVerticalScale(100),
92 iVerticalScale = 100; 92 iCharRotation(0),
93 iCharRotation = 0; 93 dwCharStyles(0),
94 dwCharStyles = 0; 94 pRect(nullptr),
95 pRect = NULL; 95 wLineBreakChar(L'\n'),
96 wLineBreakChar = L'\n'; 96 bSkipSpace(TRUE) {}
97 bSkipSpace = TRUE;
98 }
99 97
100 IFX_TxtAccess* pAccess; 98 IFX_TxtAccess* pAccess;
101 void* pIdentity; 99 void* pIdentity;
102 const FX_WCHAR* pStr; 100 CFX_WideString wsStr;
103 int32_t* pWidths; 101 int32_t* pWidths;
104 int32_t iLength; 102 int32_t iLength;
105 IFX_Font* pFont; 103 IFX_Font* pFont;
106 FX_FLOAT fFontSize; 104 FX_FLOAT fFontSize;
107 uint32_t dwStyles; 105 uint32_t dwStyles;
108 int32_t iHorizontalScale; 106 int32_t iHorizontalScale;
109 int32_t iVerticalScale; 107 int32_t iVerticalScale;
110 int32_t iCharRotation; 108 int32_t iCharRotation;
111 uint32_t dwCharStyles; 109 uint32_t dwCharStyles;
112 const CFX_RectF* pRect; 110 const CFX_RectF* pRect;
(...skipping 216 matching lines...) Expand 10 before | Expand all | Expand 10 after
329 int32_t GetBreakPos(CFX_TxtCharArray& ca, 327 int32_t GetBreakPos(CFX_TxtCharArray& ca,
330 int32_t& iEndPos, 328 int32_t& iEndPos,
331 FX_BOOL bAllChars = FALSE, 329 FX_BOOL bAllChars = FALSE,
332 FX_BOOL bOnlyBrk = FALSE); 330 FX_BOOL bOnlyBrk = FALSE);
333 void SplitTextLine(CFX_TxtLine* pCurLine, 331 void SplitTextLine(CFX_TxtLine* pCurLine,
334 CFX_TxtLine* pNextLine, 332 CFX_TxtLine* pNextLine,
335 FX_BOOL bAllChars = FALSE); 333 FX_BOOL bAllChars = FALSE);
336 }; 334 };
337 335
338 #endif // XFA_FGAS_LAYOUT_FGAS_TEXTBREAK_H_ 336 #endif // XFA_FGAS_LAYOUT_FGAS_TEXTBREAK_H_
OLDNEW
« no previous file with comments | « xfa/fee/fde_txtedtpage.cpp ('k') | xfa/fgas/layout/fgas_textbreak.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698