summaryrefslogtreecommitdiff
path: root/xfa/fxfa/app
diff options
context:
space:
mode:
Diffstat (limited to 'xfa/fxfa/app')
-rw-r--r--xfa/fxfa/app/xfa_ffwidgetacc.cpp14
-rw-r--r--xfa/fxfa/app/xfa_ffwidgethandler.cpp6
-rw-r--r--xfa/fxfa/app/xfa_fontmgr.cpp7
-rw-r--r--xfa/fxfa/app/xfa_textlayout.cpp2
4 files changed, 14 insertions, 15 deletions
diff --git a/xfa/fxfa/app/xfa_ffwidgetacc.cpp b/xfa/fxfa/app/xfa_ffwidgetacc.cpp
index fd3757ace5..11081fd5d7 100644
--- a/xfa/fxfa/app/xfa_ffwidgetacc.cpp
+++ b/xfa/fxfa/app/xfa_ffwidgetacc.cpp
@@ -210,8 +210,7 @@ void CXFA_WidgetAcc::ResetData() {
image.GetContentType(wsContentType);
image.GetHref(wsHref);
}
- SetImageEdit(wsContentType.AsStringC(), wsHref.AsStringC(),
- wsValue.AsStringC());
+ SetImageEdit(wsContentType, wsHref, wsValue);
} break;
case XFA_ELEMENT_ExclGroup: {
CXFA_Node* pNextChild = m_pNode->GetNodeItem(
@@ -252,12 +251,12 @@ void CXFA_WidgetAcc::ResetData() {
break;
}
}
-void CXFA_WidgetAcc::SetImageEdit(const CFX_WideStringC& wsContentType,
- const CFX_WideStringC& wsHref,
- const CFX_WideStringC& wsData) {
+void CXFA_WidgetAcc::SetImageEdit(const CFX_WideString& wsContentType,
+ const CFX_WideString& wsHref,
+ const CFX_WideString& wsData) {
CXFA_Image image = GetFormValue().GetImage();
if (image) {
- image.SetContentType(wsContentType);
+ image.SetContentType(CFX_WideString(wsContentType));
image.SetHref(wsHref);
}
CFX_WideString wsFormatValue(wsData);
@@ -275,8 +274,7 @@ void CXFA_WidgetAcc::SetImageEdit(const CFX_WideStringC& wsContentType,
} else {
CFDE_XMLNode* pXMLNode = pBind->GetXMLMappingNode();
ASSERT(pXMLNode && pXMLNode->GetType() == FDE_XMLNODE_Element);
- static_cast<CFDE_XMLElement*>(pXMLNode)
- ->SetString(FX_WSTRC(L"href"), wsHref);
+ static_cast<CFDE_XMLElement*>(pXMLNode)->SetString(L"href", wsHref);
}
}
diff --git a/xfa/fxfa/app/xfa_ffwidgethandler.cpp b/xfa/fxfa/app/xfa_ffwidgethandler.cpp
index 314b22731a..13cee333a5 100644
--- a/xfa/fxfa/app/xfa_ffwidgethandler.cpp
+++ b/xfa/fxfa/app/xfa_ffwidgethandler.cpp
@@ -328,7 +328,7 @@ CXFA_Node* CXFA_FFWidgetHandler::CreatePushButton(CXFA_Node* pParent,
CXFA_Node* pCaption = CreateCopyNode(XFA_ELEMENT_Caption, pField);
CXFA_Node* pValue = CreateCopyNode(XFA_ELEMENT_Value, pCaption);
CXFA_Node* pText = CreateCopyNode(XFA_ELEMENT_Text, pValue);
- pText->SetContent(FX_WSTRC(L"Button"), FX_WSTRC(L"Button"), FALSE);
+ pText->SetContent(L"Button", L"Button", FALSE);
CXFA_Node* pPara = CreateCopyNode(XFA_ELEMENT_Para, pCaption);
pPara->SetEnum(XFA_ATTRIBUTE_VAlign, XFA_ATTRIBUTEENUM_Middle, FALSE);
@@ -343,7 +343,7 @@ CXFA_Node* CXFA_FFWidgetHandler::CreatePushButton(CXFA_Node* pParent,
CXFA_Node* pFill = CreateCopyNode(XFA_ELEMENT_Fill, pBorder);
CXFA_Node* pColor = CreateCopyNode(XFA_ELEMENT_Color, pFill);
- pColor->SetCData(XFA_ATTRIBUTE_Value, FX_WSTRC(L"212, 208, 200"), FALSE);
+ pColor->SetCData(XFA_ATTRIBUTE_Value, L"212, 208, 200", FALSE);
CXFA_Node* pBind = CreateCopyNode(XFA_ELEMENT_Bind, pField);
pBind->SetEnum(XFA_ATTRIBUTE_Match, XFA_ATTRIBUTEENUM_None);
@@ -515,7 +515,7 @@ CXFA_Node* CXFA_FFWidgetHandler::CreateTemplateNode(XFA_ELEMENT eElement,
CXFA_Node* CXFA_FFWidgetHandler::CreateFontNode(CXFA_Node* pParent) const {
CXFA_Node* pFont = CreateCopyNode(XFA_ELEMENT_Font, pParent);
- pFont->SetCData(XFA_ATTRIBUTE_Typeface, FX_WSTRC(L"Myriad Pro"), FALSE);
+ pFont->SetCData(XFA_ATTRIBUTE_Typeface, L"Myriad Pro", FALSE);
return pFont;
}
diff --git a/xfa/fxfa/app/xfa_fontmgr.cpp b/xfa/fxfa/app/xfa_fontmgr.cpp
index 608c9073c3..bf8c1a7326 100644
--- a/xfa/fxfa/app/xfa_fontmgr.cpp
+++ b/xfa/fxfa/app/xfa_fontmgr.cpp
@@ -1713,7 +1713,7 @@ void XFA_LocalFontNameToEnglishName(const CFX_WideStringC& wsLocalName,
}
const XFA_FONTINFO* XFA_GetFontINFOByFontName(
const CFX_WideStringC& wsFontName) {
- CFX_WideString wsFontNameTemp = wsFontName;
+ CFX_WideString wsFontNameTemp(wsFontName);
wsFontNameTemp.Remove(L' ');
uint32_t dwCurFontNameHash =
FX_HashCode_GetW(wsFontNameTemp.AsStringC(), true);
@@ -1745,7 +1745,7 @@ IFX_Font* CXFA_DefFontMgr::GetFont(CXFA_FFDoc* hDoc,
const CFX_WideStringC& wsFontFamily,
uint32_t dwFontStyles,
uint16_t wCodePage) {
- CFX_WideString wsFontName = wsFontFamily;
+ CFX_WideString wsFontName(wsFontFamily);
IFX_FontMgr* pFDEFontMgr = hDoc->GetApp()->GetFDEFontMgr();
IFX_Font* pFont =
pFDEFontMgr->LoadFont(wsFontName.c_str(), dwFontStyles, wCodePage);
@@ -1882,7 +1882,8 @@ IFX_Font* CXFA_PDFFontMgr::GetFont(const CFX_WideStringC& wsFontFamily,
auto it = m_FontMap.find(strKey);
if (it != m_FontMap.end())
return it->second;
- CFX_ByteString bsPsName = CFX_ByteString::FromUnicode(wsFontFamily);
+ CFX_ByteString bsPsName =
+ CFX_ByteString::FromUnicode(CFX_WideString(wsFontFamily));
FX_BOOL bBold = (dwFontStyles & FX_FONTSTYLE_Bold) == FX_FONTSTYLE_Bold;
FX_BOOL bItalic = (dwFontStyles & FX_FONTSTYLE_Italic) == FX_FONTSTYLE_Italic;
CFX_ByteString strFontName = PsNameToFontName(bsPsName, bBold, bItalic);
diff --git a/xfa/fxfa/app/xfa_textlayout.cpp b/xfa/fxfa/app/xfa_textlayout.cpp
index 1f34b45670..884ec149f2 100644
--- a/xfa/fxfa/app/xfa_textlayout.cpp
+++ b/xfa/fxfa/app/xfa_textlayout.cpp
@@ -283,7 +283,7 @@ void CXFA_TextParser::ParseTagInfo(CFDE_XMLNode* pXMLNode,
CFX_WideString wsValue;
pXMLElement->GetString(FX_WSTRC(L"style").c_str(), wsValue);
if (!wsValue.IsEmpty()) {
- tagProvider.SetAttribute(FX_WSTRC(L"style"), wsValue);
+ tagProvider.SetAttribute(L"style", wsValue);
}
} else if (pXMLNode->GetType() == FDE_XMLNODE_Text) {
tagProvider.m_bTagAviliable = TRUE;