Age | Commit message (Collapse) | Author |
|
- 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
|
|
BUG=pdfium:488
Review-Url: https://codereview.chromium.org/1936383002
|
|
This Cl updates FWL_ERR to be an FWL_Error enum class. It removes FX_ERR and
replaces it with FWL_Error as well as the values were the same.
There were many places where we either returned other values for FWL_ERR
results.
This Cl is the same as: https://codereview.chromium.org/1943413002/ but I seem
to have messed up the base URL in that one.
TBR=tsepez@chromium.org
Review-Url: https://codereview.chromium.org/1952693003
|
|
This CL converts defines into constants, enums, enum classes or removes them
as needed.
Review-Url: https://codereview.chromium.org/1938163002
|
|
This Cl updates the FWL_WGTHITTEST_ defines to an enum class and fixes up any
code issues.
Review-Url: https://codereview.chromium.org/1948583002
|
|
Also fix typos and overrides.
Review-Url: https://codereview.chromium.org/1935793002
|
|
Do more cleanup in modified files.
Review-Url: https://codereview.chromium.org/1938613003
|
|
Switching the Is{SHIFT|CTRL|ALT|}KeyDown methods to bool from FX_BOOL generated
cfx_systemhandler.cpp(129): warning C4800: 'FX_BOOL': forcing value to bool
'true' or 'false' (performance warning)
on the win_chromium_x64_rel_ng and win8_chromium_ng bots. This CL switches
back to FX_BOOL. Attempting to move everything to bool has huge ripple effects.
I removed IsINSERTKeyDown as it was always false.
Review-Url: https://codereview.chromium.org/1929963002
|
|
There are currently three ways to assert in the code (ASSERT, FXSYS_assert and
assert). This CL standardizes on ASSERT. The benefit of ASSERT is that it can
be overridden if the platform requies and we can pickup the Chromium version
if it has already been defined in the build.
This does change behaviour. Currently FXSYS_assert is always defined but ASSERT
is only defined in debug builds. So, the FXSYS_assert's would fire in Release
builds. That will no longer happen.
BUG=pdfium:219
Review-Url: https://codereview.chromium.org/1914303003
|
|
The Try-Catch object must live the whole lexical scope.
Without the giving a name to the object, this is equivalent to create a temporary that is destroy at the end of the statement.
/src/pdfium/pdfium/out/Debug/../../fpdfsdk/javascript/JS_Value.cpp:154:3: warning: object destroyed immediately after creation; did you mean to name the object? [misc-unused-raii]
This issue was found by clang-tidy
R=dsinclair
BUG=589955
Review-Url: https://codereview.chromium.org/1929513002
|
|
This CL folds IFX_SystemHandler into CFX_SystemHandler. Methods which either
had no implementation, or returned a default value have been removed.
Review URL: https://codereview.chromium.org/1923093002
|
|
Review URL: https://codereview.chromium.org/1925453002
|
|
This CL removes the interfaces:
* IPDF_ObjectRenderer
* IPDF_OCContext
* IPDF_RenderModule
* IPDF_PageModule
The CPDF_RenderModule was just wrapping new and delete calls. This Cl moves
those up to the callers and removes the CPDF_RenderModule class.
Review URL: https://codereview.chromium.org/1918323003
|
|
- Merge CPDF_Page::Load() into ctor.
- Remove always nullptr param for CPDF_Page::ParseContent().
- Remove unneeded indirection in IPDF_RenderModule.
- Delete CPDF_ParseOptions.
- Fix up CPDF_Pattern.
Review URL: https://codereview.chromium.org/1918113002
|
|
Two different versions, one in xfa and one in fpdfsdk,
both do nothing.
Review URL: https://codereview.chromium.org/1915323002
|
|
There is an embedded NUL character (previously line 40).
The test was working because the beginning ot the string is identical.
But, the rest of the string wasn't compare at all.
TESTED: manually
etienneb@burger:~/src/pdfium/pdfium$ out/Debug/pdfium_embeddertests --gtest_filter=*.EmptyCreation
Note: Google Test filter = *.EmptyCreation
[==========] Running 1 test from 1 test case.
[----------] Global test environment set-up.
[----------] 1 test from FPDFEditEmbeddertest
[ RUN ] FPDFEditEmbeddertest.EmptyCreation
[ OK ] FPDFEditEmbeddertest.EmptyCreation (13 ms)
[----------] 1 test from FPDFEditEmbeddertest (13 ms total)
[----------] Global test environment tear-down
[==========] 1 test from 1 test case ran. (13 ms total)
[ PASSED ] 1 test.
R=dsinclair
BUG=589955
Review URL: https://codereview.chromium.org/1916083002
|
|
Currently when you call DelegePage on a CPDFXFA_Document the page will not be
correctly removed. The page is left in the underlying document and, if
GetPage was never called for that page index nothing will happen.
This CL updates the code to always remove the page_index from the underlying
CPDF_Document then, if needed, the original code runs to clear out the
XFA page list for that page.
BUG=chromium:596373
Review URL: https://codereview.chromium.org/1921033003
|
|
Too many calls were of the form fn(x.c_str(), x.GetLength())
which is an anti-pattern given the StringC classes which tie
these together.
There are a few places where explicit CFX_*StringCs are
constructed, but this can be avoided by changing the args
to these functions in the same manner.
Removed String_ from name of functions since it added
little value. Also removed default argument.
Review URL: https://codereview.chromium.org/1919563002
|
|
Replace one instance with std::map.
Remove another instance that is never inserted into.
Review URL: https://codereview.chromium.org/1919433002
|
|
The only place its used, elements are added to it but the
array is not used otherwise.
Review URL: https://codereview.chromium.org/1906133002
|
|
Use RVO now that we use an array type compatible with it.
Review URL: https://codereview.chromium.org/1906903002
|
|
Use unqiue_ptrs while we're at it, also better ctor.
Review URL: https://codereview.chromium.org/1896303002
|
|
Each was only used by one subclass. Removed and used the concrete classes.
BUG=pdfium:468
Review URL: https://codereview.chromium.org/1897993002
|
|
Avoid string duplication when the caller already has one.
Review URL: https://codereview.chromium.org/1883273003
|
|
- Avoid casting to void*
- Don't bother firing events that no one listens for
Review URL: https://codereview.chromium.org/1890563003
|
|
Avoids downgrade followed by duplication of existing strings.
Review URL: https://codereview.chromium.org/1891673003
|
|
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
|
|
Use the more standard name "clear()" instead.
Review URL: https://codereview.chromium.org/1888103002
|
|
BUG=
Review URL: https://codereview.chromium.org/1882043004
|
|
BUG=
Review URL: https://codereview.chromium.org/1885973002
|
|
- Use std::unique_ptr.
- Make dtor protected.
- Simplify logic.
- Remove unused bits from CXFA_FFPageView as well.
Review URL: https://codereview.chromium.org/1878963004
|
|
Similar to https://codereview.chromium.org/1876203002 but in a
different file. The result is still not as efficient as possible
owing to the conversions back and forth to C types.
Convert these methods to ordinary functions in anon namespace
while we're at it.
Review URL: https://codereview.chromium.org/1882173002
|
|
Helps to avoid re-allocating strings when the caller already
has one allocated.
Review URL: https://codereview.chromium.org/1876203002
|
|
Replace the usage of CFX_ArrayTemplate inside CPDF_Array, which
has non-standard APIs such as GetSize() returns int.
R=tsepez@chromium.org
Review URL: https://codereview.chromium.org/1867183002 .
|
|
BUG=
Review URL: https://codereview.chromium.org/1868293002
|
|
The naming is redundant given the base type, and will stand
in the way of consolidating Byte and Wide code.
BUG=
Review URL: https://codereview.chromium.org/1862123003
|
|
It doesn't persist the string beyond the duration of the
call, hence it should take the *StringC variant. Doing so
avoids some allocs by changing to the *StringC ctor in a few
places, at the cost of some explicit .ToByteStringC() calls
(which are cheap).
Review URL: https://codereview.chromium.org/1862953004
|
|
The PWL_Note clasess are never instantiated, remove them and their
implementation. PWL_Note was the only caller to enable spellcheck so this
allows us to remove IPWL_SpellCheck and the conditionals for PES_SPELLCHECK.
BUG=pdfium:468
Review URL: https://codereview.chromium.org/1869533003
|
|
This cleans up left over DEPS files or DEPS file entries from moving the code
into subfolder include/ directories.
Review URL: https://codereview.chromium.org/1865313002
|
|
This CL moves the remaining files in xfa/include/fxfa to xfa/fxfa/include.
Review URL: https://codereview.chromium.org/1864973005
|
|
The IPWL_NoteNotify interface was never implemented. In removing, found that
CPWL_Note was never created. Removed both classes. There were a bunch of methods
that were never called that interacted with this code that have also been
removed.
BUG=pdfium:468
Review URL: https://codereview.chromium.org/1867623002
|
|
This interface is never implemented, removed.
BUG=pdfium:468
Review URL: https://codereview.chromium.org/1865123002
|
|
Review URL: https://codereview.chromium.org/1864153002
|
|
Same for FPDF_GetDocPermissions().
Empty documents do not have parsers.
BUG=pdfium:465
Review URL: https://codereview.chromium.org/1865523003
|
|
This CL moves the last two fpdfdoc files from core/include/fpdfdoc to
core/fpdfdoc/include.
Review URL: https://codereview.chromium.org/1864163002
|
|
Methods that take string arguments and do not persist them should
take *StringC types as argument rather than discrete ptr/len args.
Avoids a number of implicit casts from CFX_ByteString to char*.
BUG=
Review URL: https://codereview.chromium.org/1861183002
|
|
This CL moves the fxedit, jsapi and fpdfxfa code out of fpdfsdk/include to the
various sub-include directories.
Review URL: https://codereview.chromium.org/1863163002
|
|
This CL is a straight move of the fxge includes into core/fxge/include.
Review URL: https://codereview.chromium.org/1868533002
|
|
BUG=pdfium:464
Review URL: https://codereview.chromium.org/1859303002
|