Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(116)

Issue 1101933003: Reduce usage of operator LPCWSTR from CFX_WideString(). (Closed)

Created:
5 years, 8 months ago by Tom Sepez
Modified:
5 years, 7 months ago
Reviewers:
Lei Zhang, brucedawson
CC:
pdfium-reviews_googlegroups.com
Base URL:
https://pdfium.googlesource.com/pdfium.git@master
Target Ref:
refs/heads/master
Visibility:
Public.

Description

Reduce usage of operator LPCWSTR from CFX_WideString(). This involves adding some explicit c_str() calls. Doing so flagged PDF_EncodeText() and FindOptionValue() as having suboptimal signatures, in that we are often throwing away a perfectly fine length and recomputing it. There are still some platform-specific code that needs the operator. R=brucedawson@chromium.org Committed: https://pdfium.googlesource.com/pdfium/+/e6f11a7b95e26affba59a7057776a787056af8df

Patch Set 1 #

Patch Set 2 : Ditto for FindOptionValue #

Patch Set 3 : Rebase #

Patch Set 4 : Restore operator. #

Patch Set 5 : Reload #

Patch Set 6 : Restore operator. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+183 lines, -205 lines) Patch
M core/include/fpdfapi/fpdf_parser.h View 1 4 5 1 chunk +6 lines, -1 line 0 comments Download
M core/include/fpdfdoc/fpdf_doc.h View 1 4 5 1 chunk +1 line, -1 line 0 comments Download
M core/src/fpdfapi/fpdf_parser/fpdf_parser_decode.cpp View 4 5 1 chunk +0 lines, -4 lines 0 comments Download
M core/src/fpdfapi/fpdf_parser/fpdf_parser_fdf.cpp View 4 5 3 chunks +3 lines, -3 lines 0 comments Download
M core/src/fpdfapi/fpdf_parser/fpdf_parser_objects.cpp View 4 5 1 chunk +1 line, -1 line 0 comments Download
M core/src/fpdfdoc/doc_ap.cpp View 4 5 3 chunks +3 lines, -3 lines 0 comments Download
M core/src/fpdfdoc/doc_basic.cpp View 4 5 1 chunk +1 line, -1 line 0 comments Download
M core/src/fpdfdoc/doc_form.cpp View 4 5 2 chunks +3 lines, -2 lines 0 comments Download
M core/src/fpdfdoc/doc_formfield.cpp View 1 4 5 4 chunks +4 lines, -4 lines 0 comments Download
M core/src/fpdftext/fpdf_text_int.cpp View 4 5 2 chunks +2 lines, -2 lines 0 comments Download
M core/src/fxcrt/fx_basic_wstring.cpp View 4 5 1 chunk +2 lines, -2 lines 0 comments Download
M fpdfsdk/src/formfiller/FFL_ComboBox.cpp View 4 5 3 chunks +6 lines, -11 lines 0 comments Download
M fpdfsdk/src/formfiller/FFL_IFormFiller.cpp View 4 5 1 chunk +1 line, -1 line 0 comments Download
M fpdfsdk/src/formfiller/FFL_ListBox.cpp View 4 5 1 chunk +2 lines, -4 lines 0 comments Download
M fpdfsdk/src/formfiller/FFL_TextField.cpp View 4 5 3 chunks +4 lines, -5 lines 0 comments Download
M fpdfsdk/src/fpdfdoc.cpp View 4 5 1 chunk +1 line, -1 line 0 comments Download
M fpdfsdk/src/fsdk_annothandler.cpp View 4 5 1 chunk +3 lines, -8 lines 0 comments Download
M fpdfsdk/src/fsdk_baseform.cpp View 4 5 1 chunk +1 line, -1 line 0 comments Download
M fpdfsdk/src/fxedit/fxet_edit.cpp View 4 5 2 chunks +2 lines, -2 lines 0 comments Download
M fpdfsdk/src/javascript/Document.cpp View 1 2 4 5 4 chunks +14 lines, -14 lines 0 comments Download
M fpdfsdk/src/javascript/Field.cpp View 1 2 4 5 9 chunks +13 lines, -15 lines 0 comments Download
M fpdfsdk/src/javascript/JS_Context.cpp View 4 5 1 chunk +2 lines, -2 lines 0 comments Download
M fpdfsdk/src/javascript/JS_GlobalData.cpp View 4 5 2 chunks +2 lines, -3 lines 0 comments Download
M fpdfsdk/src/javascript/JS_Value.cpp View 4 5 2 chunks +2 lines, -2 lines 0 comments Download
M fpdfsdk/src/javascript/PublicMethods.cpp View 1 2 4 5 27 chunks +48 lines, -50 lines 0 comments Download
M fpdfsdk/src/javascript/app.cpp View 1 2 4 5 5 chunks +10 lines, -12 lines 0 comments Download
M fpdfsdk/src/javascript/global.cpp View 1 2 4 5 3 chunks +12 lines, -12 lines 0 comments Download
M fpdfsdk/src/javascript/util.cpp View 1 2 4 5 6 chunks +8 lines, -8 lines 0 comments Download
M fpdfsdk/src/pdfwindow/PWL_ComboBox.cpp View 4 5 2 chunks +2 lines, -2 lines 0 comments Download
M fpdfsdk/src/pdfwindow/PWL_Edit.cpp View 4 5 3 chunks +8 lines, -8 lines 0 comments Download
M fpdfsdk/src/pdfwindow/PWL_IconList.cpp View 4 5 1 chunk +1 line, -1 line 0 comments Download
M fpdfsdk/src/pdfwindow/PWL_Note.cpp View 4 5 6 chunks +9 lines, -10 lines 0 comments Download
M fpdfsdk/src/pdfwindow/PWL_Utils.cpp View 4 5 4 chunks +6 lines, -9 lines 0 comments Download

Messages

Total messages: 9 (1 generated)
Tom Sepez
Lei, for review. Bruce, I know you wanted this gone for a while. Thanks.
5 years, 8 months ago (2015-04-24 01:19:05 UTC) #2
brucedawson
lgtm My only thought/question would be whether there are some places where StringPiece could be ...
5 years, 8 months ago (2015-04-27 17:35:51 UTC) #3
Tom Sepez
On 2015/04/27 17:35:51, brucedawson wrote: > lgtm > > My only thought/question would be whether ...
5 years, 8 months ago (2015-04-27 18:21:35 UTC) #4
Tom Sepez
Committed patchset #3 (id:40001) manually as 15a62973b9b89c3e229cc0ab501c45967f91b325 (presubmit successful).
5 years, 8 months ago (2015-04-27 18:22:25 UTC) #5
Tom Sepez
Re-opened due to revert.
5 years, 8 months ago (2015-04-27 18:32:43 UTC) #6
Tom Sepez
On 2015/04/27 18:32:43, Tom Sepez wrote: > Re-opened due to revert. Closing without relanding.
5 years, 7 months ago (2015-04-27 18:38:19 UTC) #7
Tom Sepez
And re-opening. This is a perfectly fine issue# to use for landing. I've put back ...
5 years, 7 months ago (2015-04-27 18:45:01 UTC) #8
Tom Sepez
5 years, 7 months ago (2015-04-27 18:47:33 UTC) #9
Message was sent while issue was closed.
Committed patchset #6 (id:100001) manually as
e6f11a7b95e26affba59a7057776a787056af8df (presubmit successful).

Powered by Google App Engine
This is Rietveld 408576698