Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(154)

Side by Side Diff: xfa/fxfa/app/xfa_ffwidgetacc.cpp

Issue 1846083002: Remove CFX_{Byte,Wide}String::Equal in favor of "==". (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: Created 4 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 // Copyright 2014 PDFium Authors. All rights reserved. 1 // Copyright 2014 PDFium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com 5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
6 6
7 #include "xfa/fxfa/app/xfa_ffwidgetacc.h" 7 #include "xfa/fxfa/app/xfa_ffwidgetacc.h"
8 8
9 #include <algorithm> 9 #include <algorithm>
10 10
(...skipping 1563 matching lines...) Expand 10 before | Expand all | Expand 10 after
1574 } 1574 }
1575 return 0xFF000000; 1575 return 0xFF000000;
1576 } 1576 }
1577 CXFA_Node* CXFA_TextProvider::GetTextNode(FX_BOOL& bRichText) { 1577 CXFA_Node* CXFA_TextProvider::GetTextNode(FX_BOOL& bRichText) {
1578 bRichText = FALSE; 1578 bRichText = FALSE;
1579 if (m_pTextNode) { 1579 if (m_pTextNode) {
1580 if (m_pTextNode->GetClassID() == XFA_ELEMENT_ExData) { 1580 if (m_pTextNode->GetClassID() == XFA_ELEMENT_ExData) {
1581 CFX_WideString wsContentType; 1581 CFX_WideString wsContentType;
1582 m_pTextNode->GetAttribute(XFA_ATTRIBUTE_ContentType, wsContentType, 1582 m_pTextNode->GetAttribute(XFA_ATTRIBUTE_ContentType, wsContentType,
1583 FALSE); 1583 FALSE);
1584 if (wsContentType.Equal(FX_WSTRC(L"text/html"))) { 1584 if (wsContentType == FX_WSTRC(L"text/html")) {
1585 bRichText = TRUE; 1585 bRichText = TRUE;
1586 } 1586 }
1587 } 1587 }
1588 return m_pTextNode; 1588 return m_pTextNode;
1589 } 1589 }
1590 if (m_eType == XFA_TEXTPROVIDERTYPE_Text) { 1590 if (m_eType == XFA_TEXTPROVIDERTYPE_Text) {
1591 CXFA_Node* pElementNode = m_pWidgetAcc->GetNode(); 1591 CXFA_Node* pElementNode = m_pWidgetAcc->GetNode();
1592 CXFA_Node* pValueNode = pElementNode->GetChild(0, XFA_ELEMENT_Value); 1592 CXFA_Node* pValueNode = pElementNode->GetChild(0, XFA_ELEMENT_Value);
1593 if (!pValueNode) { 1593 if (!pValueNode) {
1594 return NULL; 1594 return NULL;
1595 } 1595 }
1596 CXFA_Node* pChildNode = pValueNode->GetNodeItem(XFA_NODEITEM_FirstChild); 1596 CXFA_Node* pChildNode = pValueNode->GetNodeItem(XFA_NODEITEM_FirstChild);
1597 if (pChildNode && pChildNode->GetClassID() == XFA_ELEMENT_ExData) { 1597 if (pChildNode && pChildNode->GetClassID() == XFA_ELEMENT_ExData) {
1598 CFX_WideString wsContentType; 1598 CFX_WideString wsContentType;
1599 pChildNode->GetAttribute(XFA_ATTRIBUTE_ContentType, wsContentType, FALSE); 1599 pChildNode->GetAttribute(XFA_ATTRIBUTE_ContentType, wsContentType, FALSE);
1600 if (wsContentType.Equal(FX_WSTRC(L"text/html"))) { 1600 if (wsContentType == FX_WSTRC(L"text/html")) {
1601 bRichText = TRUE; 1601 bRichText = TRUE;
1602 } 1602 }
1603 } 1603 }
1604 return pChildNode; 1604 return pChildNode;
1605 } else if (m_eType == XFA_TEXTPROVIDERTYPE_Datasets) { 1605 } else if (m_eType == XFA_TEXTPROVIDERTYPE_Datasets) {
1606 CXFA_Node* pBind = m_pWidgetAcc->GetDatasets(); 1606 CXFA_Node* pBind = m_pWidgetAcc->GetDatasets();
1607 CFDE_XMLNode* pXMLNode = pBind->GetXMLMappingNode(); 1607 CFDE_XMLNode* pXMLNode = pBind->GetXMLMappingNode();
1608 FXSYS_assert(pXMLNode); 1608 FXSYS_assert(pXMLNode);
1609 for (CFDE_XMLNode* pXMLChild = 1609 for (CFDE_XMLNode* pXMLChild =
1610 pXMLNode->GetNodeItem(CFDE_XMLNode::FirstChild); 1610 pXMLNode->GetNodeItem(CFDE_XMLNode::FirstChild);
(...skipping 14 matching lines...) Expand all
1625 return NULL; 1625 return NULL;
1626 } 1626 }
1627 CXFA_Node* pValueNode = pCaptionNode->GetChild(0, XFA_ELEMENT_Value); 1627 CXFA_Node* pValueNode = pCaptionNode->GetChild(0, XFA_ELEMENT_Value);
1628 if (pValueNode == NULL) { 1628 if (pValueNode == NULL) {
1629 return NULL; 1629 return NULL;
1630 } 1630 }
1631 CXFA_Node* pChildNode = pValueNode->GetNodeItem(XFA_NODEITEM_FirstChild); 1631 CXFA_Node* pChildNode = pValueNode->GetNodeItem(XFA_NODEITEM_FirstChild);
1632 if (pChildNode && pChildNode->GetClassID() == XFA_ELEMENT_ExData) { 1632 if (pChildNode && pChildNode->GetClassID() == XFA_ELEMENT_ExData) {
1633 CFX_WideString wsContentType; 1633 CFX_WideString wsContentType;
1634 pChildNode->GetAttribute(XFA_ATTRIBUTE_ContentType, wsContentType, FALSE); 1634 pChildNode->GetAttribute(XFA_ATTRIBUTE_ContentType, wsContentType, FALSE);
1635 if (wsContentType.Equal(FX_WSTRC(L"text/html"))) { 1635 if (wsContentType == FX_WSTRC(L"text/html")) {
1636 bRichText = TRUE; 1636 bRichText = TRUE;
1637 } 1637 }
1638 } 1638 }
1639 return pChildNode; 1639 return pChildNode;
1640 } 1640 }
1641 CXFA_Node* pItemNode = 1641 CXFA_Node* pItemNode =
1642 m_pWidgetAcc->GetNode()->GetChild(0, XFA_ELEMENT_Items); 1642 m_pWidgetAcc->GetNode()->GetChild(0, XFA_ELEMENT_Items);
1643 if (pItemNode == NULL) { 1643 if (pItemNode == NULL) {
1644 return NULL; 1644 return NULL;
1645 } 1645 }
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after
1707 if (pIDNode) { 1707 if (pIDNode) {
1708 pEmbAcc = (CXFA_WidgetAcc*)pIDNode->GetWidgetData(); 1708 pEmbAcc = (CXFA_WidgetAcc*)pIDNode->GetWidgetData();
1709 } 1709 }
1710 if (pEmbAcc) { 1710 if (pEmbAcc) {
1711 pEmbAcc->GetValue(wsValue, XFA_VALUEPICTURE_Display); 1711 pEmbAcc->GetValue(wsValue, XFA_VALUEPICTURE_Display);
1712 return TRUE; 1712 return TRUE;
1713 } 1713 }
1714 } 1714 }
1715 return FALSE; 1715 return FALSE;
1716 } 1716 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698