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

Side by Side Diff: core/fpdfdoc/cpdf_filespec.cpp

Issue 2382723003: Move core/fxcrt/include to core/fxcrt (Closed)
Patch Set: Rebase to master Created 4 years, 2 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 | « core/fpdfdoc/cpdf_filespec.h ('k') | core/fpdfdoc/cpdf_formcontrol.h » ('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 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/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/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_
18 CFX_WideString ChangeSlashToPlatform(const FX_WCHAR* str) { 18 CFX_WideString ChangeSlashToPlatform(const FX_WCHAR* str) {
19 CFX_WideString result; 19 CFX_WideString result;
20 while (*str) { 20 while (*str) {
21 if (*str == '/') { 21 if (*str == '/') {
22 #if _FXM_PLATFORM_ == _FXM_PLATFORM_APPLE_ 22 #if _FXM_PLATFORM_ == _FXM_PLATFORM_APPLE_
(...skipping 135 matching lines...) Expand 10 before | Expand all | Expand 10 after
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 }
OLDNEW
« no previous file with comments | « core/fpdfdoc/cpdf_filespec.h ('k') | core/fpdfdoc/cpdf_formcontrol.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698