diff options
author | tsepez <tsepez@chromium.org> | 2016-04-05 12:22:15 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2016-04-05 12:22:15 -0700 |
commit | fc58ad18b7ab32e7b0bb3959b07dbe7538a7cebd (patch) | |
tree | 8662b886d373b149fbdd6f5db9570c233cb23ce7 /xfa/fxfa | |
parent | c7a7349cf316af37d4ad4b71c5742159deccbf33 (diff) | |
download | pdfium-fc58ad18b7ab32e7b0bb3959b07dbe7538a7cebd.tar.xz |
Make down-conversion explicit from CFX_Widetring to CFX_WideStringC.
Companion to https://codereview.chromium.org/1853233002
BUG=
Review URL: https://codereview.chromium.org/1857073002
Diffstat (limited to 'xfa/fxfa')
29 files changed, 276 insertions, 199 deletions
diff --git a/xfa/fxfa/app/xfa_ffbarcode.cpp b/xfa/fxfa/app/xfa_ffbarcode.cpp index e5ace150ab..28dfa86066 100644 --- a/xfa/fxfa/app/xfa_ffbarcode.cpp +++ b/xfa/fxfa/app/xfa_ffbarcode.cpp @@ -167,7 +167,7 @@ void CXFA_FFBarcode::UpdateWidgetProperty() { CFWL_Barcode* pBarCodeWidget = (CFWL_Barcode*)m_pNormalWidget; CFX_WideString wsType = GetDataAcc()->GetBarcodeType(); XFA_LPCBARCODETYPEENUMINFO pBarcodeTypeInfo = - XFA_GetBarcodeTypeByName(wsType); + XFA_GetBarcodeTypeByName(wsType.AsWideStringC()); pBarCodeWidget->SetType(pBarcodeTypeInfo->eBCType); CXFA_WidgetAcc* pAcc = GetDataAcc(); int32_t intVal; diff --git a/xfa/fxfa/app/xfa_ffchoicelist.cpp b/xfa/fxfa/app/xfa_ffchoicelist.cpp index 44ae14264d..645b8c88fa 100644 --- a/xfa/fxfa/app/xfa_ffchoicelist.cpp +++ b/xfa/fxfa/app/xfa_ffchoicelist.cpp @@ -44,7 +44,7 @@ FX_BOOL CXFA_FFListBox::LoadWidget() { m_pDataAcc->GetChoiceListItems(wsLabelArray, FALSE); int32_t iItems = wsLabelArray.GetSize(); for (int32_t i = 0; i < iItems; i++) { - pListBox->AddString(wsLabelArray[i]); + pListBox->AddString(wsLabelArray[i].AsWideStringC()); } uint32_t dwExtendedStyle = FWL_STYLEEXT_LTB_ShowScrollBarFocus; if (m_pDataAcc->GetChoiceListOpen() == XFA_ATTRIBUTEENUM_MultiSelect) { @@ -166,7 +166,7 @@ void CXFA_FFListBox::SetItemState(int32_t nIndex, FX_BOOL bSelected) { void CXFA_FFListBox::InsertItem(const CFX_WideStringC& wsLabel, int32_t nIndex) { CFX_WideString wsTemp(wsLabel); - ((CFWL_ListBox*)m_pNormalWidget)->AddString(wsTemp); + ((CFWL_ListBox*)m_pNormalWidget)->AddString(wsTemp.AsWideStringC()); m_pNormalWidget->Update(); AddInvalidateRect(); } @@ -240,7 +240,7 @@ FX_BOOL CXFA_FFComboBox::LoadWidget() { m_pDataAcc->GetChoiceListItems(wsLabelArray, FALSE); int32_t iItems = wsLabelArray.GetSize(); for (int32_t i = 0; i < iItems; i++) { - pComboBox->AddString(wsLabelArray[i]); + pComboBox->AddString(wsLabelArray[i].AsWideStringC()); } CFX_Int32Array iSelArray; m_pDataAcc->GetSelectedItems(iSelArray); @@ -250,7 +250,7 @@ FX_BOOL CXFA_FFComboBox::LoadWidget() { } else { CFX_WideString wsText; m_pDataAcc->GetValue(wsText, XFA_VALUEPICTURE_Raw); - pComboBox->SetEditText(wsText); + pComboBox->SetEditText(wsText.AsWideStringC()); } UpdateWidgetProperty(); m_pNormalWidget->UnlockUpdate(); @@ -382,7 +382,7 @@ FX_BOOL CXFA_FFComboBox::UpdateFWLData() { CFX_WideString wsText; ((CFWL_ComboBox*)m_pNormalWidget)->SetCurSel(-1); m_pDataAcc->GetValue(wsText, XFA_VALUEPICTURE_Raw); - ((CFWL_ComboBox*)m_pNormalWidget)->SetEditText(wsText); + ((CFWL_ComboBox*)m_pNormalWidget)->SetEditText(wsText.AsWideStringC()); } m_pNormalWidget->Update(); return TRUE; diff --git a/xfa/fxfa/app/xfa_ffdocview.cpp b/xfa/fxfa/app/xfa_ffdocview.cpp index 5e8813542d..c82fd53bc2 100644 --- a/xfa/fxfa/app/xfa_ffdocview.cpp +++ b/xfa/fxfa/app/xfa_ffdocview.cpp @@ -162,7 +162,8 @@ void CXFA_FFDocView::ShowNullTestMsg() { } CFX_WideString wsTitle; pAppProvider->LoadString(XFA_IDS_AppName, wsTitle); - pAppProvider->MsgBox(wsMsg, wsTitle, XFA_MBICON_Status, XFA_MB_OK); + pAppProvider->MsgBox(wsMsg.AsWideStringC(), wsTitle.AsWideStringC(), + XFA_MBICON_Status, XFA_MB_OK); } m_arrNullTestMsg.RemoveAll(); } @@ -515,8 +516,8 @@ CXFA_WidgetAcc* CXFA_FFDocView::GetWidgetAccByName( wsExpression = L"$form." + wsName; } XFA_RESOLVENODE_RS resoveNodeRS; - int32_t iRet = pScriptContext->ResolveObjects(refNode, wsExpression, - resoveNodeRS, dwStyle); + int32_t iRet = pScriptContext->ResolveObjects( + refNode, wsExpression.AsWideStringC(), resoveNodeRS, dwStyle); if (iRet < 1) { return NULL; } diff --git a/xfa/fxfa/app/xfa_fffield.cpp b/xfa/fxfa/app/xfa_fffield.cpp index a0f64e9bb0..229ed43733 100644 --- a/xfa/fxfa/app/xfa_fffield.cpp +++ b/xfa/fxfa/app/xfa_fffield.cpp @@ -731,7 +731,8 @@ int32_t CXFA_FFField::CalculateWidgetAcc(CXFA_WidgetAcc* pAcc) { wsMessage += wsWarning; CFX_WideString wsTitle; pAppProvider->LoadString(XFA_IDS_CalcOverride, wsTitle); - pAppProvider->MsgBox(wsMessage, wsTitle, XFA_MBICON_Warning, + pAppProvider->MsgBox(wsMessage.AsWideStringC(), + wsTitle.AsWideStringC(), XFA_MBICON_Warning, XFA_MB_OK); } } @@ -763,7 +764,8 @@ int32_t CXFA_FFField::CalculateWidgetAcc(CXFA_WidgetAcc* pAcc) { wsMessage += wsWarning; CFX_WideString wsTitle; pAppProvider->LoadString(XFA_IDS_CalcOverride, wsTitle); - if (pAppProvider->MsgBox(wsMessage, wsTitle, XFA_MBICON_Warning, + if (pAppProvider->MsgBox(wsMessage.AsWideStringC(), + wsTitle.AsWideStringC(), XFA_MBICON_Warning, XFA_MB_YesNo) == XFA_IDYes) { pAcc->GetNode()->SetFlag(XFA_NODEFLAG_UserInteractive, TRUE, FALSE); return 1; diff --git a/xfa/fxfa/app/xfa_ffimageedit.cpp b/xfa/fxfa/app/xfa_ffimageedit.cpp index ce69b1242b..d419fbd37d 100644 --- a/xfa/fxfa/app/xfa_ffimageedit.cpp +++ b/xfa/fxfa/app/xfa_ffimageedit.cpp @@ -108,7 +108,8 @@ FX_BOOL CXFA_FFImageEdit::OnLButtonDown(uint32_t dwFlags, CFX_WideString wsFilter; pAppProvider->LoadString(XFA_IDS_ImageFilter, wsFilter); CFX_WideStringArray wsPathArray; - pAppProvider->ShowFileDialog(wsTitle, wsFilter, wsPathArray); + pAppProvider->ShowFileDialog(wsTitle.AsWideStringC(), + wsFilter.AsWideStringC(), wsPathArray); int32_t iSize = wsPathArray.GetSize(); if (iSize < 1) { return TRUE; @@ -147,7 +148,8 @@ FX_BOOL CXFA_FFImageEdit::OnLButtonDown(uint32_t dwFlags, m_pDataAcc->SetImageEditImage(NULL); pFileRead->Release(); } - m_pDataAcc->SetImageEdit(wsContentType, CFX_WideStringC(), wsImage); + m_pDataAcc->SetImageEdit(wsContentType.AsWideStringC(), CFX_WideStringC(), + wsImage.AsWideStringC()); m_pDataAcc->LoadImageEditImage(); AddInvalidateRect(); m_pDocView->SetChangeMark(); diff --git a/xfa/fxfa/app/xfa_ffpageview.cpp b/xfa/fxfa/app/xfa_ffpageview.cpp index e22ddc0394..21eb8554da 100644 --- a/xfa/fxfa/app/xfa_ffpageview.cpp +++ b/xfa/fxfa/app/xfa_ffpageview.cpp @@ -270,7 +270,7 @@ CXFA_FFWidget* CXFA_FFTabOrderPageWidgetIterator::GetTraverseWidget( if (pTraverse) { CFX_WideString wsTraverseWidgetName; if (pTraverse->GetAttribute(XFA_ATTRIBUTE_Ref, wsTraverseWidgetName)) { - return FindWidgetByName(wsTraverseWidgetName, pWidget); + return FindWidgetByName(wsTraverseWidgetName.AsWideStringC(), pWidget); } } } diff --git a/xfa/fxfa/app/xfa_fftextedit.cpp b/xfa/fxfa/app/xfa_fftextedit.cpp index fa530169e0..de93c031b5 100644 --- a/xfa/fxfa/app/xfa_fftextedit.cpp +++ b/xfa/fxfa/app/xfa_fftextedit.cpp @@ -201,7 +201,8 @@ void CXFA_FFTextEdit::ValidateNumberField(const CFX_WideString& wsText) { pAcc->GetNode()->GetSOMExpression(wsSomField); wsMessage.Format(wsError, (const FX_WCHAR*)wsText, (const FX_WCHAR*)wsSomField); - pAppProvider->MsgBox(wsMessage, wsTitle, XFA_MBICON_Error, XFA_MB_OK); + pAppProvider->MsgBox(wsMessage.AsWideStringC(), wsTitle.AsWideStringC(), + XFA_MBICON_Error, XFA_MB_OK); } } } @@ -593,7 +594,7 @@ FX_BOOL CXFA_FFDateTimeEdit::LoadWidget() { m_pNormalWidget->LockUpdate(); CFX_WideString wsText; m_pDataAcc->GetValue(wsText, XFA_VALUEPICTURE_Display); - pWidget->SetEditText(wsText); + pWidget->SetEditText(wsText.AsWideStringC()); if (CXFA_Value value = m_pDataAcc->GetFormValue()) { switch (value.GetChildValueClassID()) { case XFA_ELEMENT_Date: { @@ -693,7 +694,7 @@ FX_BOOL CXFA_FFDateTimeEdit::UpdateFWLData() { } CFX_WideString wsText; m_pDataAcc->GetValue(wsText, eType); - ((CFWL_DateTimePicker*)m_pNormalWidget)->SetEditText(wsText); + ((CFWL_DateTimePicker*)m_pNormalWidget)->SetEditText(wsText.AsWideStringC()); if (IsFocused() && !wsText.IsEmpty()) { CXFA_LocaleValue lcValue = XFA_GetLocaleValue(m_pDataAcc); CFX_Unitime date = lcValue.GetDate(); @@ -776,7 +777,7 @@ void CXFA_FFDateTimeEdit::OnSelectChanged(IFWL_Widget* pWidget, date.FormatPatterns(wsDate, wsPicture, m_pDataAcc->GetLocal(), XFA_VALUEPICTURE_Edit); CFWL_DateTimePicker* pDateTime = (CFWL_DateTimePicker*)m_pNormalWidget; - pDateTime->SetEditText(wsDate); + pDateTime->SetEditText(wsDate.AsWideStringC()); pDateTime->Update(); GetDoc()->GetDocProvider()->SetFocusWidget(GetDoc(), NULL); CXFA_EventParam eParam; diff --git a/xfa/fxfa/app/xfa_ffwidget.cpp b/xfa/fxfa/app/xfa_ffwidget.cpp index 241bae0fdf..3a238ad0f3 100644 --- a/xfa/fxfa/app/xfa_ffwidget.cpp +++ b/xfa/fxfa/app/xfa_ffwidget.cpp @@ -944,7 +944,7 @@ FX_CHAR* XFA_Base64Encode(const uint8_t* buf, int32_t buf_len) { out[j] = '\0'; return out; } -FXCODEC_IMAGE_TYPE XFA_GetImageType(const CFX_WideStringC& wsType) { +FXCODEC_IMAGE_TYPE XFA_GetImageType(const CFX_WideString& wsType) { CFX_WideString wsContentType(wsType); wsContentType.MakeLower(); if (wsContentType == FX_WSTRC(L"image/jpg")) { @@ -1003,7 +1003,7 @@ CFX_DIBitmap* XFA_LoadImageData(CXFA_FFDoc* pDoc, if (wsURL.Left(7) != FX_WSTRC(L"http://") && wsURL.Left(6) != FX_WSTRC(L"ftp://")) { CFX_DIBitmap* pBitmap = - pDoc->GetPDFNamedImage(wsURL, iImageXDpi, iImageYDpi); + pDoc->GetPDFNamedImage(wsURL.AsWideStringC(), iImageXDpi, iImageYDpi); if (pBitmap) { bNameImage = TRUE; return pBitmap; diff --git a/xfa/fxfa/app/xfa_ffwidgetacc.cpp b/xfa/fxfa/app/xfa_ffwidgetacc.cpp index 271f9261f0..fb2b0c3ffd 100644 --- a/xfa/fxfa/app/xfa_ffwidgetacc.cpp +++ b/xfa/fxfa/app/xfa_ffwidgetacc.cpp @@ -229,7 +229,8 @@ void CXFA_WidgetAcc::ResetData() { image.GetContentType(wsContentType); image.GetHref(wsHref); } - SetImageEdit(wsContentType, wsHref, wsValue); + SetImageEdit(wsContentType.AsWideStringC(), wsHref.AsWideStringC(), + wsValue.AsWideStringC()); } break; case XFA_ELEMENT_ExclGroup: { CXFA_Node* pNextChild = m_pNode->GetNodeItem( @@ -411,11 +412,13 @@ void CXFA_WidgetAcc::ProcessScriptTestValidate(CXFA_Validate validate, GetValidateMessage(pAppProvider, wsScriptMsg, FALSE, bVersionFlag); } if (bVersionFlag) { - pAppProvider->MsgBox(wsScriptMsg, wsTitle, XFA_MBICON_Warning, + pAppProvider->MsgBox(wsScriptMsg.AsWideStringC(), + wsTitle.AsWideStringC(), XFA_MBICON_Warning, XFA_MB_OK); return; } - if (pAppProvider->MsgBox(wsScriptMsg, wsTitle, XFA_MBICON_Warning, + if (pAppProvider->MsgBox(wsScriptMsg.AsWideStringC(), + wsTitle.AsWideStringC(), XFA_MBICON_Warning, XFA_MB_YesNo) == XFA_IDYes) { GetNode()->SetFlag(XFA_NODEFLAG_UserInteractive, TRUE, FALSE); } @@ -423,7 +426,9 @@ void CXFA_WidgetAcc::ProcessScriptTestValidate(CXFA_Validate validate, if (wsScriptMsg.IsEmpty()) { GetValidateMessage(pAppProvider, wsScriptMsg, TRUE, bVersionFlag); } - pAppProvider->MsgBox(wsScriptMsg, wsTitle, XFA_MBICON_Error, XFA_MB_OK); + pAppProvider->MsgBox(wsScriptMsg.AsWideStringC(), + wsTitle.AsWideStringC(), XFA_MBICON_Error, + XFA_MB_OK); } } } @@ -456,7 +461,9 @@ int32_t CXFA_WidgetAcc::ProcessFormatTestValidate(CXFA_Validate validate, if (wsFormatMsg.IsEmpty()) { GetValidateMessage(pAppProvider, wsFormatMsg, TRUE, bVersionFlag); } - pAppProvider->MsgBox(wsFormatMsg, wsTitle, XFA_MBICON_Error, XFA_MB_OK); + pAppProvider->MsgBox(wsFormatMsg.AsWideStringC(), + wsTitle.AsWideStringC(), XFA_MBICON_Error, + XFA_MB_OK); return XFA_EVENTERROR_Success; } if (GetNode()->HasFlag(XFA_NODEFLAG_UserInteractive)) { @@ -466,11 +473,13 @@ int32_t CXFA_WidgetAcc::ProcessFormatTestValidate(CXFA_Validate validate, GetValidateMessage(pAppProvider, wsFormatMsg, FALSE, bVersionFlag); } if (bVersionFlag) { - pAppProvider->MsgBox(wsFormatMsg, wsTitle, XFA_MBICON_Warning, + pAppProvider->MsgBox(wsFormatMsg.AsWideStringC(), + wsTitle.AsWideStringC(), XFA_MBICON_Warning, XFA_MB_OK); return XFA_EVENTERROR_Success; } - if (pAppProvider->MsgBox(wsFormatMsg, wsTitle, XFA_MBICON_Warning, + if (pAppProvider->MsgBox(wsFormatMsg.AsWideStringC(), + wsTitle.AsWideStringC(), XFA_MBICON_Warning, XFA_MB_YesNo) == XFA_IDYes) { GetNode()->SetFlag(XFA_NODEFLAG_UserInteractive, TRUE, FALSE); } @@ -526,7 +535,8 @@ int32_t CXFA_WidgetAcc::ProcessNullTestValidate(CXFA_Validate validate, pAppProvider->LoadString(XFA_IDS_ValidateNullError, wsError); wsNullMsg.Format(wsError, (const FX_WCHAR*)wsCaptionName); } - pAppProvider->MsgBox(wsNullMsg, wsTitle, XFA_MBICON_Status, XFA_MB_OK); + pAppProvider->MsgBox(wsNullMsg.AsWideStringC(), wsTitle.AsWideStringC(), + XFA_MBICON_Status, XFA_MB_OK); return XFA_EVENTERROR_Error; } case XFA_ATTRIBUTEENUM_Warning: { @@ -540,7 +550,8 @@ int32_t CXFA_WidgetAcc::ProcessNullTestValidate(CXFA_Validate validate, wsNullMsg.Format(wsWarning, (const FX_WCHAR*)wsCaptionName, (const FX_WCHAR*)wsCaptionName); } - if (pAppProvider->MsgBox(wsNullMsg, wsTitle, XFA_MBICON_Warning, + if (pAppProvider->MsgBox(wsNullMsg.AsWideStringC(), + wsTitle.AsWideStringC(), XFA_MBICON_Warning, XFA_MB_YesNo) == XFA_IDYes) { GetNode()->SetFlag(XFA_NODEFLAG_UserInteractive, TRUE, FALSE); } @@ -671,8 +682,9 @@ int32_t CXFA_WidgetAcc::ExecuteScript(CXFA_Script script, } FXJSE_HVALUE hRetValue = FXJSE_Value_Create(pContext->GetRuntime()); ++m_nRecursionDepth; - FX_BOOL bRet = pContext->RunScript((XFA_SCRIPTLANGTYPE)eScriptType, - wsExpression, hRetValue, m_pNode); + FX_BOOL bRet = + pContext->RunScript((XFA_SCRIPTLANGTYPE)eScriptType, + wsExpression.AsWideStringC(), hRetValue, m_pNode); --m_nRecursionDepth; int32_t iRet = XFA_EVENTERROR_Error; if (bRet) { @@ -1700,11 +1712,12 @@ FX_BOOL CXFA_TextProvider::GetEmbbedObj(FX_BOOL bURI, CXFA_Node* pIDNode = NULL; CXFA_WidgetAcc* pEmbAcc = NULL; if (pParent) { - pIDNode = pDocument->GetNodeByID(pParent, wsAttr); + pIDNode = pDocument->GetNodeByID(pParent, wsAttr.AsWideStringC()); } if (!pIDNode) { pIDNode = pDocument->GetNodeByID( - ToNode(pDocument->GetXFAObject(XFA_HASHCODE_Form)), wsAttr); + ToNode(pDocument->GetXFAObject(XFA_HASHCODE_Form)), + wsAttr.AsWideStringC()); } if (pIDNode) { pEmbAcc = (CXFA_WidgetAcc*)pIDNode->GetWidgetData(); diff --git a/xfa/fxfa/app/xfa_fontmgr.cpp b/xfa/fxfa/app/xfa_fontmgr.cpp index 1b87f95353..8ffb7ce578 100644 --- a/xfa/fxfa/app/xfa_fontmgr.cpp +++ b/xfa/fxfa/app/xfa_fontmgr.cpp @@ -1765,7 +1765,8 @@ IFX_Font* CXFA_DefFontMgr::GetFont(CXFA_FFDoc* hDoc, IFX_FontMgr* pFDEFontMgr = hDoc->GetApp()->GetFDEFontMgr(); IFX_Font* pFont = pFDEFontMgr->LoadFont(wsFontName, dwFontStyles, wCodePage); if (!pFont) { - const XFA_FONTINFO* pCurFont = XFA_GetFontINFOByFontName(wsFontName); + const XFA_FONTINFO* pCurFont = + XFA_GetFontINFOByFontName(wsFontName.AsWideStringC()); if (pCurFont && pCurFont->pReplaceFont) { uint32_t dwStyle = 0; if (dwFontStyles & FX_FONTSTYLE_Bold) { @@ -2029,7 +2030,8 @@ IFX_Font* CXFA_FontMgr::GetFont(CXFA_FFDoc* hDoc, CPDF_Font* pPDFFont = NULL; IFX_Font* pFont = NULL; if (pMgr) { - pFont = pMgr->GetFont(wsEnglishName, dwFontStyles, &pPDFFont); + pFont = + pMgr->GetFont(wsEnglishName.AsWideStringC(), dwFontStyles, &pPDFFont); if (pFont) return pFont; } @@ -2038,7 +2040,8 @@ IFX_Font* CXFA_FontMgr::GetFont(CXFA_FFDoc* hDoc, } if (!pFont && pMgr) { pPDFFont = NULL; - pFont = pMgr->GetFont(wsEnglishName, dwFontStyles, &pPDFFont, FALSE); + pFont = pMgr->GetFont(wsEnglishName.AsWideStringC(), dwFontStyles, + &pPDFFont, FALSE); if (pFont) return pFont; } diff --git a/xfa/fxfa/app/xfa_textlayout.cpp b/xfa/fxfa/app/xfa_textlayout.cpp index 4cbdfd4f8e..cd323633c0 100644 --- a/xfa/fxfa/app/xfa_textlayout.cpp +++ b/xfa/fxfa/app/xfa_textlayout.cpp @@ -317,29 +317,26 @@ void CXFA_TextParser::ParseTagInfo(CFDE_XMLNode* pXMLNode, tagProvider.m_bContent = TRUE; } } + int32_t CXFA_TextParser::GetVAlgin(CXFA_TextProvider* pTextProvider) const { - int32_t iAlign = XFA_ATTRIBUTEENUM_Top; CXFA_Para para = pTextProvider->GetParaNode(); - if (para) { - iAlign = para.GetVerticalAlign(); - } - return iAlign; + return para ? para.GetVerticalAlign() : XFA_ATTRIBUTEENUM_Top; } + FX_FLOAT CXFA_TextParser::GetTabInterval(IFDE_CSSComputedStyle* pStyle) const { CFX_WideString wsValue; - if (pStyle && pStyle->GetCustomStyle(FX_WSTRC(L"tab-interval"), wsValue)) { - CXFA_Measurement ms(wsValue); - return ms.ToUnit(XFA_UNIT_Pt); - } + if (pStyle && pStyle->GetCustomStyle(FX_WSTRC(L"tab-interval"), wsValue)) + return CXFA_Measurement(wsValue.AsWideStringC()).ToUnit(XFA_UNIT_Pt); return 36; } + int32_t CXFA_TextParser::CountTabs(IFDE_CSSComputedStyle* pStyle) const { CFX_WideString wsValue; - if (pStyle && pStyle->GetCustomStyle(FX_WSTRC(L"xfa-tab-count"), wsValue)) { + if (pStyle && pStyle->GetCustomStyle(FX_WSTRC(L"xfa-tab-count"), wsValue)) return wsValue.GetInteger(); - } return 0; } + FX_BOOL CXFA_TextParser::IsSpaceRun(IFDE_CSSComputedStyle* pStyle) const { CFX_WideString wsValue; if (pStyle && pStyle->GetCustomStyle(FX_WSTRC(L"xfa-spacerun"), wsValue)) { diff --git a/xfa/fxfa/app/xfa_textlayout.h b/xfa/fxfa/app/xfa_textlayout.h index 9b92e1796a..d92a2f4058 100644 --- a/xfa/fxfa/app/xfa_textlayout.h +++ b/xfa/fxfa/app/xfa_textlayout.h @@ -25,7 +25,9 @@ class CXFA_CSSTagProvider : public IFDE_CSSTagProvider { public: CXFA_CSSTagProvider() : m_bTagAviliable(FALSE), m_bContent(FALSE) {} virtual ~CXFA_CSSTagProvider(); - virtual CFX_WideStringC GetTagName() { return m_wsTagName; } + + // Note: |this| must outlive the use of GetTagName()'s result. + virtual CFX_WideStringC GetTagName() { return m_wsTagName.AsWideStringC(); } virtual FX_POSITION GetFirstAttribute() { return m_Attributes.GetStartPosition(); } diff --git a/xfa/fxfa/fm2js/xfa_fm2jscontext.cpp b/xfa/fxfa/fm2js/xfa_fm2jscontext.cpp index c016e2033a..518d233745 100644 --- a/xfa/fxfa/fm2js/xfa_fm2jscontext.cpp +++ b/xfa/fxfa/fm2js/xfa_fm2jscontext.cpp @@ -1589,7 +1589,8 @@ void CXFA_FM2JSContext::Time2Num(FXJSE_HOBJECT hThis, pLocale = widgetData.GetLocal(); } else { pLocale = pMgr->GetLocaleByName( - CFX_WideString::FromUTF8(localString, localString.GetLength())); + CFX_WideString::FromUTF8(localString, localString.GetLength()) + .AsWideStringC()); } CFX_WideString wsFormat; if (formatString.IsEmpty()) { @@ -2039,7 +2040,8 @@ FX_BOOL CXFA_FM2JSContext::Local2IsoDate(FXJSE_HOBJECT hThis, pLocale = widgetData.GetLocal(); } else { pLocale = pMgr->GetLocaleByName( - CFX_WideString::FromUTF8(szLocale.c_str(), szLocale.GetLength())); + CFX_WideString::FromUTF8(szLocale.c_str(), szLocale.GetLength()) + .AsWideStringC()); } if (!pLocale) { return FALSE; @@ -2077,7 +2079,8 @@ FX_BOOL CXFA_FM2JSContext::Local2IsoTime(FXJSE_HOBJECT hThis, pLocale = widgetData.GetLocal(); } else { pLocale = pMgr->GetLocaleByName( - CFX_WideString::FromUTF8(szLocale.c_str(), szLocale.GetLength())); + CFX_WideString::FromUTF8(szLocale.c_str(), szLocale.GetLength()) + .AsWideStringC()); } if (!pLocale) { return FALSE; @@ -2118,7 +2121,8 @@ FX_BOOL CXFA_FM2JSContext::IsoDate2Local(FXJSE_HOBJECT hThis, pLocale = widgetData.GetLocal(); } else { pLocale = pMgr->GetLocaleByName( - CFX_WideString::FromUTF8(szLocale.c_str(), szLocale.GetLength())); + CFX_WideString::FromUTF8(szLocale.c_str(), szLocale.GetLength()) + .AsWideStringC()); } if (!pLocale) { return FALSE; @@ -2158,7 +2162,8 @@ FX_BOOL CXFA_FM2JSContext::IsoTime2Local(FXJSE_HOBJECT hThis, pLocale = widgetData.GetLocal(); } else { pLocale = pMgr->GetLocaleByName( - CFX_WideString::FromUTF8(szLocale.c_str(), szLocale.GetLength())); + CFX_WideString::FromUTF8(szLocale.c_str(), szLocale.GetLength()) + .AsWideStringC()); } if (!pLocale) { return FALSE; @@ -2200,7 +2205,8 @@ FX_BOOL CXFA_FM2JSContext::GetGMTTime(FXJSE_HOBJECT hThis, pLocale = widgetData.GetLocal(); } else { pLocale = pMgr->GetLocaleByName( - CFX_WideString::FromUTF8(szLocale.c_str(), szLocale.GetLength())); + CFX_WideString::FromUTF8(szLocale.c_str(), szLocale.GetLength()) + .AsWideStringC()); } if (!pLocale) { return FALSE; @@ -2383,7 +2389,8 @@ void CXFA_FM2JSContext::GetLocalDateFormat(FXJSE_HOBJECT hThis, pLocale = widgetData.GetLocal(); } else { pLocale = pMgr->GetLocaleByName( - CFX_WideString::FromUTF8(szLocalStr.c_str(), szLocalStr.GetLength())); + CFX_WideString::FromUTF8(szLocalStr.c_str(), szLocalStr.GetLength()) + .AsWideStringC()); } if (!pLocale) { return; @@ -2438,7 +2445,8 @@ void CXFA_FM2JSContext::GetLocalTimeFormat(FXJSE_HOBJECT hThis, pLocale = widgetData.GetLocal(); } else { pLocale = pMgr->GetLocaleByName( - CFX_WideString::FromUTF8(szLocalStr.c_str(), szLocalStr.GetLength())); + CFX_WideString::FromUTF8(szLocalStr.c_str(), szLocalStr.GetLength()) + .AsWideStringC()); } if (!pLocale) { return; @@ -3257,8 +3265,9 @@ void CXFA_FM2JSContext::Eval(FXJSE_HOBJECT hThis, CFX_WideTextBuf wsJavaScriptBuf; CFX_WideString javaScript; CFX_WideString wsError; - XFA_FM2JS_Translate(CFX_WideString::FromUTF8( - utf8ScriptString, utf8ScriptString.GetLength()), + XFA_FM2JS_Translate(CFX_WideString::FromUTF8(utf8ScriptString, + utf8ScriptString.GetLength()) + .AsWideStringC(), wsJavaScriptBuf, wsError); FXJSE_HCONTEXT hContext = FXJSE_Context_Create(hruntime); FXJSE_HVALUE returnValue = FXJSE_Value_Create(hruntime); @@ -5481,7 +5490,8 @@ void CXFA_FM2JSContext::Get(FXJSE_HOBJECT hThis, CFX_ByteString urlString; HValueToUTF8String(argOne, urlString); IFX_FileRead* pFile = pAppProvider->DownloadURL( - CFX_WideString::FromUTF8(urlString, urlString.GetLength())); + CFX_WideString::FromUTF8(urlString, urlString.GetLength()) + .AsWideStringC()); if (pFile) { int32_t size = pFile->GetSize(); uint8_t* pData = FX_Alloc(uint8_t, size); @@ -5541,11 +5551,14 @@ void CXFA_FM2JSContext::Post(FXJSE_HOBJECT hThis, } CFX_WideString decodedResponse; FX_BOOL bFlags = pAppProvider->PostRequestURL( - CFX_WideString::FromUTF8(bsURL, bsURL.GetLength()), - CFX_WideString::FromUTF8(bsData, bsData.GetLength()), - CFX_WideString::FromUTF8(bsContentType, bsContentType.GetLength()), - CFX_WideString::FromUTF8(bsEncode, bsEncode.GetLength()), - CFX_WideString::FromUTF8(bsHeader, bsHeader.GetLength()), + CFX_WideString::FromUTF8(bsURL, bsURL.GetLength()).AsWideStringC(), + CFX_WideString::FromUTF8(bsData, bsData.GetLength()).AsWideStringC(), + CFX_WideString::FromUTF8(bsContentType, bsContentType.GetLength()) + .AsWideStringC(), + CFX_WideString::FromUTF8(bsEncode, bsEncode.GetLength()) + .AsWideStringC(), + CFX_WideString::FromUTF8(bsHeader, bsHeader.GetLength()) + .AsWideStringC(), decodedResponse); FXJSE_Value_Release(argOne); FXJSE_Value_Release(argTwo); @@ -5602,9 +5615,10 @@ void CXFA_FM2JSContext::Put(FXJSE_HOBJECT hThis, HValueToUTF8String(argThree, bsEncode); } FX_BOOL bFlags = pAppProvider->PutRequestURL( - CFX_WideString::FromUTF8(bsURL, bsURL.GetLength()), - CFX_WideString::FromUTF8(bsData, bsData.GetLength()), - CFX_WideString::FromUTF8(bsEncode, bsEncode.GetLength())); + CFX_WideString::FromUTF8(bsURL, bsURL.GetLength()).AsWideStringC(), + CFX_WideString::FromUTF8(bsData, bsData.GetLength()).AsWideStringC(), + CFX_WideString::FromUTF8(bsEncode, bsEncode.GetLength()) + .AsWideStringC()); FXJSE_Value_Release(argOne); FXJSE_Value_Release(argTwo); if (argc > 2) { @@ -6410,7 +6424,8 @@ void CXFA_FM2JSContext::eval_translation(FXJSE_HOBJECT hThis, CFX_WideString::FromUTF8(argString, argString.GetLength()); CFX_WideTextBuf wsJavaScriptBuf; CFX_WideString wsError; - XFA_FM2JS_Translate(scriptString, wsJavaScriptBuf, wsError); + XFA_FM2JS_Translate(scriptString.AsWideStringC(), wsJavaScriptBuf, + wsError); if (wsError.IsEmpty()) { CFX_WideString javaScript = wsJavaScriptBuf.GetWideString(); FXJSE_Value_SetUTF8String( @@ -6879,7 +6894,8 @@ FX_BOOL CXFA_FM2JSContext::GetObjectByName( int32_t iRet = pScriptContext->ResolveObjects( pScriptContext->GetThisObject(), CFX_WideString::FromUTF8(szAccessorName.c_str(), - szAccessorName.GetLength()), + szAccessorName.GetLength()) + .AsWideStringC(), resoveNodeRS, dwFlags); if (iRet >= 1 && resoveNodeRS.dwFlags == XFA_RESOVENODE_RSTYPE_Nodes) { FXJSE_Value_Set(accessorValue, pScriptContext->GetJSValueFromMap( @@ -6936,8 +6952,8 @@ int32_t CXFA_FM2JSContext::ResolveObjects(FXJSE_HOBJECT hThis, pNode = (CXFA_Object*)FXJSE_Value_ToObject(hRefValue, NULL); dFlags = XFA_RESOLVENODE_AnyChild; } - iRet = pScriptContext->ResolveObjects(pNode, wsSomExpression, resoveNodeRS, - dFlags); + iRet = pScriptContext->ResolveObjects(pNode, wsSomExpression.AsWideStringC(), + resoveNodeRS, dFlags); return iRet; } void CXFA_FM2JSContext::ParseResolveResult( diff --git a/xfa/fxfa/parser/xfa_document_datamerger_imp.cpp b/xfa/fxfa/parser/xfa_document_datamerger_imp.cpp index a5f021aacd..a28b4994ab 100644 --- a/xfa/fxfa/parser/xfa_document_datamerger_imp.cpp +++ b/xfa/fxfa/parser/xfa_document_datamerger_imp.cpp @@ -131,7 +131,8 @@ static void XFA_DataMerge_CreateDataBinding(CXFA_Node* pFormNode, CFDE_XMLElement* pXMLDataElement = static_cast<CFDE_XMLElement*>(pDataNode->GetXMLMappingNode()); FXSYS_assert(pXMLDataElement); - pWidgetData->GetFormatDataValue(wsValue, wsFormatedValue); + pWidgetData->GetFormatDataValue(wsValue.AsWideStringC(), + wsFormatedValue); pDataNode->SetAttributeValue(wsValue, wsFormatedValue); pDataNode->SetCData(XFA_ATTRIBUTE_ContentType, wsContentType); if (!wsHref.IsEmpty()) { @@ -160,7 +161,8 @@ static void XFA_DataMerge_CreateDataBinding(CXFA_Node* pFormNode, ->SetString(FX_WSTRC(L"xfa:dataNode"), FX_WSTRC(L"dataGroup")); } } else if (!wsValue.IsEmpty()) { - pWidgetData->GetFormatDataValue(wsValue, wsFormatedValue); + pWidgetData->GetFormatDataValue(wsValue.AsWideStringC(), + wsFormatedValue); pDataNode->SetAttributeValue(wsValue, wsFormatedValue); } break; @@ -169,7 +171,8 @@ static void XFA_DataMerge_CreateDataBinding(CXFA_Node* pFormNode, if (wsValue.IsEmpty()) { break; } - pWidgetData->GetFormatDataValue(wsValue, wsFormatedValue); + pWidgetData->GetFormatDataValue(wsValue.AsWideStringC(), + wsFormatedValue); pDataNode->SetAttributeValue(wsValue, wsFormatedValue); break; case XFA_ELEMENT_ExclGroup: { @@ -239,7 +242,8 @@ static void XFA_DataMerge_CreateDataBinding(CXFA_Node* pFormNode, CFX_WideString wsOutput; pWidgetData->NormalizeNumStr(wsValue, wsOutput); wsValue = wsOutput; - pWidgetData->GetFormatDataValue(wsValue, wsFormatedValue); + pWidgetData->GetFormatDataValue(wsValue.AsWideStringC(), + wsFormatedValue); pDataNode->SetAttributeValue(wsValue, wsFormatedValue); CXFA_Node* pValue = pFormNode->GetProperty(0, XFA_ELEMENT_Value); XFA_DataMerge_FormValueNode_SetChildContent(pValue, wsValue, @@ -250,7 +254,8 @@ static void XFA_DataMerge_CreateDataBinding(CXFA_Node* pFormNode, if (wsValue.IsEmpty()) { break; } - pWidgetData->GetFormatDataValue(wsValue, wsFormatedValue); + pWidgetData->GetFormatDataValue(wsValue.AsWideStringC(), + wsFormatedValue); pDataNode->SetAttributeValue(wsValue, wsFormatedValue); break; } @@ -258,7 +263,8 @@ static void XFA_DataMerge_CreateDataBinding(CXFA_Node* pFormNode, CFX_WideString wsXMLValue; pDataNode->TryContent(wsXMLValue); CFX_WideString wsNormailizeValue; - pWidgetData->GetNormalizeDataValue(wsXMLValue, wsNormailizeValue); + pWidgetData->GetNormalizeDataValue(wsXMLValue.AsWideStringC(), + wsNormailizeValue); pDataNode->SetAttributeValue(wsNormailizeValue, wsXMLValue); switch (eUIType) { case XFA_ELEMENT_ImageEdit: { @@ -312,8 +318,8 @@ static void XFA_DataMerge_CreateDataBinding(CXFA_Node* pFormNode, defValue.GetNode(), wsNormailizeValue, XFA_ELEMENT_Text); break; case XFA_ELEMENT_ExclGroup: { - pWidgetData->SetSelectedMemberByValue(wsNormailizeValue, bNotify, FALSE, - FALSE); + pWidgetData->SetSelectedMemberByValue(wsNormailizeValue.AsWideStringC(), + bNotify, FALSE, FALSE); } break; case XFA_ELEMENT_DateTimeEdit: XFA_DataMerge_FormValueNode_SetChildContent( diff --git a/xfa/fxfa/parser/xfa_document_serialize.cpp b/xfa/fxfa/parser/xfa_document_serialize.cpp index 2ae82e3c35..39590f6e8f 100644 --- a/xfa/fxfa/parser/xfa_document_serialize.cpp +++ b/xfa/fxfa/parser/xfa_document_serialize.cpp @@ -297,7 +297,7 @@ static void XFA_DataExporter_RegenerateFormFile_Changed( buf << FX_WSTRC(L" xmlns=\"\"\n>"); for (int32_t i = 0; i < wsSelTextArray.GetSize(); i++) { buf << FX_WSTRC(L"<value\n>"); - buf << XFA_ExportEncodeContent(wsSelTextArray[i]); + buf << XFA_ExportEncodeContent(wsSelTextArray[i].AsWideStringC()); buf << FX_WSTRC(L"</value\n>"); } buf << FX_WSTRC(L"</"); diff --git a/xfa/fxfa/parser/xfa_layout_itemlayout.cpp b/xfa/fxfa/parser/xfa_layout_itemlayout.cpp index eb67b0f99d..d69bf2506c 100644 --- a/xfa/fxfa/parser/xfa_layout_itemlayout.cpp +++ b/xfa/fxfa/parser/xfa_layout_itemlayout.cpp @@ -1388,7 +1388,7 @@ void CXFA_ItemLayoutProcessor::DoLayoutTableContainer(CXFA_Node* pLayoutNode) { wsWidth = widths[i]; wsWidth.TrimLeft(L' '); if (!wsWidth.IsEmpty()) { - CXFA_Measurement measure(wsWidth); + CXFA_Measurement measure(wsWidth.AsWideStringC()); m_rgSpecifiedColumnWidths.Add(measure.ToUnit(XFA_UNIT_Pt)); } } diff --git a/xfa/fxfa/parser/xfa_layout_pagemgr_new.cpp b/xfa/fxfa/parser/xfa_layout_pagemgr_new.cpp index 888cf4fe5b..b12f4ce55d 100644 --- a/xfa/fxfa/parser/xfa_layout_pagemgr_new.cpp +++ b/xfa/fxfa/parser/xfa_layout_pagemgr_new.cpp @@ -297,7 +297,7 @@ static CXFA_Node* XFA_ResolveBreakTarget(CXFA_Node* pPageSetRoot, if (wsTargetExpr.GetAt(0) == '#') { CXFA_Node* pNode = pDocument->GetNodeByID( ToNode(pDocument->GetXFAObject(XFA_HASHCODE_Template)), - wsTargetExpr.Mid(1)); + wsTargetExpr.Mid(1).AsWideStringC()); if (pNode) { return pNode; } @@ -309,7 +309,7 @@ static CXFA_Node* XFA_ResolveBreakTarget(CXFA_Node* pPageSetRoot, } XFA_RESOLVENODE_RS rs; int32_t iCount = pDocument->GetScriptContext()->ResolveObjects( - pPageSetRoot, wsProcessedTarget, rs, + pPageSetRoot, wsProcessedTarget.AsWideStringC(), rs, XFA_RESOLVENODE_Children | XFA_RESOLVENODE_Properties | XFA_RESOLVENODE_Attributes | XFA_RESOLVENODE_Siblings | XFA_RESOLVENODE_Parent); diff --git a/xfa/fxfa/parser/xfa_locale.cpp b/xfa/fxfa/parser/xfa_locale.cpp index 141e295be9..c77dc2637d 100644 --- a/xfa/fxfa/parser/xfa_locale.cpp +++ b/xfa/fxfa/parser/xfa_locale.cpp @@ -79,7 +79,7 @@ void CXFA_XMLLocale::GetNumbericSymbol(FX_LOCALENUMSYMBOL eType, } GetPattern(pElement, CFX_ByteStringC((const FX_CHAR*)bsSymbols, bsSymbols.GetLength() - 1), - wsName, wsNumSymbol); + wsName.AsWideStringC(), wsNumSymbol); } void CXFA_XMLLocale::GetDateTimeSymbols(CFX_WideString& wsDtSymbol) const { if (!m_pLocaleData) { @@ -162,7 +162,7 @@ void CXFA_XMLLocale::GetDatePattern(FX_LOCALEDATETIMESUBCATEGORY eType, wsName = L"long"; break; } - GetPattern(pElement, "datePattern", wsName, wsPattern); + GetPattern(pElement, "datePattern", wsName.AsWideStringC(), wsPattern); } void CXFA_XMLLocale::GetTimePattern(FX_LOCALEDATETIMESUBCATEGORY eType, CFX_WideString& wsPattern) const { @@ -186,7 +186,7 @@ void CXFA_XMLLocale::GetTimePattern(FX_LOCALEDATETIMESUBCATEGORY eType, wsName = L"long"; break; } - GetPattern(pElement, "timePattern", wsName, wsPattern); + GetPattern(pElement, "timePattern", wsName.AsWideStringC(), wsPattern); } void CXFA_XMLLocale::GetNumPattern(FX_LOCALENUMSUBCATEGORY eType, CFX_WideString& wsPattern) const { diff --git a/xfa/fxfa/parser/xfa_localemgr.cpp b/xfa/fxfa/parser/xfa_localemgr.cpp index 7ccf228177..0c09830094 100644 --- a/xfa/fxfa/parser/xfa_localemgr.cpp +++ b/xfa/fxfa/parser/xfa_localemgr.cpp @@ -1132,7 +1132,7 @@ CXFA_LocaleMgr::CXFA_LocaleMgr(CXFA_Node* pLocaleSet, CFX_WideString wsDeflcid) pNodeLocale = pNodeLocale->GetNodeItem(XFA_NODEITEM_NextSibling); } } - m_pDefLocale = GetLocaleByName(wsDeflcid); + m_pDefLocale = GetLocaleByName(wsDeflcid.AsWideStringC()); } CXFA_LocaleMgr::~CXFA_LocaleMgr() { int32_t iCount = m_LocaleArray.GetSize(); @@ -1266,7 +1266,7 @@ CFX_WideStringC CXFA_LocaleMgr::GetConfigLocaleName(CXFA_Node* pConfig) { } m_dwLocaleFlags |= 0x01; } - return m_wsConfigLocale; + return m_wsConfigLocale.AsWideStringC(); } static CXFA_TimeZoneProvider* g_pProvider = NULL; diff --git a/xfa/fxfa/parser/xfa_localevalue.cpp b/xfa/fxfa/parser/xfa_localevalue.cpp index 3c85622b0d..99738c60ae 100644 --- a/xfa/fxfa/parser/xfa_localevalue.cpp +++ b/xfa/fxfa/parser/xfa_localevalue.cpp @@ -369,7 +369,8 @@ CFX_Unitime CXFA_LocaleValue::GetTime() const { if (m_bValid && m_dwType == XFA_VT_TIME) { CFX_Unitime dt(0); FXSYS_assert(m_pLocaleMgr); - FX_TimeFromCanonical(m_wsValue, dt, m_pLocaleMgr->GetDefLocale()); + FX_TimeFromCanonical(m_wsValue.AsWideStringC(), dt, + m_pLocaleMgr->GetDefLocale()); return dt; } return CFX_Unitime(); @@ -380,8 +381,9 @@ CFX_Unitime CXFA_LocaleValue::GetDateTime() const { CFX_Unitime dt; FX_DateFromCanonical(m_wsValue.Left(index), dt); FXSYS_assert(m_pLocaleMgr); - FX_TimeFromCanonical(m_wsValue.Right(m_wsValue.GetLength() - index - 1), dt, - m_pLocaleMgr->GetDefLocale()); + FX_TimeFromCanonical( + m_wsValue.Right(m_wsValue.GetLength() - index - 1).AsWideStringC(), dt, + m_pLocaleMgr->GetDefLocale()); return dt; } return CFX_Unitime(); diff --git a/xfa/fxfa/parser/xfa_object_imp.cpp b/xfa/fxfa/parser/xfa_object_imp.cpp index 4c3ecd2976..1dd526571d 100644 --- a/xfa/fxfa/parser/xfa_object_imp.cpp +++ b/xfa/fxfa/parser/xfa_object_imp.cpp @@ -648,8 +648,8 @@ void CXFA_Node::Script_TreeClass_ResolveNode(CFXJSE_Arguments* pArguments) { XFA_RESOLVENODE_Properties | XFA_RESOLVENODE_Parent | XFA_RESOLVENODE_Siblings; XFA_RESOLVENODE_RS resoveNodeRS; - int32_t iRet = pScriptContext->ResolveObjects(refNode, wsExpression, - resoveNodeRS, dwFlag); + int32_t iRet = pScriptContext->ResolveObjects( + refNode, wsExpression.AsWideStringC(), resoveNodeRS, dwFlag); if (iRet < 1) { return FXJSE_Value_SetNull(pArguments->GetReturnValue()); } @@ -708,7 +708,8 @@ void CXFA_Node::Script_Som_ResolveNodeList(FXJSE_HVALUE hValue, if (refNode == NULL) { refNode = this; } - pScriptContext->ResolveObjects(refNode, wsExpression, resoveNodeRS, dwFlag); + pScriptContext->ResolveObjects(refNode, wsExpression.AsWideStringC(), + resoveNodeRS, dwFlag); CXFA_ArrayNodeList* pNodeList = new CXFA_ArrayNodeList(m_pDocument); if (resoveNodeRS.dwFlags == XFA_RESOVENODE_RSTYPE_Nodes) { for (int32_t i = 0; i < resoveNodeRS.nodes.GetSize(); i++) { @@ -878,7 +879,7 @@ void CXFA_Node::Script_NodeClass_GetAttribute(CFXJSE_Arguments* pArguments) { wsExpression = CFX_WideString::FromUTF8(bsExpression, bsExpression.GetLength()); CFX_WideString wsValue; - GetAttribute(wsExpression, wsValue); + GetAttribute(wsExpression.AsWideStringC(), wsValue); FXJSE_HVALUE hValue = pArguments->GetReturnValue(); if (hValue) { FXJSE_Value_SetUTF8String(hValue, FX_UTF8Encode(wsValue).AsByteStringC()); @@ -900,7 +901,8 @@ void CXFA_Node::Script_NodeClass_GetElement(CFXJSE_Arguments* pArguments) { if (iLength >= 2) { iValue = pArguments->GetInt32(1); } - const XFA_ELEMENTINFO* pElementInfo = XFA_GetElementByName(wsExpression); + const XFA_ELEMENTINFO* pElementInfo = + XFA_GetElementByName(wsExpression.AsWideStringC()); CXFA_Node* pNode = GetProperty(iValue, pElementInfo->eName); FXJSE_Value_Set(pArguments->GetReturnValue(), m_pDocument->GetScriptContext()->GetJSValueFromMap(pNode)); @@ -929,13 +931,14 @@ void CXFA_Node::Script_NodeClass_IsPropertySpecified( } FX_BOOL bHas = FALSE; const XFA_ATTRIBUTEINFO* pAttributeInfo = - XFA_GetAttributeByName(wsExpression); + XFA_GetAttributeByName(wsExpression.AsWideStringC()); CFX_WideString wsValue; if (pAttributeInfo) { bHas = HasAttribute(pAttributeInfo->eName); } if (!bHas) { - const XFA_ELEMENTINFO* pElementInfo = XFA_GetElementByName(wsExpression); + const XFA_ELEMENTINFO* pElementInfo = + XFA_GetElementByName(wsExpression.AsWideStringC()); bHas = (GetProperty(iIndex, pElementInfo->eName) != NULL); } FXJSE_HVALUE hValue = pArguments->GetReturnValue(); @@ -1158,7 +1161,8 @@ void CXFA_Node::Script_NodeClass_SetAttribute(CFXJSE_Arguments* pArguments) { wsAttributeValue = CFX_WideString::FromUTF8(bsAttributeValue, bsAttributeValue.GetLength()); wsAttribute = CFX_WideString::FromUTF8(bsAttribute, bsAttribute.GetLength()); - SetAttribute(wsAttribute, wsAttributeValue, TRUE); + SetAttribute(wsAttribute.AsWideStringC(), wsAttributeValue.AsWideStringC(), + TRUE); } void CXFA_Node::Script_NodeClass_SetElement(CFXJSE_Arguments* pArguments) { int32_t iLength = pArguments->GetLength(); @@ -1483,7 +1487,7 @@ void CXFA_Node::Script_Attribute_String(FXJSE_HVALUE hValue, FXJSE_Value_ToUTF8String(hValue, szValue); CFX_WideString wsValue = CFX_WideString::FromUTF8(szValue, szValue.GetLength()); - SetAttribute(eAttribute, wsValue, TRUE); + SetAttribute(eAttribute, wsValue.AsWideStringC(), TRUE); if (eAttribute == XFA_ATTRIBUTE_Use && GetClassID() == XFA_ELEMENT_Desc) { CFX_WideString wsUseVal = wsValue, wsID, wsSOM; CXFA_Node* pTemplateNode = @@ -1508,12 +1512,12 @@ void CXFA_Node::Script_Attribute_String(FXJSE_HVALUE hValue, XFA_RESOLVENODE_Siblings; XFA_RESOLVENODE_RS resoveNodeRS; int32_t iRet = m_pDocument->GetScriptContext()->ResolveObjects( - pProtoRoot, wsSOM, resoveNodeRS, dwFlag); + pProtoRoot, wsSOM.AsWideStringC(), resoveNodeRS, dwFlag); if (iRet > 0 && resoveNodeRS.nodes[0]->IsNode()) { pProtoNode = resoveNodeRS.nodes[0]->AsNode(); } } else if (!wsID.IsEmpty()) { - pProtoNode = m_pDocument->GetNodeByID(pProtoRoot, wsID); + pProtoNode = m_pDocument->GetNodeByID(pProtoRoot, wsID.AsWideStringC()); } if (pProtoNode) { CXFA_Node* pHeadChild = GetNodeItem(XFA_NODEITEM_FirstChild); @@ -1701,7 +1705,8 @@ void CXFA_Node::Script_Som_DefaultValue(FXJSE_HVALUE hValue, pContainerWidgetData = GetContainerWidgetData(); } if (pContainerWidgetData) { - pContainerWidgetData->GetFormatDataValue(wsNewValue, wsFormatValue); + pContainerWidgetData->GetFormatDataValue(wsNewValue.AsWideStringC(), + wsFormatValue); } SetScriptContent(wsNewValue, wsFormatValue, TRUE, TRUE); } else { @@ -1712,7 +1717,7 @@ void CXFA_Node::Script_Som_DefaultValue(FXJSE_HVALUE hValue, } else if (classID == XFA_ELEMENT_Integer) { FXJSE_Value_SetInteger(hValue, FXSYS_wtoi(content)); } else if (classID == XFA_ELEMENT_Float || classID == XFA_ELEMENT_Decimal) { - CFX_Decimal decimal(content); + CFX_Decimal decimal(content.AsWideStringC()); FXJSE_Value_SetFloat(hValue, (FX_FLOAT)(double)decimal); } else { FXJSE_Value_SetUTF8String( @@ -1748,7 +1753,8 @@ void CXFA_Node::Script_Boolean_Value(FXJSE_HVALUE hValue, CFX_WideString wsFormatValue(wsNewValue); CXFA_WidgetData* pContainerWidgetData = GetContainerWidgetData(); if (pContainerWidgetData) { - pContainerWidgetData->GetFormatDataValue(wsNewValue, wsFormatValue); + pContainerWidgetData->GetFormatDataValue(wsNewValue.AsWideStringC(), + wsFormatValue); } SetScriptContent(wsNewValue, wsFormatValue, TRUE, TRUE); } else { @@ -1891,7 +1897,7 @@ void CXFA_Node::Script_Som_BorderWidth(FXJSE_HVALUE hValue, wsThickness = CFX_WideString::FromUTF8(bsValue, bsValue.GetLength()); for (int32_t i = 0; i < iSize; ++i) { CXFA_Edge edge = border.GetEdge(i); - CXFA_Measurement thickness(wsThickness); + CXFA_Measurement thickness(wsThickness.AsWideStringC()); edge.SetMSThickness(thickness); } } else { @@ -2008,7 +2014,8 @@ void CXFA_Node::Script_Field_DefaultValue(FXJSE_HVALUE hValue, CXFA_WidgetData* pContainerWidgetData = GetContainerWidgetData(); CFX_WideString wsFormatText(wsNewText); if (pContainerWidgetData) { - pContainerWidgetData->GetFormatDataValue(wsNewText, wsFormatText); + pContainerWidgetData->GetFormatDataValue(wsNewText.AsWideStringC(), + wsFormatText); } SetScriptContent(wsNewText, wsFormatText, TRUE, TRUE); } else { @@ -2027,7 +2034,7 @@ void CXFA_Node::Script_Field_DefaultValue(FXJSE_HVALUE hValue, hValue, FX_UTF8Encode(content, content.GetLength()).AsByteStringC()); } else { - CFX_Decimal decimal(content); + CFX_Decimal decimal(content.AsWideStringC()); FXJSE_Value_SetFloat(hValue, (FX_FLOAT)(double)decimal); } } else if (pNode && pNode->GetClassID() == XFA_ELEMENT_Integer) { @@ -2035,7 +2042,7 @@ void CXFA_Node::Script_Field_DefaultValue(FXJSE_HVALUE hValue, } else if (pNode && pNode->GetClassID() == XFA_ELEMENT_Boolean) { FXJSE_Value_SetBoolean(hValue, FXSYS_wtoi(content) == 0 ? FALSE : TRUE); } else if (pNode && pNode->GetClassID() == XFA_ELEMENT_Float) { - CFX_Decimal decimal(content); + CFX_Decimal decimal(content.AsWideStringC()); FXJSE_Value_SetFloat(hValue, (FX_FLOAT)(double)decimal); } else { FXJSE_Value_SetUTF8String( @@ -2183,7 +2190,8 @@ void CXFA_Node::Script_Field_ExecEvent(CFXJSE_Arguments* pArguments) { if (argc == 1) { CFX_ByteString eventString = pArguments->GetUTF8String(0); int32_t iRet = execSingleEventByName( - CFX_WideString::FromUTF8(eventString, eventString.GetLength()), + CFX_WideString::FromUTF8(eventString, eventString.GetLength()) + .AsWideStringC(), XFA_ELEMENT_Field); if (eventString == "validate") { FXJSE_Value_SetBoolean(pArguments->GetReturnValue(), @@ -2263,7 +2271,7 @@ void CXFA_Node::Script_Field_BoundItem(CFXJSE_Arguments* pArguments) { CFX_WideString wsValue = CFX_WideString::FromUTF8(bsValue, bsValue.GetLength()); CFX_WideString wsBoundValue; - pWidgetData->GetItemValue(wsValue, wsBoundValue); + pWidgetData->GetItemValue(wsValue.AsWideStringC(), wsBoundValue); FXJSE_HVALUE hValue = pArguments->GetReturnValue(); if (hValue) { FXJSE_Value_SetUTF8String(hValue, @@ -2407,7 +2415,8 @@ void CXFA_Node::Script_ExclGroup_DefaultAndRawValue(FXJSE_HVALUE hValue, CFX_ByteString bsValue; FXJSE_Value_ToUTF8String(hValue, bsValue); pWidgetData->SetSelectedMemberByValue( - CFX_WideString::FromUTF8(bsValue, bsValue.GetLength()), TRUE, TRUE); + CFX_WideString::FromUTF8(bsValue, bsValue.GetLength()).AsWideStringC(), + TRUE, TRUE); } else { CFX_WideString wsValue = GetScriptContent(TRUE); XFA_VERSION curVersion = GetDocument()->GetCurVersionMode(); @@ -2426,7 +2435,8 @@ void CXFA_Node::Script_ExclGroup_ExecEvent(CFXJSE_Arguments* pArguments) { if (argc == 1) { CFX_ByteString eventString = pArguments->GetUTF8String(0); execSingleEventByName( - CFX_WideString::FromUTF8(eventString, eventString.GetLength()), + CFX_WideString::FromUTF8(eventString, eventString.GetLength()) + .AsWideStringC(), XFA_ELEMENT_ExclGroup); } else { ThrowScriptErrorMessage(XFA_IDS_INCORRECT_NUMBER_OF_METHOD, L"execEvent"); @@ -2446,7 +2456,8 @@ void CXFA_Node::Script_ExclGroup_SelectedMember(CFXJSE_Arguments* pArguments) { CFX_ByteString szName; szName = pArguments->GetUTF8String(0); pReturnNode = pWidgetData->SetSelectedMember( - CFX_WideString::FromUTF8(szName, szName.GetLength())); + CFX_WideString::FromUTF8(szName, szName.GetLength()) + .AsWideStringC()); } if (pReturnNode) { FXJSE_Value_Set( @@ -2622,7 +2633,8 @@ void CXFA_Node::Script_Subform_ExecEvent(CFXJSE_Arguments* pArguments) { if (argc == 1) { CFX_ByteString eventString = pArguments->GetUTF8String(0); execSingleEventByName( - CFX_WideString::FromUTF8(eventString, eventString.GetLength()), + CFX_WideString::FromUTF8(eventString, eventString.GetLength()) + .AsWideStringC(), XFA_ELEMENT_Subform); } else { ThrowScriptErrorMessage(XFA_IDS_INCORRECT_NUMBER_OF_METHOD, L"execEvent"); @@ -2738,7 +2750,8 @@ void CXFA_Node::Script_Template_CreateNode(CFXJSE_Arguments* pArguments) { CFX_WideString::FromUTF8(bsNameSpace, bsNameSpace.GetLength()); } } - const XFA_ELEMENTINFO* pElement = XFA_GetElementByName(strTagName); + const XFA_ELEMENTINFO* pElement = + XFA_GetElementByName(strTagName.AsWideStringC()); CXFA_Node* pNewNode = CreateSamePacketNode(pElement->eName); if (!pNewNode) { FXJSE_Value_SetNull(pArguments->GetReturnValue()); @@ -2746,7 +2759,8 @@ void CXFA_Node::Script_Template_CreateNode(CFXJSE_Arguments* pArguments) { if (!strName.IsEmpty()) { if (XFA_GetAttributeOfElement(pElement->eName, XFA_ATTRIBUTE_Name, XFA_XDPPACKET_UNKNOWN)) { - pNewNode->SetAttribute(XFA_ATTRIBUTE_Name, strName, TRUE); + pNewNode->SetAttribute(XFA_ATTRIBUTE_Name, strName.AsWideStringC(), + TRUE); if (pNewNode->GetPacketID() == XFA_XDPPACKET_Datasets) { pNewNode->CreateXMLMappingNode(); } @@ -3504,7 +3518,8 @@ void CXFA_Node::Script_Form_Checksum(FXJSE_HVALUE hValue, CFX_ByteString bsChecksum; FXJSE_Value_ToUTF8String(hValue, bsChecksum); SetAttribute(XFA_ATTRIBUTE_Checksum, - CFX_WideString::FromUTF8(bsChecksum, bsChecksum.GetLength())); + CFX_WideString::FromUTF8(bsChecksum, bsChecksum.GetLength()) + .AsWideStringC()); } else { CFX_WideString wsChecksum; GetAttribute(XFA_ATTRIBUTE_Checksum, wsChecksum, FALSE); @@ -3964,7 +3979,7 @@ FX_BOOL CXFA_Node::SetCData(XFA_ATTRIBUTE eAttr, CFX_WideString* pClone = new CFX_WideString(wsValue); SetUserData(pKey, pClone, &deleteWideStringCallBack); } else { - SetMapModuleString(pKey, wsValue); + SetMapModuleString(pKey, wsValue.AsWideStringC()); if (eAttr == XFA_ATTRIBUTE_Name) UpdateNameHash(); } @@ -4321,7 +4336,8 @@ FX_BOOL CXFA_Node::SetScriptContent(const CFX_WideString& wsContent, GetAttribute(XFA_ATTRIBUTE_ContentType, wsContentType, FALSE); if (wsContentType == FX_WSTRC(L"text/html")) { wsContentType = FX_WSTRC(L""); - SetAttribute(XFA_ATTRIBUTE_ContentType, wsContentType); + SetAttribute(XFA_ATTRIBUTE_ContentType, + wsContentType.AsWideStringC()); } } CXFA_Node* pContentRawDataNode = GetNodeItem(XFA_NODEITEM_FirstChild); @@ -5233,7 +5249,7 @@ void CXFA_Node::MoveBufferMapData(CXFA_Node* pDstModule, void* pKey) { CFX_WideString wsFormatValue(wsValue); CXFA_WidgetData* pWidgetData = pDstModule->GetContainerWidgetData(); if (pWidgetData) { - pWidgetData->GetFormatDataValue(wsValue, wsFormatValue); + pWidgetData->GetFormatDataValue(wsValue.AsWideStringC(), wsFormatValue); } pDstModule->SetScriptContent(wsValue, wsFormatValue, TRUE, TRUE); } @@ -5332,8 +5348,8 @@ void CXFA_NodeList::Script_TreelistClass_NamedItem( int32_t argc = pArguments->GetLength(); if (argc == 1) { CFX_ByteString szName = pArguments->GetUTF8String(0); - CXFA_Node* pNode = - NamedItem(CFX_WideString::FromUTF8(szName, szName.GetLength())); + CXFA_Node* pNode = NamedItem( + CFX_WideString::FromUTF8(szName, szName.GetLength()).AsWideStringC()); if (!pNode) { return; } diff --git a/xfa/fxfa/parser/xfa_objectacc_imp.cpp b/xfa/fxfa/parser/xfa_objectacc_imp.cpp index 94657c6e50..22f8fc2b34 100644 --- a/xfa/fxfa/parser/xfa_objectacc_imp.cpp +++ b/xfa/fxfa/parser/xfa_objectacc_imp.cpp @@ -477,7 +477,7 @@ FX_BOOL CXFA_Image::SetHref(const CFX_WideString& wsHref) { if (m_bDefValue) { return m_pNode->SetCData(XFA_ATTRIBUTE_Href, wsHref); } - return m_pNode->SetAttribute(XFA_ATTRIBUTE_Href, wsHref); + return m_pNode->SetAttribute(XFA_ATTRIBUTE_Href, wsHref.AsWideStringC()); } FX_BOOL CXFA_Image::SetTransferEncoding(int32_t iTransferEncoding) { if (m_bDefValue) { @@ -510,7 +510,8 @@ int32_t CXFA_Validate::GetFormatTest() { FX_BOOL CXFA_Validate::SetTestValue(int32_t iType, CFX_WideString& wsValue, XFA_ATTRIBUTEENUM eName) { - const XFA_ATTRIBUTEENUMINFO* pInfo = XFA_GetAttributeEnumByName(wsValue); + const XFA_ATTRIBUTEENUMINFO* pInfo = + XFA_GetAttributeEnumByName(wsValue.AsWideStringC()); if (pInfo) { eName = pInfo->eName; } @@ -1590,7 +1591,7 @@ void CXFA_WidgetData::SetItemState(int32_t nIndex, if (iSel < 0) { CFX_WideString wsSaveText = wsSaveTextArray[nIndex]; CFX_WideString wsFormatText(wsSaveText); - GetFormatDataValue(wsSaveText, wsFormatText); + GetFormatDataValue(wsSaveText.AsWideStringC(), wsFormatText); m_pNode->SetContent(wsSaveText, wsFormatText, bNotify, bScriptModify, bSyncData); } @@ -1619,7 +1620,7 @@ void CXFA_WidgetData::SetSelectdItems(CFX_Int32Array& iSelArray, } CFX_WideString wsFormat(wsValue); if (GetChoiceListOpen() != XFA_ATTRIBUTEENUM_MultiSelect) { - GetFormatDataValue(wsValue, wsFormat); + GetFormatDataValue(wsValue.AsWideStringC(), wsFormat); } m_pNode->SetContent(wsValue, wsFormat, bNotify, bScriptModify, bSyncData); } @@ -1656,19 +1657,19 @@ void CXFA_WidgetData::InsertItem(const CFX_WideString& wsLabel, if (iCount < 1) { CXFA_Node* pItems = m_pNode->CreateSamePacketNode(XFA_ELEMENT_Items); m_pNode->InsertChild(-1, pItems); - InsertListTextItem(pItems, wsLabel, nIndex); + InsertListTextItem(pItems, wsLabel.AsWideStringC(), nIndex); CXFA_Node* pSaveItems = m_pNode->CreateSamePacketNode(XFA_ELEMENT_Items); m_pNode->InsertChild(-1, pSaveItems); pSaveItems->SetBoolean(XFA_ATTRIBUTE_Save, TRUE); - InsertListTextItem(pSaveItems, wsNewValue, nIndex); + InsertListTextItem(pSaveItems, wsNewValue.AsWideStringC(), nIndex); } else if (iCount > 1) { for (int32_t i = 0; i < 2; i++) { CXFA_Node* pNode = listitems[i]; FX_BOOL bHasSave = pNode->GetBoolean(XFA_ATTRIBUTE_Save); if (bHasSave) { - InsertListTextItem(pNode, wsNewValue, nIndex); + InsertListTextItem(pNode, wsNewValue.AsWideStringC(), nIndex); } else { - InsertListTextItem(pNode, wsLabel, nIndex); + InsertListTextItem(pNode, wsLabel.AsWideStringC(), nIndex); } } } else { @@ -1685,12 +1686,12 @@ void CXFA_WidgetData::InsertItem(const CFX_WideString& wsLabel, while (pListNode) { CFX_WideString wsOldValue; pListNode->TryContent(wsOldValue); - InsertListTextItem(pSaveItems, wsOldValue, i); + InsertListTextItem(pSaveItems, wsOldValue.AsWideStringC(), i); i++; pListNode = pListNode->GetNodeItem(XFA_NODEITEM_NextSibling); } - InsertListTextItem(pNode, wsLabel, nIndex); - InsertListTextItem(pSaveItems, wsNewValue, nIndex); + InsertListTextItem(pNode, wsLabel.AsWideStringC(), nIndex); + InsertListTextItem(pSaveItems, wsNewValue.AsWideStringC(), nIndex); } if (!bNotify) { return; @@ -2101,7 +2102,7 @@ CFX_WideString XFA_NumericLimit(const CFX_WideString& wsValue, iTread_++; if (iTread_ > iTread) { if (iTread != -1) { - CFX_Decimal wsDeci = CFX_Decimal(wsValue); + CFX_Decimal wsDeci = CFX_Decimal(wsValue.AsWideStringC()); wsDeci.SetScale(iTread); wsRet = wsDeci; } @@ -2276,8 +2277,8 @@ IFX_Locale* CXFA_WidgetData::GetLocal() { if (wsLocaleName == FX_WSTRC(L"ambient")) { pLocale = m_pNode->GetDocument()->GetLocalMgr()->GetDefLocale(); } else { - pLocale = - m_pNode->GetDocument()->GetLocalMgr()->GetLocaleByName(wsLocaleName); + pLocale = m_pNode->GetDocument()->GetLocalMgr()->GetLocaleByName( + wsLocaleName.AsWideStringC()); } } return pLocale; @@ -2332,7 +2333,7 @@ FX_BOOL CXFA_WidgetData::GetValue(CFX_WideString& wsValue, wsValue = m_pNode->GetContent(); if (eValueType == XFA_VALUEPICTURE_Display) - GetItemLabel(wsValue, wsValue); + GetItemLabel(wsValue.AsWideStringC(), wsValue); CFX_WideString wsPicture; GetPictureContent(wsPicture, eValueType); @@ -2575,7 +2576,8 @@ void CXFA_WidgetData::SyncValue(const CFX_WideString& wsValue, CFX_WideString wsFormatValue(wsValue); CXFA_WidgetData* pContainerWidgetData = m_pNode->GetContainerWidgetData(); if (pContainerWidgetData) { - pContainerWidgetData->GetFormatDataValue(wsValue, wsFormatValue); + pContainerWidgetData->GetFormatDataValue(wsValue.AsWideStringC(), + wsFormatValue); } m_pNode->SetContent(wsValue, wsFormatValue, bNotify); } diff --git a/xfa/fxfa/parser/xfa_parser_imp.cpp b/xfa/fxfa/parser/xfa_parser_imp.cpp index f4a479d7c3..4c831d5b8f 100644 --- a/xfa/fxfa/parser/xfa_parser_imp.cpp +++ b/xfa/fxfa/parser/xfa_parser_imp.cpp @@ -225,8 +225,8 @@ static inline void XFA_FDEExtension_GetElementTagNamespaceURI( CFX_WideString& wsNamespaceURI) { CFX_WideString wsNodeStr; pElement->GetNamespacePrefix(wsNodeStr); - if (!XFA_FDEExtension_ResolveNamespaceQualifier(pElement, wsNodeStr, - wsNamespaceURI)) { + if (!XFA_FDEExtension_ResolveNamespaceQualifier( + pElement, wsNodeStr.AsWideStringC(), wsNamespaceURI)) { wsNamespaceURI.Empty(); } } @@ -283,8 +283,8 @@ static FX_BOOL XFA_FDEExtension_ResolveAttribute( wsNSPrefix == FX_WSTRC(L"xmlns") || wsNSPrefix == FX_WSTRC(L"xml")) { return FALSE; } - if (!XFA_FDEExtension_ResolveNamespaceQualifier(pElement, wsNSPrefix, - wsNamespaceURI)) { + if (!XFA_FDEExtension_ResolveNamespaceQualifier( + pElement, wsNSPrefix.AsWideStringC(), wsNamespaceURI)) { wsNamespaceURI.Empty(); return FALSE; } @@ -318,8 +318,8 @@ static FX_BOOL XFA_FDEExtension_FindAttributeWithNS( } wsNSPrefix = wsAttrName.Left(iFind); } - if (!XFA_FDEExtension_ResolveNamespaceQualifier(pElement, wsNSPrefix, - wsAttrNS)) { + if (!XFA_FDEExtension_ResolveNamespaceQualifier( + pElement, wsNSPrefix.AsWideStringC(), wsAttrNS)) { continue; } if (bMatchNSAsPrefix) { @@ -433,7 +433,8 @@ CXFA_Node* CXFA_SimpleParser::ParseAsXDPPacket_XDP( reinterpret_cast<CFDE_XMLElement*>(pChildItem); CFX_WideString wsPacketName; pElement->GetLocalTagName(wsPacketName); - const XFA_PACKETINFO* pPacketInfo = XFA_GetPacketByName(wsPacketName); + const XFA_PACKETINFO* pPacketInfo = + XFA_GetPacketByName(wsPacketName.AsWideStringC()); if (pPacketInfo && pPacketInfo->pURI) { if (!XFA_FDEExtension_MatchNodeName(pElement, pPacketInfo->pName, pPacketInfo->pURI, @@ -585,7 +586,7 @@ CXFA_Node* CXFA_SimpleParser::ParseAsXDPPacket_TemplateForm( } pNode->SetCData(XFA_ATTRIBUTE_Name, XFA_GetPacketByIndex(XFA_PACKET_Form)->pName); - pNode->SetAttribute(XFA_ATTRIBUTE_Checksum, wsChecksum); + pNode->SetAttribute(XFA_ATTRIBUTE_Checksum, wsChecksum.AsWideStringC()); CXFA_Node* pTemplateRoot = m_pRootNode->GetFirstChildByClass(XFA_ELEMENT_Template); CXFA_Node* pTemplateChosen = @@ -821,7 +822,8 @@ CXFA_Node* CXFA_SimpleParser::NormalLoader(CXFA_Node* pXFANode, CFDE_XMLElement* pXMLElement = static_cast<CFDE_XMLElement*>(pXMLChild); CFX_WideString wsTagName; pXMLElement->GetLocalTagName(wsTagName); - const XFA_ELEMENTINFO* pElemInfo = XFA_GetElementByName(wsTagName); + const XFA_ELEMENTINFO* pElemInfo = + XFA_GetElementByName(wsTagName.AsWideStringC()); if (!pElemInfo) { continue; } @@ -841,7 +843,8 @@ CXFA_Node* CXFA_SimpleParser::NormalLoader(CXFA_Node* pXFANode, return NULL; } if (ePacketID == XFA_XDPPACKET_Config) { - pXFAChild->SetAttribute(XFA_ATTRIBUTE_Name, wsTagName); + pXFAChild->SetAttribute(XFA_ATTRIBUTE_Name, + wsTagName.AsWideStringC()); } FX_BOOL IsNeedValue = TRUE; for (int32_t i = 0, count = pXMLElement->CountAttributes(); i < count; @@ -850,14 +853,14 @@ CXFA_Node* CXFA_SimpleParser::NormalLoader(CXFA_Node* pXFANode, CFX_WideString wsAttrName; CFX_WideString wsAttrValue; pXMLElement->GetAttribute(i, wsAttrQualifiedName, wsAttrValue); - XFA_FDEExtension_GetAttributeLocalName(wsAttrQualifiedName, - wsAttrName); + XFA_FDEExtension_GetAttributeLocalName( + wsAttrQualifiedName.AsWideStringC(), wsAttrName); if (wsAttrName == FX_WSTRC(L"nil") && wsAttrValue == FX_WSTRC(L"true")) { IsNeedValue = FALSE; } const XFA_ATTRIBUTEINFO* lpAttrInfo = - XFA_GetAttributeByName(wsAttrName); + XFA_GetAttributeByName(wsAttrName.AsWideStringC()); if (!lpAttrInfo) { continue; } @@ -865,7 +868,8 @@ CXFA_Node* CXFA_SimpleParser::NormalLoader(CXFA_Node* pXFANode, lpAttrInfo->eName != XFA_ATTRIBUTE_Save) { continue; } - pXFAChild->SetAttribute(lpAttrInfo->eName, wsAttrValue); + pXFAChild->SetAttribute(lpAttrInfo->eName, + wsAttrValue.AsWideStringC()); } pXFANode->InsertChild(pXFAChild); if (pElemInfo->eName == XFA_ELEMENT_Validate || @@ -1108,8 +1112,8 @@ void CXFA_SimpleParser::ParseDataGroup(CXFA_Node* pXFANode, CFX_WideString wsAttrNamespaceURI; pXMLElement->GetAttribute(i, wsAttrQualifiedName, wsAttrValue); if (!XFA_FDEExtension_ResolveAttribute( - pXMLElement, wsAttrQualifiedName, wsAttrName, - wsAttrNamespaceURI)) { + pXMLElement, wsAttrQualifiedName.AsWideStringC(), + wsAttrName, wsAttrNamespaceURI)) { continue; } if (wsAttrName == FX_WSTRC(L"nil") && diff --git a/xfa/fxfa/parser/xfa_script_hostpseudomodel.cpp b/xfa/fxfa/parser/xfa_script_hostpseudomodel.cpp index b7e3bb380c..08e9cede92 100644 --- a/xfa/fxfa/parser/xfa_script_hostpseudomodel.cpp +++ b/xfa/fxfa/parser/xfa_script_hostpseudomodel.cpp @@ -164,7 +164,8 @@ void CScript_HostPseudoModel::Script_HostPseudoModel_Title( CFX_ByteString bsValue; FXJSE_Value_ToUTF8String(hValue, bsValue); pNotify->GetDocProvider()->SetTitle( - hDoc, CFX_WideString::FromUTF8(bsValue, bsValue.GetLength())); + hDoc, + CFX_WideString::FromUTF8(bsValue, bsValue.GetLength()).AsWideStringC()); return; } CFX_WideString wsTitle; @@ -292,7 +293,7 @@ void CScript_HostPseudoModel::Script_HostPseudoModel_GotoURL( CFX_ByteString bsURL = pArguments->GetUTF8String(0); wsURL = CFX_WideString::FromUTF8(bsURL, bsURL.GetLength()); } - pNotify->GetDocProvider()->GotoURL(hDoc, wsURL); + pNotify->GetDocProvider()->GotoURL(hDoc, wsURL.AsWideStringC()); } void CScript_HostPseudoModel::Script_HostPseudoModel_OpenList( CFXJSE_Arguments* pArguments) { @@ -331,8 +332,8 @@ void CScript_HostPseudoModel::Script_HostPseudoModel_OpenList( uint32_t dwFlag = XFA_RESOLVENODE_Children | XFA_RESOLVENODE_Parent | XFA_RESOLVENODE_Siblings; XFA_RESOLVENODE_RS resoveNodeRS; - int32_t iRet = pScriptContext->ResolveObjects(pObject, wsExpression, - resoveNodeRS, dwFlag); + int32_t iRet = pScriptContext->ResolveObjects( + pObject, wsExpression.AsWideStringC(), resoveNodeRS, dwFlag); if (iRet < 1 || !resoveNodeRS.nodes[0]->IsNode()) { FXJSE_Value_Release(hValue); return; @@ -385,8 +386,9 @@ void CScript_HostPseudoModel::Script_HostPseudoModel_Response( bMark = pArguments->GetInt32(3) == 0 ? FALSE : TRUE; } CFX_WideString wsAnswer; - pNotify->GetAppProvider()->Response(wsAnswer, wsQuestion, wsTitle, - wsDefaultAnswer, bMark); + pNotify->GetAppProvider()->Response(wsAnswer, wsQuestion.AsWideStringC(), + wsTitle.AsWideStringC(), + wsDefaultAnswer.AsWideStringC(), bMark); FXJSE_HVALUE hValue = pArguments->GetReturnValue(); if (hValue) { FXJSE_Value_SetUTF8String(hValue, FX_UTF8Encode(wsAnswer).AsByteStringC()); @@ -454,7 +456,7 @@ void CScript_HostPseudoModel::Script_HostPseudoModel_ResetData( CXFA_Node* pNode = NULL; int32_t iExpLength = wsExpression.GetLength(); while (iStart < iExpLength) { - iStart = XFA_FilterName(wsExpression, iStart, wsName); + iStart = XFA_FilterName(wsExpression.AsWideStringC(), iStart, wsName); CXFA_ScriptContext* pScriptContext = m_pDocument->GetScriptContext(); if (!pScriptContext) { return; @@ -466,8 +468,8 @@ void CScript_HostPseudoModel::Script_HostPseudoModel_ResetData( uint32_t dwFlag = XFA_RESOLVENODE_Children | XFA_RESOLVENODE_Parent | XFA_RESOLVENODE_Siblings; XFA_RESOLVENODE_RS resoveNodeRS; - int32_t iRet = - pScriptContext->ResolveObjects(pObject, wsName, resoveNodeRS, dwFlag); + int32_t iRet = pScriptContext->ResolveObjects( + pObject, wsName.AsWideStringC(), resoveNodeRS, dwFlag); if (iRet < 1 || !resoveNodeRS.nodes[0]->IsNode()) { continue; } @@ -535,8 +537,8 @@ void CScript_HostPseudoModel::Script_HostPseudoModel_SetFocus( uint32_t dwFlag = XFA_RESOLVENODE_Children | XFA_RESOLVENODE_Parent | XFA_RESOLVENODE_Siblings; XFA_RESOLVENODE_RS resoveNodeRS; - int32_t iRet = pScriptContext->ResolveObjects(pObject, wsExpression, - resoveNodeRS, dwFlag); + int32_t iRet = pScriptContext->ResolveObjects( + pObject, wsExpression.AsWideStringC(), resoveNodeRS, dwFlag); if (iRet < 1 || !resoveNodeRS.nodes[0]->IsNode()) { FXJSE_Value_Release(hValue); return; @@ -601,7 +603,8 @@ void CScript_HostPseudoModel::Script_HostPseudoModel_MessageBox( } } int32_t iValue = pNotify->GetAppProvider()->MsgBox( - wsMessage, bsTitle, dwMessageType, dwButtonType); + wsMessage.AsWideStringC(), bsTitle.AsWideStringC(), dwMessageType, + dwButtonType); FXJSE_HVALUE hValue = pArguments->GetReturnValue(); if (hValue) { FXJSE_Value_SetInteger(hValue, iValue); @@ -733,7 +736,7 @@ void CScript_HostPseudoModel::Script_HostPseudoModel_ImportData( wsFilePath = CFX_WideString::FromUTF8(bsFilePath, bsFilePath.GetLength()); } CXFA_FFDoc* hDoc = pNotify->GetHDOC(); - pNotify->GetDocProvider()->ImportData(hDoc, wsFilePath); + pNotify->GetDocProvider()->ImportData(hDoc, wsFilePath.AsWideStringC()); } void CScript_HostPseudoModel::Script_HostPseudoModel_ExportData( CFXJSE_Arguments* pArguments) { @@ -756,7 +759,7 @@ void CScript_HostPseudoModel::Script_HostPseudoModel_ExportData( if (iLength >= 2) { bXDP = pArguments->GetInt32(1) == 0 ? FALSE : TRUE; } - pNotify->GetDocProvider()->ExportData(hDoc, wsFilePath, bXDP); + pNotify->GetDocProvider()->ExportData(hDoc, wsFilePath.AsWideStringC(), bXDP); } void CScript_HostPseudoModel::Script_HostPseudoModel_PageUp( CFXJSE_Arguments* pArguments) { diff --git a/xfa/fxfa/parser/xfa_script_imp.cpp b/xfa/fxfa/parser/xfa_script_imp.cpp index b85e9b783f..fe6caa84bc 100644 --- a/xfa/fxfa/parser/xfa_script_imp.cpp +++ b/xfa/fxfa/parser/xfa_script_imp.cpp @@ -124,8 +124,8 @@ void CXFA_ScriptContext::GlobalPropertySetter(FXJSE_HOBJECT hObject, if (lpOrginalNode->GetObjectType() == XFA_OBJECTTYPE_VariablesThis) { pRefNode = ToNode(lpCurNode); } - if (lpScriptContext->QueryNodeByFlag(pRefNode, wsPropName, hValue, dwFlag, - TRUE)) { + if (lpScriptContext->QueryNodeByFlag(pRefNode, wsPropName.AsWideStringC(), + hValue, dwFlag, TRUE)) { return; } if (lpOrginalNode->GetObjectType() == XFA_OBJECTTYPE_VariablesThis) { @@ -198,13 +198,13 @@ void CXFA_ScriptContext::GlobalPropertyGetter(FXJSE_HOBJECT hObject, if (pOrginalObject->GetObjectType() == XFA_OBJECTTYPE_VariablesThis) { pRefNode = ToNode(lpCurNode); } - if (lpScriptContext->QueryNodeByFlag(pRefNode, wsPropName, hValue, dwFlag, - FALSE)) { + if (lpScriptContext->QueryNodeByFlag(pRefNode, wsPropName.AsWideStringC(), + hValue, dwFlag, FALSE)) { return; } dwFlag = XFA_RESOLVENODE_Parent | XFA_RESOLVENODE_Siblings; - if (lpScriptContext->QueryNodeByFlag(pRefNode, wsPropName, hValue, dwFlag, - FALSE)) { + if (lpScriptContext->QueryNodeByFlag(pRefNode, wsPropName.AsWideStringC(), + hValue, dwFlag, FALSE)) { return; } CXFA_Object* pScriptObject = @@ -243,8 +243,8 @@ void CXFA_ScriptContext::NormalPropertyGetter(FXJSE_HOBJECT hObject, } uint32_t dwFlag = XFA_RESOLVENODE_Children | XFA_RESOLVENODE_Properties | XFA_RESOLVENODE_Attributes; - FX_BOOL bRet = lpScriptContext->QueryNodeByFlag(ToNode(pObject), wsPropName, - hValue, dwFlag, FALSE); + FX_BOOL bRet = lpScriptContext->QueryNodeByFlag( + ToNode(pObject), wsPropName.AsWideStringC(), hValue, dwFlag, FALSE); if (bRet) { return; } @@ -252,8 +252,8 @@ void CXFA_ScriptContext::NormalPropertyGetter(FXJSE_HOBJECT hObject, (lpScriptContext->GetType() == XFA_SCRIPTLANGTYPE_Javascript && !lpScriptContext->IsStrictScopeInJavaScript())) { dwFlag = XFA_RESOLVENODE_Parent | XFA_RESOLVENODE_Siblings; - bRet = lpScriptContext->QueryNodeByFlag(ToNode(pObject), wsPropName, hValue, - dwFlag, FALSE); + bRet = lpScriptContext->QueryNodeByFlag( + ToNode(pObject), wsPropName.AsWideStringC(), hValue, dwFlag, FALSE); } if (bRet) { return; @@ -281,8 +281,8 @@ void CXFA_ScriptContext::NormalPropertySetter(FXJSE_HOBJECT hObject, CXFA_Object* pObject = lpScriptContext->GetVariablesThis(pOrginalObject); CFX_WideString wsPropName = CFX_WideString::FromUTF8( (const FX_CHAR*)szPropName.raw_str(), szPropName.GetLength()); - const XFA_SCRIPTATTRIBUTEINFO* lpAttributeInfo = - XFA_GetScriptAttributeByName(pObject->GetClassID(), wsPropName); + const XFA_SCRIPTATTRIBUTEINFO* lpAttributeInfo = XFA_GetScriptAttributeByName( + pObject->GetClassID(), wsPropName.AsWideStringC()); if (lpAttributeInfo) { (pObject->*(lpAttributeInfo->lpfnCallback))( hValue, TRUE, (XFA_ATTRIBUTE)lpAttributeInfo->eAttribute); @@ -293,17 +293,18 @@ void CXFA_ScriptContext::NormalPropertySetter(FXJSE_HOBJECT hObject, } CXFA_Node* pNode = ToNode(pObject); CXFA_Node* pPropOrChild = NULL; - const XFA_ELEMENTINFO* lpElementInfo = XFA_GetElementByName(wsPropName); + const XFA_ELEMENTINFO* lpElementInfo = + XFA_GetElementByName(wsPropName.AsWideStringC()); if (lpElementInfo) { pPropOrChild = pNode->GetProperty(0, lpElementInfo->eName); } else { - pPropOrChild = pNode->GetFirstChildByName(wsPropName); + pPropOrChild = pNode->GetFirstChildByName(wsPropName.AsWideStringC()); } if (pPropOrChild) { CFX_WideString wsDefaultName = FX_WSTRC(L"{default}"); const XFA_SCRIPTATTRIBUTEINFO* lpAttributeInfo = XFA_GetScriptAttributeByName(pPropOrChild->GetClassID(), - wsDefaultName); + wsDefaultName.AsWideStringC()); if (lpAttributeInfo) { (pPropOrChild->*(lpAttributeInfo->lpfnCallback))( hValue, TRUE, (XFA_ATTRIBUTE)lpAttributeInfo->eAttribute); @@ -333,10 +334,11 @@ int32_t CXFA_ScriptContext::NormalPropTypeGetter( XFA_ELEMENT objElement = pObject->GetClassID(); CFX_WideString wsPropName = CFX_WideString::FromUTF8( (const FX_CHAR*)szPropName.raw_str(), szPropName.GetLength()); - if (XFA_GetMethodByName(objElement, wsPropName)) { + if (XFA_GetMethodByName(objElement, wsPropName.AsWideStringC())) { return FXJSE_ClassPropType_Method; } - if (bQueryIn && !XFA_GetScriptAttributeByName(objElement, wsPropName)) { + if (bQueryIn && + !XFA_GetScriptAttributeByName(objElement, wsPropName.AsWideStringC())) { return FXJSE_ClassPropType_None; } return FXJSE_ClassPropType_Property; @@ -355,7 +357,7 @@ int32_t CXFA_ScriptContext::GlobalPropTypeGetter( XFA_ELEMENT objElement = pObject->GetClassID(); CFX_WideString wsPropName = CFX_WideString::FromUTF8( (const FX_CHAR*)szPropName.raw_str(), szPropName.GetLength()); - if (XFA_GetMethodByName(objElement, wsPropName)) { + if (XFA_GetMethodByName(objElement, wsPropName.AsWideStringC())) { return FXJSE_ClassPropType_Method; } return FXJSE_ClassPropType_Property; @@ -373,7 +375,7 @@ void CXFA_ScriptContext::NormalMethodCall(FXJSE_HOBJECT hThis, CFX_WideString wsFunName = CFX_WideString::FromUTF8( (const FX_CHAR*)szFuncName.raw_str(), szFuncName.GetLength()); const XFA_METHODINFO* lpMethodInfo = - XFA_GetMethodByName(pObject->GetClassID(), wsFunName); + XFA_GetMethodByName(pObject->GetClassID(), wsFunName.AsWideStringC()); if (NULL == lpMethodInfo) { return; } diff --git a/xfa/fxfa/parser/xfa_script_layoutpseudomodel.cpp b/xfa/fxfa/parser/xfa_script_layoutpseudomodel.cpp index 922b0d6bb6..1b70dffb19 100644 --- a/xfa/fxfa/parser/xfa_script_layoutpseudomodel.cpp +++ b/xfa/fxfa/parser/xfa_script_layoutpseudomodel.cpp @@ -117,7 +117,7 @@ void CScript_LayoutPseudoModel::Script_LayoutPseudoModel_HWXY( measure.Set(rtRect.top, XFA_UNIT_Pt); break; } - XFA_UNIT unit = measure.GetUnit(wsUnit); + XFA_UNIT unit = measure.GetUnit(wsUnit.AsWideStringC()); FX_FLOAT fValue = measure.ToUnit(unit); fValue = FXSYS_round(fValue * 1000) / 1000.0f; if (hValue) { diff --git a/xfa/fxfa/parser/xfa_script_nodehelper.cpp b/xfa/fxfa/parser/xfa_script_nodehelper.cpp index d7a1e29d9d..9e8ff5191c 100644 --- a/xfa/fxfa/parser/xfa_script_nodehelper.cpp +++ b/xfa/fxfa/parser/xfa_script_nodehelper.cpp @@ -368,7 +368,8 @@ FX_BOOL CXFA_NodeHelper::XFA_ResolveNodes_CreateNode( XFA_CreateNode_ForCondition(wsCondition); } if (bIsClassName) { - const XFA_ELEMENTINFO* lpElement = XFA_GetElementByName(wsName); + const XFA_ELEMENTINFO* lpElement = + XFA_GetElementByName(wsName.AsWideStringC()); if (lpElement == NULL) { return FALSE; } @@ -391,7 +392,7 @@ FX_BOOL CXFA_NodeHelper::XFA_ResolveNodes_CreateNode( for (int32_t iIndex = 0; iIndex < m_iCreateCount; iIndex++) { CXFA_Node* pNewNode = m_pCreateParent->CreateSamePacketNode(eClassType); if (pNewNode) { - pNewNode->SetAttribute(XFA_ATTRIBUTE_Name, wsName); + pNewNode->SetAttribute(XFA_ATTRIBUTE_Name, wsName.AsWideStringC()); pNewNode->CreateXMLMappingNode(); m_pCreateParent->InsertChild(pNewNode); if (iIndex == m_iCreateCount - 1) { diff --git a/xfa/fxfa/parser/xfa_script_resolveprocessor.cpp b/xfa/fxfa/parser/xfa_script_resolveprocessor.cpp index a71270a332..8ad8b13176 100644 --- a/xfa/fxfa/parser/xfa_script_resolveprocessor.cpp +++ b/xfa/fxfa/parser/xfa_script_resolveprocessor.cpp @@ -35,7 +35,8 @@ int32_t CXFA_ResolveProcessor::XFA_ResolveNodes(CXFA_ResolveNodesData& rnd) { } if (!rnd.m_CurNode->IsNode()) { if (rnd.m_dwStyles & XFA_RESOLVENODE_Attributes) { - return XFA_ResolveNodes_ForAttributeRs(rnd.m_CurNode, rnd, rnd.m_wsName); + return XFA_ResolveNodes_ForAttributeRs(rnd.m_CurNode, rnd, + rnd.m_wsName.AsWideStringC()); } return 0; } @@ -70,7 +71,7 @@ int32_t CXFA_ResolveProcessor::XFA_ResolveNodes(CXFA_ResolveNodesData& rnd) { rnd.m_Nodes.Add(rnd.m_CurNode); } else if ((rnd.m_dwStyles & XFA_RESOLVENODE_Attributes) && XFA_ResolveNodes_ForAttributeRs(rnd.m_CurNode, rnd, - rnd.m_wsName)) { + rnd.m_wsName.AsWideStringC())) { return 1; } if (rnd.m_Nodes.GetSize() > 0) { @@ -168,7 +169,7 @@ int32_t CXFA_ResolveProcessor::XFA_ResolveNodes_NumberSign( CFX_WideString wsName = rnd.m_wsName.Right(rnd.m_wsName.GetLength() - 1); CFX_WideString wsCondition = rnd.m_wsCondition; CXFA_Node* curNode = ToNode(rnd.m_CurNode); - if (XFA_ResolveNodes_ForAttributeRs(curNode, rnd, wsName)) { + if (XFA_ResolveNodes_ForAttributeRs(curNode, rnd, wsName.AsWideStringC())) { return 1; } CXFA_ResolveNodesData rndFind; @@ -331,7 +332,7 @@ int32_t CXFA_ResolveProcessor::XFA_ResolveNodes_Normal( } } if (dwStyles & XFA_RESOLVENODE_Attributes) { - if (XFA_ResolveNodes_ForAttributeRs(curNode, rnd, wsName)) { + if (XFA_ResolveNodes_ForAttributeRs(curNode, rnd, wsName.AsWideStringC())) { return 1; } } @@ -365,7 +366,8 @@ int32_t CXFA_ResolveProcessor::XFA_ResolveNodes_Normal( pProp = pInstanceManager->GetProperty(0, XFA_ELEMENT_Occur, TRUE); } } else { - const XFA_ELEMENTINFO* pElement = XFA_GetElementByName(wsName); + const XFA_ELEMENTINFO* pElement = + XFA_GetElementByName(wsName.AsWideStringC()); if (pElement) { pProp = curNode->AsNode()->GetProperty( 0, pElement->eName, pElement->eName != XFA_ELEMENT_PageSet); @@ -711,7 +713,8 @@ void CXFA_ResolveProcessor::XFA_ResolveNode_DoPredicateFilter( CXFA_Object* node = findNodes[i]; FX_BOOL bRet = FALSE; FXJSE_HVALUE pRetValue = FXJSE_Value_Create(rnd.m_pSC->GetRuntime()); - bRet = pContext->RunScript(eLangType, wsExpression, pRetValue, node); + bRet = pContext->RunScript(eLangType, wsExpression.AsWideStringC(), + pRetValue, node); if (!bRet || !FXJSE_Value_ToBoolean(pRetValue)) { findNodes.RemoveAt(i); } diff --git a/xfa/fxfa/parser/xfa_script_signaturepseudomodel.cpp b/xfa/fxfa/parser/xfa_script_signaturepseudomodel.cpp index 2919664b52..f460cf764b 100644 --- a/xfa/fxfa/parser/xfa_script_signaturepseudomodel.cpp +++ b/xfa/fxfa/parser/xfa_script_signaturepseudomodel.cpp @@ -75,8 +75,9 @@ void CScript_SignaturePseudoModel::Script_SignaturePseudoModel_Sign( CFX_ByteString bsXMLIdent = pArguments->GetUTF8String(2); wsXMLIdent = CFX_WideString::FromUTF8(bsXMLIdent, bsXMLIdent.GetLength()); } - FX_BOOL bSign = pNotify->GetDocProvider()->Sign(hDoc, pNodeList, wsExpression, - wsXMLIdent); + FX_BOOL bSign = pNotify->GetDocProvider()->Sign(hDoc, pNodeList, + wsExpression.AsWideStringC(), + wsXMLIdent.AsWideStringC()); FXJSE_HVALUE hValue = pArguments->GetReturnValue(); if (hValue) { FXJSE_Value_SetBoolean(hValue, bSign); |