summaryrefslogtreecommitdiff
path: root/fpdfsdk/fxedit/fxet_edit.cpp
AgeCommit message (Collapse)Author
2017-07-24Remove fxedit place classes in pdfwindow/Dan Sinclair
This CL removes the fpdfsdk/fxedit folder and moves the code to fpdfsdk/pdfwindow which is the primary consumer. The classes were renamed from CFX_* to CPWL_*. Change-Id: I6c6178adccf978193bbb9685204657ebd3f438bb Reviewed-on: https://pdfium-review.googlesource.com/8552 Commit-Queue: dsinclair <dsinclair@chromium.org> Reviewed-by: Tom Sepez <tsepez@chromium.org>
2017-07-24Remove fx_edit.hDan Sinclair
This CL moves GetPDFWordString to be a method on CFX_Edit. The FX_EDIT_ISLATINWORD define is moved into fx_edit.h. CFWL_Edit::FX_EDIT_ISLATINWORD is renamed to FxEditIsLatinWord to make less confusing with the define. Change-Id: I47d12d41447b268894a1d0376ac4b2bdb409e2df Reviewed-on: https://pdfium-review.googlesource.com/8531 Commit-Queue: dsinclair <dsinclair@chromium.org> Reviewed-by: Tom Sepez <tsepez@chromium.org>
2017-07-21Change Clear() to ClearSelection().Diana Gage
This CL renames Clear() in CPWL_EditCtrl, CPWL_ComboBox, and CFX_Edit to ClearSelection(), as this function's behavior is clearing text selection. Change-Id: Ia32f5347abc1960d7219684942df6a3fede9936c Reviewed-on: https://pdfium-review.googlesource.com/8611 Reviewed-by: Lei Zhang <thestig@chromium.org> Commit-Queue: Diana Gage <drgage@google.com>
2017-07-21Change CFX_Edit::GetSelText() to CFX_Edit::GetSelectedText().Diana Gage
This CL renames the CFX_Edit::GetSelText() method so that it is more descriptive. Change-Id: I2086f7d036cd874aba1b7d7ec04d1cbb7e182d06 Reviewed-on: https://pdfium-review.googlesource.com/8612 Reviewed-by: Lei Zhang <thestig@chromium.org> Commit-Queue: Lei Zhang <thestig@chromium.org>
2017-07-21Change "Sel" abbreviation to "Selection".Diana Gage
This CL changes SetSel() and GetSel() to SetSelection() and GetSelection() in CFX_Edit and CPWL_EditCtrl, and SetEditSel() and GetEditSel() to SetEditSelection() and GetEditSelection() in CPWL_ComboBox. Change-Id: Idd984932bda139a04e99193e519756980b7d4397 Reviewed-on: https://pdfium-review.googlesource.com/8610 Reviewed-by: Lei Zhang <thestig@chromium.org> Commit-Queue: Lei Zhang <thestig@chromium.org>
2017-07-20Consolidate Appearance Stream code in CPWL_AppStream.Dan Sinclair
This CL moves the remaining appearance stream code to CPWL_AppStream. The unused GetThisAppearanceStream methods have been removed. Change-Id: I0bdfbb11962ee7975394a40a1ea45d076ee9151d Reviewed-on: https://pdfium-review.googlesource.com/8312 Commit-Queue: dsinclair <dsinclair@chromium.org> Reviewed-by: Henrique Nakashima <hnakashima@chromium.org>
2017-07-13Cleanup CPDF_RenderOptions colour members.Dan Sinclair
This CL removes the fore/back colours in favour of just using the colours inline and converts the m_ColorMode to an enum. Change-Id: I1796e200d5c470680126af8625d45fc3062a1042 Reviewed-on: https://pdfium-review.googlesource.com/7751 Reviewed-by: Henrique Nakashima <hnakashima@chromium.org> Reviewed-by: Nicolás Peña <npm@chromium.org> Commit-Queue: dsinclair <dsinclair@chromium.org>
2017-07-05Cleanup IOn* methods and CPWL_CBEditDan Sinclair
This CL removes various IOn* methods and consolidates code where possible. The CPWL_CBEdit class is also removed as it was a subclass of CPWL_Edit which added no extra functionality. Change-Id: Ifac579ab252b7ca64f8c9b3caeac443683a39c58 Reviewed-on: https://pdfium-review.googlesource.com/7279 Commit-Queue: dsinclair <dsinclair@chromium.org> Reviewed-by: Tom Sepez <tsepez@chromium.org>
2017-06-27Converting CFX_ByteTextBuf to ostringstream in fxet_edit.cpp.Henrique Nakashima
Bug: pdfium:731 Change-Id: I64e37ee1673d46e6e550d44503c0ccc1015243e1 Reviewed-on: https://pdfium-review.googlesource.com/7012 Commit-Queue: dsinclair <dsinclair@chromium.org> Reviewed-by: dsinclair <dsinclair@chromium.org>
2017-06-20Cleanup fpdf_parser_decodeNicolas Pena
This CL fixes some nits in fpdf_parser_decode, especially avoiding non-const reference parameters. Change-Id: Ibb914850afd924bb398f886ac862f7589519ef7e Reviewed-on: https://pdfium-review.googlesource.com/6750 Commit-Queue: Nicolás Peña <npm@chromium.org> Reviewed-by: dsinclair <dsinclair@chromium.org>
2017-06-02Rename PWL_FooBar files to cpwl_foo_bar.Lei Zhang
Change-Id: I7ed0ba0acbbee291e285555974ebf50c0073668f Reviewed-on: https://pdfium-review.googlesource.com/6250 Reviewed-by: Tom Sepez <tsepez@chromium.org> Commit-Queue: Lei Zhang <thestig@chromium.org>
2017-05-25Mass conversion of remaining class members (non-xfa)Tom Sepez
Change-Id: I8365ba80e3395d59a3cf35dbd9d9162e86e712e3 Reviewed-on: https://pdfium-review.googlesource.com/5970 Commit-Queue: Tom Sepez <tsepez@chromium.org> Reviewed-by: Lei Zhang <thestig@chromium.org>
2017-04-21Add CFX_RenderDevice::AutoRestorer()chromium/3078Tom Sepez
Avoid cleanup on every return path. Change-Id: I6978adb6f31020d812ac88c5d46c703d1461d373 Reviewed-on: https://pdfium-review.googlesource.com/4435 Reviewed-by: Lei Zhang <thestig@chromium.org> Reviewed-by: Tom Sepez <tsepez@chromium.org> Commit-Queue: Tom Sepez <tsepez@chromium.org>
2017-04-19Cleanup codepage and charset definitions.Dan Sinclair
This Cl cleans up the unused defines in fx_codepage.h. The FXFONT_CHARSET_ defines are replaced with fx_codepage defines, this moves fx_codepage into core instead of xfa only. Static asserts are added to verify the public/ charsets match the fx_codepage charsets. Change-Id: Ie2f749e093de60a9a6743128a1fb087912e4cc96 Reviewed-on: https://pdfium-review.googlesource.com/4316 Commit-Queue: dsinclair <dsinclair@chromium.org> Commit-Queue: Nicolás Peña <npm@chromium.org> Reviewed-by: Nicolás Peña <npm@chromium.org>
2017-03-23Remove dead code in fxet_edit.h.chromium/3050Lei Zhang
Change-Id: Ide1702bbe07bd973293331fe6389b41c057691ba Reviewed-on: https://pdfium-review.googlesource.com/3123 Commit-Queue: Lei Zhang <thestig@chromium.org> Reviewed-by: Nicolás Peña <npm@chromium.org>
2017-03-23Remove dead CFX_Edit code and fix some typos.Lei Zhang
Change-Id: Ieaac36e06db3d1e2b857d999a7d3d9cd5c5a9506 Reviewed-on: https://pdfium-review.googlesource.com/3118 Commit-Queue: Lei Zhang <thestig@chromium.org> Reviewed-by: Tom Sepez <tsepez@chromium.org>
2017-03-21Make CPVT_WordPlace more conformant with the prevailing idioms.Tom Sepez
Add relational operators to replace CmpWord(). Leave CmpLine() for the moment as it saves some work. Remove CmpSec() and just inline comparison of the one member. Invert IsExist() as IsEmpty(). There is a big philosophical discussion as to whether things that are empty exist. I say they do, but they're just empty. Rename Default() to Reset(). Default sounds like a noun. Add AdvanceSection() method and call as appropriate. Change-Id: I01d9479f63a4860e0fd228255540d6d94dc24a9f Reviewed-on: https://pdfium-review.googlesource.com/3139 Commit-Queue: dsinclair <dsinclair@chromium.org> Reviewed-by: dsinclair <dsinclair@chromium.org>
2017-03-14Replace FX_FLOAT with underlying float type.Dan Sinclair
Change-Id: I158b7d80b0ec28b742a9f2d5a96f3dde7fb3ab56 Reviewed-on: https://pdfium-review.googlesource.com/3031 Commit-Queue: dsinclair <dsinclair@chromium.org> Reviewed-by: Tom Sepez <tsepez@chromium.org> Reviewed-by: Nicolás Peña <npm@chromium.org>
2017-02-23Convert TransformPoint calls to Transform callsDan Sinclair
This Cl converts remaining calls to TransformPoint to use Transform instead. Change-Id: I7a2c000492da5dda3975b4449812f281816fdab6 Reviewed-on: https://pdfium-review.googlesource.com/2822 Commit-Queue: dsinclair <dsinclair@chromium.org> Reviewed-by: Tom Sepez <tsepez@chromium.org>
2017-02-14Reland "Convert CFX_FloatPoint to CFX_PointF"Dan Sinclair
This CL updates the CFX_FloatPoint Cl to accommodate for the Origin CL being reverted. Change-Id: I345fe1117938a49ad9ee5f310fe7b5e21d9f1948 Reviewed-on: https://pdfium-review.googlesource.com/2697 Reviewed-by: Nicolás Peña <npm@chromium.org> Commit-Queue: dsinclair <dsinclair@chromium.org>
2017-02-14Delete unused method CPWL_Edit::GeneratePageObjectsNicolas Pena
Change-Id: I114afbee411784118e81b4528ae740528c4aef2c Reviewed-on: https://pdfium-review.googlesource.com/2693 Commit-Queue: Nicolás Peña <npm@chromium.org> Reviewed-by: dsinclair <dsinclair@chromium.org>
2017-02-14Revert "Convert CFX_FloatPoint to CFX_PointF"dsinclair
This reverts commit 4797c4240cb9e2d8cd36c583d46cd52ff94af95d. Reason for revert: Reverting chain to see if fixes Chrome roll. Original change's description: > Convert CFX_FloatPoint to CFX_PointF > > The two classes store the same information, remove the CFX_FloatPoint variant. > > Change-Id: Ie598c2ba5af04fb2bb3347dd48c30fd5e4845e62 > Reviewed-on: https://pdfium-review.googlesource.com/2612 > Commit-Queue: dsinclair <dsinclair@chromium.org> > Reviewed-by: Tom Sepez <tsepez@chromium.org> > TBR=tsepez@chromium.org,dsinclair@chromium.org,pdfium-reviews@googlegroups.com NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true Change-Id: Ia42074e706983c62d2e57497c3079b3c338343a3 Reviewed-on: https://pdfium-review.googlesource.com/2694 Commit-Queue: dsinclair <dsinclair@chromium.org> Reviewed-by: dsinclair <dsinclair@chromium.org>
2017-02-13Convert CFX_FloatPoint to CFX_PointFDan Sinclair
The two classes store the same information, remove the CFX_FloatPoint variant. Change-Id: Ie598c2ba5af04fb2bb3347dd48c30fd5e4845e62 Reviewed-on: https://pdfium-review.googlesource.com/2612 Commit-Queue: dsinclair <dsinclair@chromium.org> Reviewed-by: Tom Sepez <tsepez@chromium.org>
2017-02-09Remove Transform in favour of TransformPointDan Sinclair
This CL removes the two Transform() overrides from CFX_Matrix and calls the TransformPoint methods directly. In the case of the 4 param version the values were assigned to the out values before calling. Change-Id: Id633826caec75b848774dcda6cfdcef2dbf5a7db Reviewed-on: https://pdfium-review.googlesource.com/2573 Reviewed-by: Nicolás Peña <npm@chromium.org> Reviewed-by: Tom Sepez <tsepez@chromium.org> Commit-Queue: dsinclair <dsinclair@chromium.org>
2017-01-31Use std::vector, unique_ptrs in fxet_edit.hTom Sepez
Change-Id: I16a1bfc7e3edcb3844e0978be1c7ca1e9c59eb6e Reviewed-on: https://pdfium-review.googlesource.com/2454 Reviewed-by: Nicolás Peña <npm@chromium.org> Reviewed-by: dsinclair <dsinclair@chromium.org> Commit-Queue: dsinclair <dsinclair@chromium.org>
2017-01-04Remove CFX_ArrayTemplate, use unique_ptr in fpdfsdk/pdfwindowtsepez
Review-Url: https://codereview.chromium.org/2594153003
2016-11-02Remove FX_BOOL from fpdfsdk.tsepez
Review-Url: https://codereview.chromium.org/2453683011
2016-10-04Move core/fpdfapi/fpdf_render to core/fpdfapi/renderdsinclair
BUG=pdfium:603 Review-Url: https://codereview.chromium.org/2393593002
2016-10-04Move core/fpdfapi/fpdf_parser to core/fpdfapi/parserdsinclair
BUG=pdfium:603 Review-Url: https://codereview.chromium.org/2392603004
2016-10-04Move core/fpdfapi/fpdf_page to core/fpdfapi/pagedsinclair
BUG=pdfium:603 Review-Url: https://codereview.chromium.org/2386423004
2016-10-04Move core/fpdfapi/fpdf_font to core/fpdfapi/fontdsinclair
BUG=pdfium:603 Review-Url: https://codereview.chromium.org/2392773003
2016-10-03Add ptr_util.h from base until std::make_unique<> availabletsepez
Review-Url: https://codereview.chromium.org/2386273004
2016-09-29Move fpdfsdk/fxedit/include to fpdfsdk/fxeditdsinclair
BUG=pdfium:611 Review-Url: https://codereview.chromium.org/2375963006
2016-09-29Move core/fxge/include to core/fxgedsinclair
BUG=pdfium:611 Review-Url: https://codereview.chromium.org/2377393002
2016-09-29Move core/fpdfdoc/include to core/fpdfdocdsinclair
BUG=pdfium:611 Review-Url: https://codereview.chromium.org/2374383003
2016-09-29Move core/fpdfapi/fpdf_render/include to core/fpdfapi/fpdf_renderdsinclair
BUG=pdfium:611 Review-Url: https://codereview.chromium.org/2382763002
2016-09-29Move core/fpdfapi/fpdf_parser/include to core/fpdfapi/fpdf_parserdsinclair
BUG=pdfium:611 Review-Url: https://codereview.chromium.org/2383543002
2016-09-29Move core/fpdfapi/fpdf_page/include to core/fpdfapi/fpdf_pagedsinclair
BUG=pdfium:611 Review-Url: https://codereview.chromium.org/2379033002
2016-09-29Move core/fpdfapi/fpdf_font/include to core/fpdfapi/fpdf_fontdsinclair
BUG=pdfium:611 Review-Url: https://codereview.chromium.org/2375283003
2016-09-28Replace std::unique_ptr.reset() with WrapUnique assignment.thestig
fpdfsdk/ edition. Review-Url: https://codereview.chromium.org/2381723002
2016-09-19Remove duplicated charset definitions, and move them to fx_font.hnpm
PWL_FontMap does not need its own charset definitions. fx_edit.h does not need to define DEFAULT_CHARSET. XFA have their own definitions. They look different in that most are MAC or MSWin charset definitions. So they are left untouched. public/fpdf_sysfontinfo.h duplicate ones were left untouched due to being in public folder. Review-Url: https://codereview.chromium.org/2347313002
2016-09-15Cleanup CFX_SystemHandler.dsinclair
This CL cleans up signatures and code in CFX_SystemHandler. Review-Url: https://codereview.chromium.org/2341693003
2016-09-14Delete unused parameter nWordStyle from GetCharWidth()chromium/2861npm
Deleted parameter from callers, who also do not use it. Review-Url: https://codereview.chromium.org/2337973004
2016-09-13CFX_FloatPoint default constructor and equals operatorschromium/2860tsepez
Review-Url: https://codereview.chromium.org/2341453002
2016-09-09Delete unused methods and definitions from fxet_editnpm
Review-Url: https://codereview.chromium.org/2331453002
2016-09-08Pass CFX_WideString further down widget callerstsepez
Avoid a couple of places where we copy the raw string back into a brand-new widestring. There are a few places where the difference between a null ptr and an empty string control the logic, and I left these as-is. Other places can just take the string by const ref. Review-Url: https://codereview.chromium.org/2323493002
2016-09-02Make CPDF_Path have a CFX_Path rather than inheritingtsepez
Review-Url: https://codereview.chromium.org/2305103002
2016-08-30Make CPDF_TextState have a CPDF_TextStateData rather than inheriting one.tsepez
Review-Url: https://codereview.chromium.org/2287313004
2016-08-29Revert "Add -> operators to CFX_CountRef."tsepez
This reverts commit c10c23a2b1999b1cb0354fd4db9837dc63a3d833. TBR=dsinclair@chromium.org Review-Url: https://codereview.chromium.org/2285283003
2016-08-29Revert "Use ->() in CPDF_ColorState"tsepez
This reverts commit 91ddd3f7501429222f648b986a99f3959a398889. Reason for revert: may introduce sublte bugs, more thought required. TBR=dsinclair@chromium.org Review-Url: https://codereview.chromium.org/2294553002