| 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 "../../include/fxcrt/fx_string.h" | 7 #include "core/include/fxcrt/fx_string.h" |
| 8 #include "unicodenormalizationdata.h" | 8 #include "unicodenormalizationdata.h" |
| 9 | 9 |
| 10 const FX_WCHAR* const g_UnicodeData_Normalization_Maps[5] = { | 10 const FX_WCHAR* const g_UnicodeData_Normalization_Maps[5] = { |
| 11 nullptr, | 11 nullptr, |
| 12 g_UnicodeData_Normalization_Map1, | 12 g_UnicodeData_Normalization_Map1, |
| 13 g_UnicodeData_Normalization_Map2, | 13 g_UnicodeData_Normalization_Map2, |
| 14 g_UnicodeData_Normalization_Map3, | 14 g_UnicodeData_Normalization_Map3, |
| 15 g_UnicodeData_Normalization_Map4}; | 15 g_UnicodeData_Normalization_Map4}; |
| 16 | 16 |
| 17 FX_STRSIZE FX_Unicode_GetNormalization(FX_WCHAR wch, FX_WCHAR* pDst) { | 17 FX_STRSIZE FX_Unicode_GetNormalization(FX_WCHAR wch, FX_WCHAR* pDst) { |
| (...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 62 CFX_WideString& wsDst) { | 62 CFX_WideString& wsDst) { |
| 63 FX_STRSIZE nLen = FX_WideString_GetNormalization(wsSrc, (FX_WCHAR*)NULL); | 63 FX_STRSIZE nLen = FX_WideString_GetNormalization(wsSrc, (FX_WCHAR*)NULL); |
| 64 if (!nLen) { | 64 if (!nLen) { |
| 65 return 0; | 65 return 0; |
| 66 } | 66 } |
| 67 FX_WCHAR* pBuf = wsDst.GetBuffer(nLen); | 67 FX_WCHAR* pBuf = wsDst.GetBuffer(nLen); |
| 68 FX_WideString_GetNormalization(wsSrc, pBuf); | 68 FX_WideString_GetNormalization(wsSrc, pBuf); |
| 69 wsDst.ReleaseBuffer(nLen); | 69 wsDst.ReleaseBuffer(nLen); |
| 70 return nLen; | 70 return nLen; |
| 71 } | 71 } |
| OLD | NEW |