本文整理汇总了C++中CFX_ByteString::EqualNoCase方法的典型用法代码示例。如果您正苦于以下问题:C++ CFX_ByteString::EqualNoCase方法的具体用法?C++ CFX_ByteString::EqualNoCase怎么用?C++ CFX_ByteString::EqualNoCase使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CFX_ByteString
的用法示例。
在下文中一共展示了CFX_ByteString::EqualNoCase方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: CPDFDocumentFromFPDFDocument
DLLEXPORT int STDCALL FPDFDoc_GetPageMode(FPDF_DOCUMENT document) {
CPDF_Document* pDoc = CPDFDocumentFromFPDFDocument(document);
if (!pDoc)
return PAGEMODE_UNKNOWN;
CPDF_Dictionary* pRoot = pDoc->GetRoot();
if (!pRoot)
return PAGEMODE_UNKNOWN;
CPDF_Object* pName = pRoot->GetObjectFor("PageMode");
if (!pName)
return PAGEMODE_USENONE;
CFX_ByteString strPageMode = pName->GetString();
if (strPageMode.IsEmpty() || strPageMode.EqualNoCase("UseNone"))
return PAGEMODE_USENONE;
if (strPageMode.EqualNoCase("UseOutlines"))
return PAGEMODE_USEOUTLINES;
if (strPageMode.EqualNoCase("UseThumbs"))
return PAGEMODE_USETHUMBS;
if (strPageMode.EqualNoCase("FullScreen"))
return PAGEMODE_FULLSCREEN;
if (strPageMode.EqualNoCase("UseOC"))
return PAGEMODE_USEOC;
if (strPageMode.EqualNoCase("UseAttachments"))
return PAGEMODE_USEATTACHMENTS;
return PAGEMODE_UNKNOWN;
}
示例2: FPDFDoc_GetPageMode
DLLEXPORT int FPDFDoc_GetPageMode(FPDF_DOCUMENT document)
{
if (!document) return PAGEMODE_UNKNOWN;
CPDF_Dictionary *pRoot = ((CPDF_Document*)document)->GetRoot();
if (!pRoot)
return PAGEMODE_UNKNOWN;
CPDF_Object* pName = pRoot->GetElement("PageMode");
if (!pName)
return PAGEMODE_USENONE;
CFX_ByteString strPageMode = pName->GetString();
if (strPageMode.IsEmpty()||strPageMode.EqualNoCase(FX_BSTR("UseNone")))
return PAGEMODE_USENONE;
else if (strPageMode.EqualNoCase(FX_BSTR("UseOutlines")))
return PAGEMODE_USEOUTLINES;
else if (strPageMode.EqualNoCase(FX_BSTR("UseThumbs")))
return PAGEMODE_USETHUMBS;
else if (strPageMode.EqualNoCase(FX_BSTR("FullScreen")))
return PAGEMODE_FULLSCREEN;
else if (strPageMode.EqualNoCase(FX_BSTR("UseOC")))
return PAGEMODE_USEOC;
else if (strPageMode.EqualNoCase(FX_BSTR("UseAttachments")))
return PAGEMODE_USEATTACHMENTS;
return PAGEMODE_UNKNOWN;
}
示例3: SetText
void CPWL_Edit::SetText(const CFX_WideString& csText) {
CFX_WideString swText = csText;
if (!HasFlag(PES_RICH)) {
m_pEdit->SetText(swText);
return;
}
CFX_ByteString sValue = CFX_ByteString::FromUnicode(swText);
std::unique_ptr<CXML_Element> pXML(
CXML_Element::Parse(sValue.c_str(), sValue.GetLength()));
if (!pXML) {
m_pEdit->SetText(swText);
return;
}
int32_t nCount = pXML->CountChildren();
bool bFirst = true;
swText.clear();
for (int32_t i = 0; i < nCount; i++) {
CXML_Element* pSubElement = pXML->GetElement(i);
if (!pSubElement)
continue;
CFX_ByteString tag = pSubElement->GetTagName();
if (tag.EqualNoCase("p")) {
int nChild = pSubElement->CountChildren();
CFX_WideString swSection;
for (int32_t j = 0; j < nChild; j++)
swSection += pSubElement->GetContent(j);
if (bFirst)
bFirst = false;
else
swText += FWL_VKEY_Return;
swText += swSection;
}
}
m_pEdit->SetText(swText);
}
示例4: SetText
void CPWL_Edit::SetText(const FX_WCHAR* csText) {
CFX_WideString swText = csText;
if (HasFlag(PES_RICH)) {
CFX_ByteString sValue = CFX_ByteString::FromUnicode(swText);
if (CXML_Element* pXML =
CXML_Element::Parse(sValue.c_str(), sValue.GetLength())) {
int32_t nCount = pXML->CountChildren();
FX_BOOL bFirst = TRUE;
swText.Empty();
for (int32_t i = 0; i < nCount; i++) {
if (CXML_Element* pSubElement = pXML->GetElement(i)) {
CFX_ByteString tag = pSubElement->GetTagName();
if (tag.EqualNoCase("p")) {
int nChild = pSubElement->CountChildren();
CFX_WideString swSection;
for (int32_t j = 0; j < nChild; j++) {
swSection += pSubElement->GetContent(j);
}
if (bFirst)
bFirst = FALSE;
else
swText += FWL_VKEY_Return;
swText += swSection;
}
}
}
delete pXML;
}
}
m_pEdit->SetText(swText.c_str());
}