summaryrefslogtreecommitdiff
path: root/fpdfsdk/fpdfxfa
diff options
context:
space:
mode:
authortsepez <tsepez@chromium.org>2016-05-13 17:21:31 -0700
committerCommit bot <commit-bot@chromium.org>2016-05-13 17:21:31 -0700
commitafe94306e3c542f0d499e7f7706ee5dec4028d8a (patch)
tree5012c9356cf1af259c74da3008dc7fcad439db2a /fpdfsdk/fpdfxfa
parent01e624fb699af3a8ee2f81620d59d366dac18f29 (diff)
downloadpdfium-afe94306e3c542f0d499e7f7706ee5dec4028d8a.tar.xz
Make CFX_WideString(const CFX_WideString&) explicit.
BUG= Review-Url: https://codereview.chromium.org/1979723003
Diffstat (limited to 'fpdfsdk/fpdfxfa')
-rw-r--r--fpdfsdk/fpdfxfa/fpdfxfa_doc.cpp16
-rw-r--r--fpdfsdk/fpdfxfa/include/fpdfxfa_doc.h2
2 files changed, 8 insertions, 10 deletions
diff --git a/fpdfsdk/fpdfxfa/fpdfxfa_doc.cpp b/fpdfsdk/fpdfxfa/fpdfxfa_doc.cpp
index 4b44669c0d..deba943072 100644
--- a/fpdfsdk/fpdfxfa/fpdfxfa_doc.cpp
+++ b/fpdfsdk/fpdfxfa/fpdfxfa_doc.cpp
@@ -614,18 +614,16 @@ void CPDFXFA_Document::GetTitle(CXFA_FFDoc* hDoc, CFX_WideString& wsTitle) {
wsTitle = wsTitle.FromLocal(csTitle.GetBuffer(csTitle.GetLength()));
csTitle.ReleaseBuffer(csTitle.GetLength());
}
+
void CPDFXFA_Document::SetTitle(CXFA_FFDoc* hDoc,
- const CFX_WideStringC& wsTitle) {
- if (hDoc != m_pXFADoc)
- return;
- if (m_pPDFDoc == NULL)
+ const CFX_WideString& wsTitle) {
+ if (hDoc != m_pXFADoc || !m_pPDFDoc)
return;
- CPDF_Dictionary* pInfoDict = m_pPDFDoc->GetInfo();
- if (pInfoDict == NULL)
- return;
- pInfoDict->SetAt("Title", new CPDF_String(wsTitle));
+ if (CPDF_Dictionary* pInfoDict = m_pPDFDoc->GetInfo())
+ pInfoDict->SetAt("Title", new CPDF_String(wsTitle));
}
+
void CPDFXFA_Document::ExportData(CXFA_FFDoc* hDoc,
const CFX_WideStringC& wsFilePath,
FX_BOOL bXDP) {
@@ -1140,7 +1138,7 @@ FX_BOOL CPDFXFA_Document::_SubmitData(CXFA_FFDoc* hDoc, CXFA_Submit submit) {
return FALSE;
CFX_WideStringC csURLC;
submit.GetSubmitTarget(csURLC);
- CFX_WideString csURL = csURLC;
+ CFX_WideString csURL(csURLC);
if (csURL.IsEmpty()) {
CFX_WideString ws;
ws.FromLocal("Submit cancelled.");
diff --git a/fpdfsdk/fpdfxfa/include/fpdfxfa_doc.h b/fpdfsdk/fpdfxfa/include/fpdfxfa_doc.h
index 5ffeb21022..a67b7803a0 100644
--- a/fpdfsdk/fpdfxfa/include/fpdfxfa_doc.h
+++ b/fpdfsdk/fpdfxfa/include/fpdfxfa_doc.h
@@ -90,7 +90,7 @@ class CPDFXFA_Document : public IXFA_DocProvider {
virtual FX_BOOL IsCalculationsEnabled(CXFA_FFDoc* hDoc);
virtual void SetCalculationsEnabled(CXFA_FFDoc* hDoc, FX_BOOL bEnabled);
virtual void GetTitle(CXFA_FFDoc* hDoc, CFX_WideString& wsTitle);
- virtual void SetTitle(CXFA_FFDoc* hDoc, const CFX_WideStringC& wsTitle);
+ virtual void SetTitle(CXFA_FFDoc* hDoc, const CFX_WideString& wsTitle);
virtual void ExportData(CXFA_FFDoc* hDoc,
const CFX_WideStringC& wsFilePath,
FX_BOOL bXDP = TRUE);