OLD | NEW |
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 "core/fpdfapi/page/cpdf_streamcontentparser.h" | 7 #include "core/fpdfapi/page/cpdf_streamcontentparser.h" |
8 | 8 |
9 #include <memory> | 9 #include <memory> |
10 #include <utility> | 10 #include <utility> |
(...skipping 198 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
209 } | 209 } |
210 case CPDF_Object::ARRAY: { | 210 case CPDF_Object::ARRAY: { |
211 CPDF_Array* pArray = pObj->AsArray(); | 211 CPDF_Array* pArray = pObj->AsArray(); |
212 for (size_t i = 0; i < pArray->GetCount(); i++) { | 212 for (size_t i = 0; i < pArray->GetCount(); i++) { |
213 CPDF_Object* pElement = pArray->GetObjectAt(i); | 213 CPDF_Object* pElement = pArray->GetObjectAt(i); |
214 if (pElement->IsName()) { | 214 if (pElement->IsName()) { |
215 CFX_ByteString name = pElement->GetString(); | 215 CFX_ByteString name = pElement->GetString(); |
216 CFX_ByteStringC fullname = FindFullName( | 216 CFX_ByteStringC fullname = FindFullName( |
217 InlineValueAbbr, FX_ArraySize(InlineValueAbbr), name.AsStringC()); | 217 InlineValueAbbr, FX_ArraySize(InlineValueAbbr), name.AsStringC()); |
218 if (!fullname.IsEmpty()) | 218 if (!fullname.IsEmpty()) |
219 pArray->SetAt(i, new CPDF_Name(CFX_ByteString(fullname))); | 219 pArray->SetNewAt<CPDF_Name>(i, CFX_ByteString(fullname)); |
220 } else { | 220 } else { |
221 ReplaceAbbr(pElement); | 221 ReplaceAbbr(pElement); |
222 } | 222 } |
223 } | 223 } |
224 break; | 224 break; |
225 } | 225 } |
226 default: | 226 default: |
227 break; | 227 break; |
228 } | 228 } |
229 } | 229 } |
(...skipping 1431 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1661 } | 1661 } |
1662 default: | 1662 default: |
1663 bProcessed = false; | 1663 bProcessed = false; |
1664 } | 1664 } |
1665 if (!bProcessed) { | 1665 if (!bProcessed) { |
1666 m_pSyntax->SetPos(last_pos); | 1666 m_pSyntax->SetPos(last_pos); |
1667 return; | 1667 return; |
1668 } | 1668 } |
1669 } | 1669 } |
1670 } | 1670 } |
OLD | NEW |