summaryrefslogtreecommitdiff
path: root/xfa/fxfa/app
diff options
context:
space:
mode:
authortsepez <tsepez@chromium.org>2016-04-01 10:23:04 -0700
committerCommit bot <commit-bot@chromium.org>2016-04-01 10:23:05 -0700
commit9f2970caec897c40b91bd010c04dfe1f19d11108 (patch)
treed0a289939b3b6be3fe19a412b134eeb467672db2 /xfa/fxfa/app
parentdf4bc596c64fb848647c670be66a29ea0861b4f4 (diff)
downloadpdfium-9f2970caec897c40b91bd010c04dfe1f19d11108.tar.xz
Remove CFX_{Byte,Wide}String::Equal in favor of "==".
Makes the code slightly cleaner. Review URL: https://codereview.chromium.org/1846083002
Diffstat (limited to 'xfa/fxfa/app')
-rw-r--r--xfa/fxfa/app/xfa_ffdoc.cpp4
-rw-r--r--xfa/fxfa/app/xfa_ffwidgetacc.cpp6
-rw-r--r--xfa/fxfa/app/xfa_fontmgr.cpp11
-rw-r--r--xfa/fxfa/app/xfa_textlayout.cpp2
4 files changed, 11 insertions, 12 deletions
diff --git a/xfa/fxfa/app/xfa_ffdoc.cpp b/xfa/fxfa/app/xfa_ffdoc.cpp
index 94f035251e..ed4f94cd77 100644
--- a/xfa/fxfa/app/xfa_ffdoc.cpp
+++ b/xfa/fxfa/app/xfa_ffdoc.cpp
@@ -59,7 +59,7 @@ FX_BOOL XFA_GetPDFContentsFromPDFXML(CFDE_XMLNode* pPDFElement,
CFX_WideString wsTagName;
CFDE_XMLElement* pXMLElement = static_cast<CFDE_XMLElement*>(pXMLNode);
pXMLElement->GetTagName(wsTagName);
- if (wsTagName.Equal(FX_WSTRC(L"document"))) {
+ if (wsTagName == FX_WSTRC(L"document")) {
pDocumentElement = pXMLElement;
break;
}
@@ -76,7 +76,7 @@ FX_BOOL XFA_GetPDFContentsFromPDFXML(CFDE_XMLNode* pPDFElement,
CFX_WideString wsTagName;
CFDE_XMLElement* pXMLElement = static_cast<CFDE_XMLElement*>(pXMLNode);
pXMLElement->GetTagName(wsTagName);
- if (wsTagName.Equal(FX_WSTRC(L"chunk"))) {
+ if (wsTagName == FX_WSTRC(L"chunk")) {
pChunkElement = pXMLElement;
break;
}
diff --git a/xfa/fxfa/app/xfa_ffwidgetacc.cpp b/xfa/fxfa/app/xfa_ffwidgetacc.cpp
index fc8b38f458..5c2e6c354b 100644
--- a/xfa/fxfa/app/xfa_ffwidgetacc.cpp
+++ b/xfa/fxfa/app/xfa_ffwidgetacc.cpp
@@ -1583,7 +1583,7 @@ CXFA_Node* CXFA_TextProvider::GetTextNode(FX_BOOL& bRichText) {
CFX_WideString wsContentType;
m_pTextNode->GetAttribute(XFA_ATTRIBUTE_ContentType, wsContentType,
FALSE);
- if (wsContentType.Equal(FX_WSTRC(L"text/html"))) {
+ if (wsContentType == FX_WSTRC(L"text/html")) {
bRichText = TRUE;
}
}
@@ -1599,7 +1599,7 @@ CXFA_Node* CXFA_TextProvider::GetTextNode(FX_BOOL& bRichText) {
if (pChildNode && pChildNode->GetClassID() == XFA_ELEMENT_ExData) {
CFX_WideString wsContentType;
pChildNode->GetAttribute(XFA_ATTRIBUTE_ContentType, wsContentType, FALSE);
- if (wsContentType.Equal(FX_WSTRC(L"text/html"))) {
+ if (wsContentType == FX_WSTRC(L"text/html")) {
bRichText = TRUE;
}
}
@@ -1634,7 +1634,7 @@ CXFA_Node* CXFA_TextProvider::GetTextNode(FX_BOOL& bRichText) {
if (pChildNode && pChildNode->GetClassID() == XFA_ELEMENT_ExData) {
CFX_WideString wsContentType;
pChildNode->GetAttribute(XFA_ATTRIBUTE_ContentType, wsContentType, FALSE);
- if (wsContentType.Equal(FX_WSTRC(L"text/html"))) {
+ if (wsContentType == FX_WSTRC(L"text/html")) {
bRichText = TRUE;
}
}
diff --git a/xfa/fxfa/app/xfa_fontmgr.cpp b/xfa/fxfa/app/xfa_fontmgr.cpp
index fb6fd39249..e915dcbaf7 100644
--- a/xfa/fxfa/app/xfa_fontmgr.cpp
+++ b/xfa/fxfa/app/xfa_fontmgr.cpp
@@ -1960,8 +1960,8 @@ FX_BOOL CXFA_PDFFontMgr::PsNameMatchDRFontName(
}
if (iDifferLength > 1) {
CFX_ByteString bsDRTailer = bsDRName.Right(iDifferLength);
- if (bsDRTailer.Equal("MT") || bsDRTailer.Equal("PSMT") ||
- bsDRTailer.Equal("Regular") || bsDRTailer.Equal("Reg")) {
+ if (bsDRTailer == "MT" || bsDRTailer == "PSMT" ||
+ bsDRTailer == "Regular" || bsDRTailer == "Reg") {
return TRUE;
}
if (bBoldFont || bItalicFont) {
@@ -1970,18 +1970,17 @@ FX_BOOL CXFA_PDFFontMgr::PsNameMatchDRFontName(
FX_BOOL bMatch = FALSE;
switch (bsPsName.GetAt(iPsLen - 1)) {
case 'L': {
- if (bsDRName.Right(5).Equal("Light")) {
+ if (bsDRName.Right(5) == "Light") {
bMatch = TRUE;
}
} break;
case 'R': {
- if (bsDRName.Right(7).Equal("Regular") ||
- bsDRName.Right(3).Equal("Reg")) {
+ if (bsDRName.Right(7) == "Regular" || bsDRName.Right(3) == "Reg") {
bMatch = TRUE;
}
} break;
case 'M': {
- if (bsDRName.Right(5).Equal("Medium")) {
+ if (bsDRName.Right(5) == "Medium") {
bMatch = TRUE;
}
} break;
diff --git a/xfa/fxfa/app/xfa_textlayout.cpp b/xfa/fxfa/app/xfa_textlayout.cpp
index f60ed26c64..07a353e287 100644
--- a/xfa/fxfa/app/xfa_textlayout.cpp
+++ b/xfa/fxfa/app/xfa_textlayout.cpp
@@ -729,7 +729,7 @@ CFDE_XMLNode* CXFA_TextLayout::GetXMLContainerNode() {
CFDE_XMLElement* pXMLElement = static_cast<CFDE_XMLElement*>(pXMLChild);
CFX_WideString wsTag;
pXMLElement->GetLocalTagName(wsTag);
- if (wsTag.Equal(FX_WSTRC(L"body")) || wsTag.Equal(FX_WSTRC(L"html"))) {
+ if (wsTag == FX_WSTRC(L"body") || wsTag == FX_WSTRC(L"html")) {
pXMLContainer = pXMLChild;
break;
}