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

Side by Side Diff: xfa/fde/css/fde_csssyntax.cpp

Issue 1830323006: Remove FX_DWORD from XFA. (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
« no previous file with comments | « xfa/fde/css/fde_cssstylesheet.cpp ('k') | xfa/fde/fde_gedevice.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/fde/css/fde_csssyntax.h" 7 #include "xfa/fde/css/fde_csssyntax.h"
8 8
9 #include "xfa/fde/css/fde_cssdatatable.h" 9 #include "xfa/fde/css/fde_cssdatatable.h"
10 #include "xfa/fgas/crt/fgas_codepage.h" 10 #include "xfa/fgas/crt/fgas_codepage.h"
(...skipping 12 matching lines...) Expand all
23 #endif 23 #endif
24 24
25 IFDE_CSSSyntaxParser* IFDE_CSSSyntaxParser::Create() { 25 IFDE_CSSSyntaxParser* IFDE_CSSSyntaxParser::Create() {
26 return new CFDE_CSSSyntaxParser; 26 return new CFDE_CSSSyntaxParser;
27 } 27 }
28 CFDE_CSSSyntaxParser::CFDE_CSSSyntaxParser() 28 CFDE_CSSSyntaxParser::CFDE_CSSSyntaxParser()
29 : m_pStream(NULL), 29 : m_pStream(NULL),
30 m_iStreamPos(0), 30 m_iStreamPos(0),
31 m_iPlaneSize(0), 31 m_iPlaneSize(0),
32 m_iTextDatLen(0), 32 m_iTextDatLen(0),
33 m_dwCheck((FX_DWORD)-1), 33 m_dwCheck((uint32_t)-1),
34 m_eMode(FDE_CSSSYNTAXMODE_RuleSet), 34 m_eMode(FDE_CSSSYNTAXMODE_RuleSet),
35 m_eStatus(FDE_CSSSYNTAXSTATUS_None) {} 35 m_eStatus(FDE_CSSSYNTAXSTATUS_None) {}
36 CFDE_CSSSyntaxParser::~CFDE_CSSSyntaxParser() { 36 CFDE_CSSSyntaxParser::~CFDE_CSSSyntaxParser() {
37 m_TextData.Reset(); 37 m_TextData.Reset();
38 m_TextPlane.Reset(); 38 m_TextPlane.Reset();
39 } 39 }
40 FX_BOOL CFDE_CSSSyntaxParser::Init(IFX_Stream* pStream, 40 FX_BOOL CFDE_CSSSyntaxParser::Init(IFX_Stream* pStream,
41 int32_t iCSSPlaneSize, 41 int32_t iCSSPlaneSize,
42 int32_t iTextDataSize, 42 int32_t iTextDataSize,
43 FX_BOOL bOnlyDeclaration) { 43 FX_BOOL bOnlyDeclaration) {
(...skipping 18 matching lines...) Expand all
62 return FALSE; 62 return FALSE;
63 } 63 }
64 return m_TextPlane.AttachBuffer(pBuffer, iBufferSize); 64 return m_TextPlane.AttachBuffer(pBuffer, iBufferSize);
65 } 65 }
66 void CFDE_CSSSyntaxParser::Reset(FX_BOOL bOnlyDeclaration) { 66 void CFDE_CSSSyntaxParser::Reset(FX_BOOL bOnlyDeclaration) {
67 m_TextPlane.Reset(); 67 m_TextPlane.Reset();
68 m_TextData.Reset(); 68 m_TextData.Reset();
69 m_pStream = NULL; 69 m_pStream = NULL;
70 m_iStreamPos = 0; 70 m_iStreamPos = 0;
71 m_iTextDatLen = 0; 71 m_iTextDatLen = 0;
72 m_dwCheck = (FX_DWORD)-1; 72 m_dwCheck = (uint32_t)-1;
73 m_eStatus = FDE_CSSSYNTAXSTATUS_None; 73 m_eStatus = FDE_CSSSYNTAXSTATUS_None;
74 m_eMode = bOnlyDeclaration ? FDE_CSSSYNTAXMODE_PropertyName 74 m_eMode = bOnlyDeclaration ? FDE_CSSSYNTAXMODE_PropertyName
75 : FDE_CSSSYNTAXMODE_RuleSet; 75 : FDE_CSSSYNTAXMODE_RuleSet;
76 } 76 }
77 FDE_CSSSYNTAXSTATUS CFDE_CSSSyntaxParser::DoSyntaxParse() { 77 FDE_CSSSYNTAXSTATUS CFDE_CSSSyntaxParser::DoSyntaxParse() {
78 while (m_eStatus >= FDE_CSSSYNTAXSTATUS_None) { 78 while (m_eStatus >= FDE_CSSSYNTAXSTATUS_None) {
79 if (m_TextPlane.IsEOF()) { 79 if (m_TextPlane.IsEOF()) {
80 if (m_pStream == NULL) { 80 if (m_pStream == NULL) {
81 if (m_eMode == FDE_CSSSYNTAXMODE_PropertyValue && 81 if (m_eMode == FDE_CSSSYNTAXMODE_PropertyValue &&
82 m_TextData.GetLength() > 0) { 82 m_TextData.GetLength() > 0) {
(...skipping 395 matching lines...) Expand 10 before | Expand all | Expand 10 after
478 if (iLength > m_iDatLen - iStart) { 478 if (iLength > m_iDatLen - iStart) {
479 iLength = m_iDatLen - iStart; 479 iLength = m_iDatLen - iStart;
480 } 480 }
481 if (iLength < 0) { 481 if (iLength < 0) {
482 iLength = 0; 482 iLength = 0;
483 } else { 483 } else {
484 FXSYS_memmove(m_pBuffer, m_pBuffer + iStart, iLength * sizeof(FX_WCHAR)); 484 FXSYS_memmove(m_pBuffer, m_pBuffer + iStart, iLength * sizeof(FX_WCHAR));
485 } 485 }
486 m_iDatLen = iLength; 486 m_iDatLen = iLength;
487 } 487 }
OLDNEW
« no previous file with comments | « xfa/fde/css/fde_cssstylesheet.cpp ('k') | xfa/fde/fde_gedevice.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698