summaryrefslogtreecommitdiff
path: root/fpdfsdk
diff options
context:
space:
mode:
Diffstat (limited to 'fpdfsdk')
-rw-r--r--fpdfsdk/fpdfxfa/fpdfxfa_doc.cpp6
-rw-r--r--fpdfsdk/fsdk_baseform.cpp12
-rw-r--r--fpdfsdk/javascript/PublicMethods.cpp16
3 files changed, 18 insertions, 16 deletions
diff --git a/fpdfsdk/fpdfxfa/fpdfxfa_doc.cpp b/fpdfsdk/fpdfxfa/fpdfxfa_doc.cpp
index fbc05bd9aa..bb8793f1a7 100644
--- a/fpdfsdk/fpdfxfa/fpdfxfa_doc.cpp
+++ b/fpdfsdk/fpdfxfa/fpdfxfa_doc.cpp
@@ -957,7 +957,7 @@ FX_BOOL CPDFXFA_Document::_ExportSubmitFile(FPDF_FILEHANDLER* pFileHandler,
ws.FromLocal("data");
CFX_ByteString content = "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\r\n";
fileStream.WriteBlock((const FX_CHAR*)content, 0, content.GetLength());
- m_pXFADoc->SavePackage(ws, &fileStream);
+ m_pXFADoc->SavePackage(ws.AsWideStringC(), &fileStream);
} else if (fileType == FXFA_SAVEAS_XDP) {
if (flag == 0)
flag = FXFA_CONFIG | FXFA_TEMPLATE | FXFA_LOCALESET | FXFA_DATASETS |
@@ -1018,11 +1018,11 @@ FX_BOOL CPDFXFA_Document::_ExportSubmitFile(FPDF_FILEHANDLER* pFileHandler,
if (pPrePDFObj->GetString() == "form") {
CFX_WideString ws;
ws.FromLocal("form");
- m_pXFADoc->SavePackage(ws, &fileStream);
+ m_pXFADoc->SavePackage(ws.AsWideStringC(), &fileStream);
} else if (pPrePDFObj->GetString() == "datasets") {
CFX_WideString ws;
ws.FromLocal("datasets");
- m_pXFADoc->SavePackage(ws, &fileStream);
+ m_pXFADoc->SavePackage(ws.AsWideStringC(), &fileStream);
} else {
// PDF,creator.
}
diff --git a/fpdfsdk/fsdk_baseform.cpp b/fpdfsdk/fsdk_baseform.cpp
index fe7c23932f..3dad62472f 100644
--- a/fpdfsdk/fsdk_baseform.cpp
+++ b/fpdfsdk/fsdk_baseform.cpp
@@ -64,7 +64,7 @@ CXFA_FFWidget* CPDFSDK_Widget::GetMixXFAWidget() const {
}
if (!sName.IsEmpty())
- m_hMixXFAWidget = pDocView->GetWidgetByName(sName);
+ m_hMixXFAWidget = pDocView->GetWidgetByName(sName.AsWideStringC());
}
}
return m_hMixXFAWidget;
@@ -80,7 +80,7 @@ CXFA_FFWidget* CPDFSDK_Widget::GetGroupMixXFAWidget() {
if (CXFA_FFDocView* pDocView = pDoc->GetXFADocView()) {
CFX_WideString sName = GetName();
if (!sName.IsEmpty())
- return pDocView->GetWidgetByName(sName);
+ return pDocView->GetWidgetByName(sName.AsWideStringC());
}
}
@@ -2448,7 +2448,7 @@ FX_BOOL CPDFSDK_InterForm::ExportFieldsToFDFTextBuf(
bool bIncludeOrExclude,
CFX_ByteTextBuf& textBuf) {
std::unique_ptr<CFDF_Document> pFDF(m_pInterForm->ExportToFDF(
- m_pDocument->GetPath(), fields, bIncludeOrExclude));
+ m_pDocument->GetPath().AsWideStringC(), fields, bIncludeOrExclude));
return pFDF ? pFDF->WriteBuf(textBuf) : FALSE;
}
@@ -2486,7 +2486,8 @@ FX_BOOL CPDFSDK_InterForm::SubmitForm(const CFX_WideString& sDestination,
CPDFDoc_Environment* pEnv = m_pDocument->GetEnv();
CFX_WideString wsPDFFilePath = m_pDocument->GetPath();
- CFDF_Document* pFDFDoc = m_pInterForm->ExportToFDF(wsPDFFilePath);
+ CFDF_Document* pFDFDoc =
+ m_pInterForm->ExportToFDF(wsPDFFilePath.AsWideStringC());
if (!pFDFDoc)
return FALSE;
@@ -2515,7 +2516,8 @@ FX_BOOL CPDFSDK_InterForm::SubmitForm(const CFX_WideString& sDestination,
}
FX_BOOL CPDFSDK_InterForm::ExportFormToFDFTextBuf(CFX_ByteTextBuf& textBuf) {
- CFDF_Document* pFDF = m_pInterForm->ExportToFDF(m_pDocument->GetPath());
+ CFDF_Document* pFDF =
+ m_pInterForm->ExportToFDF(m_pDocument->GetPath().AsWideStringC());
if (!pFDF)
return FALSE;
diff --git a/fpdfsdk/javascript/PublicMethods.cpp b/fpdfsdk/javascript/PublicMethods.cpp
index b928aab31d..308163d454 100644
--- a/fpdfsdk/javascript/PublicMethods.cpp
+++ b/fpdfsdk/javascript/PublicMethods.cpp
@@ -1219,11 +1219,11 @@ double CJS_PublicMethods::MakeInterDate(CFX_WideString strValue) {
else if (sTemp.Compare(L"Dec") == 0)
nMonth = 12;
- int nDay = FX_atof(wsArray[2]);
- int nHour = FX_atof(wsArray[3]);
- int nMin = FX_atof(wsArray[4]);
- int nSec = FX_atof(wsArray[5]);
- int nYear = FX_atof(wsArray[7]);
+ int nDay = FX_atof(wsArray[2].AsWideStringC());
+ int nHour = FX_atof(wsArray[3].AsWideStringC());
+ int nMin = FX_atof(wsArray[4].AsWideStringC());
+ int nSec = FX_atof(wsArray[5].AsWideStringC());
+ int nYear = FX_atof(wsArray[7].AsWideStringC());
double dRet = JS_MakeDate(JS_MakeDay(nYear, nMonth - 1, nDay),
JS_MakeTime(nHour, nMin, nSec, 0));
if (JS_PortIsNan(dRet))
@@ -1726,7 +1726,7 @@ FX_BOOL CJS_PublicMethods::AFSimple_Calculate(
CFX_WideString trimmed = pFormField->GetValue();
trimmed.TrimRight();
trimmed.TrimLeft();
- dTemp = FX_atof(trimmed);
+ dTemp = FX_atof(trimmed.AsWideStringC());
} break;
case FIELDTYPE_PUSHBUTTON: {
dTemp = 0.0;
@@ -1740,7 +1740,7 @@ FX_BOOL CJS_PublicMethods::AFSimple_Calculate(
CFX_WideString trimmed = pFormCtrl->GetExportValue();
trimmed.TrimRight();
trimmed.TrimLeft();
- dTemp = FX_atof(trimmed);
+ dTemp = FX_atof(trimmed.AsWideStringC());
break;
}
}
@@ -1751,7 +1751,7 @@ FX_BOOL CJS_PublicMethods::AFSimple_Calculate(
CFX_WideString trimmed = pFormField->GetValue();
trimmed.TrimRight();
trimmed.TrimLeft();
- dTemp = FX_atof(trimmed);
+ dTemp = FX_atof(trimmed.AsWideStringC());
}
} break;
default: