Age | Commit message (Collapse) | Author |
|
Some changes were required to match underlying ctors
as invoked by the templated methods.
Many release() calls go away, a few WrapUniques() are
introduced to avoid going deeper into other code.
Review-Url: https://codereview.chromium.org/2510223002
|
|
Make CDPF_Arrays intern the object they create.
Allow passing nullptr as a CFX_WeakPtr shortcut as well.
Review-Url: https://codereview.chromium.org/2509123002
|
|
Add convenience routines to create and add object in
one step.
Review-Url: https://codereview.chromium.org/2489283003
|
|
Review-Url: https://codereview.chromium.org/2488103002
|
|
Because that's what clone does. There are numerous
release() calls that will go away as more code is
converted.
Review-Url: https://codereview.chromium.org/2484033002
|
|
Review-Url: https://codereview.chromium.org/2477443002
|
|
This reverts commit 3ba098595ae56b64eacc0c25ab76b89a4d78d920.
TBR=thestig@chromium.org,weili@chromium.org
Review URL: https://codereview.chromium.org/2424533003 .
|
|
Doing so highlights a few places where ownership is dubious.
Add convenience functions to return an unowned reference to
a newly-created indirect object.
Review-Url: https://codereview.chromium.org/2419173002
|
|
BUG=pdfium:603
Review-Url: https://codereview.chromium.org/2392603004
|
|
BUG=pdfium:603
Review-Url: https://codereview.chromium.org/2392773003
|
|
BUG=pdfium:611
Review-Url: https://codereview.chromium.org/2374383003
|
|
BUG=pdfium:611
Review-Url: https://codereview.chromium.org/2383543002
|
|
BUG=pdfium:611
Review-Url: https://codereview.chromium.org/2375283003
|
|
BUG=pdfium:597
Review-Url: https://codereview.chromium.org/2345063002
|
|
Also, it's idempotent, so simplify some logic in callers to
not care if objnum is zero.
The alternate forms are rarely used, using the objnum form
makes it clear that SetReferenceFor() can't possibly register
the object as a side-effect.
Review-Url: https://codereview.chromium.org/2361713002
|
|
BUG=645954
Review-Url: https://codereview.chromium.org/2355733002
|
|
Replace the CPDF_Stream(nullptr, 0, nullptr) pattern with
a default ctor.
Remove unused parameters from CPDF_Stream::SetData(). Both
are always passed as FALSE.
CPDF_Stream declared its own m_GenNum, which shadowed the one
in CPDF_Object. It was used only to distinguish file/memory
streams, so add a bool explicitly for this purpose.
Remove the union, it would be sad if we confused user data
with a C++ object with virtual function calls.
Use unique_ptrs with appropriate deleters to manage memory.
Review-Url: https://codereview.chromium.org/2347993002
|
|
On Acrobat, if "/AP" is present on a text markup definition,
the coordinates used to draw the annotation come from "/Rect
values, whereas if "/AP" is not defined, the array defined
in /QuadPoints is used to grab the annotation coordinates from.
PDFium, on the other hand, uses "/Rect" regardless of
presence or absence of "/AP".
CL fixes PDFium to work similarly to Acrobat, in this case.
TEST=testing/resources/pixel/bug_585_*.in
BUG=pdfium:585
Review-Url: https://codereview.chromium.org/2289293005
|
|
This Cl makes the Get and Set methods consistenly use {G|S}et<Type>For.
BUG=pdfium:596
Review-Url: https://codereview.chromium.org/2334323005
|
|
Review-Url: https://codereview.chromium.org/2341453002
|
|
Avoids a needless alloc and copy.
Review-Url: https://codereview.chromium.org/2338553002
|
|
We should not use DR field from annotation/field dictionaries, since
these are not supposed to have one. In PDF spec 1.7, DR is defined only
for the form dictionary, in 8.6.1. In addition, note 118 in Appendix H
says "In PDF 1.2, an additional entry in the field dictionary, DR, was
defined but was never implemented. Beginning with PDF 1.5, this entry
is obsolete and should be ignored."
The changes in CBA_FontMap fix the bug below. The changes in
cpvt_generateap do not affect the bug but follow the reasoning from
the above paragraph.
BUG=pdfium:538
Review-Url: https://codereview.chromium.org/2337673002
|
|
By doing this, we simplify the code in cpvt_generateap.cpp,
and avoid calling CPVT_GenerateAP methods altogether,
when it is known that they are bailing out.
This is a preparation to fix pdfium bug 585.
BUG=pdfium:585
Review-Url: https://codereview.chromium.org/2310873002
|
|
Each annotation has its contents, and users should be able to see the
contents. In this patch, PDFium creates a Popup annotation for each
annotation and stores the author and the content. When a user mouse
hover on the annotation, PDFium draws the corresponding Popup annotation
and displays the content.
Also, roll DEPS for testing/corpus to 5867fa6.
BUG=62625
Review-Url: https://codereview.chromium.org/2273893002
|
|
This patch generates a default AP stream for text annotation. The AP stream
only draws a symbol, which represents the presence of text annotation at the
point.
Also, roll DEPS for testing/corpus to afbac94 to test text annotations.
BUG=62625
Review-Url: https://codereview.chromium.org/2270493002
|
|
Now that PDFium supports drawing of more annotation
types, it should also respect the "hidden" flag that
annotations might feature.
For instance, in IE/Acroread if an annotation is flagged as
"hidden" it does not get drawn.
CL adds a check for the specific "hidden" flag, not drawing
annotation that are flagged with it, in order to match IE + acrobat
reader behavior.
The "flags" definition can be seen by looking at "/F {value}"
syntax in a PDF file source, where {value} is an predefined
integer value.
Test: PDF files being added in [1].
[1] https://codereview.chromium.org/2239713003/
BUG=62625
Review-Url: https://codereview.chromium.org/2239853002
|
|
This patch generates a default AP stream for ink annotation so that ink
annotations without AP stream can be displayed.
Also, roll DEPS for testing/corpus to 4119f8e to test ink annotations.
BUG=62625
Review-Url: https://codereview.chromium.org/2232553002
|
|
This patch generates a default AP stream for circle annotation so that
circle annotations without AP stream can be displayed.
Also, roll DEPS for testing/corpus to 71d1f22 to test circle annotations.
BUG=62625
Review-Url: https://codereview.chromium.org/2228093002
|
|
This patch generates a default AP stream for square annotation so that square
annotations without AP stream can be displayed.
Also, roll DEPS for testing/corpus to 7f07c22 to test square annotations.
BUG=62625
Review-Url: https://codereview.chromium.org/2219683002
|
|
Since CFX_BinaryBuf::GetBuffer() returns uint8_t*, casting to uint8_t*
is unnecessary.
Review-Url: https://codereview.chromium.org/2218633002
|
|
This patch generates a default AP stream for squiggly annotation so that
squiggly annotations without AP stream can be displayed.
Also, roll DEPS for testing/corpus to a89e4fb to test squiggly annotations.
BUG=62625
Review-Url: https://codereview.chromium.org/2206773004
|
|
This patch generates a default AP stream for strike out annotation so that
strike out annotations without AP stream can be displayed.
Also, roll DEPS for testing/corpus to ddc1938 to test strike out annotations.
BUG=62625
Review-Url: https://codereview.chromium.org/2206083002
|
|
This patch generates a default AP stream for underline annotation so that
underline annotations without AP stream can be displayed.
Also, roll DEPS for testing/corpus to cae29d1 to test underline annotations.
BUG=62625
Review-Url: https://codereview.chromium.org/2205543002
|
|
Also, use PaintOperation instead of bStrokingOperation in
CPDF_DefaultAppearance.
Review-Url: https://codereview.chromium.org/2197353002
|
|
This splits the doc_ocg, doc_vt and doc_basic files into individual class files.
Review-Url: https://codereview.chromium.org/2187073005
|
|
BUG=62625
Review-Url: https://codereview.chromium.org/2202063002
|
|
This patch generates a default AP stream for highlight annotation so that
highlight annotations without AP stream can be displayed.
BUG=62625
Review-Url: https://codereview.chromium.org/2193983002
|
|
Review-Url: https://codereview.chromium.org/2196903002
|
|
This CL splits the header file apart. The cpp files are not touched as part
of this CL, they will be done as a followup. This de-duplicates the fpdf_doc.h
BUG=pdfium:249
Review-Url: https://codereview.chromium.org/2183313004
|
|
BUG=pdfium:234
Review-Url: https://codereview.chromium.org/2001783003
|
|
There were two defines, BBS_ and PBS_ for the various border styles in the
system. They were the same, except PBS_ had an extra SHADOW define which was
never used.
This CL combines both of those into a single BorderStyle enum class and updates
the code as needed.
Also, removes ADDBIT, GETBIT unused defines. Updates barcode code to use
the util.h defines instead of redefinition. fsdk_baseannot names starting with _ were cleaned up and some #defines moved to constants.
Review-Url: https://codereview.chromium.org/1980973002
|
|
Add missing helper function to CFX_ByteTextBuf to avoid the
anti-pattern CFX_ByteString(sBuf.AsStringC()), using the name
"Make" to indicate there's an allocation going on in this case.
Change some method arguments to take pre-existing ByteStrings where
possible.
Review-Url: https://codereview.chromium.org/1977093002
|
|
These were left over from after I broke a big "things that never return
NULL" CL up into smaller ones.
Review-Url: https://codereview.chromium.org/1960043003
|
|
Same goes for CFX_Edit::GetIterator().
Review-Url: https://codereview.chromium.org/1967963002
|
|
- No caller checks the CPDF_VariableText::SetProvider() return value.
- IFX_Edit::SetVTProvider() is unused.
- CFX_ListItem::SetCaret() is useless.
- CFX_List::SetItemCaret() is also useless.
- CPVT_GenerateAP::GenerateEditAP() has a param that's always NULL.
Review-Url: https://codereview.chromium.org/1960183003
|
|
https://codereview.chromium.org/1919283008/ )
Reason for revert:
Causing segv on certain PDFs which make the PDF load tests hang. crbug.com/608901
Original issue's description:
> Remove unneeded CPVT classes.
>
> - CPVT_Size is the same as CFX_PointF
> - CPVT_FloatRange is unused.
> - CPVT_ArrayTemplate is just a wrapper for CFX_ArrayTemplate.
>
> Committed: https://pdfium.googlesource.com/pdfium/+/a354eb517429e10d84abff65e455f0c183fe58e0
TBR=thestig@chromium.org
# Not skipping CQ checks because original CL landed more than 1 days ago.
Review-Url: https://codereview.chromium.org/1947093002
|
|
- CPVT_Size is the same as CFX_PointF
- CPVT_FloatRange is unused.
- CPVT_ArrayTemplate is just a wrapper for CFX_ArrayTemplate.
Review-Url: https://codereview.chromium.org/1919283008
|
|
Do the same for CFX_WideTextBuf as well.
The name is confusing because these return CFX_ByteStringC,
not CFX_ByteString. The AsStringC naming gives parallelism with
the string types themselves, and may help to indicate that
the result is only good for the lifetime of the object being
operated upon.
Review URL: https://codereview.chromium.org/1886263003
|
|
This will help avoid duplicate allocation of CFX_ByteStrings
when the caller already has one. It may seem counter-intuitive
that requiring the caller to pass an allocated CFX_ByteString
rather than a static CFX_ByteStringC would improve the situation,
but due to the idiosyncrasies of std::map, the CPDF_Dictionary
methods must always do an allocation under the covers which
can't be avoided.
The changed callers in this CL are places where we would
previously demote to CFX_ByteStringC and then allocate a
a duplicate CFX_ByteString in the dictionary method.
Review URL: https://codereview.chromium.org/1889863002
|
|
R=tsepez@chromium.org,weili@chromium.org
Review URL: https://codereview.chromium.org/1879083002
|