summaryrefslogtreecommitdiff
path: root/fpdfsdk/fpdfsave.cpp
diff options
context:
space:
mode:
authordsinclair <dsinclair@chromium.org>2016-05-18 13:16:12 -0700
committerCommit bot <commit-bot@chromium.org>2016-05-18 13:16:12 -0700
commitcbfef5772c52fbd3378905a61fc9432da1515433 (patch)
treebe4c25e41d2467609612232a92e598ccd9baa7eb /fpdfsdk/fpdfsave.cpp
parent1763f62972a3ebf080f645899a8de79b00dbfb23 (diff)
downloadpdfium-cbfef5772c52fbd3378905a61fc9432da1515433.tar.xz
Cleanup XFA_HASHCODE usage.
This CL cleans up several uses of XFA_HASHCODE. The defines have been converted into an enum. For the SavePackage call the type is now used as the param instead of a string. The callers pass in the correct type instead of doing an internal conversion. The GetXFAObject accepting a string was removed as it was unused. The other variant was changed to accept the XFA_HashCode type instead of uint32_t. GetPackageData was removed as it is unused. Review-Url: https://codereview.chromium.org/1989313002
Diffstat (limited to 'fpdfsdk/fpdfsave.cpp')
-rw-r--r--fpdfsdk/fpdfsave.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/fpdfsdk/fpdfsave.cpp b/fpdfsdk/fpdfsave.cpp
index 84de668dde..7b08194bf4 100644
--- a/fpdfsdk/fpdfsave.cpp
+++ b/fpdfsdk/fpdfsave.cpp
@@ -174,8 +174,8 @@ bool SaveXFADocumentData(CPDFXFA_Document* pDocument,
// L"datasets"
{
ScopedFileStream pDsfileWrite(FX_CreateMemoryStream());
- if (pXFADocView->GetDoc()->SavePackage(CFX_WideStringC(L"datasets"),
- pDsfileWrite.get()) &&
+ if (pXFADocView->GetDoc()->SavePackage(XFA_HASHCODE_Datasets,
+ pDsfileWrite.get(), nullptr) &&
pDsfileWrite->GetSize() > 0) {
// Datasets
pContext->UpdateChecksum(pDsfileWrite.get());
@@ -198,8 +198,8 @@ bool SaveXFADocumentData(CPDFXFA_Document* pDocument,
// L"form"
{
ScopedFileStream pfileWrite(FX_CreateMemoryStream());
- if (pXFADocView->GetDoc()->SavePackage(CFX_WideStringC(L"form"),
- pfileWrite.get(), pContext.get()) &&
+ if (pXFADocView->GetDoc()->SavePackage(XFA_HASHCODE_Form, pfileWrite.get(),
+ pContext.get()) &&
pfileWrite->GetSize() > 0) {
CPDF_Dictionary* pDataDict = new CPDF_Dictionary;
if (iFormIndex != -1) {