Merge to XFA: Remove FX_BSTR and FX_WSTR typedefs.
[pdfium.git] / xfa / src / fwl / src / lightwidget / edit.cpp
index c87f83f..310e68b 100644 (file)
@@ -39,12 +39,12 @@ FWL_ERR CFWL_Edit::SetText(const CFX_WideString &wsText)
     _FWL_RETURN_VALUE_IF_FAIL(m_pImp, FWL_ERR_Indefinite);\r
     return ((IFWL_Edit*)m_pImp)->SetText(wsText);\r
 }\r
-FX_INT32 CFWL_Edit::GetTextLength() const\r
+int32_t CFWL_Edit::GetTextLength() const\r
 {\r
     _FWL_RETURN_VALUE_IF_FAIL(m_pImp, 0);\r
     return ((IFWL_Edit*)m_pImp)->GetTextLength();\r
 }\r
-FWL_ERR CFWL_Edit::GetText(CFX_WideString &wsText, FX_INT32 nStart, FX_INT32 nCount) const\r
+FWL_ERR CFWL_Edit::GetText(CFX_WideString &wsText, int32_t nStart, int32_t nCount) const\r
 {\r
     _FWL_RETURN_VALUE_IF_FAIL(m_pImp, FWL_ERR_Indefinite);\r
     return ((IFWL_Edit*)m_pImp)->GetText(wsText, nStart, nCount);\r
@@ -54,22 +54,22 @@ FWL_ERR CFWL_Edit::ClearText()
     _FWL_RETURN_VALUE_IF_FAIL(m_pImp, FWL_ERR_Indefinite);\r
     return ((IFWL_Edit*)m_pImp)->ClearText();\r
 }\r
-FX_INT32 CFWL_Edit::GetCaretPos() const\r
+int32_t CFWL_Edit::GetCaretPos() const\r
 {\r
     _FWL_RETURN_VALUE_IF_FAIL(m_pImp, -1);\r
     return ((IFWL_Edit*)m_pImp)->GetCaretPos();\r
 }\r
-FX_INT32 CFWL_Edit::SetCaretPos(FX_INT32 nIndex, FX_BOOL bBefore)\r
+int32_t CFWL_Edit::SetCaretPos(int32_t nIndex, FX_BOOL bBefore)\r
 {\r
     _FWL_RETURN_VALUE_IF_FAIL(m_pImp, -1);\r
     return ((IFWL_Edit*)m_pImp)->SetCaretPos(nIndex, bBefore);\r
 }\r
-FWL_ERR CFWL_Edit::AddSelRange(FX_INT32 nStart, FX_INT32 nCount)\r
+FWL_ERR CFWL_Edit::AddSelRange(int32_t nStart, int32_t nCount)\r
 {\r
     _FWL_RETURN_VALUE_IF_FAIL(m_pImp, FWL_ERR_Indefinite);\r
     ((IFWL_Edit*)m_pImp)->AddSelRange(nStart, nCount);\r
-    FX_INT32 pos = 0;\r
-    FX_INT32 sum = ((IFWL_Edit*)m_pImp)->GetTextLength();\r
+    int32_t pos = 0;\r
+    int32_t sum = ((IFWL_Edit*)m_pImp)->GetTextLength();\r
     if (nCount == -1) {\r
         pos = sum;\r
     } else {\r
@@ -77,12 +77,12 @@ FWL_ERR CFWL_Edit::AddSelRange(FX_INT32 nStart, FX_INT32 nCount)
     }\r
     return ((IFWL_Edit*)m_pImp)->SetCaretPos(pos);\r
 }\r
-FX_INT32 CFWL_Edit::CountSelRanges()\r
+int32_t CFWL_Edit::CountSelRanges()\r
 {\r
     _FWL_RETURN_VALUE_IF_FAIL(m_pImp, 0);\r
     return ((IFWL_Edit*)m_pImp)->CountSelRanges();\r
 }\r
-FX_INT32 CFWL_Edit::GetSelRange(FX_INT32 nIndex, FX_INT32 &nStart)\r
+int32_t CFWL_Edit::GetSelRange(int32_t nIndex, int32_t &nStart)\r
 {\r
     _FWL_RETURN_VALUE_IF_FAIL(m_pImp, 0);\r
     return ((IFWL_Edit*)m_pImp)->GetSelRange(nIndex, nStart);\r
@@ -92,12 +92,12 @@ FWL_ERR CFWL_Edit::ClearSelections()
     _FWL_RETURN_VALUE_IF_FAIL(m_pImp, FWL_ERR_Indefinite);\r
     return ((IFWL_Edit*)m_pImp)->ClearSelections();\r
 }\r
-FX_INT32 CFWL_Edit::GetLimit()\r
+int32_t CFWL_Edit::GetLimit()\r
 {\r
     _FWL_RETURN_VALUE_IF_FAIL(m_pImp, -1);\r
     return ((IFWL_Edit*)m_pImp)->GetLimit();\r
 }\r
-FWL_ERR CFWL_Edit::SetLimit(FX_INT32 nLimit)\r
+FWL_ERR CFWL_Edit::SetLimit(int32_t nLimit)\r
 {\r
     _FWL_RETURN_VALUE_IF_FAIL(m_pImp, FWL_ERR_Indefinite);\r
     return ((IFWL_Edit*)m_pImp)->SetLimit(nLimit);\r
@@ -112,7 +112,7 @@ FWL_ERR CFWL_Edit::SetFormatString(const CFX_WideString &wsFormat)
     _FWL_RETURN_VALUE_IF_FAIL(m_pImp, FWL_ERR_Indefinite);\r
     return ((IFWL_Edit*)m_pImp)->SetFormatString(wsFormat);\r
 }\r
-FWL_ERR CFWL_Edit::Insert(FX_INT32 nStart, FX_LPCWSTR lpText, FX_INT32 nLen)\r
+FWL_ERR CFWL_Edit::Insert(int32_t nStart, const FX_WCHAR* lpText, int32_t nLen)\r
 {\r
     _FWL_RETURN_VALUE_IF_FAIL(m_pImp, FWL_ERR_Indefinite);\r
     return ((IFWL_Edit*)m_pImp)->Insert(nStart, lpText, nLen);\r
@@ -122,7 +122,7 @@ FWL_ERR CFWL_Edit::DeleteSelections()
     _FWL_RETURN_VALUE_IF_FAIL(m_pImp, FWL_ERR_Indefinite);\r
     return ((IFWL_Edit*)m_pImp)->DeleteSelections();\r
 }\r
-FWL_ERR CFWL_Edit::DeleteRange(FX_INT32 nStart, FX_INT32 nCount)\r
+FWL_ERR CFWL_Edit::DeleteRange(int32_t nStart, int32_t nCount)\r
 {\r
     _FWL_RETURN_VALUE_IF_FAIL(m_pImp, FWL_ERR_Indefinite);\r
     return ((IFWL_Edit*)m_pImp)->DeleteRange(nStart, nCount);\r
@@ -132,22 +132,22 @@ FWL_ERR CFWL_Edit::ReplaceSelections(const CFX_WideStringC &wsReplace)
     _FWL_RETURN_VALUE_IF_FAIL(m_pImp, FWL_ERR_Indefinite);\r
     return ((IFWL_Edit*)m_pImp)->ReplaceSelections(wsReplace);\r
 }\r
-FWL_ERR CFWL_Edit::Replace(FX_INT32 nStart, FX_INT32 nLen, const CFX_WideStringC &wsReplace)\r
+FWL_ERR CFWL_Edit::Replace(int32_t nStart, int32_t nLen, const CFX_WideStringC &wsReplace)\r
 {\r
     _FWL_RETURN_VALUE_IF_FAIL(m_pImp, FWL_ERR_Indefinite);\r
     return ((IFWL_Edit*)m_pImp)->Replace(nStart, nLen, wsReplace);\r
 }\r
-FWL_ERR CFWL_Edit::DoClipboard(FX_INT32 iCmd)\r
+FWL_ERR CFWL_Edit::DoClipboard(int32_t iCmd)\r
 {\r
     _FWL_RETURN_VALUE_IF_FAIL(m_pImp, FWL_ERR_Indefinite);\r
     return ((IFWL_Edit*)m_pImp)->DoClipboard(iCmd);\r
 }\r
-FX_BOOL CFWL_Edit::Redo(FX_BSTR bsRecord)\r
+FX_BOOL CFWL_Edit::Redo(const CFX_ByteStringC& bsRecord)\r
 {\r
     _FWL_RETURN_VALUE_IF_FAIL(m_pImp, FALSE);\r
     return ((IFWL_Edit*)m_pImp)->Redo(bsRecord);\r
 }\r
-FX_BOOL CFWL_Edit::Undo(FX_BSTR bsRecord)\r
+FX_BOOL CFWL_Edit::Undo(const CFX_ByteStringC& bsRecord)\r
 {\r
     _FWL_RETURN_VALUE_IF_FAIL(m_pImp, FALSE);\r
     return ((IFWL_Edit*)m_pImp)->Undo(bsRecord);\r
@@ -157,7 +157,7 @@ FWL_ERR CFWL_Edit::SetTabWidth(FX_FLOAT fTabWidth, FX_BOOL bEquidistant)
     _FWL_RETURN_VALUE_IF_FAIL(m_pImp, FWL_ERR_Indefinite);\r
     return ((IFWL_Edit*)m_pImp)->SetTabWidth(fTabWidth, bEquidistant);\r
 }\r
-FWL_ERR        CFWL_Edit::SetNumberRange(FX_INT32 iMin, FX_INT32 iMax)\r
+FWL_ERR        CFWL_Edit::SetNumberRange(int32_t iMin, int32_t iMax)\r
 {\r
     if (iMin > iMax) {\r
         return FWL_ERR_Parameter_Invalid;\r
@@ -214,7 +214,7 @@ FX_BOOL CFWL_Edit::GetSuggestWords(CFX_PointF pointf, CFX_ByteStringArray &sSugg
 {\r
     return ((IFWL_Edit*)m_pImp)->GetSuggestWords(pointf, sSuggest);\r
 }\r
-FX_BOOL CFWL_Edit::ReplaceSpellCheckWord(CFX_PointF pointf, FX_BSTR bsReplace)\r
+FX_BOOL CFWL_Edit::ReplaceSpellCheckWord(CFX_PointF pointf, const CFX_ByteStringC& bsReplace)\r
 {\r
     return ((IFWL_Edit*)m_pImp)->ReplaceSpellCheckWord(pointf, bsReplace);\r
 }\r