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

Side by Side Diff: xfa/fgas/layout/fgas_rtfbreak.cpp

Issue 1821043003: Remove FX_WORD in favor of uint16_t. (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: Use stdint.h directly, bitfield minefield. 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
« no previous file with comments | « xfa/fgas/layout/fgas_linebreak.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 #include "xfa/fgas/layout/fgas_rtfbreak.h" 7 #include "xfa/fgas/layout/fgas_rtfbreak.h"
8 8
9 #include <algorithm> 9 #include <algorithm>
10 10
(...skipping 497 matching lines...) Expand 10 before | Expand all | Expand 10 after
508 &CFX_RTFBreak::AppendChar_Arabic, &CFX_RTFBreak::AppendChar_Arabic, 508 &CFX_RTFBreak::AppendChar_Arabic, &CFX_RTFBreak::AppendChar_Arabic,
509 &CFX_RTFBreak::AppendChar_Arabic, &CFX_RTFBreak::AppendChar_Arabic, 509 &CFX_RTFBreak::AppendChar_Arabic, &CFX_RTFBreak::AppendChar_Arabic,
510 &CFX_RTFBreak::AppendChar_Arabic, &CFX_RTFBreak::AppendChar_Others, 510 &CFX_RTFBreak::AppendChar_Arabic, &CFX_RTFBreak::AppendChar_Others,
511 &CFX_RTFBreak::AppendChar_Others, &CFX_RTFBreak::AppendChar_Others, 511 &CFX_RTFBreak::AppendChar_Others, &CFX_RTFBreak::AppendChar_Others,
512 }; 512 };
513 FX_DWORD CFX_RTFBreak::AppendChar(FX_WCHAR wch) { 513 FX_DWORD CFX_RTFBreak::AppendChar(FX_WCHAR wch) {
514 FXSYS_assert(m_pFont != NULL && m_pCurLine != NULL && m_pArabicChar != NULL); 514 FXSYS_assert(m_pFont != NULL && m_pCurLine != NULL && m_pArabicChar != NULL);
515 if (m_bCharCode) { 515 if (m_bCharCode) {
516 return AppendChar_CharCode(wch); 516 return AppendChar_CharCode(wch);
517 } 517 }
518 FX_DWORD dwProps = kTextLayoutCodeProperties[(FX_WORD)wch]; 518 FX_DWORD dwProps = kTextLayoutCodeProperties[(uint16_t)wch];
519 FX_DWORD dwType = (dwProps & FX_CHARTYPEBITSMASK); 519 FX_DWORD dwType = (dwProps & FX_CHARTYPEBITSMASK);
520 CFX_RTFCharArray& tca = m_pCurLine->m_LineChars; 520 CFX_RTFCharArray& tca = m_pCurLine->m_LineChars;
521 CFX_RTFChar* pCurChar = tca.AddSpace(); 521 CFX_RTFChar* pCurChar = tca.AddSpace();
522 pCurChar->m_dwStatus = 0; 522 pCurChar->m_dwStatus = 0;
523 pCurChar->m_wCharCode = wch; 523 pCurChar->m_wCharCode = wch;
524 pCurChar->m_dwCharProps = dwProps; 524 pCurChar->m_dwCharProps = dwProps;
525 pCurChar->m_dwCharStyles = 0; 525 pCurChar->m_dwCharStyles = 0;
526 pCurChar->m_dwLayoutStyles = 0; 526 pCurChar->m_dwLayoutStyles = 0;
527 pCurChar->m_iFontSize = m_iFontSize; 527 pCurChar->m_iFontSize = m_iFontSize;
528 pCurChar->m_iFontHeight = m_iFontHeight; 528 pCurChar->m_iFontHeight = m_iFontHeight;
(...skipping 1153 matching lines...) Expand 10 before | Expand all | Expand 10 after
1682 rtBBoxF.height = fHeight; 1682 rtBBoxF.height = fHeight;
1683 rtBBoxF.top = std::max(rtBBoxF.top, 0.0f); 1683 rtBBoxF.top = std::max(rtBBoxF.top, 0.0f);
1684 } 1684 }
1685 rtArray.SetAt(i, rtBBoxF); 1685 rtArray.SetAt(i, rtBBoxF);
1686 continue; 1686 continue;
1687 } 1687 }
1688 rtArray.SetAt(i, rect); 1688 rtArray.SetAt(i, rect);
1689 } 1689 }
1690 return iLength; 1690 return iLength;
1691 } 1691 }
OLDNEW
« no previous file with comments | « xfa/fgas/layout/fgas_linebreak.cpp ('k') | xfa/fgas/layout/fgas_textbreak.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698