| 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/fpdfdoc/include/cpdf_filespec.h" | 7 #include "core/fpdfdoc/cpdf_filespec.h" |
| 8 | 8 |
| 9 #include "core/fpdfapi/fpdf_parser/cpdf_dictionary.h" | 9 #include "core/fpdfapi/fpdf_parser/cpdf_dictionary.h" |
| 10 #include "core/fpdfapi/fpdf_parser/cpdf_object.h" | 10 #include "core/fpdfapi/fpdf_parser/cpdf_object.h" |
| 11 #include "core/fpdfapi/fpdf_parser/fpdf_parser_decode.h" | 11 #include "core/fpdfapi/fpdf_parser/fpdf_parser_decode.h" |
| 12 #include "core/fxcrt/include/fx_system.h" | 12 #include "core/fxcrt/include/fx_system.h" |
| 13 | 13 |
| 14 namespace { | 14 namespace { |
| 15 | 15 |
| 16 #if _FXM_PLATFORM_ == _FXM_PLATFORM_APPLE_ || \ | 16 #if _FXM_PLATFORM_ == _FXM_PLATFORM_APPLE_ || \ |
| 17 _FXM_PLATFORM_ == _FXM_PLATFORM_WINDOWS_ | 17 _FXM_PLATFORM_ == _FXM_PLATFORM_WINDOWS_ |
| (...skipping 140 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 158 return; | 158 return; |
| 159 | 159 |
| 160 CFX_WideString wsStr = EncodeFileName(wsFileName); | 160 CFX_WideString wsStr = EncodeFileName(wsFileName); |
| 161 if (m_pObj->IsString()) { | 161 if (m_pObj->IsString()) { |
| 162 m_pObj->SetString(CFX_ByteString::FromUnicode(wsStr)); | 162 m_pObj->SetString(CFX_ByteString::FromUnicode(wsStr)); |
| 163 } else if (CPDF_Dictionary* pDict = m_pObj->AsDictionary()) { | 163 } else if (CPDF_Dictionary* pDict = m_pObj->AsDictionary()) { |
| 164 pDict->SetStringFor("F", CFX_ByteString::FromUnicode(wsStr)); | 164 pDict->SetStringFor("F", CFX_ByteString::FromUnicode(wsStr)); |
| 165 pDict->SetStringFor("UF", PDF_EncodeText(wsStr)); | 165 pDict->SetStringFor("UF", PDF_EncodeText(wsStr)); |
| 166 } | 166 } |
| 167 } | 167 } |
| OLD | NEW |