OLD | NEW |
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 325 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
336 int32_t i = 0; | 336 int32_t i = 0; |
337 for (; i < contents.GetLength(); i++) | 337 for (; i < contents.GetLength(); i++) |
338 if (contents.GetAt(i) != ' ') { | 338 if (contents.GetAt(i) != ' ') { |
339 break; | 339 break; |
340 } | 340 } |
341 if (m_locTextLoc != BC_TEXT_LOC_NONE && i < contents.GetLength()) { | 341 if (m_locTextLoc != BC_TEXT_LOC_NONE && i < contents.GetLength()) { |
342 ShowChars(contents, pOutBitmap, nullptr, nullptr, m_barWidth, m_multiple, | 342 ShowChars(contents, pOutBitmap, nullptr, nullptr, m_barWidth, m_multiple, |
343 e); | 343 e); |
344 BC_EXCEPTION_CHECK_ReturnVoid(e); | 344 BC_EXCEPTION_CHECK_ReturnVoid(e); |
345 } | 345 } |
346 CFX_DIBitmap* pStretchBitmap = pOutBitmap->StretchTo(m_Width, m_Height); | 346 std::unique_ptr<CFX_DIBitmap> pStretchBitmap = |
| 347 pOutBitmap->StretchTo(m_Width, m_Height); |
347 delete pOutBitmap; | 348 delete pOutBitmap; |
348 pOutBitmap = pStretchBitmap; | 349 pOutBitmap = pStretchBitmap.release(); |
349 } | 350 } |
350 | 351 |
351 void CBC_OneDimWriter::RenderDeviceResult(CFX_RenderDevice* device, | 352 void CBC_OneDimWriter::RenderDeviceResult(CFX_RenderDevice* device, |
352 const CFX_Matrix* matrix, | 353 const CFX_Matrix* matrix, |
353 const CFX_WideStringC& contents, | 354 const CFX_WideStringC& contents, |
354 int32_t& e) { | 355 int32_t& e) { |
355 if (!m_output) | 356 if (!m_output) |
356 BC_EXCEPTION_CHECK_ReturnVoid(e); | 357 BC_EXCEPTION_CHECK_ReturnVoid(e); |
357 | 358 |
358 CFX_GraphStateData stateData; | 359 CFX_GraphStateData stateData; |
(...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
466 | 467 |
467 CFX_WideString CBC_OneDimWriter::FilterContents( | 468 CFX_WideString CBC_OneDimWriter::FilterContents( |
468 const CFX_WideStringC& contents) { | 469 const CFX_WideStringC& contents) { |
469 return CFX_WideString(); | 470 return CFX_WideString(); |
470 } | 471 } |
471 | 472 |
472 CFX_WideString CBC_OneDimWriter::RenderTextContents( | 473 CFX_WideString CBC_OneDimWriter::RenderTextContents( |
473 const CFX_WideStringC& contents) { | 474 const CFX_WideStringC& contents) { |
474 return CFX_WideString(); | 475 return CFX_WideString(); |
475 } | 476 } |
OLD | NEW |