summaryrefslogtreecommitdiff
path: root/xfa/fxfa/app
diff options
context:
space:
mode:
Diffstat (limited to 'xfa/fxfa/app')
-rw-r--r--xfa/fxfa/app/cxfa_textlayout.cpp17
-rw-r--r--xfa/fxfa/app/xfa_ffdoc.cpp6
-rw-r--r--xfa/fxfa/app/xfa_ffdocview.cpp10
-rw-r--r--xfa/fxfa/app/xfa_ffwidget.cpp18
-rw-r--r--xfa/fxfa/app/xfa_ffwidgetacc.cpp15
5 files changed, 28 insertions, 38 deletions
diff --git a/xfa/fxfa/app/cxfa_textlayout.cpp b/xfa/fxfa/app/cxfa_textlayout.cpp
index 86f49eda89..0fbe8e0fe3 100644
--- a/xfa/fxfa/app/cxfa_textlayout.cpp
+++ b/xfa/fxfa/app/cxfa_textlayout.cpp
@@ -80,7 +80,7 @@ CFDE_XMLNode* CXFA_TextLayout::GetXMLContainerNode() {
CFDE_XMLElement* pXMLElement = static_cast<CFDE_XMLElement*>(pXMLChild);
CFX_WideString wsTag;
pXMLElement->GetLocalTagName(wsTag);
- if (wsTag == FX_WSTRC(L"body") || wsTag == FX_WSTRC(L"html")) {
+ if (wsTag == L"body" || wsTag == L"html") {
pXMLContainer = pXMLChild;
break;
}
@@ -732,7 +732,7 @@ bool CXFA_TextLayout::LoadRichText(
pElement = static_cast<CFDE_XMLElement*>(pXMLNode);
pElement->GetLocalTagName(wsName);
}
- if (wsName == FX_WSTRC(L"ol")) {
+ if (wsName == L"ol") {
bIsOl = true;
bCurOl = true;
}
@@ -750,9 +750,8 @@ bool CXFA_TextLayout::LoadRichText(
if ((eDisplay == FDE_CSSDisplay::Block ||
eDisplay == FDE_CSSDisplay::ListItem) &&
pStyle &&
- (wsName.IsEmpty() ||
- (wsName != FX_WSTRC(L"body") && wsName != FX_WSTRC(L"html") &&
- wsName != FX_WSTRC(L"ol") && wsName != FX_WSTRC(L"ul")))) {
+ (wsName.IsEmpty() || (wsName != L"body" && wsName != L"html" &&
+ wsName != L"ol" && wsName != L"ul"))) {
const FDE_CSSRect* pRect = pStyle->GetMarginWidth();
if (pRect) {
fLinePos += pRect->top.GetValue();
@@ -760,7 +759,7 @@ bool CXFA_TextLayout::LoadRichText(
}
}
- if (wsName == FX_WSTRC(L"a")) {
+ if (wsName == L"a") {
CFX_WideString wsLinkContent;
ASSERT(pElement);
pElement->GetString(L"href", wsLinkContent);
@@ -778,14 +777,14 @@ bool CXFA_TextLayout::LoadRichText(
CFX_WideString wsText;
if (bContentNode && iTabCount == 0) {
static_cast<CFDE_XMLText*>(pXMLNode)->GetText(wsText);
- } else if (wsName == FX_WSTRC(L"br")) {
+ } else if (wsName == L"br") {
wsText = L'\n';
- } else if (wsName == FX_WSTRC(L"li")) {
+ } else if (wsName == L"li") {
bCurLi = true;
if (bIsOl)
wsText.Format(L"%d. ", iLiCount);
else
- wsText = 0x00B7 + FX_WSTRC(L" ");
+ wsText = 0x00B7 + CFX_WideStringC(L" ", 1);
} else if (!bContentNode) {
if (iTabCount > 0) {
while (iTabCount-- > 0)
diff --git a/xfa/fxfa/app/xfa_ffdoc.cpp b/xfa/fxfa/app/xfa_ffdoc.cpp
index c34213c17e..911bdf8400 100644
--- a/xfa/fxfa/app/xfa_ffdoc.cpp
+++ b/xfa/fxfa/app/xfa_ffdoc.cpp
@@ -183,7 +183,7 @@ bool XFA_GetPDFContentsFromPDFXML(CFDE_XMLNode* pPDFElement,
CFX_WideString wsTagName;
CFDE_XMLElement* pXMLElement = static_cast<CFDE_XMLElement*>(pXMLNode);
pXMLElement->GetTagName(wsTagName);
- if (wsTagName == FX_WSTRC(L"document")) {
+ if (wsTagName == L"document") {
pDocumentElement = pXMLElement;
break;
}
@@ -200,7 +200,7 @@ bool XFA_GetPDFContentsFromPDFXML(CFDE_XMLNode* pPDFElement,
CFX_WideString wsTagName;
CFDE_XMLElement* pXMLElement = static_cast<CFDE_XMLElement*>(pXMLNode);
pXMLElement->GetTagName(wsTagName);
- if (wsTagName == FX_WSTRC(L"chunk")) {
+ if (wsTagName == L"chunk") {
pChunkElement = pXMLElement;
break;
}
@@ -265,7 +265,7 @@ void CXFA_FFDoc::StopLoad() {
return;
}
CFX_WideString wsType;
- if (pDynamicRender->TryContent(wsType) && wsType == FX_WSTRC(L"required")) {
+ if (pDynamicRender->TryContent(wsType) && wsType == L"required") {
m_dwDocType = XFA_DOCTYPE_Dynamic;
}
}
diff --git a/xfa/fxfa/app/xfa_ffdocview.cpp b/xfa/fxfa/app/xfa_ffdocview.cpp
index 0aedeed231..847ae07d87 100644
--- a/xfa/fxfa/app/xfa_ffdocview.cpp
+++ b/xfa/fxfa/app/xfa_ffdocview.cpp
@@ -155,7 +155,7 @@ void CXFA_FFDocView::ShowNullTestMsg() {
iCount -= iRemain;
CFX_WideString wsMsg;
for (int32_t i = 0; i < iCount; i++) {
- wsMsg += m_arrNullTestMsg[i] + FX_WSTRC(L"\n");
+ wsMsg += m_arrNullTestMsg[i] + L"\n";
}
if (iRemain > 0) {
CFX_WideString wsTemp;
@@ -163,7 +163,7 @@ void CXFA_FFDocView::ShowNullTestMsg() {
L"Message limit exceeded. Remaining %d "
L"validation errors not reported.",
iRemain);
- wsMsg += FX_WSTRC(L"\n") + wsTemp;
+ wsMsg += L"\n" + wsTemp;
}
pAppProvider->MsgBox(wsMsg, pAppProvider->GetAppTitle(), XFA_MBICON_Status,
XFA_MB_OK);
@@ -755,10 +755,8 @@ void CXFA_FFDocView::RunBindItems() {
binditems.GetValueRef(wsValueRef);
binditems.GetLabelRef(wsLabelRef);
const bool bUseValue = wsLabelRef.IsEmpty() || wsLabelRef == wsValueRef;
- const bool bLabelUseContent =
- wsLabelRef.IsEmpty() || wsLabelRef == FX_WSTRC(L"$");
- const bool bValueUseContent =
- wsValueRef.IsEmpty() || wsValueRef == FX_WSTRC(L"$");
+ const bool bLabelUseContent = wsLabelRef.IsEmpty() || wsLabelRef == L"$";
+ const bool bValueUseContent = wsValueRef.IsEmpty() || wsValueRef == L"$";
CFX_WideString wsValue;
CFX_WideString wsLabel;
uint32_t uValueHash = FX_HashCode_GetW(wsValueRef, false);
diff --git a/xfa/fxfa/app/xfa_ffwidget.cpp b/xfa/fxfa/app/xfa_ffwidget.cpp
index 4cd6b44a66..c87fa4ef9f 100644
--- a/xfa/fxfa/app/xfa_ffwidget.cpp
+++ b/xfa/fxfa/app/xfa_ffwidget.cpp
@@ -1020,21 +1020,16 @@ FX_CHAR* XFA_Base64Encode(const uint8_t* buf, int32_t buf_len) {
FXCODEC_IMAGE_TYPE XFA_GetImageType(const CFX_WideString& wsType) {
CFX_WideString wsContentType(wsType);
wsContentType.MakeLower();
- if (wsContentType == FX_WSTRC(L"image/jpg")) {
+ if (wsContentType == L"image/jpg")
return FXCODEC_IMAGE_JPG;
- }
- if (wsContentType == FX_WSTRC(L"image/png")) {
+ if (wsContentType == L"image/png")
return FXCODEC_IMAGE_PNG;
- }
- if (wsContentType == FX_WSTRC(L"image/gif")) {
+ if (wsContentType == L"image/gif")
return FXCODEC_IMAGE_GIF;
- }
- if (wsContentType == FX_WSTRC(L"image/bmp")) {
+ if (wsContentType == L"image/bmp")
return FXCODEC_IMAGE_BMP;
- }
- if (wsContentType == FX_WSTRC(L"image/tif")) {
+ if (wsContentType == L"image/tif")
return FXCODEC_IMAGE_TIF;
- }
return FXCODEC_IMAGE_UNKNOWN;
}
CFX_DIBitmap* XFA_LoadImageData(CXFA_FFDoc* pDoc,
@@ -1073,8 +1068,7 @@ CFX_DIBitmap* XFA_LoadImageData(CXFA_FFDoc* pDoc,
}
} else {
CFX_WideString wsURL = wsHref;
- if (wsURL.Left(7) != FX_WSTRC(L"http://") &&
- wsURL.Left(6) != FX_WSTRC(L"ftp://")) {
+ if (wsURL.Left(7) != L"http://" && wsURL.Left(6) != L"ftp://") {
CFX_DIBitmap* pBitmap =
pDoc->GetPDFNamedImage(wsURL.AsStringC(), iImageXDpi, iImageYDpi);
if (pBitmap) {
diff --git a/xfa/fxfa/app/xfa_ffwidgetacc.cpp b/xfa/fxfa/app/xfa_ffwidgetacc.cpp
index 5fe591c02a..97adff30ac 100644
--- a/xfa/fxfa/app/xfa_ffwidgetacc.cpp
+++ b/xfa/fxfa/app/xfa_ffwidgetacc.cpp
@@ -183,7 +183,7 @@ bool CXFA_WidgetAcc::GetName(CFX_WideString& wsName, int32_t iNameType) {
}
m_pNode->GetSOMExpression(wsName);
if (iNameType == 2 && wsName.GetLength() >= 15) {
- CFX_WideStringC wsPre = FX_WSTRC(L"xfa[0].form[0].");
+ CFX_WideStringC wsPre = L"xfa[0].form[0].";
if (wsPre == CFX_WideStringC(wsName.c_str(), wsPre.GetLength())) {
wsName.Delete(0, wsPre.GetLength());
}
@@ -1497,7 +1497,7 @@ CXFA_WidgetLayoutData* CXFA_WidgetAcc::GetWidgetLayoutData() {
}
CFX_RetainPtr<CFGAS_GEFont> CXFA_WidgetAcc::GetFDEFont() {
- CFX_WideStringC wsFontName = FX_WSTRC(L"Courier");
+ CFX_WideStringC wsFontName = L"Courier";
uint32_t dwFontStyle = 0;
if (CXFA_Font font = GetFont()) {
if (font.IsBold())
@@ -1541,7 +1541,7 @@ CXFA_Node* CXFA_TextProvider::GetTextNode(bool& bRichText) {
CFX_WideString wsContentType;
m_pTextNode->GetAttribute(XFA_ATTRIBUTE_ContentType, wsContentType,
false);
- if (wsContentType == FX_WSTRC(L"text/html")) {
+ if (wsContentType == L"text/html") {
bRichText = true;
}
}
@@ -1557,7 +1557,7 @@ CXFA_Node* CXFA_TextProvider::GetTextNode(bool& bRichText) {
if (pChildNode && pChildNode->GetElementType() == XFA_Element::ExData) {
CFX_WideString wsContentType;
pChildNode->GetAttribute(XFA_ATTRIBUTE_ContentType, wsContentType, false);
- if (wsContentType == FX_WSTRC(L"text/html")) {
+ if (wsContentType == L"text/html") {
bRichText = true;
}
}
@@ -1592,7 +1592,7 @@ CXFA_Node* CXFA_TextProvider::GetTextNode(bool& bRichText) {
if (pChildNode && pChildNode->GetElementType() == XFA_Element::ExData) {
CFX_WideString wsContentType;
pChildNode->GetAttribute(XFA_ATTRIBUTE_ContentType, wsContentType, false);
- if (wsContentType == FX_WSTRC(L"text/html")) {
+ if (wsContentType == L"text/html") {
bRichText = true;
}
}
@@ -1607,11 +1607,10 @@ CXFA_Node* CXFA_TextProvider::GetTextNode(bool& bRichText) {
while (pNode) {
CFX_WideStringC wsName;
pNode->TryCData(XFA_ATTRIBUTE_Name, wsName);
- if (m_eType == XFA_TEXTPROVIDERTYPE_Rollover &&
- wsName == FX_WSTRC(L"rollover")) {
+ if (m_eType == XFA_TEXTPROVIDERTYPE_Rollover && wsName == L"rollover") {
return pNode;
}
- if (m_eType == XFA_TEXTPROVIDERTYPE_Down && wsName == FX_WSTRC(L"down")) {
+ if (m_eType == XFA_TEXTPROVIDERTYPE_Down && wsName == L"down") {
return pNode;
}
pNode = pNode->GetNodeItem(XFA_NODEITEM_NextSibling);