summaryrefslogtreecommitdiff
path: root/fpdfsdk
AgeCommit message (Collapse)Author
2016-04-08Make CFX_WideString::FromLocal() take a CFX_ByteStringC argtsepez
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
2016-04-07Remove all PWL_Note classesdsinclair
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
2016-04-07Cleanup DEPS files after include/ changes.dsinclair
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
2016-04-06Move remaining xfa/include/fxfa filesdsinclair
This CL moves the remaining files in xfa/include/fxfa to xfa/fxfa/include. Review URL: https://codereview.chromium.org/1864973005
2016-04-06Remove IPWL_NoteNotify and CPWL_Note.dsinclair
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
2016-04-06Remove IPWL_IconList_Notify.dsinclair
This interface is never implemented, removed. BUG=pdfium:468 Review URL: https://codereview.chromium.org/1865123002
2016-04-06Move include/fxcodec to fxcodec/includedsinclair
Review URL: https://codereview.chromium.org/1864153002
2016-04-06FPDF_GetSecurityHandlerRevision() should not crash.thestig
Same for FPDF_GetDocPermissions(). Empty documents do not have parsers. BUG=pdfium:465 Review URL: https://codereview.chromium.org/1865523003
2016-04-06Move remaining fpdfdoc filesdsinclair
This CL moves the last two fpdfdoc files from core/include/fpdfdoc to core/fpdfdoc/include. Review URL: https://codereview.chromium.org/1864163002
2016-04-06Make CFX_WideString::FromUTF8() take a CFX_ByteStringC argument.tsepez
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
2016-04-06Move code from fpdfsdk/include to the sub directories.dsinclair
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
2016-04-06Move core/include/fxge to core/fxge/include.dsinclair
This CL is a straight move of the fxge includes into core/fxge/include. Review URL: https://codereview.chromium.org/1868533002
2016-04-06Mark FPDF_BStr_* with DLLEXPORT / STDCALL.thestig
BUG=pdfium:464 Review URL: https://codereview.chromium.org/1859303002
2016-04-06Rename CFX_WideStringC::raw_str() to c_str()tsepez
No functional change intended. This difference in naming is standing in the way of consolidating some of the string code between Wide and Byte strings. The Wide code wants to call raw_str() in exactly the same spots that the Byte code calls c_str(). This makes sense, because in both places we get a character type back, and not a uint*_t type. If WideStringC had a raw_str() method, it would have to return uint32_t or similar. R=dsinclair@chromium.org Review URL: https://codereview.chromium.org/1863593004
2016-04-05Make down-conversion explicit from CFX_Widetring to CFX_WideStringC.tsepez
Companion to https://codereview.chromium.org/1853233002 BUG= Review URL: https://codereview.chromium.org/1857073002
2016-04-05Remove core/include/fpdfdoc/fpdf_vt.hdsinclair
This CL removes the core/include/fpdfdoc/fpdf_vt.h file. The IPDF_VariableText class was removed in favour of the only concrete class of CPD_VariableText. CPVT_Provider was moved to CPDF_VariableText::Provider and CPDF_VariableText_Iterator was moved to CPDF_VariableText::Iterator. The IFX_Edit_FontMap interface was merged into the IPVT_FontMap interface so there is only one. Other classes were split out as needed in order to keep things compiling. BUG=pdfium:468 Review URL: https://codereview.chromium.org/1860063002
2016-04-05Rename GetCStr and GetPtr to match CFX_ByteString.dsinclair
This CL updates CFX_ByteStringC to use the more common c_str and raw_str instead of GetCStr and GetPtr. Review URL: https://codereview.chromium.org/1857713003
2016-04-04Make down-conversion explicit from CFX_ByteString to CFX_ByteStringC.tsepez
Having this happen implicitly can be dangerous because the lifetime has to be considered; we should have caught the "red bots" in https://codereview.chromium.org/1847333004/#ps60001 at compile time. Review URL: https://codereview.chromium.org/1853233002
2016-04-04Make IPDF_VariableText_{Provider,Iterator} inner classes.dsinclair
This CL moves the IPDF_VariableText_Provider and IPDF_VariableText_Iterator classes to be nested sub-classes of IPDF_VariableText. BUG=pdfium:455 Review URL: https://codereview.chromium.org/1855403002
2016-04-04Cleanup the FF Handler proxy methods.dsinclair
This CL removes the proxy methods from CXFA_FFWidgetHandler and CXFA_DocHandler and removes CXFA_FFMenuHandler as it was only proxy methods. The calls are made directly on the object now. Review URL: https://codereview.chromium.org/1857893002
2016-04-01Remove CFX_{Byte,Wide}String::Equal in favor of "==".tsepez
Makes the code slightly cleaner. Review URL: https://codereview.chromium.org/1846083002
2016-03-31Remove IXFA_* interfaces.dsinclair
This CL removes the IXFA_* interfaces which are: - Implemented once. - Not implemented by an fpdfsdk class. This requires making a few classes visible to fpdfsdk so we can have the correct instances available instead of the IXFA types. Review URL: https://codereview.chromium.org/1846993002
2016-03-31Move the fpdfsdk/include/javascript folderdsinclair
This CL splits the IJavaScript.h file into the two inner classes and puts them in the fpdfsdk/javascript folder. Review URL: https://codereview.chromium.org/1847583004
2016-03-31Split core/include/fpdfdoc/fpdf_ap.hdsinclair
This CL splits the fpdf_ap.h file apart into individual pieces and moves the implementations to their own CPP files. Review URL: https://codereview.chromium.org/1840413002
2016-03-31Re-enable all the windows warnings except 4267weili
The code is changed or had been changed to no longer generate these warnings. It is safe to re-enabled these warnings. In this code change, we fixed some code which generates warnings 4018 (signed/unsigned mismatch) and 4146 (unary minus operator applied to unsigned type, result still unsigned). Warning 4333 (right shift by too large amount, data loss) and 4345 (an object of POD type constructed with an initializer of the form () will be default-initialized) are no longer generated. The same setting is applied and verified for GN build as well. BUG=pdfium:29 Review URL: https://codereview.chromium.org/1849443003
2016-03-29Code change to avoid signed/unsigned mismatch warnings.Wei Li
This makes pdfium code on Linux and Mac sign-compare warning free. The warning flag will be re-enabled after checking on windows clang build. BUG=pdfium:29 R=tsepez@chromium.org Review URL: https://codereview.chromium.org/1841643002 .
2016-03-29Rename GetElementValue() to GetDirectObject{By,At}().tsepez
Every time I read this code, I have to make the mental substituion that "Element value" means "de-ref indirect object", so it might as well just say so. BUG= Review URL: https://codereview.chromium.org/1841173002
2016-03-29Add test for util.byteToChar() and fix error msg.tsepez
Review URL: https://codereview.chromium.org/1838543002
2016-03-28use std::vector in more places in JavaScript bindings code.tsepez
use unique_ptrs for app:m_Timers. BUG= Review URL: https://codereview.chromium.org/1834203002
2016-03-28Added test for util.printx() and make it match spec.tsepez
R=dsinclair@chromium.org Review URL: https://codereview.chromium.org/1837543002
2016-03-28Reduce signed/unsigned comparison warningsWei Li
The warnings generated by Clang. This is part 1 for some simple cases. BUG=pdfium:29 R=tsepez@chromium.org Review URL: https://codereview.chromium.org/1840483003 .
2016-03-25Remove FX_DWORD from fpdfsdk/ and testingtsepez
BUG= Review URL: https://codereview.chromium.org/1835693002
2016-03-25Replace CFX_DWordArray with CFX_ArrayTemplate<FX_DWORD>.Tom Sepez
First step to getting rid of FX_DWORD. R=ochang@chromium.org Review URL: https://codereview.chromium.org/1832113003 .
2016-03-25util.printd() replaces specified date with current date.tsepez
Added test case. Several bugs going on here: JS_LocalTime() ignoring argument and returning current time and not factoring in the time zone adjustment. Use of FXSYS_floor() silently casts result to float, losing precision required to extract minutes and seconds. Pre-existing wcsftime escapes not stripped. BUG=pdfium:413 Review URL: https://codereview.chromium.org/1833053002
2016-03-24Re-land "Preserve m_pDynamicObjsMap until FXJS_PerIsolateData is destroyed.""Tom Sepez
Fix the destruction order. This reverts commit 129a60ec2d4d98ed953beaca629c99a52fb7e9b0. BUG=594120 TBR=jochen@chromium.org Review URL: https://codereview.chromium.org/1831723004 .
2016-03-24Revert "Preserve m_pDynamicObjsMap until FXJS_PerIsolateData is destroyed."Tom Sepez
This reverts commit e432675850161570a8562f8c617da039f51f706d. Reson for revert - broke tests. TBR=jochen@chromium.org Review URL: https://codereview.chromium.org/1826223002 .
2016-03-24Preserve m_pDynamicObjsMap until FXJS_PerIsolateData is destroyed.Tom Sepez
BUG=594120 R=jochen@chromium.org Review URL: https://codereview.chromium.org/1822423002 .
2016-03-23Move the fpdfsdk/include/pdfwindow/ headers into fpdfsdk/pdfwindow.dan sinclair
This CL moves all of the pdfwindow headers to live beside their source files. R=tsepez@chromium.org Review URL: https://codereview.chromium.org/1823153002 .
2016-03-23Split core/include/fpdfapi/fpdf_resource.hdan sinclair
This CL splits apart the core/include/fpdfapi/fpdf_resource.h file and places the classes into individual files. R=tsepez@chromium.org Review URL: https://codereview.chromium.org/1824033002 .
2016-03-23Move xfa/include/fwl/{core,basewidget} to xfa/fwl/{core,basewidget}.Dan Sinclair
This CL moves and splits the FWL files from the core and basewidget directories into the non-include folders. R=tsepez@chromium.org Review URL: https://codereview.chromium.org/1827923002 .
2016-03-23Move core/include/fxcrt to core/fxcrt/include.Dan Sinclair
This CL moves the fxcrt code into the core/fxcrt directory. The only exception was fx_bidi.h which was moved into core/fxcrt as it is not used outside of core/. R=tsepez@chromium.org Review URL: https://codereview.chromium.org/1825953002 .
2016-03-22Re-enable MSVC warning 4702Wei Li
BUG=pdfium:29 R=tsepez@chromium.org Review URL: https://codereview.chromium.org/1821423002 .
2016-03-22Fix CPDFSDK_Widget::OnXFAAAction()Wei Li
Fix a couple issues with OnXFAAAction(): -- radio button widget should not call ProcessEvent() twice; -- UpdateDocView should be called before returning; R=jun_fang@foxitsoftware.com Review URL: https://codereview.chromium.org/1809073004 .
2016-03-21Remove FX_WORD in favor of uint16_t.Tom Sepez
It isn't buying us anthing, and it looks strange in a struct when other uint types are already present. R=dsinclair@chromium.org Review URL: https://codereview.chromium.org/1821043003 .
2016-03-21Make a few more const tables smaller.chromium/2689chromium/2688Tom Sepez
Remove some tables from .h file (risk of duplication). R=ochang@chromium.org Review URL: https://codereview.chromium.org/1814233005 .
2016-03-21Move xfa/include/fxbarcode/BC_Barcode.h to xfa/fxbarcode.Dan Sinclair
This CL splits apart the larger header into individual class headers in the xfa/fxbarcode directory. R=tsepez@chromium.org Review URL: https://codereview.chromium.org/1816133002 .
2016-03-21Re-enable several MSVC warningsWei Li
Re-enable the following warnings: 4245: signed/unsigned conversion mismatch; 4310: cast may truncate data; 4389: operator on signed/unsigned mismatch; 4701: use potentially uninitialized local variable; 4706: assignment within conditional expression Clean up the code to avoid those warnings. BUG=pdfium:29 R=tsepez@chromium.org Review URL: https://codereview.chromium.org/1801383002 .
2016-03-21Move core/include/fpdfapi/fpdf_pageobj.h into core/fpdfapi.Dan Sinclair
This CL splits the file into individual classes and moves them into core/fpdfapi/fpdf_page as needed. R=tsepez@chromium.org Review URL: https://codereview.chromium.org/1811053002 .
2016-03-21Move fpdfsdk/include/formfiller to fpdfsdk/formfiller.Dan Sinclair
This CL moves the .h files and renames the .cpp files to match. R=tsepez@chromium.org Review URL: https://codereview.chromium.org/1809193002 .
2016-03-18Fix a typoWei Li
R=tsepez@chromium.org Review URL: https://codereview.chromium.org/1808853007 .