diff options
Diffstat (limited to 'core/fxcrt')
-rw-r--r-- | core/fxcrt/fx_ext.h | 9 | ||||
-rw-r--r-- | core/fxcrt/fx_extension.cpp | 6 |
2 files changed, 7 insertions, 8 deletions
diff --git a/core/fxcrt/fx_ext.h b/core/fxcrt/fx_ext.h index 20580760c6..9203938c2c 100644 --- a/core/fxcrt/fx_ext.h +++ b/core/fxcrt/fx_ext.h @@ -86,15 +86,14 @@ void FX_Random_GenerateMT(uint32_t* pBuffer, int32_t iCount); void FX_Random_GenerateCrypto(uint32_t* pBuffer, int32_t iCount); #ifdef PDF_ENABLE_XFA -typedef struct FX_GUID { +struct FX_GUID { uint32_t data1; uint16_t data2; uint16_t data3; uint8_t data4[8]; -} FX_GUID, *FX_LPGUID; -typedef FX_GUID const* FX_LPCGUID; -void FX_GUID_CreateV4(FX_LPGUID pGUID); -void FX_GUID_ToString(FX_LPCGUID pGUID, +}; +void FX_GUID_CreateV4(FX_GUID* pGUID); +void FX_GUID_ToString(const FX_GUID* pGUID, CFX_ByteString& bsStr, bool bSeparator = true); #endif // PDF_ENABLE_XFA diff --git a/core/fxcrt/fx_extension.cpp b/core/fxcrt/fx_extension.cpp index ba82b9b7f0..f1e2583b40 100644 --- a/core/fxcrt/fx_extension.cpp +++ b/core/fxcrt/fx_extension.cpp @@ -652,13 +652,13 @@ void FX_Random_GenerateCrypto(uint32_t* pBuffer, int32_t iCount) { } #ifdef PDF_ENABLE_XFA -void FX_GUID_CreateV4(FX_LPGUID pGUID) { +static const FX_CHAR gs_FX_pHexChars[] = "0123456789ABCDEF"; +void FX_GUID_CreateV4(FX_GUID* pGUID) { FX_Random_GenerateMT((uint32_t*)pGUID, 4); uint8_t& b = ((uint8_t*)pGUID)[6]; b = (b & 0x0F) | 0x40; } -const FX_CHAR* gs_FX_pHexChars = "0123456789ABCDEF"; -void FX_GUID_ToString(FX_LPCGUID pGUID, +void FX_GUID_ToString(const FX_GUID* pGUID, CFX_ByteString& bsStr, bool bSeparator) { FX_CHAR* pBuf = bsStr.GetBuffer(40); |