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

Side by Side Diff: xfa/fxbarcode/datamatrix/BC_EdifactEncoder.cpp

Issue 2467203003: Remove FX_BOOL from xfa. (Closed)
Patch Set: Created 4 years, 1 month 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 // Original code is licensed as follows: 6 // Original code is licensed as follows:
7 /* 7 /*
8 * Copyright 2006-2007 Jeremias Maerki. 8 * Copyright 2006-2007 Jeremias Maerki.
9 * 9 *
10 * Licensed under the Apache License, Version 2.0 (the "License"); 10 * Licensed under the Apache License, Version 2.0 (the "License");
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after
82 } 82 }
83 if (count > 4) { 83 if (count > 4) {
84 e = BCExceptionIllegalStateCountMustNotExceed4; 84 e = BCExceptionIllegalStateCountMustNotExceed4;
85 return; 85 return;
86 } 86 }
87 int32_t restChars = count - 1; 87 int32_t restChars = count - 1;
88 CFX_WideString encoded = encodeToCodewords(buffer, 0, e); 88 CFX_WideString encoded = encodeToCodewords(buffer, 0, e);
89 if (e != BCExceptionNO) { 89 if (e != BCExceptionNO) {
90 return; 90 return;
91 } 91 }
92 FX_BOOL endOfSymbolReached = !context.hasMoreCharacters(); 92 bool endOfSymbolReached = !context.hasMoreCharacters();
93 FX_BOOL restInAscii = endOfSymbolReached && restChars <= 2; 93 bool restInAscii = endOfSymbolReached && restChars <= 2;
94 if (restChars <= 2) { 94 if (restChars <= 2) {
95 context.updateSymbolInfo(context.getCodewordCount() + restChars, e); 95 context.updateSymbolInfo(context.getCodewordCount() + restChars, e);
96 if (e != BCExceptionNO) { 96 if (e != BCExceptionNO) {
97 return; 97 return;
98 } 98 }
99 int32_t available = 99 int32_t available =
100 context.m_symbolInfo->m_dataCapacity - context.getCodewordCount(); 100 context.m_symbolInfo->m_dataCapacity - context.getCodewordCount();
101 if (available >= 3) { 101 if (available >= 3) {
102 restInAscii = FALSE; 102 restInAscii = false;
103 context.updateSymbolInfo(context.getCodewordCount() + encoded.GetLength(), 103 context.updateSymbolInfo(context.getCodewordCount() + encoded.GetLength(),
104 e); 104 e);
105 if (e != BCExceptionNO) { 105 if (e != BCExceptionNO) {
106 return; 106 return;
107 } 107 }
108 } 108 }
109 } 109 }
110 if (restInAscii) { 110 if (restInAscii) {
111 context.resetSymbolInfo(); 111 context.resetSymbolInfo();
112 context.m_pos -= restChars; 112 context.m_pos -= restChars;
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
145 CFX_WideString res; 145 CFX_WideString res;
146 res += cw1; 146 res += cw1;
147 if (len >= 2) { 147 if (len >= 2) {
148 res += cw2; 148 res += cw2;
149 } 149 }
150 if (len >= 3) { 150 if (len >= 3) {
151 res += cw3; 151 res += cw3;
152 } 152 }
153 return res; 153 return res;
154 } 154 }
OLDNEW
« no previous file with comments | « xfa/fxbarcode/datamatrix/BC_DefaultPlacement.cpp ('k') | xfa/fxbarcode/datamatrix/BC_EncoderContext.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698