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

Side by Side Diff: xfa/fxfa/parser/cxfa_widetextread.cpp

Issue 2560783003: Catch stray Retains() and Releases() outside of RetainPtr<>. (Closed)
Patch Set: override required per chrome style Created 4 years 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/fxfa/parser/cxfa_widetextread.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2016 PDFium Authors. All rights reserved. 1 // Copyright 2016 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/fxfa/parser/cxfa_widetextread.h" 7 #include "xfa/fxfa/parser/cxfa_widetextread.h"
8 8
9 #include <algorithm> 9 #include <algorithm>
10 10
11 #include "core/fxcrt/fx_ext.h" 11 #include "core/fxcrt/fx_ext.h"
12 #include "xfa/fgas/crt/fgas_codepage.h" 12 #include "xfa/fgas/crt/fgas_codepage.h"
13 13
14 CXFA_WideTextRead::CXFA_WideTextRead(const CFX_WideString& wsBuffer) 14 CXFA_WideTextRead::CXFA_WideTextRead(const CFX_WideString& wsBuffer)
15 : m_wsBuffer(wsBuffer), m_iPosition(0) {} 15 : m_wsBuffer(wsBuffer), m_iPosition(0) {}
16 16
17 CXFA_WideTextRead::~CXFA_WideTextRead() {}
18
17 uint32_t CXFA_WideTextRead::GetAccessModes() const { 19 uint32_t CXFA_WideTextRead::GetAccessModes() const {
18 return FX_STREAMACCESS_Read | FX_STREAMACCESS_Text; 20 return FX_STREAMACCESS_Read | FX_STREAMACCESS_Text;
19 } 21 }
20 22
21 int32_t CXFA_WideTextRead::GetLength() const { 23 int32_t CXFA_WideTextRead::GetLength() const {
22 return m_wsBuffer.GetLength() * sizeof(FX_WCHAR); 24 return m_wsBuffer.GetLength() * sizeof(FX_WCHAR);
23 } 25 }
24 26
25 int32_t CXFA_WideTextRead::Seek(FX_STREAMSEEK eSeek, int32_t iOffset) { 27 int32_t CXFA_WideTextRead::Seek(FX_STREAMSEEK eSeek, int32_t iOffset) {
26 switch (eSeek) { 28 switch (eSeek) {
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after
91 CFX_RetainPtr<IFGAS_Stream> CXFA_WideTextRead::CreateSharedStream( 93 CFX_RetainPtr<IFGAS_Stream> CXFA_WideTextRead::CreateSharedStream(
92 uint32_t dwAccess, 94 uint32_t dwAccess,
93 int32_t iOffset, 95 int32_t iOffset,
94 int32_t iLength) { 96 int32_t iLength) {
95 return nullptr; 97 return nullptr;
96 } 98 }
97 99
98 CFX_WideString CXFA_WideTextRead::GetSrcText() const { 100 CFX_WideString CXFA_WideTextRead::GetSrcText() const {
99 return m_wsBuffer; 101 return m_wsBuffer;
100 } 102 }
OLDNEW
« no previous file with comments | « xfa/fxfa/parser/cxfa_widetextread.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698