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

Unified Diff: fpdfsdk/fpdfxfa/fpdfxfa_doc.cpp

Issue 1979723003: Make CFX_WideString(const CFX_WideString&) explicit. (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: Override Created 4 years, 7 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 | « core/fxcrt/include/fx_string.h ('k') | fpdfsdk/fpdfxfa/include/fpdfxfa_doc.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: fpdfsdk/fpdfxfa/fpdfxfa_doc.cpp
diff --git a/fpdfsdk/fpdfxfa/fpdfxfa_doc.cpp b/fpdfsdk/fpdfxfa/fpdfxfa_doc.cpp
index 72f67dd2711180c230a97c8f9c277c947f0a15c2..65c1d32ae5ce83295413709089122f2ca3f9cfbe 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.");
« no previous file with comments | « core/fxcrt/include/fx_string.h ('k') | fpdfsdk/fpdfxfa/include/fpdfxfa_doc.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698