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

Side by Side Diff: xfa/fxbarcode/oned/BC_OneDimWriter.cpp

Issue 2027273002: Fix all the code which has duplicate variable declarations (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: rebase Created 4 years, 6 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/fxbarcode/datamatrix/BC_DataMatrixDecoder.cpp ('k') | xfa/fxfa/app/xfa_ffdocview.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 // Original code is licensed as follows: 6 // Original code is licensed as follows:
7 /* 7 /*
8 * Copyright 2011 ZXing authors 8 * Copyright 2011 ZXing authors
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 327 matching lines...) Expand 10 before | Expand all | Expand 10 after
338 path.AppendRect(0, 0, (FX_FLOAT)m_Width, (FX_FLOAT)m_Height); 338 path.AppendRect(0, 0, (FX_FLOAT)m_Width, (FX_FLOAT)m_Height);
339 device->DrawPath(&path, matrix, &stateData, m_backgroundColor, 339 device->DrawPath(&path, matrix, &stateData, m_backgroundColor,
340 m_backgroundColor, FXFILL_ALTERNATE); 340 m_backgroundColor, FXFILL_ALTERNATE);
341 CFX_Matrix matri(m_outputHScale, 0.0, 0.0, (FX_FLOAT)m_Height, 0.0, 0.0); 341 CFX_Matrix matri(m_outputHScale, 0.0, 0.0, (FX_FLOAT)m_Height, 0.0, 0.0);
342 matri.Concat(*matrix); 342 matri.Concat(*matrix);
343 for (int32_t x = 0; x < m_output->GetWidth(); x++) { 343 for (int32_t x = 0; x < m_output->GetWidth(); x++) {
344 for (int32_t y = 0; y < m_output->GetHeight(); y++) { 344 for (int32_t y = 0; y < m_output->GetHeight(); y++) {
345 CFX_PathData rect; 345 CFX_PathData rect;
346 rect.AppendRect((FX_FLOAT)x, (FX_FLOAT)y, (FX_FLOAT)(x + 1), 346 rect.AppendRect((FX_FLOAT)x, (FX_FLOAT)y, (FX_FLOAT)(x + 1),
347 (FX_FLOAT)(y + 1)); 347 (FX_FLOAT)(y + 1));
348 CFX_GraphStateData stateData;
349 if (m_output->Get(x, y)) { 348 if (m_output->Get(x, y)) {
350 device->DrawPath(&rect, &matri, &stateData, m_barColor, 0, 349 CFX_GraphStateData data;
351 FXFILL_WINDING); 350 device->DrawPath(&rect, &matri, &data, m_barColor, 0, FXFILL_WINDING);
352 } 351 }
353 } 352 }
354 } 353 }
355 int32_t i = 0; 354 int32_t i = 0;
356 for (; i < contents.GetLength(); i++) 355 for (; i < contents.GetLength(); i++)
357 if (contents.GetAt(i) != ' ') { 356 if (contents.GetAt(i) != ' ') {
358 break; 357 break;
359 } 358 }
360 if (m_locTextLoc != BC_TEXT_LOC_NONE && i < contents.GetLength()) { 359 if (m_locTextLoc != BC_TEXT_LOC_NONE && i < contents.GetLength()) {
361 ShowChars(contents, NULL, device, matrix, m_barWidth, m_multiple, e); 360 ShowChars(contents, NULL, device, matrix, m_barWidth, m_multiple, e);
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after
430 if (outputX + m_multiple > outputWidth && outputWidth - outputX > 0) { 429 if (outputX + m_multiple > outputWidth && outputWidth - outputX > 0) {
431 m_output->SetRegion(outputX, 0, outputWidth - outputX, outputHeight, e); 430 m_output->SetRegion(outputX, 0, outputWidth - outputX, outputHeight, e);
432 break; 431 break;
433 } 432 }
434 m_output->SetRegion(outputX, 0, m_multiple, outputHeight, e); 433 m_output->SetRegion(outputX, 0, m_multiple, outputHeight, e);
435 BC_EXCEPTION_CHECK_ReturnVoid(e); 434 BC_EXCEPTION_CHECK_ReturnVoid(e);
436 } 435 }
437 outputX += m_multiple; 436 outputX += m_multiple;
438 } 437 }
439 } 438 }
OLDNEW
« no previous file with comments | « xfa/fxbarcode/datamatrix/BC_DataMatrixDecoder.cpp ('k') | xfa/fxfa/app/xfa_ffdocview.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698