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 | 6 |
7 #include "../../core/include/fxcodec/fx_codec.h" | 7 #include "../../core/include/fxcodec/fx_codec.h" |
8 #include "../../core/include/fxcrt/fx_safe_types.h" | 8 #include "../../core/include/fxcrt/fx_safe_types.h" |
9 #include "../../public/fpdf_ext.h" | 9 #include "../../public/fpdf_ext.h" |
10 #include "../../public/fpdf_progressive.h" | 10 #include "../../public/fpdf_progressive.h" |
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
49 foxit_sandbox_policy &= 0xFFFFFFFE; | 49 foxit_sandbox_policy &= 0xFFFFFFFE; |
50 } break; | 50 } break; |
51 default: | 51 default: |
52 break; | 52 break; |
53 } | 53 } |
54 } | 54 } |
55 | 55 |
56 FPDF_BOOL FSDK_IsSandBoxPolicyEnabled(FPDF_DWORD policy) { | 56 FPDF_BOOL FSDK_IsSandBoxPolicyEnabled(FPDF_DWORD policy) { |
57 switch (policy) { | 57 switch (policy) { |
58 case FPDF_POLICY_MACHINETIME_ACCESS: | 58 case FPDF_POLICY_MACHINETIME_ACCESS: |
59 return (foxit_sandbox_policy & 0x01) ? TRUE : FALSE; | 59 return foxit_sandbox_policy & 0x01; |
Tom Sepez
2015/10/15 17:08:31
nit: !! would be redundant, but foolproof should w
Lei Zhang
2015/10/19 08:56:18
Done.
| |
60 default: | 60 default: |
61 return FALSE; | 61 return FALSE; |
62 } | 62 } |
63 } | 63 } |
64 | 64 |
65 CCodec_ModuleMgr* g_pCodecModule = nullptr; | 65 CCodec_ModuleMgr* g_pCodecModule = nullptr; |
66 | 66 |
67 DLLEXPORT void STDCALL FPDF_InitLibrary() { | 67 DLLEXPORT void STDCALL FPDF_InitLibrary() { |
68 FPDF_InitLibraryWithConfig(nullptr); | 68 FPDF_InitLibraryWithConfig(nullptr); |
69 } | 69 } |
(...skipping 816 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
886 if (!buffer) { | 886 if (!buffer) { |
887 *buflen = len; | 887 *buflen = len; |
888 } else if (*buflen >= len) { | 888 } else if (*buflen >= len) { |
889 memcpy(buffer, utf16Name.c_str(), len); | 889 memcpy(buffer, utf16Name.c_str(), len); |
890 *buflen = len; | 890 *buflen = len; |
891 } else { | 891 } else { |
892 *buflen = -1; | 892 *buflen = -1; |
893 } | 893 } |
894 return (FPDF_DEST)pDestObj; | 894 return (FPDF_DEST)pDestObj; |
895 } | 895 } |
OLD | NEW |