mirror of
https://bitbucket.org/chromiumembedded/cef
synced 2025-06-05 21:39:12 +02:00
Initial commit of libcef and cefclient projects.
git-svn-id: https://chromiumembedded.googlecode.com/svn/trunk@2 5089003a-bbd8-11dd-ad1f-f1f9622dbc98
This commit is contained in:
25
libcef/printing/page_range.cc
Normal file
25
libcef/printing/page_range.cc
Normal file
@@ -0,0 +1,25 @@
|
||||
// Copyright (c) 2006-2008 The Chromium Authors. All rights reserved.
|
||||
// Use of this source code is governed by a BSD-style license that can be
|
||||
// found in the LICENSE file.
|
||||
|
||||
#include "precompiled_libcef.h"
|
||||
#include "page_range.h"
|
||||
|
||||
#include "chrome/common/stl_util-inl.h"
|
||||
|
||||
namespace printing {
|
||||
|
||||
std::vector<int> PageRange::GetPages(const PageRanges& ranges) {
|
||||
std::set<int> pages;
|
||||
for (unsigned i = 0; i < ranges.size(); ++i) {
|
||||
const PageRange& range = ranges[i];
|
||||
// Ranges are inclusive.
|
||||
for (int i = range.from; i <= range.to; ++i) {
|
||||
pages.insert(i);
|
||||
}
|
||||
}
|
||||
return SetToVector(pages);
|
||||
}
|
||||
|
||||
} // namespace printing
|
||||
|
Reference in New Issue
Block a user