summaryrefslogtreecommitdiff
path: root/core/fpdfdoc/cpdf_defaultappearance.h
AgeCommit message (Collapse)Author
2018-04-03Remove DefaultAppearance HasColor and return an optional insteadDan Sinclair
This CL converts CPDF_DefaultAppearance to return Optional<CFX_Color:Type> items instead of having a HasColor. This saves the double parse of the appearance stream. Change-Id: Ib3c136da6e2adfb559e495de1d299cce0b4ad25f Reviewed-on: https://pdfium-review.googlesource.com/29630 Reviewed-by: Henrique Nakashima <hnakashima@chromium.org> Commit-Queue: dsinclair <dsinclair@chromium.org>
2018-04-03Use Optional to determine if appearance stream as fontchromium/3388Dan Sinclair
This CL changes the CPDF_DefaultAppearance code to remove the HasFont method and change GetFont to return an Optional. This forces all the call sites to verify a font was returned correctly and removes the need for the duplicate appearance stream parsing. Bug: chromium:827430 Change-Id: If09e0a7d3f7dd63ad77b97a5a388127e4a02da61 Reviewed-on: https://pdfium-review.googlesource.com/29610 Commit-Queue: Ryan Harrison <rharrison@chromium.org> Reviewed-by: Ryan Harrison <rharrison@chromium.org>
2018-03-28Remove CPDF_DefaultAppearance reference paramsDan Sinclair
This CL converts the CPDF_DefaultAppearance::GetColor methods to return instead of using reference parameters. Change-Id: I9ba6bf060a536290a83d3c9ce6e115511f28664c Reviewed-on: https://pdfium-review.googlesource.com/29410 Commit-Queue: dsinclair <dsinclair@chromium.org> Reviewed-by: Henrique Nakashima <hnakashima@chromium.org>
2018-03-28Use CPDF_DefaultAppearance instead of custom parsingDan Sinclair
This CL moves code over to using CPDF_DefaultAppearance instead of calling the CPDF_SimpleParser directly. This means the code for finding a specific tag start can move into CPDF_DefaultAppearance directly. Change-Id: I1dc64e54aedd03d059b963121d466f3eb75c17db Reviewed-on: https://pdfium-review.googlesource.com/28410 Reviewed-by: Henrique Nakashima <hnakashima@chromium.org> Commit-Queue: dsinclair <dsinclair@chromium.org>
2018-03-09Cleanup CPDF_DefaultAppearancedan sinclair
Minor cleanups and refactoring of the CPDF_DefaultAppearance class. Change-Id: I7b3de021e8a6a1e9ca1d70ae413f3c433627f3fd Reviewed-on: https://pdfium-review.googlesource.com/28390 Commit-Queue: Ryan Harrison <rharrison@chromium.org> Reviewed-by: Ryan Harrison <rharrison@chromium.org>
2018-03-09Remove default params from CPDF_DefaultAppearance methodschromium/3368chromium/3367dan sinclair
This CL removes default params from CPDF_DefaultAppearance methods. Change-Id: Iaeebc7b35ebb6140850f3f0e0828c3ae9e3c5548 Reviewed-on: https://pdfium-review.googlesource.com/28350 Reviewed-by: Ryan Harrison <rharrison@chromium.org> Commit-Queue: Ryan Harrison <rharrison@chromium.org>
2018-03-09Remove unused methods from CPDF_DefaultAppearancedan sinclair
Methods unused. Removed. Change-Id: I059b1e321b7d57f631368b77ace1d62cb75596c8 Reviewed-on: https://pdfium-review.googlesource.com/28310 Commit-Queue: Ryan Harrison <rharrison@chromium.org> Reviewed-by: Ryan Harrison <rharrison@chromium.org>
2017-09-18Convert string class namesRyan Harrison
Automated using git grep & sed. Replace StringC classes with StringView classes. Remove the CFX_ prefix and put string classes in fxcrt namespace. Change AsStringC() to AsStringView(). Rename tests from TEST(fxcrt, *String*Foo) to TEST(*String*, Foo). Couple of tests needed to have their names regularlized. BUG=pdfium:894 Change-Id: I7ca038685c8d803795f3ed02545124f7a224c83d Reviewed-on: https://pdfium-review.googlesource.com/14151 Reviewed-by: Tom Sepez <tsepez@chromium.org> Commit-Queue: Ryan Harrison <rharrison@chromium.org>
2017-04-07Cleanup string passing in core/fpdf*Tom Sepez
Return strings where possible. Add missing consts to strings passed by ref. Convert non-const cases to pointers. Rename a few methods to be clearer. Change-Id: I86569bc1744f539e6dd67fc73649b272c016328c Reviewed-on: https://pdfium-review.googlesource.com/3951 Commit-Queue: Tom Sepez <tsepez@chromium.org> Reviewed-by: Nicolás Peña <npm@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>
2016-11-02Remove FX_BOOL from coretsepez
Review-Url: https://codereview.chromium.org/2477443002
2016-09-29Move core/fxge/include to core/fxgedsinclair
BUG=pdfium:611 Review-Url: https://codereview.chromium.org/2377393002
2016-09-29Move core/fxcrt/include to core/fxcrtdsinclair
BUG=pdfium:611 Review-Url: https://codereview.chromium.org/2382723003
2016-09-29Move core/fpdfdoc/include to core/fpdfdocdsinclair
BUG=pdfium:611 Review-Url: https://codereview.chromium.org/2374383003