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

Side by Side Diff: xfa/src/fee/fx_wordbreak/fx_wordbreak_impl.cpp

Issue 1778633003: Collapse xfa/src/fee directories (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: Created 4 years, 9 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
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 #include "xfa/src/fee/src/fx_wordbreak/fx_wordbreak_impl.h" 7 #include "xfa/src/fee/fx_wordbreak/fx_wordbreak_impl.h"
8
9 #define FX_IsOdd(a) ((a)&1)
10 8
11 FX_WordBreakProp FX_GetWordBreakProperty(FX_WCHAR wcCodePoint) { 9 FX_WordBreakProp FX_GetWordBreakProperty(FX_WCHAR wcCodePoint) {
12 FX_DWORD dwProperty = 10 FX_DWORD dwProperty =
13 (FX_DWORD)gs_FX_WordBreak_CodePointProperties[wcCodePoint >> 1]; 11 (FX_DWORD)gs_FX_WordBreak_CodePointProperties[wcCodePoint >> 1];
14 return (FX_WordBreakProp)(FX_IsOdd(wcCodePoint) ? (dwProperty & 0x0F) 12 return (FX_WordBreakProp)(((wcCodePoint) & 1) ? (dwProperty & 0x0F)
15 : (dwProperty >> 4)); 13 : (dwProperty >> 4));
16 } 14 }
17 CFX_CharIter::CFX_CharIter(const CFX_WideString& wsText) 15 CFX_CharIter::CFX_CharIter(const CFX_WideString& wsText)
18 : m_wsText(wsText), m_nIndex(0) { 16 : m_wsText(wsText), m_nIndex(0) {
19 FXSYS_assert(!wsText.IsEmpty()); 17 FXSYS_assert(!wsText.IsEmpty());
20 } 18 }
21 CFX_CharIter::~CFX_CharIter() {} 19 CFX_CharIter::~CFX_CharIter() {}
22 void CFX_CharIter::Release() { 20 void CFX_CharIter::Release() {
23 delete this; 21 delete this;
24 } 22 }
(...skipping 206 matching lines...) Expand 10 before | Expand all | Expand 10 after
231 } 229 }
232 ePreType = eCurType; 230 ePreType = eCurType;
233 eCurType = eNextType; 231 eCurType = eNextType;
234 bFirst = FALSE; 232 bFirst = FALSE;
235 } while (!pIter->IsEOF(!bPrev)); 233 } while (!pIter->IsEOF(!bPrev));
236 return TRUE; 234 return TRUE;
237 } 235 }
238 IFX_WordBreak* FX_WordBreak_Create() { 236 IFX_WordBreak* FX_WordBreak_Create() {
239 return new CFX_WordBreak; 237 return new CFX_WordBreak;
240 } 238 }
OLDNEW
« no previous file with comments | « xfa/src/fee/fx_wordbreak/fx_wordbreak_impl.h ('k') | xfa/src/fee/fx_wordbreak/fx_wordbreakdata.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698