Merge to XFA: Remove FX_BSTR and FX_WSTR typedefs.
[pdfium.git] / xfa / src / fxfa / src / app / xfa_ffbarcode.cpp
index f87009d..3b04a27 100644 (file)
@@ -12,7 +12,7 @@
 #include "xfa_ffpageview.h"\r
 #include "xfa_fftextedit.h"\r
 #include "xfa_ffbarcode.h"\r
-static XFA_LPCBARCODETYPEENUMINFO XFA_GetBarcodeTypeByName(FX_WSTR wsName);\r
+static XFA_LPCBARCODETYPEENUMINFO XFA_GetBarcodeTypeByName(const CFX_WideStringC& wsName);\r
 CXFA_FFBarcode::CXFA_FFBarcode(CXFA_FFPageView* pPageView, CXFA_WidgetAcc* pDataAcc)\r
     : CXFA_FFTextEdit(pPageView, pDataAcc)\r
 {\r
@@ -40,7 +40,7 @@ FX_BOOL CXFA_FFBarcode::LoadWidget()
     m_pNormalWidget->UnlockUpdate();\r
     return CXFA_FFField::LoadWidget();\r
 }\r
-void CXFA_FFBarcode::RenderWidget(CFX_Graphics* pGS, CFX_Matrix* pMatrix , FX_DWORD dwStatus , FX_INT32 iRotate )\r
+void CXFA_FFBarcode::RenderWidget(CFX_Graphics* pGS, CFX_Matrix* pMatrix , FX_DWORD dwStatus , int32_t iRotate )\r
 {\r
     if (!IsMatchVisibleStatus(dwStatus)) {\r
         return;\r
@@ -69,7 +69,7 @@ void CXFA_FFBarcode::UpdateWidgetProperty()
     XFA_LPCBARCODETYPEENUMINFO pBarcodeTypeInfo = XFA_GetBarcodeTypeByName(wsType);\r
     pBarCodeWidget->SetType(pBarcodeTypeInfo->eBCType);\r
     CXFA_WidgetAcc *pAcc = GetDataAcc();\r
-    FX_INT32 intVal;\r
+    int32_t intVal;\r
     FX_CHAR  charVal;\r
     FX_BOOL  boolVal;\r
     FX_FLOAT floatVal;\r
@@ -107,7 +107,7 @@ void CXFA_FFBarcode::UpdateWidgetProperty()
         pBarCodeWidget->SetTruncated(boolVal);\r
     }\r
     if (pAcc->GetBarcodeAttribute_WideNarrowRatio(floatVal))   {\r
-        pBarCodeWidget->SetWideNarrowRatio((FX_INT32)floatVal);\r
+        pBarCodeWidget->SetWideNarrowRatio((int32_t)floatVal);\r
     }\r
     if (pBarcodeTypeInfo->eName == XFA_BARCODETYPE_code3Of9\r
             || pBarcodeTypeInfo->eName == XFA_BARCODETYPE_ean8\r
@@ -199,17 +199,17 @@ extern const XFA_BARCODETYPEENUMINFO g_XFABarCodeTypeEnumData[] = {
     {0xfaeaf37f, L"postUSStandard", XFA_BARCODETYPE_postUSStandard, BC_UNKNOWN},\r
     {0xfb48155c, L"code3Of9", XFA_BARCODETYPE_code3Of9, BC_CODE39},\r
 };\r
-extern const FX_INT32 g_iXFABarcodeTypeCount = sizeof(g_XFABarCodeTypeEnumData) / sizeof(XFA_BARCODETYPEENUMINFO);\r
-static XFA_LPCBARCODETYPEENUMINFO XFA_GetBarcodeTypeByName(FX_WSTR wsName)\r
+extern const int32_t g_iXFABarcodeTypeCount = sizeof(g_XFABarCodeTypeEnumData) / sizeof(XFA_BARCODETYPEENUMINFO);\r
+static XFA_LPCBARCODETYPEENUMINFO XFA_GetBarcodeTypeByName(const CFX_WideStringC& wsName)\r
 {\r
-    FX_INT32 iLength = wsName.GetLength();\r
+    int32_t iLength = wsName.GetLength();\r
     if (iLength == 0) {\r
         return NULL;\r
     }\r
-    FX_UINT32 uHash = FX_HashCode_String_GetW(wsName.GetPtr(), iLength, TRUE);\r
-    FX_INT32 iStart = 0, iEnd = g_iXFABarcodeTypeCount - 1;\r
+    uint32_t uHash = FX_HashCode_String_GetW(wsName.GetPtr(), iLength, TRUE);\r
+    int32_t iStart = 0, iEnd = g_iXFABarcodeTypeCount - 1;\r
     do {\r
-        FX_INT32 iMid = (iStart + iEnd) / 2;\r
+        int32_t iMid = (iStart + iEnd) / 2;\r
         XFA_LPCBARCODETYPEENUMINFO pInfo = g_XFABarCodeTypeEnumData + iMid;\r
         if (uHash == pInfo->uHash) {\r
             return pInfo;\r