summaryrefslogtreecommitdiff
path: root/core/fpdfapi/edit/cpdf_creator.h
AgeCommit message (Collapse)Author
2017-05-24Convert to CFX_UnownedPtr, part 4.Tom Sepez
Fix strange ownership issue in cpdf_type3char.cpp, and describe the absolutely insane stuff happening there. Change-Id: Iae70f9eca8f125ed3ef677729f1776ba9f10183c Reviewed-on: https://pdfium-review.googlesource.com/5830 Reviewed-by: Lei Zhang <thestig@chromium.org> Commit-Queue: Tom Sepez <tsepez@chromium.org>
2017-05-15Remove unused flags from CPDF_CreatorNicolas Pena
The only user of CPDF_Creator is FPDF_Doc_Save, and it only uses flags 1 or 2 when calling Create. Thus, the other two flags will never be set. Change-Id: Ib2eb0ce5585469c7749f0ab350855f1c6a2bba08 Reviewed-on: https://pdfium-review.googlesource.com/5491 Reviewed-by: Lei Zhang <thestig@chromium.org> Reviewed-by: dsinclair <dsinclair@chromium.org> Commit-Queue: Nicolás Peña <npm@chromium.org>
2017-05-10Store the offset in the archive bufferDan Sinclair
This Cl moves the implementation of the archive buffer behind an IFX_ArchiveStream interface. The buffer holds the current offset and the offset parameter is removed from the CPDF_Creator and various other methods. Change-Id: Ia54e803b58bbfb6ef03fec4a940d2c056d541356 Reviewed-on: https://pdfium-review.googlesource.com/5255 Reviewed-by: Tom Sepez <tsepez@chromium.org> Commit-Queue: dsinclair <dsinclair@chromium.org>
2017-05-10Cleaning up Edit codeDan Sinclair
This Cl conslidates if statements, converts int returns to bools where possible and various other cleanups in fpdfapi/edit. Change-Id: Ia31ecc69843117eb5ebfff449a6046a267d08e89 Reviewed-on: https://pdfium-review.googlesource.com/5190 Reviewed-by: Nicolás Peña <npm@chromium.org> Commit-Queue: dsinclair <dsinclair@chromium.org>
2017-05-09Edit code cleanupDan Sinclair
Minor cleans in the fpdfapi/edit code. Change-Id: I7bb2f4add7c6e84f072501035b1f77c218174cca Reviewed-on: https://pdfium-review.googlesource.com/5152 Reviewed-by: Nicolás Peña <npm@chromium.org> Reviewed-by: Tom Sepez <tsepez@chromium.org> Commit-Queue: dsinclair <dsinclair@chromium.org>
2017-05-09Move FPDF_FILEWRITE adapter to own fileDan Sinclair
This Cl moves the adapater out of the fpdfsave.cpp file into its own h/cpp files. The adapter was renamed for clarity. The CPDF_Creator was modified to take the adapter as a constructor param and the Create methods consolidated. Change-Id: Icb104f195ef532dda053c859aae356a8d4a7a54c Reviewed-on: https://pdfium-review.googlesource.com/5151 Reviewed-by: Tom Sepez <tsepez@chromium.org> Commit-Queue: dsinclair <dsinclair@chromium.org>
2017-05-09Remove CPDF_Creator friendsDan Sinclair
This CL removes the friend declarations from CPDF_Creator and adds accessor methods instead. Change-Id: I6d8f67b5944aed34af00ff6ea9d23fe7d17cec18 Reviewed-on: https://pdfium-review.googlesource.com/5112 Commit-Queue: dsinclair <dsinclair@chromium.org> Reviewed-by: Tom Sepez <tsepez@chromium.org>
2017-05-04Remove some unused IFX_Pause paramsDan Sinclair
This Cl removes IFX_Pause parameters which are always null. Change-Id: I6d36e52380a8f688c5e20f5e19c671f3bcc12868 Reviewed-on: https://pdfium-review.googlesource.com/4874 Commit-Queue: dsinclair <dsinclair@chromium.org> Reviewed-by: Nicolás Peña <npm@chromium.org>
2017-04-13Move another opertator<<() prototype into correct .h file.Tom Sepez
Prototype should be in header for .cpp file actually implementing it. Change-Id: I8f771a4840e09da419cee384e3d6dc2e7bba1cc4 Reviewed-on: https://pdfium-review.googlesource.com/4170 Commit-Queue: dsinclair <dsinclair@chromium.org> Reviewed-by: dsinclair <dsinclair@chromium.org>
2017-04-13Refcount CPDF_CryptoHandlerchromium/3076chromium/3075chromium/3074chromium/3073chromium/3072Tom Sepez
Avoid tracking ownership via m_bLocalCryptoHandler. Also remove m_bEncryptCloned, as it is always false. Replace some methods with direct calls to underlying code. Change-Id: Ifa9d6f721c59d07e3b8e258f76832ca9f2ea0fc9 Reviewed-on: https://pdfium-review.googlesource.com/4111 Reviewed-by: Lei Zhang <thestig@chromium.org> Commit-Queue: Lei Zhang <thestig@chromium.org>
2017-03-21Replace CFX_FileSizeListArray with a std::mapDan Sinclair
This CL replaces the FileSizeListArray code with a std::map. Change-Id: Ic158ad95e7055693168d186ba428806a59b04c95 Reviewed-on: https://pdfium-review.googlesource.com/3136 Reviewed-by: Tom Sepez <tsepez@chromium.org> Commit-Queue: dsinclair <dsinclair@chromium.org>
2017-03-14Convert CPDF_Creator::m_Pos to uint32_tDan Sinclair
Currently m_Pos is a FX_POSITION. The value stored into the void* is typically a uint32_t. We sometimes read that uint32_t value as a size_t to compare against vector lengths. This Cl converts all usages to be uint32_t and uses pdfium::CollectionSize to get the correct typed vector size. Change-Id: I5f452817ab6049e03477945e4622c6911c89f877 Reviewed-on: https://pdfium-review.googlesource.com/3032 Reviewed-by: Tom Sepez <tsepez@chromium.org> Commit-Queue: dsinclair <dsinclair@chromium.org>
2017-01-09Remove CFX_ArrayTemplate from fpdfapitsepez
Review-Url: https://codereview.chromium.org/2611413002
2016-12-07Refcount all the IFX_ stream classes all the time.tsepez
We can remove a lot of "bOwnsStream" logic in the process. Always pass these by const reference, in case the called method wants to hang on to the stream (one exception is where we stick a raw pointer into a void* slot in a context from another layer). Review-Url: https://codereview.chromium.org/2451493002
2016-11-04Reland "Remove CPDF_Object::Release() in favor of direct delete"tsepez
This reverts commit f0d5b6c35fa343108a3ab7a25bc2cc2b3cf105b3. Review-Url: https://codereview.chromium.org/2478303002
2016-11-04Revert of Remove CPDF_Object::Release() in favor of direct delete (patchset ↵dsinclair
#11 id:200001 of https://codereview.chromium.org/2384883003/ ) Reason for revert: Looks like it's blocking the roll. https://build.chromium.org/p/tryserver.chromium.linux/builders/linux_chromium_compile_dbg_ng/builds/186619 Original issue's description: > Remove CPDF_Object::Release() in favor of direct delete > > Follow-on once we prove Release always deletes in previous CL. > > Committed: https://pdfium.googlesource.com/pdfium/+/4de3d095c9d9e961f93750cf1ebd489fd515be12 TBR=thestig@chromium.org,tsepez@chromium.org # Skipping CQ checks because original CL landed less than 1 days ago. NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true Review-Url: https://codereview.chromium.org/2478253002
2016-11-03Remove CPDF_Object::Release() in favor of direct deletetsepez
Follow-on once we prove Release always deletes in previous CL. Review-Url: https://codereview.chromium.org/2384883003
2016-11-02Remove FX_BOOL from coretsepez
Review-Url: https://codereview.chromium.org/2477443002
2016-10-24Rename IFX_ stream nameschromium/2900tsepez
It's been troubling for some time that an IFX_FileStream might actually be an in-memory buffer with no backing file. Review-Url: https://codereview.chromium.org/2443723002
2016-10-04Move core/fpdfapi/fpdf_edit to core/fpdfapi/editdsinclair
BUG=pdfium:603 Review-Url: https://codereview.chromium.org/2386263003