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

Unified Diff: xfa/fxfa/app/xfa_ffwidgetacc.cpp

Issue 1882043004: Remove implicit cast from CFX_WideString to (const wchar_t*) (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: win error #2 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « xfa/fxfa/app/xfa_fftextedit.cpp ('k') | xfa/fxfa/app/xfa_fontmgr.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: xfa/fxfa/app/xfa_ffwidgetacc.cpp
diff --git a/xfa/fxfa/app/xfa_ffwidgetacc.cpp b/xfa/fxfa/app/xfa_ffwidgetacc.cpp
index 4e7da92370986c08a8adf00f73f7527c00028b64..fba296cde7ac16f9c4e3ba800f7c816923933bbe 100644
--- a/xfa/fxfa/app/xfa_ffwidgetacc.cpp
+++ b/xfa/fxfa/app/xfa_ffwidgetacc.cpp
@@ -200,7 +200,7 @@ FX_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].");
- if (wsPre == CFX_WideStringC(wsName, wsPre.GetLength())) {
+ if (wsPre == CFX_WideStringC(wsName.c_str(), wsPre.GetLength())) {
wsName.Delete(0, wsPre.GetLength());
}
}
@@ -528,7 +528,7 @@ int32_t CXFA_WidgetAcc::ProcessNullTestValidate(CXFA_Validate validate,
GetValidateCaptionName(wsCaptionName, bVersionFlag);
CFX_WideString wsError;
pAppProvider->LoadString(XFA_IDS_ValidateNullError, wsError);
- wsNullMsg.Format(wsError, (const FX_WCHAR*)wsCaptionName);
+ wsNullMsg.Format(wsError.c_str(), wsCaptionName.c_str());
}
pAppProvider->MsgBox(wsNullMsg.AsStringC(), wsTitle.AsStringC(),
XFA_MBICON_Status, XFA_MB_OK);
@@ -542,8 +542,8 @@ int32_t CXFA_WidgetAcc::ProcessNullTestValidate(CXFA_Validate validate,
GetValidateCaptionName(wsCaptionName, bVersionFlag);
CFX_WideString wsWarning;
pAppProvider->LoadString(XFA_IDS_ValidateNullWarning, wsWarning);
- wsNullMsg.Format(wsWarning, (const FX_WCHAR*)wsCaptionName,
- (const FX_WCHAR*)wsCaptionName);
+ wsNullMsg.Format(wsWarning.c_str(), wsCaptionName.c_str(),
+ wsCaptionName.c_str());
}
if (pAppProvider->MsgBox(wsNullMsg.AsStringC(), wsTitle.AsStringC(),
XFA_MBICON_Warning, XFA_MB_YesNo) == XFA_IDYes) {
@@ -584,18 +584,18 @@ void CXFA_WidgetAcc::GetValidateMessage(IXFA_AppProvider* pAppProvider,
CFX_WideString wsError;
if (bVersionFlag) {
pAppProvider->LoadString(XFA_IDS_ValidateFailed, wsError);
- wsMessage.Format(wsError, (const FX_WCHAR*)wsCaptionName);
+ wsMessage.Format(wsError.c_str(), wsCaptionName.c_str());
return;
}
if (bError) {
pAppProvider->LoadString(XFA_IDS_ValidateError, wsError);
- wsMessage.Format(wsError, (const FX_WCHAR*)wsCaptionName);
+ wsMessage.Format(wsError.c_str(), wsCaptionName.c_str());
return;
}
CFX_WideString wsWarning;
pAppProvider->LoadString(XFA_IDS_ValidateWarning, wsWarning);
- wsMessage.Format(wsWarning, (const FX_WCHAR*)wsCaptionName,
- (const FX_WCHAR*)wsCaptionName);
+ wsMessage.Format(wsWarning.c_str(), wsCaptionName.c_str(),
+ wsCaptionName.c_str());
}
int32_t CXFA_WidgetAcc::ProcessValidate(int32_t iFlags) {
if (GetClassID() == XFA_ELEMENT_Draw) {
@@ -916,7 +916,7 @@ void CXFA_WidgetAcc::CalculateTextContentSize(CFX_SizeF& size) {
pTextOut->SetStyles(dwStyles);
}
((CXFA_FieldLayoutData*)m_pLayoutData)
- ->m_pTextOut->CalcLogicSize(wsText, wsText.GetLength(), size);
+ ->m_pTextOut->CalcLogicSize(wsText.c_str(), wsText.GetLength(), size);
}
FX_BOOL CXFA_WidgetAcc::CalculateTextEditAutoSize(CFX_SizeF& size) {
if (size.x > 0) {
« no previous file with comments | « xfa/fxfa/app/xfa_fftextedit.cpp ('k') | xfa/fxfa/app/xfa_fontmgr.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698