diff options
Diffstat (limited to 'fpdfsdk/src')
36 files changed, 176 insertions, 182 deletions
diff --git a/fpdfsdk/src/formfiller/FFL_CBA_Fontmap.cpp b/fpdfsdk/src/formfiller/FFL_CBA_Fontmap.cpp index d73fbf45b0..abe30d85af 100644 --- a/fpdfsdk/src/formfiller/FFL_CBA_Fontmap.cpp +++ b/fpdfsdk/src/formfiller/FFL_CBA_Fontmap.cpp @@ -43,7 +43,7 @@ void CBA_FontMap::Reset() m_sDefaultFontName = ""; } -void CBA_FontMap::Initial(FX_LPCSTR fontname) +void CBA_FontMap::Initial(const FX_CHAR* fontname) { int32_t nCharset = DEFAULT_CHARSET; diff --git a/fpdfsdk/src/fpdf_dataavail.cpp b/fpdfsdk/src/fpdf_dataavail.cpp index a87ebecf90..d0f0a4ac90 100644 --- a/fpdfsdk/src/fpdf_dataavail.cpp +++ b/fpdfsdk/src/fpdf_dataavail.cpp @@ -53,7 +53,7 @@ public: virtual FX_BOOL ReadBlock(void* buffer, FX_FILESIZE offset, size_t size) { - return m_pFileAccess->m_GetBlock(m_pFileAccess->m_Param, offset, (FX_LPBYTE)buffer, size); + return m_pFileAccess->m_GetBlock(m_pFileAccess->m_Param, offset, (uint8_t*)buffer, size); } virtual void Release() diff --git a/fpdfsdk/src/fpdf_ext.cpp b/fpdfsdk/src/fpdf_ext.cpp index 6d846dfb67..c258b93c7d 100644 --- a/fpdfsdk/src/fpdf_ext.cpp +++ b/fpdfsdk/src/fpdf_ext.cpp @@ -29,7 +29,7 @@ void CFSDK_UnsupportInfo_Adapter::ReportError(int nErrorType) } } -void FreeUnsupportInfo(FX_LPVOID pData) +void FreeUnsupportInfo(void* pData) { CFSDK_UnsupportInfo_Adapter * pAdapter = (CFSDK_UnsupportInfo_Adapter *)pData; delete pAdapter; diff --git a/fpdfsdk/src/fpdf_flatten.cpp b/fpdfsdk/src/fpdf_flatten.cpp index 3dd768742f..742aeda72f 100644 --- a/fpdfsdk/src/fpdf_flatten.cpp +++ b/fpdfsdk/src/fpdf_flatten.cpp @@ -220,7 +220,7 @@ void SetPageContents(CFX_ByteString key, CPDF_Dictionary* pPage, CPDF_Document* CFX_ByteString sStream; sStream.Format("q 1 0 0 1 0 0 cm /%s Do Q", key.c_str()); - pNewContents->SetData((FX_LPCBYTE)sStream, sStream.GetLength(), FALSE, FALSE); + pNewContents->SetData((const uint8_t*)sStream, sStream.GetLength(), FALSE, FALSE); } return; } @@ -238,9 +238,9 @@ void SetPageContents(CFX_ByteString key, CPDF_Dictionary* pPage, CPDF_Document* CPDF_StreamAcc acc; acc.LoadAllData(pContents); CFX_ByteString sStream = "q\n"; - CFX_ByteString sBody = CFX_ByteString((FX_LPCSTR)acc.GetData(), acc.GetSize()); + CFX_ByteString sBody = CFX_ByteString((const FX_CHAR*)acc.GetData(), acc.GetSize()); sStream = sStream + sBody + "\nQ"; - pContents->SetData((FX_LPCBYTE)sStream, sStream.GetLength(), FALSE, FALSE); + pContents->SetData((const uint8_t*)sStream, sStream.GetLength(), FALSE, FALSE); pContentsArray->AddReference(pDocument, dwObjNum); break; } @@ -267,7 +267,7 @@ void SetPageContents(CFX_ByteString key, CPDF_Dictionary* pPage, CPDF_Document* CFX_ByteString sStream; sStream.Format("q 1 0 0 1 0 0 cm /%s Do Q", key.c_str()); - pNewContents->SetData((FX_LPCBYTE)sStream, sStream.GetLength(), FALSE, FALSE); + pNewContents->SetData((const uint8_t*)sStream, sStream.GetLength(), FALSE, FALSE); } } @@ -529,7 +529,7 @@ DLLEXPORT int STDCALL FPDFPage_Flatten( FPDF_PAGE page, int nFlag) CPDF_StreamAcc acc; acc.LoadAllData(pNewXObject); - FX_LPCBYTE pData = acc.GetData(); + const uint8_t* pData = acc.GetData(); CFX_ByteString sStream(pData, acc.GetSize()); CFX_ByteString sTemp; @@ -547,7 +547,7 @@ DLLEXPORT int STDCALL FPDFPage_Flatten( FPDF_PAGE page, int nFlag) sTemp.Format("q %f 0 0 %f %f %f cm /%s Do Q\n", m.a, m.d, m.e, m.f, sFormName.c_str()); sStream += sTemp; - pNewXObject->SetData((FX_LPCBYTE)sStream, sStream.GetLength(), FALSE, FALSE); + pNewXObject->SetData((const uint8_t*)sStream, sStream.GetLength(), FALSE, FALSE); } pPageDict->RemoveAt( "Annots" ); diff --git a/fpdfsdk/src/fpdf_sysfontinfo.cpp b/fpdfsdk/src/fpdf_sysfontinfo.cpp index 4d77794768..c1c6417ca6 100644 --- a/fpdfsdk/src/fpdf_sysfontinfo.cpp +++ b/fpdfsdk/src/fpdf_sysfontinfo.cpp @@ -29,21 +29,21 @@ public: return FALSE; } - virtual void* MapFont(int weight, FX_BOOL bItalic, int charset, int pitch_family, FX_LPCSTR family, FX_BOOL& bExact) override + virtual void* MapFont(int weight, FX_BOOL bItalic, int charset, int pitch_family, const FX_CHAR* family, FX_BOOL& bExact) override { if (m_pInfo->MapFont) return m_pInfo->MapFont(m_pInfo, weight, bItalic, charset, pitch_family, family, &bExact); return NULL; } - virtual void* GetFont(FX_LPCSTR family) override + virtual void* GetFont(const FX_CHAR* family) override { if (m_pInfo->GetFont) return m_pInfo->GetFont(m_pInfo, family); return NULL; } - virtual FX_DWORD GetFontData(void* hFont, FX_DWORD table, FX_LPBYTE buffer, FX_DWORD size) override + virtual FX_DWORD GetFontData(void* hFont, FX_DWORD table, uint8_t* buffer, FX_DWORD size) override { if (m_pInfo->GetFontData) return m_pInfo->GetFontData(m_pInfo, hFont, table, buffer, size); diff --git a/fpdfsdk/src/fpdf_transformpage.cpp b/fpdfsdk/src/fpdf_transformpage.cpp index 592b5f4e64..a6caf78e6e 100644 --- a/fpdfsdk/src/fpdf_transformpage.cpp +++ b/fpdfsdk/src/fpdf_transformpage.cpp @@ -119,9 +119,9 @@ DLLEXPORT FPDF_BOOL STDCALL FPDFPage_TransFormWithClip(FPDF_PAGE page, FS_MATRIX return FALSE; pDoc->AddIndirectObject(pStream); - pDic = FX_NEW CPDF_Dictionary; - CPDF_Stream* pEndStream = FX_NEW CPDF_Stream(NULL,0, pDic); - pEndStream->SetData((FX_LPCBYTE)" Q", 2, FALSE, FALSE); + pDic = new CPDF_Dictionary; + CPDF_Stream* pEndStream = new CPDF_Stream(NULL,0, pDic); + pEndStream->SetData((const uint8_t*)" Q", 2, FALSE, FALSE); pDoc->AddIndirectObject(pEndStream); CPDF_Array* pContentArray = NULL; diff --git a/fpdfsdk/src/fpdfdoc.cpp b/fpdfsdk/src/fpdfdoc.cpp index d662699dbf..e874e815e1 100644 --- a/fpdfsdk/src/fpdfdoc.cpp +++ b/fpdfsdk/src/fpdfdoc.cpp @@ -161,7 +161,7 @@ DLLEXPORT unsigned long STDCALL FPDFDest_GetPageIndex(FPDF_DOCUMENT document, FP return dest.GetPageIndex(pDoc); } -static void ReleaseLinkList(FX_LPVOID data) +static void ReleaseLinkList(void* data) { delete (CPDF_LinkList*)data; } diff --git a/fpdfsdk/src/fpdfformfill.cpp b/fpdfsdk/src/fpdfformfill.cpp index 0ae2237d29..e4b7de4426 100644 --- a/fpdfsdk/src/fpdfformfill.cpp +++ b/fpdfsdk/src/fpdfformfill.cpp @@ -529,7 +529,7 @@ DLLEXPORT FPDF_BOOL STDCALL FPDF_StringHandleGetStringByIndex(FPDF_STRINGHANDLE int real_size = len < *size ? len : *size; if (real_size > 0) - FXSYS_memcpy((void*)bsText, (FX_LPCSTR)(sSuggestWords[index]), real_size); + FXSYS_memcpy((void*)bsText, (const FX_CHAR*)(sSuggestWords[index]), real_size); *size = real_size; return TRUE; diff --git a/fpdfsdk/src/fpdfppo.cpp b/fpdfsdk/src/fpdfppo.cpp index 5c66e4bb69..3e8de3fe42 100644 --- a/fpdfsdk/src/fpdfppo.cpp +++ b/fpdfsdk/src/fpdfppo.cpp @@ -179,7 +179,7 @@ FX_BOOL CPDF_PageOrganizer::ExportPage(CPDF_Document *pSrcPDFDoc, CFX_WordArray* FX_DWORD dwOldPageObj = pSrcPageDict->GetObjNum(); FX_DWORD dwNewPageObj = pCurPageDict->GetObjNum(); - pMapPtrToPtr->SetAt((FX_LPVOID)(uintptr_t)dwOldPageObj, (FX_LPVOID)(uintptr_t)dwNewPageObj); + pMapPtrToPtr->SetAt((void*)(uintptr_t)dwOldPageObj, (void*)(uintptr_t)dwNewPageObj); this->UpdateReference(pCurPageDict, pDestPDFDoc, pMapPtrToPtr); curpage++; @@ -302,7 +302,7 @@ int CPDF_PageOrganizer::GetNewObjId(CPDF_Document *pDoc, CFX_MapPtrToPtr* pMapPt size_t dwNewObjNum = 0; - pMapPtrToPtr->Lookup((FX_LPVOID)dwObjnum, (FX_LPVOID&)dwNewObjNum); + pMapPtrToPtr->Lookup((void*)dwObjnum, (void*&)dwNewObjNum); if(dwNewObjNum) { return (int)dwNewObjNum; @@ -340,7 +340,7 @@ int CPDF_PageOrganizer::GetNewObjId(CPDF_Document *pDoc, CFX_MapPtrToPtr* pMapPt } } dwNewObjNum = pDoc->AddIndirectObject(pClone);//, onum, gnum); - pMapPtrToPtr->SetAt((FX_LPVOID)dwObjnum, (FX_LPVOID)dwNewObjNum); + pMapPtrToPtr->SetAt((void*)dwObjnum, (void*)dwNewObjNum); if(!UpdateReference(pClone, pDoc, pMapPtrToPtr)) { diff --git a/fpdfsdk/src/fpdfsave.cpp b/fpdfsdk/src/fpdfsave.cpp index db9e289d9e..34cf381555 100644 --- a/fpdfsdk/src/fpdfsave.cpp +++ b/fpdfsdk/src/fpdfsave.cpp @@ -124,7 +124,7 @@ FX_BOOL _SaveXFADocumentData(CPDFXFA_Document* pDocument, CFX_PtrArray& fileList CPDF_Stream *pTemplateStream = pArray->GetStream(iTemplate); CPDF_StreamAcc streamAcc; streamAcc.LoadAllData(pTemplateStream); - FX_LPBYTE pData = (FX_LPBYTE)streamAcc.GetData(); + uint8_t* pData = (uint8_t*)streamAcc.GetData(); FX_DWORD dwSize2 = streamAcc.GetSize(); IFX_FileStream *pTemplate = FX_CreateMemoryStream(pData, dwSize2); pContext->UpdateChecksum((IFX_FileRead*)pTemplate); diff --git a/fpdfsdk/src/fpdfview.cpp b/fpdfsdk/src/fpdfview.cpp index fa6bb2ef53..a86d54f3af 100644 --- a/fpdfsdk/src/fpdfview.cpp +++ b/fpdfsdk/src/fpdfview.cpp @@ -120,7 +120,7 @@ FX_BOOL CPDF_CustomAccess::GetByte(FX_DWORD pos, uint8_t& ch) return TRUE; } -FX_BOOL CPDF_CustomAccess::GetBlock(FX_DWORD pos, FX_LPBYTE pBuf, FX_DWORD size) +FX_BOOL CPDF_CustomAccess::GetBlock(FX_DWORD pos, uint8_t* pBuf, FX_DWORD size) { if (pos + size > m_FileAccess.m_FileLen) return FALSE; return m_FileAccess.m_GetBlock(m_FileAccess.m_Param, pos, pBuf, size); @@ -136,7 +136,7 @@ FX_BOOL CPDF_CustomAccess::ReadBlock(void* buffer, FX_FILESIZE offset, size_t si if (!newPos.IsValid() || newPos.ValueOrDie() > m_FileAccess.m_FileLen) { return FALSE; } - return m_FileAccess.m_GetBlock(m_FileAccess.m_Param, offset,(FX_LPBYTE) buffer, size); + return m_FileAccess.m_GetBlock(m_FileAccess.m_Param, offset,(uint8_t*) buffer, size); } //0 bit: FPDF_POLICY_MACHINETIME_ACCESS @@ -245,7 +245,7 @@ DLLEXPORT FPDF_DOCUMENT STDCALL FPDF_LoadDocument(FPDF_STRING file_path, FPDF_BY CPDF_Parser* pParser = FX_NEW CPDF_Parser; pParser->SetPassword(password); - FX_DWORD err_code = pParser->StartParse((FX_LPCSTR)file_path); + FX_DWORD err_code = pParser->StartParse((const FX_CHAR*)file_path); if (err_code) { delete pParser; ProcessParseError(err_code); @@ -560,9 +560,9 @@ DLLEXPORT void STDCALL FPDF_RenderPage(HDC dc, FPDF_PAGE page, int start_x, int #endif // Create a device with this external buffer - pContext->m_pBitmap = FX_NEW CFX_DIBitmap; - pContext->m_pBitmap->Create(width, height, FXDIB_Rgb, (FX_LPBYTE)pBuffer); - pContext->m_pDevice = FX_NEW CPDF_FxgeDevice; + pContext->m_pBitmap = new CFX_DIBitmap; + pContext->m_pBitmap->Create(width, height, FXDIB_Rgb, (uint8_t*)pBuffer); + pContext->m_pDevice = new CPDF_FxgeDevice; ((CPDF_FxgeDevice*)pContext->m_pDevice)->Attach(pContext->m_pBitmap); #ifdef DEBUG_TRACE @@ -649,15 +649,9 @@ DLLEXPORT void STDCALL FPDF_RenderPageBitmap(FPDF_BITMAP bitmap, FPDF_PAGE page, DLLEXPORT void STDCALL FPDF_ClosePage(FPDF_PAGE page) { if (!page) return; + CPDFXFA_Page* pPage = (CPDFXFA_Page*)page; - pPage->Release(); -// CPDFXFA_Document* pDoc = pPage->GetDocument(); -// if (pDoc) { -// pDoc->RemovePage(pPage); -// } -// delete (CPDFXFA_Page*)page; - } DLLEXPORT void STDCALL FPDF_CloseDocument(FPDF_DOCUMENT document) @@ -727,8 +721,8 @@ DLLEXPORT FPDF_BITMAP STDCALL FPDFBitmap_CreateEx(int width, int height, int for default: return NULL; } - CFX_DIBitmap* pBitmap = FX_NEW CFX_DIBitmap; - pBitmap->Create(width, height, fx_format, (FX_LPBYTE)first_scan, stride); + CFX_DIBitmap* pBitmap = new CFX_DIBitmap; + pBitmap->Create(width, height, fx_format, (uint8_t*)first_scan, stride); return pBitmap; } diff --git a/fpdfsdk/src/fpdfxfa/fpdfxfa_doc.cpp b/fpdfsdk/src/fpdfxfa/fpdfxfa_doc.cpp index 106e3cbc12..c1f402e393 100644 --- a/fpdfsdk/src/fpdfxfa/fpdfxfa_doc.cpp +++ b/fpdfsdk/src/fpdfxfa/fpdfxfa_doc.cpp @@ -573,7 +573,7 @@ void CPDFXFA_Document::PageViewEvent(IXFA_PageView* pPageView, FX_DWORD dwFlags) }
}
-void CPDFXFA_Document::WidgetEvent(IXFA_Widget* hWidget, CXFA_WidgetAcc* pWidgetData, FX_DWORD dwEvent, FX_LPVOID pParam, FX_LPVOID pAdditional)
+void CPDFXFA_Document::WidgetEvent(IXFA_Widget* hWidget, CXFA_WidgetAcc* pWidgetData, FX_DWORD dwEvent, void* pParam, void* pAdditional)
{
if (m_iDocType != DOCTYPE_DYNIMIC_XFA || NULL == hWidget)
return;
@@ -745,7 +745,7 @@ void CPDFXFA_Document::ExportData(IXFA_Doc* hDoc, FX_WSTR wsFilePath, FX_BOOL bX if (fileType == FXFA_SAVEAS_XML)
{
content = "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\r\n";
- fileWrite.WriteBlock((FX_LPCSTR)content, fileWrite.GetSize(), content.GetLength());
+ fileWrite.WriteBlock((const FX_CHAR*)content, fileWrite.GetSize(), content.GetLength());
CFX_WideStringC data(L"data");
if( pXFADocHander->SavePackage(m_pXFADocView->GetDoc(),data, &fileWrite))
{
@@ -755,7 +755,7 @@ void CPDFXFA_Document::ExportData(IXFA_Doc* hDoc, FX_WSTR wsFilePath, FX_BOOL bX /*else if (fileType == FXFA_FILE_STATIC_XDP)
{
content = "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\r\n";
- fileWrite.WriteBlock((FX_LPCSTR)content, fileWrite.GetSize(), content.GetLength());
+ fileWrite.WriteBlock((const FX_CHAR*)content, fileWrite.GetSize(), content.GetLength());
CFX_WideStringC data(L"data");
if( pXFADocHander->SavePackage(m_pXFADocView->GetDoc(), data, &fileWrite))
{
@@ -766,8 +766,8 @@ void CPDFXFA_Document::ExportData(IXFA_Doc* hDoc, FX_WSTR wsFilePath, FX_BOOL bX // wPath.FromUTF16LE(filePath);
CFX_ByteString bPath = wPath.UTF8Encode();
CFX_ByteString szFormat = "\n<pdf href=\"%s\" xmlns=\"http://ns.adobe.com/xdp/pdf/\"/>";
- content.Format(szFormat,(char*)(FX_LPCSTR)bPath);
- fileWrite.WriteBlock((FX_LPCSTR)content,fileWrite.GetSize(), content.GetLength());
+ content.Format(szFormat,(char*)(const FX_CHAR*)bPath);
+ fileWrite.WriteBlock((const FX_CHAR*)content,fileWrite.GetSize(), content.GetLength());
}
*/
else if (fileType == FXFA_SAVEAS_XDP)
@@ -817,11 +817,11 @@ void CPDFXFA_Document::ExportData(IXFA_Doc* hDoc, FX_WSTR wsFilePath, FX_BOOL bX if (i == size-1)
{
//CFX_WideString wPath = pEnv->FFI_GetFilePath(pFileHandler);
- CFX_WideString wPath = CFX_WideString::FromUTF16LE((unsigned short*)(FX_LPCSTR)bs, bs.GetLength()/sizeof(unsigned short));
+ CFX_WideString wPath = CFX_WideString::FromUTF16LE((unsigned short*)(const FX_CHAR*)bs, bs.GetLength()/sizeof(unsigned short));
CFX_ByteString bPath = wPath.UTF8Encode();
CFX_ByteString szFormat = "\n<pdf href=\"%s\" xmlns=\"http://ns.adobe.com/xdp/pdf/\"/>";
- content.Format(szFormat,(char*)(FX_LPCSTR)bPath);
- fileWrite.WriteBlock((FX_LPCSTR)content,fileWrite.GetSize(), content.GetLength());
+ content.Format(szFormat,(char*)(const FX_CHAR*)bPath);
+ fileWrite.WriteBlock((const FX_CHAR*)content,fileWrite.GetSize(), content.GetLength());
}
CPDF_Stream* pStream = (CPDF_Stream*)pDirectObj;
@@ -1085,7 +1085,7 @@ FX_BOOL CPDFXFA_Document::_ExportSubmitFile(FPDF_FILEHANDLER* pFileHandler, int CFX_WideString ws;
ws.FromLocal("data");
CFX_ByteString content = "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\r\n";
- fileStream.WriteBlock((FX_LPCSTR)content,0,content.GetLength());
+ fileStream.WriteBlock((const FX_CHAR*)content,0,content.GetLength());
pDocHandler->SavePackage(m_pXFADoc, ws, &fileStream);
}
else if (fileType == FXFA_SAVEAS_XDP)
diff --git a/fpdfsdk/src/fsdk_actionhandler.cpp b/fpdfsdk/src/fsdk_actionhandler.cpp index 25f39ff8c7..d4276866d3 100644 --- a/fpdfsdk/src/fsdk_actionhandler.cpp +++ b/fpdfsdk/src/fsdk_actionhandler.cpp @@ -599,8 +599,9 @@ void CPDFSDK_ActionHandler::DoAction_URI(CPDFSDK_Document* pDocument, const CPDF CPDFDoc_Environment* pApp = pDocument->GetEnv(); ASSERT(pApp != NULL); + CFX_ByteString sURI = action.GetURI(pDocument->GetDocument()->GetPDFDoc()); - pApp->FFI_DoURIAction(FX_LPCSTR(sURI)); + pApp->FFI_DoURIAction(sURI.c_str()); } void CPDFSDK_ActionHandler::DoAction_Named(CPDFSDK_Document* pDocument, const CPDF_Action& action) diff --git a/fpdfsdk/src/fsdk_baseform.cpp b/fpdfsdk/src/fsdk_baseform.cpp index 5f9df4852b..037339f4ff 100644 --- a/fpdfsdk/src/fsdk_baseform.cpp +++ b/fpdfsdk/src/fsdk_baseform.cpp @@ -986,7 +986,7 @@ void CPDFSDK_Widget::ResetAppearance(FX_BOOL bValueChanged) } } -void CPDFSDK_Widget::ResetAppearance(FX_LPCWSTR sValue, FX_BOOL bValueChanged) +void CPDFSDK_Widget::ResetAppearance(const FX_WCHAR* sValue, FX_BOOL bValueChanged) { SetAppModified(); @@ -1661,7 +1661,7 @@ void CPDFSDK_Widget::ResetAppearance_RadioButton() SetAppState("Off"); } -void CPDFSDK_Widget::ResetAppearance_ComboBox(FX_LPCWSTR sValue) +void CPDFSDK_Widget::ResetAppearance_ComboBox(const FX_WCHAR* sValue) { CPDF_FormControl* pControl = GetFormControl(); ASSERT(pControl != NULL); @@ -1835,7 +1835,7 @@ void CPDFSDK_Widget::ResetAppearance_ListBox() WriteAppearance("N", GetRotatedRect(), GetMatrix(), sAP); } -void CPDFSDK_Widget::ResetAppearance_TextField(FX_LPCWSTR sValue) +void CPDFSDK_Widget::ResetAppearance_TextField(const FX_WCHAR* sValue) { CPDF_FormControl* pControl = GetFormControl(); ASSERT(pControl != NULL); @@ -2810,7 +2810,7 @@ CFX_WideString CPDFSDK_InterForm::OnFormat(CPDF_FormField* pFormField, int nComm return sValue; } -void CPDFSDK_InterForm::ResetFieldAppearance(CPDF_FormField* pFormField, FX_LPCWSTR sValue, FX_BOOL bValueChanged) +void CPDFSDK_InterForm::ResetFieldAppearance(CPDF_FormField* pFormField, const FX_WCHAR* sValue, FX_BOOL bValueChanged) { ASSERT(pFormField != NULL); @@ -3023,7 +3023,7 @@ FX_BOOL CPDFSDK_InterForm::SubmitFields(const CFX_WideString& csDestination, con CFX_ByteTextBuf textBuf; ExportFieldsToFDFTextBuf(fields, bIncludeOrExclude, textBuf); - FX_LPBYTE pBuffer = textBuf.GetBuffer(); + uint8_t* pBuffer = textBuf.GetBuffer(); FX_STRSIZE nBufSize = textBuf.GetLength(); if (bUrlEncoded) @@ -3078,7 +3078,7 @@ FX_BOOL CPDFSDK_InterForm::FDFToURLEncodedData(CFX_WideString csFDFFile, CFX_Wid return TRUE; } -FX_BOOL CPDFSDK_InterForm::FDFToURLEncodedData(FX_LPBYTE& pBuf, FX_STRSIZE& nBufSize) +FX_BOOL CPDFSDK_InterForm::FDFToURLEncodedData(uint8_t*& pBuf, FX_STRSIZE& nBufSize) { CFDF_Document* pFDF = CFDF_Document::ParseMemory(pBuf, nBufSize); if (pFDF) @@ -3178,7 +3178,7 @@ FX_BOOL CPDFSDK_InterForm::SubmitForm(const CFX_WideString& sDestination, FX_BOO delete pFDFDoc; if (!bRet) return FALSE; - FX_LPBYTE pBuffer = FdfBuffer.GetBuffer(); + uint8_t* pBuffer = FdfBuffer.GetBuffer(); FX_STRSIZE nBufSize = FdfBuffer.GetLength(); if (bUrlEncoded) diff --git a/fpdfsdk/src/fsdk_mgr.cpp b/fpdfsdk/src/fsdk_mgr.cpp index dc454ee160..4f457bd86a 100644 --- a/fpdfsdk/src/fsdk_mgr.cpp +++ b/fpdfsdk/src/fsdk_mgr.cpp @@ -614,7 +614,6 @@ CPDFSDK_PageView::CPDFSDK_PageView(CPDFSDK_Document* pSDKDoc,CPDFXFA_Page* page) if (page->GetPDFPage()) pPDFInterForm->FixPageFields(page->GetPDFPage()); } - m_fxAnnotArray.RemoveAll(); m_bEnterWidget = FALSE; @@ -838,7 +837,7 @@ CPDFSDK_Annot* CPDFSDK_PageView::AddAnnot(CPDF_Dictionary * pDict) return NULL; } -CPDFSDK_Annot* CPDFSDK_PageView::AddAnnot(FX_LPCSTR lpSubType,CPDF_Dictionary * pDict) +CPDFSDK_Annot* CPDFSDK_PageView::AddAnnot(const FX_CHAR* lpSubType,CPDF_Dictionary * pDict) { return NULL; } @@ -1211,7 +1210,7 @@ int CPDFSDK_PageView::GetPageIndex() return -1; } -FX_BOOL CPDFSDK_PageView::IsValidAnnot(FX_LPVOID p) +FX_BOOL CPDFSDK_PageView::IsValidAnnot(void* p) { if (p == NULL) return FALSE; int iCount = m_pAnnotList->Count(); diff --git a/fpdfsdk/src/fxedit/fxet_edit.cpp b/fpdfsdk/src/fxedit/fxet_edit.cpp index 9415cefbe3..b45fc69780 100644 --- a/fpdfsdk/src/fxedit/fxet_edit.cpp +++ b/fpdfsdk/src/fxedit/fxet_edit.cpp @@ -1921,7 +1921,7 @@ FX_BOOL CFX_Edit::SetWordProps(EDIT_PROPS_E eProps, const CPVT_WordPlace & place return FALSE; } -void CFX_Edit::SetText(FX_LPCWSTR text,int32_t charset /*= DEFAULT_CHARSET*/, +void CFX_Edit::SetText(const FX_WCHAR* text,int32_t charset /*= DEFAULT_CHARSET*/, const CPVT_SecProps * pSecProps /*= NULL*/,const CPVT_WordProps * pWordProps /*= NULL*/) { SetText(text,charset,pSecProps,pWordProps,TRUE,TRUE); @@ -1952,7 +1952,7 @@ FX_BOOL CFX_Edit::Clear() return Clear(TRUE,TRUE); } -FX_BOOL CFX_Edit::InsertText(FX_LPCWSTR text, int32_t charset /*= DEFAULT_CHARSET*/, +FX_BOOL CFX_Edit::InsertText(const FX_WCHAR* text, int32_t charset /*= DEFAULT_CHARSET*/, const CPVT_SecProps * pSecProps /*= NULL*/,const CPVT_WordProps * pWordProps /*= NULL*/) { return InsertText(text,charset,pSecProps,pWordProps,TRUE,TRUE); @@ -2962,7 +2962,7 @@ void CFX_Edit::OnVK_END(FX_BOOL bShift,FX_BOOL bCtrl) } } -void CFX_Edit::SetText(FX_LPCWSTR text,int32_t charset, +void CFX_Edit::SetText(const FX_WCHAR* text,int32_t charset, const CPVT_SecProps * pSecProps,const CPVT_WordProps * pWordProps, FX_BOOL bAddUndo, FX_BOOL bPaint) { Empty(); @@ -3264,7 +3264,7 @@ FX_BOOL CFX_Edit::Clear(FX_BOOL bAddUndo, FX_BOOL bPaint) return FALSE; } -FX_BOOL CFX_Edit::InsertText(FX_LPCWSTR text, int32_t charset, +FX_BOOL CFX_Edit::InsertText(const FX_WCHAR* text, int32_t charset, const CPVT_SecProps * pSecProps, const CPVT_WordProps * pWordProps, FX_BOOL bAddUndo, FX_BOOL bPaint) { if (IsTextOverflow()) return FALSE; @@ -3510,7 +3510,7 @@ FX_FLOAT CFX_Edit::GetLineBottom(const CPVT_WordPlace& place) const return 0.0f; } -CPVT_WordPlace CFX_Edit::DoInsertText(const CPVT_WordPlace& place, FX_LPCWSTR text, int32_t charset, +CPVT_WordPlace CFX_Edit::DoInsertText(const CPVT_WordPlace& place, const FX_WCHAR* text, int32_t charset, const CPVT_SecProps * pSecProps, const CPVT_WordProps * pWordProps) { CPVT_WordPlace wp = place; diff --git a/fpdfsdk/src/fxedit/fxet_list.cpp b/fpdfsdk/src/fxedit/fxet_list.cpp index 03b23020b4..6d48b30269 100644 --- a/fpdfsdk/src/fxedit/fxet_list.cpp +++ b/fpdfsdk/src/fxedit/fxet_list.cpp @@ -76,7 +76,7 @@ void CFX_ListItem::SetCaret(FX_BOOL bCaret) m_bCaret = bCaret; } -void CFX_ListItem::SetText(FX_LPCWSTR text) +void CFX_ListItem::SetText(const FX_WCHAR* text) { if (m_pEdit) m_pEdit->SetText(text); @@ -146,7 +146,7 @@ void CFX_List::SetFontSize(FX_FLOAT fFontSize) m_fFontSize = fFontSize; } -void CFX_List::AddItem(FX_LPCWSTR str) +void CFX_List::AddItem(const FX_WCHAR* str) { if (CFX_ListItem * pListItem = new CFX_ListItem()) { @@ -733,7 +733,7 @@ CPDF_Rect CFX_ListCtrl::GetItemRect(int32_t nIndex) const return InToOut(CFX_List::GetItemRect(nIndex)); } -void CFX_ListCtrl::AddString(FX_LPCWSTR string) +void CFX_ListCtrl::AddString(const FX_WCHAR* string) { AddItem(string); ReArrange(GetCount() - 1); diff --git a/fpdfsdk/src/javascript/Consts.cpp b/fpdfsdk/src/javascript/Consts.cpp index 1b1c8babcb..cea9f9a4c9 100644 --- a/fpdfsdk/src/javascript/Consts.cpp +++ b/fpdfsdk/src/javascript/Consts.cpp @@ -151,14 +151,14 @@ int CJS_GlobalConsts::Init(IJS_Runtime* pRuntime) int CJS_GlobalArrays::Init(IJS_Runtime* pRuntime) { { - FX_LPCWSTR ArrayName = L"RE_NUMBER_ENTRY_DOT_SEP"; - FX_LPCWSTR ArrayContent[] = {L"[+-]?\\d*\\.?\\d*"}; + const FX_WCHAR* ArrayName = L"RE_NUMBER_ENTRY_DOT_SEP"; + const FX_WCHAR* ArrayContent[] = {L"[+-]?\\d*\\.?\\d*"}; DEFINE_GLOBAL_ARRAY(pRuntime); } { - FX_LPCWSTR ArrayName = L"RE_NUMBER_COMMIT_DOT_SEP"; - FX_LPCWSTR ArrayContent[] = { L"[+-]?\\d+(\\.\\d+)?", /* -1.0 or -1 */ + const FX_WCHAR* ArrayName = L"RE_NUMBER_COMMIT_DOT_SEP"; + const FX_WCHAR* ArrayContent[] = { L"[+-]?\\d+(\\.\\d+)?", /* -1.0 or -1 */ L"[+-]?\\.\\d+", /* -.1 */ L"[+-]?\\d+\\." /* -1. */ }; @@ -166,15 +166,15 @@ int CJS_GlobalArrays::Init(IJS_Runtime* pRuntime) } { - FX_LPCWSTR ArrayName = L"RE_NUMBER_ENTRY_COMMA_SEP"; - FX_LPCWSTR ArrayContent[] = {L"[+-]?\\d*,?\\d*"}; + const FX_WCHAR* ArrayName = L"RE_NUMBER_ENTRY_COMMA_SEP"; + const FX_WCHAR* ArrayContent[] = {L"[+-]?\\d*,?\\d*"}; DEFINE_GLOBAL_ARRAY(pRuntime); } { - FX_LPCWSTR ArrayName = L"RE_NUMBER_COMMIT_COMMA_SEP"; - FX_LPCWSTR ArrayContent[] = { L"[+-]?\\d+([.,]\\d+)?", /* -1,0 or -1 */ + const FX_WCHAR* ArrayName = L"RE_NUMBER_COMMIT_COMMA_SEP"; + const FX_WCHAR* ArrayContent[] = { L"[+-]?\\d+([.,]\\d+)?", /* -1,0 or -1 */ L"[+-]?[.,]\\d+", /* -,1 */ L"[+-]?\\d+[.,]" /* -1, */ }; @@ -182,32 +182,32 @@ int CJS_GlobalArrays::Init(IJS_Runtime* pRuntime) } { - FX_LPCWSTR ArrayName = L"RE_ZIP_ENTRY"; - FX_LPCWSTR ArrayContent[] = {L"\\d{0,5}"}; + const FX_WCHAR* ArrayName = L"RE_ZIP_ENTRY"; + const FX_WCHAR* ArrayContent[] = {L"\\d{0,5}"}; DEFINE_GLOBAL_ARRAY(pRuntime); } { - FX_LPCWSTR ArrayName = L"RE_ZIP_COMMIT"; - FX_LPCWSTR ArrayContent[] = {L"\\d{5}"}; + const FX_WCHAR* ArrayName = L"RE_ZIP_COMMIT"; + const FX_WCHAR* ArrayContent[] = {L"\\d{5}"}; DEFINE_GLOBAL_ARRAY(pRuntime); } { - FX_LPCWSTR ArrayName = L"RE_ZIP4_ENTRY"; - FX_LPCWSTR ArrayContent[] = {L"\\d{0,5}(\\.|[- ])?\\d{0,4}"}; + const FX_WCHAR* ArrayName = L"RE_ZIP4_ENTRY"; + const FX_WCHAR* ArrayContent[] = {L"\\d{0,5}(\\.|[- ])?\\d{0,4}"}; DEFINE_GLOBAL_ARRAY(pRuntime); } { - FX_LPCWSTR ArrayName = L"RE_ZIP4_COMMIT"; - FX_LPCWSTR ArrayContent[] = {L"\\d{5}(\\.|[- ])?\\d{4}"}; + const FX_WCHAR* ArrayName = L"RE_ZIP4_COMMIT"; + const FX_WCHAR* ArrayContent[] = {L"\\d{5}(\\.|[- ])?\\d{4}"}; DEFINE_GLOBAL_ARRAY(pRuntime); } { - FX_LPCWSTR ArrayName = L"RE_PHONE_ENTRY"; - FX_LPCWSTR ArrayContent[] = { + const FX_WCHAR* ArrayName = L"RE_PHONE_ENTRY"; + const FX_WCHAR* ArrayContent[] = { L"\\d{0,3}(\\.|[- ])?\\d{0,3}(\\.|[- ])?\\d{0,4}", /* 555-1234 or 408 555-1234 */ L"\\(\\d{0,3}", /* (408 */ L"\\(\\d{0,3}\\)(\\.|[- ])?\\d{0,3}(\\.|[- ])?\\d{0,4}", /* (408) 555-1234 */ @@ -220,8 +220,8 @@ int CJS_GlobalArrays::Init(IJS_Runtime* pRuntime) } { - FX_LPCWSTR ArrayName = L"RE_PHONE_COMMIT"; - FX_LPCWSTR ArrayContent[] = { + const FX_WCHAR* ArrayName = L"RE_PHONE_COMMIT"; + const FX_WCHAR* ArrayContent[] = { L"\\d{3}(\\.|[- ])?\\d{4}", /* 555-1234 */ L"\\d{3}(\\.|[- ])?\\d{3}(\\.|[- ])?\\d{4}", /* 408 555-1234 */ L"\\(\\d{3}\\)(\\.|[- ])?\\d{3}(\\.|[- ])?\\d{4}", /* (408) 555-1234 */ @@ -231,14 +231,14 @@ int CJS_GlobalArrays::Init(IJS_Runtime* pRuntime) } { - FX_LPCWSTR ArrayName = L"RE_SSN_ENTRY"; - FX_LPCWSTR ArrayContent[] = {L"\\d{0,3}(\\.|[- ])?\\d{0,2}(\\.|[- ])?\\d{0,4}"}; + const FX_WCHAR* ArrayName = L"RE_SSN_ENTRY"; + const FX_WCHAR* ArrayContent[] = {L"\\d{0,3}(\\.|[- ])?\\d{0,2}(\\.|[- ])?\\d{0,4}"}; DEFINE_GLOBAL_ARRAY(pRuntime); } { - FX_LPCWSTR ArrayName = L"RE_SSN_COMMIT"; - FX_LPCWSTR ArrayContent[] = {L"\\d{3}(\\.|[- ])?\\d{2}(\\.|[- ])?\\d{4}"}; + const FX_WCHAR* ArrayName = L"RE_SSN_COMMIT"; + const FX_WCHAR* ArrayContent[] = {L"\\d{3}(\\.|[- ])?\\d{2}(\\.|[- ])?\\d{4}"}; DEFINE_GLOBAL_ARRAY(pRuntime); } diff --git a/fpdfsdk/src/javascript/JS_EventHandler.cpp b/fpdfsdk/src/javascript/JS_EventHandler.cpp index cf59ed9c86..fe4f6b2d4c 100644 --- a/fpdfsdk/src/javascript/JS_EventHandler.cpp +++ b/fpdfsdk/src/javascript/JS_EventHandler.cpp @@ -461,7 +461,7 @@ FX_BOOL CJS_EventHandler::Modifier() return m_bModifier; } -FX_LPCWSTR CJS_EventHandler::Name() +const FX_WCHAR* CJS_EventHandler::Name() { switch (m_eEventType) { @@ -509,7 +509,7 @@ FX_LPCWSTR CJS_EventHandler::Name() return L""; } -FX_LPCWSTR CJS_EventHandler::Type() +const FX_WCHAR* CJS_EventHandler::Type() { switch (m_eEventType) { diff --git a/fpdfsdk/src/javascript/JS_GlobalData.cpp b/fpdfsdk/src/javascript/JS_GlobalData.cpp index c4166762ee..0fa2189453 100644 --- a/fpdfsdk/src/javascript/JS_GlobalData.cpp +++ b/fpdfsdk/src/javascript/JS_GlobalData.cpp @@ -138,7 +138,7 @@ CJS_GlobalData::~CJS_GlobalData() m_arrayGlobalData.RemoveAll(); } -int CJS_GlobalData::FindGlobalVariable(FX_LPCSTR propname) +int CJS_GlobalData::FindGlobalVariable(const FX_CHAR* propname) { ASSERT(propname != NULL); @@ -157,7 +157,7 @@ int CJS_GlobalData::FindGlobalVariable(FX_LPCSTR propname) return nRet; } -CJS_GlobalData_Element* CJS_GlobalData::GetGlobalVariable(FX_LPCSTR propname) +CJS_GlobalData_Element* CJS_GlobalData::GetGlobalVariable(const FX_CHAR* propname) { ASSERT(propname != NULL); @@ -169,7 +169,7 @@ CJS_GlobalData_Element* CJS_GlobalData::GetGlobalVariable(FX_LPCSTR propname) return NULL; } -void CJS_GlobalData::SetGlobalVariableNumber(FX_LPCSTR propname, double dData) +void CJS_GlobalData::SetGlobalVariableNumber(const FX_CHAR* propname, double dData) { ASSERT(propname != NULL); CFX_ByteString sPropName = propname; @@ -195,7 +195,7 @@ void CJS_GlobalData::SetGlobalVariableNumber(FX_LPCSTR propname, double dData) } } -void CJS_GlobalData::SetGlobalVariableBoolean(FX_LPCSTR propname, bool bData) +void CJS_GlobalData::SetGlobalVariableBoolean(const FX_CHAR* propname, bool bData) { ASSERT(propname != NULL); CFX_ByteString sPropName = propname; @@ -221,7 +221,7 @@ void CJS_GlobalData::SetGlobalVariableBoolean(FX_LPCSTR propname, bool bData) } } -void CJS_GlobalData::SetGlobalVariableString(FX_LPCSTR propname, const CFX_ByteString& sData) +void CJS_GlobalData::SetGlobalVariableString(const FX_CHAR* propname, const CFX_ByteString& sData) { ASSERT(propname != NULL); CFX_ByteString sPropName = propname; @@ -247,7 +247,7 @@ void CJS_GlobalData::SetGlobalVariableString(FX_LPCSTR propname, const CFX_ByteS } } -void CJS_GlobalData::SetGlobalVariableObject(FX_LPCSTR propname, const CJS_GlobalVariableArray& array) +void CJS_GlobalData::SetGlobalVariableObject(const FX_CHAR* propname, const CJS_GlobalVariableArray& array) { ASSERT(propname != NULL); CFX_ByteString sPropName = propname; @@ -273,7 +273,7 @@ void CJS_GlobalData::SetGlobalVariableObject(FX_LPCSTR propname, const CJS_Globa } } -void CJS_GlobalData::SetGlobalVariableNull(FX_LPCSTR propname) +void CJS_GlobalData::SetGlobalVariableNull(const FX_CHAR* propname) { ASSERT(propname != NULL); CFX_ByteString sPropName = propname; @@ -297,7 +297,7 @@ void CJS_GlobalData::SetGlobalVariableNull(FX_LPCSTR propname) } } -FX_BOOL CJS_GlobalData::SetGlobalVariablePersistent(FX_LPCSTR propname, FX_BOOL bPersistent) +FX_BOOL CJS_GlobalData::SetGlobalVariablePersistent(const FX_CHAR* propname, FX_BOOL bPersistent) { ASSERT(propname != NULL); CFX_ByteString sPropName = propname; @@ -316,7 +316,7 @@ FX_BOOL CJS_GlobalData::SetGlobalVariablePersistent(FX_LPCSTR propname, FX_BOOL return FALSE; } -FX_BOOL CJS_GlobalData::DeleteGlobalVariable(FX_LPCSTR propname) +FX_BOOL CJS_GlobalData::DeleteGlobalVariable(const FX_CHAR* propname) { ASSERT(propname != NULL); CFX_ByteString sPropName = propname; @@ -350,7 +350,7 @@ CJS_GlobalData_Element* CJS_GlobalData::GetAt(int index) const void CJS_GlobalData::LoadGlobalPersistentVariables() { - FX_LPBYTE pBuffer = NULL; + uint8_t* pBuffer = NULL; int32_t nLength = 0; LoadFileBuffer(m_sFilePath.c_str(), pBuffer, nLength); @@ -358,7 +358,7 @@ void CJS_GlobalData::LoadGlobalPersistentVariables() if (pBuffer) { - FX_LPBYTE p = pBuffer; + uint8_t* p = pBuffer; FX_WORD wType = *((FX_WORD*)p); p += sizeof(FX_WORD); @@ -508,15 +508,15 @@ void CJS_GlobalData::SaveGlobalPersisitentVariables() sFile.AppendBlock(sData.GetBuffer(), sData.GetSize()); CRYPT_ArcFourCryptBlock(sFile.GetBuffer(), sFile.GetSize(), JS_RC4KEY, sizeof(JS_RC4KEY)); - WriteFileBuffer(m_sFilePath.c_str(), (FX_LPCSTR)sFile.GetBuffer(), sFile.GetSize()); + WriteFileBuffer(m_sFilePath.c_str(), (const FX_CHAR*)sFile.GetBuffer(), sFile.GetSize()); } -void CJS_GlobalData::LoadFileBuffer(FX_LPCWSTR sFilePath, FX_LPBYTE& pBuffer, int32_t& nLength) +void CJS_GlobalData::LoadFileBuffer(const FX_WCHAR* sFilePath, uint8_t*& pBuffer, int32_t& nLength) { //UnSupport. } -void CJS_GlobalData::WriteFileBuffer(FX_LPCWSTR sFilePath, FX_LPCSTR pBuffer, int32_t nLength) +void CJS_GlobalData::WriteFileBuffer(const FX_WCHAR* sFilePath, const FX_CHAR* pBuffer, int32_t nLength) { //UnSupport. } diff --git a/fpdfsdk/src/javascript/JS_Object.cpp b/fpdfsdk/src/javascript/JS_Object.cpp index 96c5307e63..9f2d0f8258 100644 --- a/fpdfsdk/src/javascript/JS_Object.cpp +++ b/fpdfsdk/src/javascript/JS_Object.cpp @@ -19,7 +19,7 @@ JS_TIMER_MAPARRAY& GetTimeMap() return *timeMap; } -int FXJS_MsgBox(CPDFDoc_Environment* pApp, CPDFSDK_PageView* pPageView, FX_LPCWSTR swMsg, FX_LPCWSTR swTitle, FX_UINT nType, FX_UINT nIcon) +int FXJS_MsgBox(CPDFDoc_Environment* pApp, CPDFSDK_PageView* pPageView, const FX_WCHAR* swMsg, const FX_WCHAR* swTitle, FX_UINT nType, FX_UINT nIcon) { int nRet = 0; @@ -62,12 +62,12 @@ CPDFSDK_PageView* CJS_EmbedObj::JSGetPageView(IFXJS_Context* cc) return FXJS_GetPageView(cc); } -int CJS_EmbedObj::MsgBox(CPDFDoc_Environment* pApp, CPDFSDK_PageView* pPageView,FX_LPCWSTR swMsg,FX_LPCWSTR swTitle,FX_UINT nType,FX_UINT nIcon) +int CJS_EmbedObj::MsgBox(CPDFDoc_Environment* pApp, CPDFSDK_PageView* pPageView,const FX_WCHAR* swMsg,const FX_WCHAR* swTitle,FX_UINT nType,FX_UINT nIcon) { return FXJS_MsgBox(pApp, pPageView, swMsg, swTitle, nType, nIcon); } -void CJS_EmbedObj::Alert(CJS_Context* pContext, FX_LPCWSTR swMsg) +void CJS_EmbedObj::Alert(CJS_Context* pContext, const FX_WCHAR* swMsg) { CJS_Object::Alert(pContext, swMsg); } @@ -134,12 +134,12 @@ CPDFSDK_PageView* CJS_Object::JSGetPageView(IFXJS_Context* cc) return FXJS_GetPageView(cc); } -int CJS_Object::MsgBox(CPDFDoc_Environment* pApp, CPDFSDK_PageView* pPageView, FX_LPCWSTR swMsg, FX_LPCWSTR swTitle, FX_UINT nType, FX_UINT nIcon) +int CJS_Object::MsgBox(CPDFDoc_Environment* pApp, CPDFSDK_PageView* pPageView, const FX_WCHAR* swMsg, const FX_WCHAR* swTitle, FX_UINT nType, FX_UINT nIcon) { return FXJS_MsgBox(pApp, pPageView, swMsg, swTitle, nType, nIcon); } -void CJS_Object::Alert(CJS_Context* pContext, FX_LPCWSTR swMsg) +void CJS_Object::Alert(CJS_Context* pContext, const FX_WCHAR* swMsg) { ASSERT(pContext != NULL); diff --git a/fpdfsdk/src/javascript/JS_Runtime.cpp b/fpdfsdk/src/javascript/JS_Runtime.cpp index 9450a6400a..e3e38bcf3d 100644 --- a/fpdfsdk/src/javascript/JS_Runtime.cpp +++ b/fpdfsdk/src/javascript/JS_Runtime.cpp @@ -361,7 +361,7 @@ CFX_WideString ChangeObjName(const CFX_WideString& str) } FX_BOOL CJS_Runtime::GetHValueByName(FX_BSTR utf8Name, FXJSE_HVALUE hValue) { - FX_LPCSTR name = utf8Name.GetCStr(); + const FX_CHAR* name = utf8Name.GetCStr(); v8::Locker lock(GetIsolate()); v8::Isolate::Scope isolate_scope(GetIsolate()); @@ -386,7 +386,7 @@ FX_BOOL CJS_Runtime::SetHValueByName(FX_BSTR utf8Name, FXJSE_HVALUE hValue) { if (utf8Name.IsEmpty() || hValue == NULL) return FALSE; - FX_LPCSTR name = utf8Name.GetCStr(); + const FX_CHAR* name = utf8Name.GetCStr(); v8::Isolate* pIsolate = GetIsolate(); v8::Locker lock(pIsolate); v8::Isolate::Scope isolate_scope(pIsolate); diff --git a/fpdfsdk/src/javascript/JS_Value.cpp b/fpdfsdk/src/javascript/JS_Value.cpp index 0943802508..5bca831710 100644 --- a/fpdfsdk/src/javascript/JS_Value.cpp +++ b/fpdfsdk/src/javascript/JS_Value.cpp @@ -57,12 +57,12 @@ CJS_Value::CJS_Value(v8::Isolate* isolate, CJS_Document* pJsDoc):m_isolate(isola m_pValue = (JSFXObject)*pJsDoc; } -CJS_Value::CJS_Value(v8::Isolate* isolate, FX_LPCWSTR pWstr):m_isolate(isolate) +CJS_Value::CJS_Value(v8::Isolate* isolate, const FX_WCHAR* pWstr):m_isolate(isolate) { operator =(pWstr); } -CJS_Value::CJS_Value(v8::Isolate* isolate, FX_LPCSTR pStr):m_isolate(isolate) +CJS_Value::CJS_Value(v8::Isolate* isolate, const FX_CHAR* pStr):m_isolate(isolate) { operator = (pStr); } @@ -200,7 +200,7 @@ void CJS_Value::operator = (CJS_Document* pJsDoc) } } -void CJS_Value::operator =(FX_LPCWSTR pWstr) +void CJS_Value::operator =(const FX_WCHAR* pWstr) { m_pValue = JS_NewString(m_isolate,(wchar_t *)pWstr); @@ -214,7 +214,7 @@ void CJS_Value::SetNull() m_eType = VT_null; } -void CJS_Value::operator = (FX_LPCSTR pStr) +void CJS_Value::operator = (const FX_CHAR* pStr) { operator = (CFX_WideString::FromLocal(pStr).c_str()); } @@ -419,7 +419,7 @@ void CJS_PropValue::operator >>(CFX_ByteString &string) const string = CJS_Value::ToCFXByteString(); } -void CJS_PropValue::operator <<(FX_LPCWSTR c_string) +void CJS_PropValue::operator <<(const FX_WCHAR* c_string) { ASSERT(!m_bIsSetting); CJS_Value::operator =(c_string); diff --git a/fpdfsdk/src/javascript/PublicMethods.cpp b/fpdfsdk/src/javascript/PublicMethods.cpp index 539d7c780a..c3fb8c3b2e 100644 --- a/fpdfsdk/src/javascript/PublicMethods.cpp +++ b/fpdfsdk/src/javascript/PublicMethods.cpp @@ -64,8 +64,8 @@ IMPLEMENT_JS_STATIC_GLOBAL_FUN(CJS_PublicMethods) struct stru_TbConvert { - FX_LPCSTR lpszJSMark; - FX_LPCSTR lpszCppMark; + const FX_CHAR* lpszJSMark; + const FX_CHAR* lpszCppMark; }; static const stru_TbConvert fcTable[] = { @@ -91,21 +91,21 @@ static const stru_TbConvert fcTable[] = { //"t" }; -static FX_LPCWSTR months[] = +static const FX_WCHAR* months[] = { L"Jan", L"Feb", L"Mar", L"Apr", L"May", L"Jun", L"Jul", L"Aug", L"Sep", L"Oct", L"Nov", L"Dec" }; -static FX_LPCWSTR fullmonths[] = -{ - L"January", L"February", L"March", L"April", L"May", L"June", L"July", L"August", L"September", L"October", L"November", L"December" +static const FX_WCHAR* const fullmonths[] = +{ + L"January", L"February", L"March", L"April", L"May", L"June", L"July", L"August", L"September", L"October", L"November", L"December" }; -FX_BOOL CJS_PublicMethods::IsNumber(FX_LPCWSTR string) +FX_BOOL CJS_PublicMethods::IsNumber(const FX_WCHAR* string) { CFX_WideString sTrim = StrTrim(string); - FX_LPCWSTR pTrim = sTrim.c_str(); - FX_LPCWSTR p = pTrim; + const FX_WCHAR* pTrim = sTrim.c_str(); + const FX_WCHAR* p = pTrim; FX_BOOL bDot = FALSE; @@ -191,7 +191,7 @@ FX_BOOL CJS_PublicMethods::isReservedMaskChar(wchar_t ch) return ch == L'9' || ch == L'A' || ch == L'O' || ch == L'X'; } -double CJS_PublicMethods::AF_Simple(FX_LPCWSTR sFuction, double dValue1, double dValue2) +double CJS_PublicMethods::AF_Simple(const FX_WCHAR* sFuction, double dValue1, double dValue2) { if (FXSYS_wcsicmp(sFuction,L"AVG") == 0 || FXSYS_wcsicmp(sFuction,L"SUM") == 0) { @@ -213,49 +213,49 @@ double CJS_PublicMethods::AF_Simple(FX_LPCWSTR sFuction, double dValue1, double return dValue1; } -CFX_WideString CJS_PublicMethods::StrLTrim(FX_LPCWSTR pStr) +CFX_WideString CJS_PublicMethods::StrLTrim(const FX_WCHAR* pStr) { while (*pStr && *pStr == L' ') pStr++; return pStr; } -CFX_WideString CJS_PublicMethods::StrRTrim(FX_LPCWSTR pStr) +CFX_WideString CJS_PublicMethods::StrRTrim(const FX_WCHAR* pStr) { - FX_LPCWSTR p = pStr; + const FX_WCHAR* p = pStr; while (*p) p++; while (p > pStr && *(p - 1) == L' ') p--; return CFX_WideString(pStr, p - pStr); } -CFX_WideString CJS_PublicMethods::StrTrim(FX_LPCWSTR pStr) +CFX_WideString CJS_PublicMethods::StrTrim(const FX_WCHAR* pStr) { return StrRTrim(StrLTrim(pStr).c_str()); } -CFX_ByteString CJS_PublicMethods::StrLTrim(FX_LPCSTR pStr) +CFX_ByteString CJS_PublicMethods::StrLTrim(const FX_CHAR* pStr) { while (*pStr && *pStr == ' ') pStr++; return pStr; } -CFX_ByteString CJS_PublicMethods::StrRTrim(FX_LPCSTR pStr) +CFX_ByteString CJS_PublicMethods::StrRTrim(const FX_CHAR* pStr) { - FX_LPCSTR p = pStr; + const FX_CHAR* p = pStr; while (*p) p++; while (p > pStr && *(p - 1) == L' ') p--; return CFX_ByteString(pStr,p-pStr); } -CFX_ByteString CJS_PublicMethods::StrTrim(FX_LPCSTR pStr) +CFX_ByteString CJS_PublicMethods::StrTrim(const FX_CHAR* pStr) { return StrRTrim(StrLTrim(pStr)); } -double CJS_PublicMethods::ParseNumber(FX_LPCWSTR swSource, FX_BOOL& bAllDigits, FX_BOOL& bDot, FX_BOOL& bSign, FX_BOOL& bKXJS) +double CJS_PublicMethods::ParseNumber(const FX_WCHAR* swSource, FX_BOOL& bAllDigits, FX_BOOL& bDot, FX_BOOL& bSign, FX_BOOL& bKXJS) { bDot = FALSE; bSign = FALSE; @@ -263,11 +263,11 @@ double CJS_PublicMethods::ParseNumber(FX_LPCWSTR swSource, FX_BOOL& bAllDigits, FX_BOOL bDigitExist = FALSE; - FX_LPCWSTR p = swSource; + const FX_WCHAR* p = swSource; wchar_t c; - FX_LPCWSTR pStart = NULL; - FX_LPCWSTR pEnd = NULL; + const FX_WCHAR* pStart = NULL; + const FX_WCHAR* pEnd = NULL; while ((c = *p)) { @@ -401,7 +401,7 @@ double CJS_PublicMethods::ParseNumber(FX_LPCWSTR swSource, FX_BOOL& bAllDigits, return dRet; } -double CJS_PublicMethods::ParseStringToNumber(FX_LPCWSTR swSource) +double CJS_PublicMethods::ParseStringToNumber(const FX_WCHAR* swSource) { FX_BOOL bAllDigits = FALSE; FX_BOOL bDot = FALSE; @@ -411,7 +411,7 @@ double CJS_PublicMethods::ParseStringToNumber(FX_LPCWSTR swSource) return ParseNumber(swSource, bAllDigits, bDot, bSign, bKXJS); } -FX_BOOL CJS_PublicMethods::ConvertStringToNumber(FX_LPCWSTR swSource, double & dRet, FX_BOOL & bDot) +FX_BOOL CJS_PublicMethods::ConvertStringToNumber(const FX_WCHAR* swSource, double & dRet, FX_BOOL & bDot) { FX_BOOL bAllDigits = FALSE; FX_BOOL bSign = FALSE; @@ -1662,7 +1662,7 @@ FX_BOOL CJS_PublicMethods::AFDate_Format(IFXJS_Context* cc, const CJS_Parameters } int iIndex = params[0].ToInt(); - FX_LPCWSTR cFormats[] = {L"m/d", L"m/d/yy", L"mm/dd/yy", L"mm/yy", L"d-mmm", L"d-mmm-yy", L"dd-mmm-yy", + const FX_WCHAR* cFormats[] = {L"m/d", L"m/d/yy", L"mm/dd/yy", L"mm/yy", L"d-mmm", L"d-mmm-yy", L"dd-mmm-yy", L"yy-mm-dd", L"mmm-yy", L"mmmm-yy", L"mmm d, yyyy", L"mmmm d, yyyy", L"m/d/yy h:MM tt", L"m/d/yy HH:MM" }; @@ -1693,7 +1693,7 @@ FX_BOOL CJS_PublicMethods::AFDate_Keystroke(IFXJS_Context* cc, const CJS_Paramet } int iIndex = params[0].ToInt(); - FX_LPCWSTR cFormats[] = {L"m/d", L"m/d/yy", L"mm/dd/yy", L"mm/yy", L"d-mmm", L"d-mmm-yy", L"dd-mmm-yy", + const FX_WCHAR* cFormats[] = {L"m/d", L"m/d/yy", L"mm/dd/yy", L"mm/yy", L"d-mmm", L"d-mmm-yy", L"dd-mmm-yy", L"yy-mm-dd", L"mmm-yy", L"mmmm-yy", L"mmm d, yyyy", L"mmmm d, yyyy", L"m/d/yy h:MM tt", L"m/d/yy HH:MM" }; @@ -1723,7 +1723,7 @@ FX_BOOL CJS_PublicMethods::AFTime_Format(IFXJS_Context* cc, const CJS_Parameters } int iIndex = params[0].ToInt(); - FX_LPCWSTR cFormats[] = {L"HH:MM", L"h:MM tt", L"HH:MM:ss", L"h:MM:ss tt"}; + const FX_WCHAR* cFormats[] = {L"HH:MM", L"h:MM tt", L"HH:MM:ss", L"h:MM:ss tt"}; ASSERT(iIndex<FX_ArraySize(cFormats)); @@ -1749,7 +1749,7 @@ FX_BOOL CJS_PublicMethods::AFTime_Keystroke(IFXJS_Context* cc, const CJS_Paramet } int iIndex = params[0].ToInt(); - FX_LPCWSTR cFormats[] = {L"HH:MM", L"h:MM tt", L"HH:MM:ss", L"h:MM:ss tt"}; + const FX_WCHAR* cFormats[] = {L"HH:MM", L"h:MM tt", L"HH:MM:ss", L"h:MM:ss tt"}; ASSERT(iIndex<FX_ArraySize(cFormats)); diff --git a/fpdfsdk/src/javascript/global.cpp b/fpdfsdk/src/javascript/global.cpp index f139380b20..06e147eb15 100644 --- a/fpdfsdk/src/javascript/global.cpp +++ b/fpdfsdk/src/javascript/global.cpp @@ -134,17 +134,17 @@ void global_alternate::Initial(CPDFDoc_Environment* pApp) UpdateGlobalPersistentVariables(); } -FX_BOOL global_alternate::QueryProperty(FX_LPCWSTR propname) +FX_BOOL global_alternate::QueryProperty(const FX_WCHAR* propname) { return CFX_WideString(propname) != L"setPersistent"; } -FX_BOOL global_alternate::DelProperty(IFXJS_Context* cc, FX_LPCWSTR propname, CFX_WideString& sError) +FX_BOOL global_alternate::DelProperty(IFXJS_Context* cc, const FX_WCHAR* propname, CFX_WideString& sError) { js_global_data* pData = NULL; CFX_ByteString sPropName = CFX_ByteString::FromUnicode(propname); - if (m_mapGlobal.Lookup(sPropName, (FX_LPVOID&)pData)) + if (m_mapGlobal.Lookup(sPropName, (void*&)pData)) { pData->bDeleted = TRUE; return TRUE; @@ -153,7 +153,7 @@ FX_BOOL global_alternate::DelProperty(IFXJS_Context* cc, FX_LPCWSTR propname, CF return FALSE; } -FX_BOOL global_alternate::DoProperty(IFXJS_Context* cc, FX_LPCWSTR propname, CJS_PropValue& vp, CFX_WideString& sError) +FX_BOOL global_alternate::DoProperty(IFXJS_Context* cc, const FX_WCHAR* propname, CJS_PropValue& vp, CFX_WideString& sError) { if (vp.IsSetting()) { @@ -202,7 +202,7 @@ FX_BOOL global_alternate::DoProperty(IFXJS_Context* cc, FX_LPCWSTR propname, CJS js_global_data* pData = NULL; CFX_ByteString sPropName = CFX_ByteString::FromUnicode(propname); - if (m_mapGlobal.Lookup(sPropName, (FX_LPVOID&)pData)) + if (m_mapGlobal.Lookup(sPropName, (void*&)pData)) { if (pData) { @@ -266,7 +266,7 @@ FX_BOOL global_alternate::setPersistent(IFXJS_Context* cc, const CJS_Parameters& CFX_ByteString sName = params[0].ToCFXByteString(); js_global_data* pData = NULL; - if (m_mapGlobal.Lookup(sName, (FX_LPVOID&)pData)) + if (m_mapGlobal.Lookup(sName, (void*&)pData)) { if (pData && !pData->bDeleted) { @@ -337,7 +337,7 @@ void global_alternate::CommitGlobalPersisitentVariables() { CFX_ByteString name; js_global_data* pData = NULL; - m_mapGlobal.GetNextAssoc(pos, name, (FX_LPVOID&)pData); + m_mapGlobal.GetNextAssoc(pos, name, (void*&)pData); if (pData) { @@ -491,7 +491,7 @@ void global_alternate::DestroyGlobalPersisitentVariables() { CFX_ByteString name; js_global_data* pData = NULL; - m_mapGlobal.GetNextAssoc(pos, name, (FX_LPVOID&)pData); + m_mapGlobal.GetNextAssoc(pos, name, (void*&)pData); delete pData; } @@ -499,13 +499,13 @@ void global_alternate::DestroyGlobalPersisitentVariables() } -FX_BOOL global_alternate::SetGlobalVariables(FX_LPCSTR propname, int nType, +FX_BOOL global_alternate::SetGlobalVariables(const FX_CHAR* propname, int nType, double dData, bool bData, const CFX_ByteString& sData, JSObject pData, bool bDefaultPersistent) { if (propname == NULL) return FALSE; js_global_data* pTemp = NULL; - m_mapGlobal.Lookup(propname, (FX_LPVOID&)pTemp); + m_mapGlobal.Lookup(propname, (void*&)pTemp); if (pTemp) { @@ -597,7 +597,7 @@ FX_BOOL global_alternate::SetGlobalVariables(FX_LPCSTR propname, int nType, return FALSE; } - m_mapGlobal.SetAt(propname, (FX_LPVOID)pNewData); + m_mapGlobal.SetAt(propname, (void*)pNewData); return TRUE; } diff --git a/fpdfsdk/src/javascript/util.cpp b/fpdfsdk/src/javascript/util.cpp index e051cda66e..97bddec5c1 100644 --- a/fpdfsdk/src/javascript/util.cpp +++ b/fpdfsdk/src/javascript/util.cpp @@ -58,8 +58,8 @@ util::~util(void) struct stru_TbConvert { - FX_LPCWSTR lpszJSMark; - FX_LPCWSTR lpszCppMark; + const FX_WCHAR* lpszJSMark; + const FX_WCHAR* lpszCppMark; }; const stru_TbConvert fcTable[] = { @@ -315,7 +315,7 @@ FX_BOOL util::printd(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& struct stru_TbConvertAd { - FX_LPCWSTR lpszJSMark; + const FX_WCHAR* lpszJSMark; int iValue; }; @@ -411,7 +411,7 @@ void util::printd(const std::wstring &cFormat2, CJS_Date jsDate, bool bXFAPictur struct stru_TbConvertAd { - FX_LPCWSTR lpszJSMark; + const FX_WCHAR* lpszJSMark; int iValue; }; diff --git a/fpdfsdk/src/jsapi/fxjs_v8.cpp b/fpdfsdk/src/jsapi/fxjs_v8.cpp index c03c84b7a7..3ab27e2d4a 100644 --- a/fpdfsdk/src/jsapi/fxjs_v8.cpp +++ b/fpdfsdk/src/jsapi/fxjs_v8.cpp @@ -33,7 +33,7 @@ class CJS_PrivateData public: CJS_PrivateData():ObjDefID(-1), pPrivate(NULL) {} int ObjDefID; - FX_LPVOID pPrivate; + void* pPrivate; }; @@ -105,7 +105,7 @@ int JS_DefineObjMethod(IJS_Runtime* pJSRuntime, int nObjDefnID, const wchar_t* s if(nObjDefnID<0 || nObjDefnID>= pArray->GetSize()) return 0; CJS_ObjDefintion* pObjDef = (CJS_ObjDefintion*)pArray->GetAt(nObjDefnID); v8::Local<v8::ObjectTemplate> objTemp = v8::Local<v8::ObjectTemplate>::New(isolate, pObjDef->m_objTemplate); - objTemp->Set(v8::String::NewFromUtf8(isolate, FX_LPCSTR(bsMethodName), v8::NewStringType::kNormal).ToLocalChecked(), v8::FunctionTemplate::New(isolate, pMethodCall), v8::ReadOnly); + objTemp->Set(v8::String::NewFromUtf8(isolate, bsMethodName.c_str(), v8::NewStringType::kNormal).ToLocalChecked(), v8::FunctionTemplate::New(isolate, pMethodCall), v8::ReadOnly); pObjDef->m_objTemplate.Reset(isolate,objTemp); return 0; } @@ -125,7 +125,7 @@ int JS_DefineObjProperty(IJS_Runtime* pJSRuntime, int nObjDefnID, const wchar_t* if(nObjDefnID<0 || nObjDefnID>= pArray->GetSize()) return 0; CJS_ObjDefintion* pObjDef = (CJS_ObjDefintion*)pArray->GetAt(nObjDefnID); v8::Local<v8::ObjectTemplate> objTemp = v8::Local<v8::ObjectTemplate>::New(isolate, pObjDef->m_objTemplate); - objTemp->SetAccessor(v8::String::NewFromUtf8(isolate, FX_LPCSTR(bsPropertyName), v8::NewStringType::kNormal).ToLocalChecked(), pPropGet, pPropPut); + objTemp->SetAccessor(v8::String::NewFromUtf8(isolate, bsPropertyName.c_str(), v8::NewStringType::kNormal).ToLocalChecked(), pPropGet, pPropPut); pObjDef->m_objTemplate.Reset(isolate,objTemp); return 0; } @@ -162,7 +162,7 @@ int JS_DefineObjConst(IJS_Runtime* pJSRuntime, int nObjDefnID, const wchar_t* sC if(nObjDefnID<0 || nObjDefnID>= pArray->GetSize()) return 0; CJS_ObjDefintion* pObjDef = (CJS_ObjDefintion*)pArray->GetAt(nObjDefnID); v8::Local<v8::ObjectTemplate> objTemp = v8::Local<v8::ObjectTemplate>::New(isolate, pObjDef->m_objTemplate); - objTemp->Set(isolate, FX_LPCSTR(bsConstName), pDefault); + objTemp->Set(isolate, bsConstName.c_str(), pDefault); pObjDef->m_objTemplate.Reset(isolate,objTemp); return 0; } @@ -202,7 +202,7 @@ int JS_DefineGlobalMethod(IJS_Runtime* pJSRuntime, const wchar_t* sMethodName, v objTemp = v8::ObjectTemplate::New(isolate); else objTemp = v8::Local<v8::ObjectTemplate>::New(isolate, globalObjTemp); - objTemp->Set(v8::String::NewFromUtf8(isolate, FX_LPCSTR(bsMethodName), v8::NewStringType::kNormal).ToLocalChecked(), funTempl, v8::ReadOnly); + objTemp->Set(v8::String::NewFromUtf8(isolate, bsMethodName.c_str(), v8::NewStringType::kNormal).ToLocalChecked(), funTempl, v8::ReadOnly); globalObjTemp.Reset(isolate,objTemp); @@ -225,7 +225,7 @@ int JS_DefineGlobalConst(IJS_Runtime* pJSRuntime, const wchar_t* sConstName, v8: objTemp = v8::ObjectTemplate::New(isolate); else objTemp = v8::Local<v8::ObjectTemplate>::New(isolate, globalObjTemp); - objTemp->Set(v8::String::NewFromUtf8(isolate, FX_LPCSTR(bsConst), v8::NewStringType::kNormal).ToLocalChecked(), pDefault, v8::ReadOnly); + objTemp->Set(v8::String::NewFromUtf8(isolate, bsConst.c_str(), v8::NewStringType::kNormal).ToLocalChecked(), pDefault, v8::ReadOnly); globalObjTemp.Reset(isolate,objTemp); @@ -473,12 +473,12 @@ void JS_Error(v8::Isolate* isolate, const CFX_WideString& message) unsigned JS_CalcHash(const wchar_t* main, unsigned nLen) { - return (unsigned)FX_HashCode_String_GetW((FX_LPCWSTR)main, nLen); + return (unsigned)FX_HashCode_String_GetW((const FX_WCHAR*)main, nLen); } unsigned JS_CalcHash(const wchar_t* main) { - return (unsigned)FX_HashCode_String_GetW((FX_LPCWSTR)main, FXSYS_wcslen(main)); + return (unsigned)FX_HashCode_String_GetW((const FX_WCHAR*)main, FXSYS_wcslen(main)); } const wchar_t* JS_GetTypeof(v8::Local<v8::Value> pObj) { diff --git a/fpdfsdk/src/pdfwindow/PWL_ComboBox.cpp b/fpdfsdk/src/pdfwindow/PWL_ComboBox.cpp index cbc2ba46ba..f3dce6ad72 100644 --- a/fpdfsdk/src/pdfwindow/PWL_ComboBox.cpp +++ b/fpdfsdk/src/pdfwindow/PWL_ComboBox.cpp @@ -244,13 +244,13 @@ CFX_WideString CPWL_ComboBox::GetText() const return CFX_WideString(); } -void CPWL_ComboBox::SetText(FX_LPCWSTR text) +void CPWL_ComboBox::SetText(const FX_WCHAR* text) { if (m_pEdit) m_pEdit->SetText(text); } -void CPWL_ComboBox::AddString(FX_LPCWSTR string) +void CPWL_ComboBox::AddString(const FX_WCHAR* string) { if (m_pList) m_pList->AddString(string); diff --git a/fpdfsdk/src/pdfwindow/PWL_Edit.cpp b/fpdfsdk/src/pdfwindow/PWL_Edit.cpp index f50233ff1c..62f09eff2b 100644 --- a/fpdfsdk/src/pdfwindow/PWL_Edit.cpp +++ b/fpdfsdk/src/pdfwindow/PWL_Edit.cpp @@ -37,7 +37,7 @@ void CPWL_Edit::OnDestroy() { } -void CPWL_Edit::SetText(FX_LPCWSTR csText) +void CPWL_Edit::SetText(const FX_WCHAR* csText) { CFX_WideString swText = csText; @@ -865,7 +865,7 @@ void CPWL_Edit::SetLimitChar(int32_t nLimitChar) m_pEdit->SetLimitChar(nLimitChar); } -void CPWL_Edit::ReplaceSel(FX_LPCWSTR csText) +void CPWL_Edit::ReplaceSel(const FX_WCHAR* csText) { m_pEdit->Clear(); m_pEdit->InsertText(csText); diff --git a/fpdfsdk/src/pdfwindow/PWL_EditCtrl.cpp b/fpdfsdk/src/pdfwindow/PWL_EditCtrl.cpp index a38371c326..57b0c01782 100644 --- a/fpdfsdk/src/pdfwindow/PWL_EditCtrl.cpp +++ b/fpdfsdk/src/pdfwindow/PWL_EditCtrl.cpp @@ -561,7 +561,7 @@ FX_FLOAT CPWL_EditCtrl::GetCaretFontSize() const return fFontSize; } -void CPWL_EditCtrl::SetText(FX_LPCWSTR csText) +void CPWL_EditCtrl::SetText(const FX_WCHAR* csText) { m_pEdit->SetText(csText); } @@ -582,7 +582,7 @@ void CPWL_EditCtrl::ShowVScrollBar(FX_BOOL bShow) { } -void CPWL_EditCtrl::InsertText(FX_LPCWSTR csText) +void CPWL_EditCtrl::InsertText(const FX_WCHAR* csText) { if (!IsReadOnly()) m_pEdit->InsertText(csText); diff --git a/fpdfsdk/src/pdfwindow/PWL_FontMap.cpp b/fpdfsdk/src/pdfwindow/PWL_FontMap.cpp index 085159f5f3..bd01eab3da 100644 --- a/fpdfsdk/src/pdfwindow/PWL_FontMap.cpp +++ b/fpdfsdk/src/pdfwindow/PWL_FontMap.cpp @@ -195,7 +195,7 @@ void CPWL_FontMap::Empty() } } -void CPWL_FontMap::Initial(FX_LPCSTR fontname) +void CPWL_FontMap::Initial(const FX_CHAR* fontname) { CFX_ByteString sFontName = fontname; diff --git a/fpdfsdk/src/pdfwindow/PWL_Icon.cpp b/fpdfsdk/src/pdfwindow/PWL_Icon.cpp index 9426824c8e..f85156da0c 100644 --- a/fpdfsdk/src/pdfwindow/PWL_Icon.cpp +++ b/fpdfsdk/src/pdfwindow/PWL_Icon.cpp @@ -109,7 +109,7 @@ CFX_ByteString CPWL_Image::GetImageAlias() return CFX_ByteString(); } -void CPWL_Image::SetImageAlias(FX_LPCSTR sImageAlias) +void CPWL_Image::SetImageAlias(const FX_CHAR* sImageAlias) { m_sImageAlias = sImageAlias; } diff --git a/fpdfsdk/src/pdfwindow/PWL_Label.cpp b/fpdfsdk/src/pdfwindow/PWL_Label.cpp index f2f3929e3f..9875002437 100644 --- a/fpdfsdk/src/pdfwindow/PWL_Label.cpp +++ b/fpdfsdk/src/pdfwindow/PWL_Label.cpp @@ -43,7 +43,7 @@ void CPWL_Label::OnCreated() } } -void CPWL_Label::SetText(FX_LPCWSTR csText) +void CPWL_Label::SetText(const FX_WCHAR* csText) { m_pEdit->SetText(csText); } diff --git a/fpdfsdk/src/pdfwindow/PWL_ListBox.cpp b/fpdfsdk/src/pdfwindow/PWL_ListBox.cpp index 47c1c86123..ecf9e1231f 100644 --- a/fpdfsdk/src/pdfwindow/PWL_ListBox.cpp +++ b/fpdfsdk/src/pdfwindow/PWL_ListBox.cpp @@ -462,7 +462,7 @@ CPDF_Rect CPWL_ListBox::GetFocusRect() const return CPWL_Wnd::GetFocusRect(); } -void CPWL_ListBox::AddString(FX_LPCWSTR string) +void CPWL_ListBox::AddString(const FX_WCHAR* string) { if (m_pList) { @@ -470,7 +470,7 @@ void CPWL_ListBox::AddString(FX_LPCWSTR string) } } -void CPWL_ListBox::SetText(FX_LPCWSTR csText,FX_BOOL bRefresh) +void CPWL_ListBox::SetText(const FX_WCHAR* csText,FX_BOOL bRefresh) { //return CPDF_List::SetText(csText,bRefresh); } diff --git a/fpdfsdk/src/pdfwindow/PWL_Note.cpp b/fpdfsdk/src/pdfwindow/PWL_Note.cpp index 6e8ffcd546..13e15a0518 100644 --- a/fpdfsdk/src/pdfwindow/PWL_Note.cpp +++ b/fpdfsdk/src/pdfwindow/PWL_Note.cpp @@ -143,7 +143,7 @@ void CPWL_Note_Edit::RePosChildWnd() m_fOldItemHeight = this->GetContentRect().Height(); } -void CPWL_Note_Edit::SetText(FX_LPCWSTR csText) +void CPWL_Note_Edit::SetText(const FX_WCHAR* csText) { m_bEnableNotify = FALSE; CPWL_Edit::SetText(csText); diff --git a/fpdfsdk/src/pdfwindow/PWL_Signature.cpp b/fpdfsdk/src/pdfwindow/PWL_Signature.cpp index fe07630057..4864cabc11 100644 --- a/fpdfsdk/src/pdfwindow/PWL_Signature.cpp +++ b/fpdfsdk/src/pdfwindow/PWL_Signature.cpp @@ -99,14 +99,14 @@ void CPWL_Signature::SetFoxitFlag(FX_BOOL bFlagExist) m_bFlagExist = bFlagExist; } -void CPWL_Signature::SetText(FX_LPCWSTR sText) +void CPWL_Signature::SetText(const FX_WCHAR* sText) { m_pText->SetText(sText); RePosChildWnd(); } -void CPWL_Signature::SetDescription(FX_LPCWSTR string) +void CPWL_Signature::SetDescription(const FX_WCHAR* string) { m_pDescription->SetText(string); @@ -120,7 +120,7 @@ void CPWL_Signature::SetImage(CFX_DIBSource* pImage) RePosChildWnd(); } -void CPWL_Signature::SetImageStream(CPDF_Stream * pStream, FX_LPCSTR sImageAlias) +void CPWL_Signature::SetImageStream(CPDF_Stream * pStream, const FX_CHAR* sImageAlias) { m_pImage->SetPDFStream(pStream); m_pImage->SetImageAlias(sImageAlias); |