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

Side by Side Diff: pdf/pdfium/pdfium_range.cc

Issue 2270463003: Turn on enforce-in-pdf Clang plugin flag. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix win clang Created 4 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « pdf/pdfium/pdfium_range.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "pdf/pdfium/pdfium_range.h" 5 #include "pdf/pdfium/pdfium_range.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "base/strings/string_util.h" 8 #include "base/strings/string_util.h"
9 #include "pdf/pdfium/pdfium_api_string_buffer_adapter.h" 9 #include "pdf/pdfium/pdfium_api_string_buffer_adapter.h"
10 10
11 namespace chrome_pdf { 11 namespace chrome_pdf {
12 12
13 PDFiumRange::PDFiumRange(PDFiumPage* page, int char_index, int char_count) 13 PDFiumRange::PDFiumRange(PDFiumPage* page, int char_index, int char_count)
14 : page_(page), 14 : page_(page),
15 char_index_(char_index), 15 char_index_(char_index),
16 char_count_(char_count), 16 char_count_(char_count),
17 cached_screen_rects_zoom_(0) { 17 cached_screen_rects_zoom_(0) {
18 } 18 }
19 19
20 PDFiumRange::~PDFiumRange() { 20 PDFiumRange::PDFiumRange(const PDFiumRange& that) = default;
21 } 21
22 PDFiumRange::~PDFiumRange() = default;
22 23
23 void PDFiumRange::SetCharCount(int char_count) { 24 void PDFiumRange::SetCharCount(int char_count) {
24 char_count_ = char_count; 25 char_count_ = char_count;
25 26
26 cached_screen_rects_offset_ = pp::Point(); 27 cached_screen_rects_offset_ = pp::Point();
27 cached_screen_rects_zoom_ = 0; 28 cached_screen_rects_zoom_ = 0;
28 } 29 }
29 30
30 std::vector<pp::Rect> PDFiumRange::GetScreenRects(const pp::Point& offset, 31 std::vector<pp::Rect> PDFiumRange::GetScreenRects(const pp::Point& offset,
31 double zoom, 32 double zoom,
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
73 unsigned short* data = 74 unsigned short* data =
74 reinterpret_cast<unsigned short*>(api_string_adapter.GetData()); 75 reinterpret_cast<unsigned short*>(api_string_adapter.GetData());
75 int written = FPDFText_GetText(page_->GetTextPage(), index, count, data); 76 int written = FPDFText_GetText(page_->GetTextPage(), index, count, data);
76 api_string_adapter.Close(written); 77 api_string_adapter.Close(written);
77 } 78 }
78 79
79 return rv; 80 return rv;
80 } 81 }
81 82
82 } // namespace chrome_pdf 83 } // namespace chrome_pdf
OLDNEW
« no previous file with comments | « pdf/pdfium/pdfium_range.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698