本文整理汇总了C++中CFX_WideStringC::GetPtr方法的典型用法代码示例。如果您正苦于以下问题:C++ CFX_WideStringC::GetPtr方法的具体用法?C++ CFX_WideStringC::GetPtr怎么用?C++ CFX_WideStringC::GetPtr使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CFX_WideStringC
的用法示例。
在下文中一共展示了CFX_WideStringC::GetPtr方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: PutRequestURL
FX_BOOL CPDFXFA_App::PutRequestURL(const CFX_WideStringC& wsURL,
const CFX_WideStringC& wsData,
const CFX_WideStringC& wsEncode) {
CPDFDoc_Environment* pEnv = m_pEnvList.GetAt(0);
if (pEnv) {
return pEnv->FFI_PutRequestURL(wsURL.GetPtr(), wsData.GetPtr(),
wsEncode.GetPtr());
}
return FALSE;
}
示例2: MsgBox
int32_t CPDFXFA_App::MsgBox(const CFX_WideStringC& wsMessage,
const CFX_WideStringC& wsTitle,
FX_DWORD dwIconType,
FX_DWORD dwButtonType) {
CPDFDoc_Environment* pEnv = m_pEnvList.GetAt(0);
if (!pEnv)
return -1;
FX_DWORD iconType = 0;
int iButtonType = 0;
switch (dwIconType) {
case XFA_MBICON_Error:
iconType |= 0;
break;
case XFA_MBICON_Warning:
iconType |= 1;
break;
case XFA_MBICON_Question:
iconType |= 2;
break;
case XFA_MBICON_Status:
iconType |= 3;
break;
}
switch (dwButtonType) {
case XFA_MB_OK:
iButtonType |= 0;
break;
case XFA_MB_OKCancel:
iButtonType |= 1;
break;
case XFA_MB_YesNo:
iButtonType |= 2;
break;
case XFA_MB_YesNoCancel:
iButtonType |= 3;
break;
}
int32_t iRet = pEnv->JS_appAlert(wsMessage.GetPtr(), wsTitle.GetPtr(),
iButtonType, iconType);
switch (iRet) {
case 1:
return XFA_IDOK;
case 2:
return XFA_IDCancel;
case 3:
return XFA_IDNo;
case 4:
return XFA_IDYes;
}
return XFA_IDYes;
}
示例3:
CFX_WideString::CFX_WideString(const CFX_WideStringC& str1, const CFX_WideStringC& str2)
{
m_pData = NULL;
int nNewLen = str1.GetLength() + str2.GetLength();
if (nNewLen == 0) {
return;
}
m_pData = StringData::Create(nNewLen);
if (m_pData) {
FXSYS_memcpy(m_pData->m_String, str1.GetPtr(), str1.GetLength()*sizeof(FX_WCHAR));
FXSYS_memcpy(m_pData->m_String + str1.GetLength(), str2.GetPtr(), str2.GetLength()*sizeof(FX_WCHAR));
}
}
示例4: PostRequestURL
FX_BOOL CPDFXFA_App::PostRequestURL(const CFX_WideStringC& wsURL,
const CFX_WideStringC& wsData,
const CFX_WideStringC& wsContentType,
const CFX_WideStringC& wsEncode,
const CFX_WideStringC& wsHeader,
CFX_WideString& wsResponse) {
CPDFDoc_Environment* pEnv = m_pEnvList.GetAt(0);
if (pEnv) {
wsResponse = pEnv->FFI_PostRequestURL(wsURL.GetPtr(), wsData.GetPtr(),
wsContentType.GetPtr(),
wsEncode.GetPtr(), wsHeader.GetPtr());
return TRUE;
}
return FALSE;
}
示例5: FX_File_Exist
FX_BOOL FX_File_Exist(const CFX_WideStringC& fileName) {
FX_DWORD dwAttri = ::GetFileAttributesW((LPCWSTR)fileName.GetPtr());
if (dwAttri == -1) {
return FALSE;
}
return (dwAttri & FILE_ATTRIBUTE_DIRECTORY) == 0;
}
示例6: Equal
bool CFX_WideString::Equal(const CFX_WideStringC& str) const {
if (m_pData == NULL) {
return str.IsEmpty();
}
return str.GetLength() == m_pData->m_nDataLength &&
wmemcmp(str.GetPtr(), m_pData->m_String, m_pData->m_nDataLength) == 0;
}
示例7: Equal
bool CFX_WideString::Equal(const CFX_WideStringC& str) const
{
if (m_pData == NULL) {
return str.IsEmpty();
}
return str.GetLength() == m_pData->m_nDataLength &&
FXSYS_memcmp32(str.GetPtr(), m_pData->m_String, m_pData->m_nDataLength * sizeof(FX_WCHAR)) == 0;
}
示例8: FILESPEC_DecodeFileName
static CFX_WideString FILESPEC_DecodeFileName(const CFX_WideStringC& filepath) {
if (filepath.GetLength() <= 1) {
return CFX_WideString();
}
#if _FXM_PLATFORM_ == _FXM_PLATFORM_APPLE_
if (filepath.Left(sizeof("/Mac") - 1) == CFX_WideStringC(L"/Mac")) {
return ChangeSlashToPlatform(filepath.GetPtr() + 1);
}
return ChangeSlashToPlatform(filepath.GetPtr());
#elif _FXM_PLATFORM_ == _FXM_PLATFORM_WINDOWS_
if (filepath.GetAt(0) != '/') {
return ChangeSlashToPlatform(filepath.GetPtr());
}
if (filepath.GetAt(1) == '/') {
return ChangeSlashToPlatform(filepath.GetPtr() + 1);
}
if (filepath.GetAt(2) == '/') {
CFX_WideString result;
result += filepath.GetAt(1);
result += ':';
result += ChangeSlashToPlatform(filepath.GetPtr() + 2);
return result;
}
CFX_WideString result;
result += '\\';
result += ChangeSlashToPlatform(filepath.GetPtr());
return result;
#else
return filepath;
#endif
}
示例9: Response
void CPDFXFA_App::Response(CFX_WideString& wsAnswer,
const CFX_WideStringC& wsQuestion,
const CFX_WideStringC& wsTitle,
const CFX_WideStringC& wsDefaultAnswer,
FX_BOOL bMark) {
CPDFDoc_Environment* pEnv = m_pEnvList.GetAt(0);
if (pEnv) {
int nLength = 2048;
char* pBuff = new char[nLength];
nLength = pEnv->JS_appResponse(wsQuestion.GetPtr(), wsTitle.GetPtr(),
wsDefaultAnswer.GetPtr(), NULL, bMark, pBuff,
nLength);
if (nLength > 0) {
nLength = nLength > 2046 ? 2046 : nLength;
pBuff[nLength] = 0;
pBuff[nLength + 1] = 0;
wsAnswer = CFX_WideString::FromUTF16LE(
reinterpret_cast<const unsigned short*>(pBuff),
nLength / sizeof(unsigned short));
}
delete[] pBuff;
}
}
示例10:
FX_BOOL CFXCRT_FileAccess_Win64::Open(const CFX_WideStringC& fileName,
FX_DWORD dwMode) {
if (m_hFile) {
return FALSE;
}
FX_DWORD dwAccess, dwShare, dwCreation;
FXCRT_Windows_GetFileMode(dwMode, dwAccess, dwShare, dwCreation);
m_hFile = ::CreateFileW((LPCWSTR)fileName.GetPtr(), dwAccess, dwShare, NULL,
dwCreation, FILE_ATTRIBUTE_NORMAL, NULL);
if (m_hFile == INVALID_HANDLE_VALUE) {
m_hFile = NULL;
}
return m_hFile != NULL;
}
示例11: LoadFont
FX_BOOL CFWL_FontData::LoadFont(const CFX_WideStringC& wsFontFamily,
FX_DWORD dwFontStyles,
FX_WORD dwCodePage) {
m_wsFamily = wsFontFamily;
m_dwStyles = dwFontStyles;
m_dwCodePage = dwCodePage;
if (!m_pFontMgr) {
#if _FXM_PLATFORM_ == _FXM_PLATFORM_WINDOWS_
m_pFontMgr = IFX_FontMgr::Create(FX_GetDefFontEnumerator());
#else
m_pFontSource = FX_CreateDefaultFontSourceEnum();
m_pFontMgr = IFX_FontMgr::Create(m_pFontSource);
#endif
}
m_pFont = IFX_Font::LoadFont(wsFontFamily.GetPtr(), dwFontStyles, dwCodePage,
m_pFontMgr);
return m_pFont != NULL;
}
示例12: XFA_GetBarcodeTypeByName
static XFA_LPCBARCODETYPEENUMINFO XFA_GetBarcodeTypeByName(
const CFX_WideStringC& wsName) {
int32_t iLength = wsName.GetLength();
if (iLength == 0) {
return NULL;
}
uint32_t uHash = FX_HashCode_String_GetW(wsName.GetPtr(), iLength, TRUE);
int32_t iStart = 0, iEnd = g_iXFABarcodeTypeCount - 1;
do {
int32_t iMid = (iStart + iEnd) / 2;
XFA_LPCBARCODETYPEENUMINFO pInfo = g_XFABarCodeTypeEnumData + iMid;
if (uHash == pInfo->uHash) {
return pInfo;
} else if (uHash < pInfo->uHash) {
iEnd = iMid - 1;
} else {
iStart = iMid + 1;
}
} while (iStart <= iEnd);
return NULL;
}
示例13: while
static int32_t XFA_FilterName(const CFX_WideStringC& wsExpression,
int32_t nStart,
CFX_WideString& wsFilter) {
FXSYS_assert(nStart > -1);
int32_t iLength = wsExpression.GetLength();
if (nStart >= iLength) {
return iLength;
}
FX_WCHAR* pBuf = wsFilter.GetBuffer(iLength - nStart);
int32_t nCount = 0;
const FX_WCHAR* pSrc = wsExpression.GetPtr();
FX_WCHAR wCur;
while (nStart < iLength) {
wCur = pSrc[nStart++];
if (wCur == ',') {
break;
}
pBuf[nCount++] = wCur;
}
wsFilter.ReleaseBuffer(nCount);
wsFilter.TrimLeft();
wsFilter.TrimRight();
return nStart;
}
示例14: FILESPEC_EncodeFileName
CFX_WideString FILESPEC_EncodeFileName(const CFX_WideStringC& filepath) {
if (filepath.GetLength() <= 1) {
return CFX_WideString();
}
#if _FXM_PLATFORM_ == _FXM_PLATFORM_WINDOWS_
if (filepath.GetAt(1) == ':') {
CFX_WideString result;
result = '/';
result += filepath.GetAt(0);
if (filepath.GetAt(2) != '\\') {
result += '/';
}
result += ChangeSlashToPDF(filepath.GetPtr() + 2);
return result;
}
if (filepath.GetAt(0) == '\\' && filepath.GetAt(1) == '\\') {
return ChangeSlashToPDF(filepath.GetPtr() + 1);
}
if (filepath.GetAt(0) == '\\') {
CFX_WideString result;
result = '/';
result += ChangeSlashToPDF(filepath.GetPtr());
return result;
}
return ChangeSlashToPDF(filepath.GetPtr());
#elif _FXM_PLATFORM_ == _FXM_PLATFORM_APPLE_
if (filepath.Left(sizeof("Mac") - 1) == FX_WSTRC(L"Mac")) {
CFX_WideString result;
result = '/';
result += ChangeSlashToPDF(filepath.GetPtr());
return result;
}
return ChangeSlashToPDF(filepath.GetPtr());
#else
return filepath;
#endif
}
示例15: CopyData
void CFX_WideTextBuf::operator=(const CFX_WideStringC& str) {
CopyData(str.GetPtr(), str.GetLength() * sizeof(FX_WCHAR));
}