本文整理汇总了C++中CFX_WideString::MakeLower方法的典型用法代码示例。如果您正苦于以下问题:C++ CFX_WideString::MakeLower方法的具体用法?C++ CFX_WideString::MakeLower怎么用?C++ CFX_WideString::MakeLower使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CFX_WideString
的用法示例。
在下文中一共展示了CFX_WideString::MakeLower方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: GetFontInfo
FX_BOOL CXFA_FFConfigAcc::GetFontInfo(int32_t index,
CFX_WideString& wsFontFamily,
CFX_WideString& wsPsName,
FX_BOOL bBold,
FX_BOOL bItalic) {
if (index < 0 || index >= CountChildren()) {
return FALSE;
}
CXFA_Node* pFontNode = m_pPsMapNode->GetChild(index, XFA_ELEMENT_Font);
if (pFontNode == NULL) {
return FALSE;
}
wsFontFamily.Empty();
wsPsName.Empty();
bBold = FALSE;
bItalic = FALSE;
pFontNode->GetAttribute(XFA_ATTRIBUTE_Typeface, wsFontFamily);
pFontNode->GetAttribute(XFA_ATTRIBUTE_PsName, wsPsName);
CFX_WideString wsValue;
pFontNode->GetAttribute(XFA_ATTRIBUTE_Weight, wsValue);
wsValue.MakeLower();
if (wsValue == FX_WSTRC(L"bold")) {
bBold = TRUE;
}
pFontNode->GetAttribute(XFA_ATTRIBUTE_Posture, wsValue);
wsValue.MakeLower();
if (wsValue == FX_WSTRC(L"italic")) {
bItalic = TRUE;
}
return wsFontFamily.GetLength() > 0;
}
示例2: FX_LocaleMgr_Create
IFX_LocaleMgr* FX_LocaleMgr_Create(const FX_WCHAR* pszLocalPath,
FX_WORD wDefaultLCID) {
void* pPathHandle = FX_OpenFolder(pszLocalPath);
if (!pPathHandle) {
return NULL;
}
CFX_LocaleMgr* pLocaleMgr = new CFX_LocaleMgr(wDefaultLCID);
CFX_WideString wsFileName;
FX_BOOL bFolder = FALSE;
while (FX_GetNextFile(pPathHandle, wsFileName, bFolder)) {
if (!bFolder) {
if (wsFileName.GetLength() < 4) {
continue;
}
CFX_WideString wsExt = wsFileName.Right(4);
wsExt.MakeLower();
if (wsExt != L".xml") {
continue;
}
CFX_WideString wsFullPath(pszLocalPath);
wsFullPath += L"\\" + wsFileName;
IFX_FileRead* pRead = FX_CreateFileRead(wsFullPath);
if (!pRead) {
continue;
}
CXML_Element* pXmlLocale = CXML_Element::Parse(pRead);
pRead->Release();
CFX_ByteString bssp = pXmlLocale->GetNamespace();
if (bssp == "http://www.foxitsoftware.com/localization") {
CFX_WideString wsLCID = pXmlLocale->GetAttrValue("", "lcid");
wchar_t* pEnd = NULL;
FX_DWORD dwLCID = wcstol(wsLCID, &pEnd, 16);
if (pLocaleMgr->m_lcid2xml.GetValueAt((void*)(uintptr_t)dwLCID)) {
delete pXmlLocale;
} else {
pLocaleMgr->m_lcid2xml.SetAt((void*)(uintptr_t)dwLCID, pXmlLocale);
}
} else {
delete pXmlLocale;
}
}
}
FX_CloseFolder(pPathHandle);
return pLocaleMgr;
}
示例3: FindFirst
FX_BOOL CPDF_TextPageFind::FindFirst(const CFX_WideString& findwhat,
int flags,
int startPos) {
if (!m_pTextPage)
return FALSE;
if (m_strText.IsEmpty() || m_bMatchCase != (flags & FPDFTEXT_MATCHCASE))
m_strText = m_pTextPage->GetPageText();
CFX_WideString findwhatStr = findwhat;
m_findWhat = findwhatStr;
m_flags = flags;
m_bMatchCase = flags & FPDFTEXT_MATCHCASE;
if (m_strText.IsEmpty()) {
m_IsFind = FALSE;
return TRUE;
}
FX_STRSIZE len = findwhatStr.GetLength();
if (!m_bMatchCase) {
findwhatStr.MakeLower();
m_strText.MakeLower();
}
m_bMatchWholeWord = flags & FPDFTEXT_MATCHWHOLEWORD;
m_findNextStart = startPos;
if (startPos == -1)
m_findPreStart = m_strText.GetLength() - 1;
else
m_findPreStart = startPos;
m_csFindWhatArray.clear();
int i = 0;
while (i < len) {
if (findwhatStr.GetAt(i) != ' ')
break;
i++;
}
if (i < len)
ExtractFindWhat(findwhatStr);
else
m_csFindWhatArray.push_back(findwhatStr);
if (m_csFindWhatArray.empty())
return FALSE;
m_IsFind = TRUE;
m_resStart = 0;
m_resEnd = -1;
return TRUE;
}