mirror of
https://pdfium.googlesource.com/pdfium
synced 2026-07-31 22:26:36 +08:00
Updates old-style copyright headers to the new style, by removing "All rights reserved." Also inserts "The" before "PDFium Authors", which is required by both styles. Mechanically generated by this command: PATTERN='Copyright \([0-9]\+\) \(The \)\?PDFium Authors. All rights reserved.' git grep -l "$PATTERN" \ | xargs sed "s/$PATTERN/Copyright \1 The PDFium Authors/" -i'' Fixed: pdfium:1884 Change-Id: I6f781d811df8839e2e21b85f716529b813828bcd Reviewed-on: https://pdfium-review.googlesource.com/c/pdfium/+/100371 Reviewed-by: Lei Zhang <thestig@chromium.org> Commit-Queue: K. Moon <kmoon@chromium.org>
68 lines
2.1 KiB
C++
68 lines
2.1 KiB
C++
// Copyright 2018 The PDFium Authors
|
|
// Use of this source code is governed by a BSD-style license that can be
|
|
// found in the LICENSE file.
|
|
|
|
#ifndef PUBLIC_CPP_FPDF_SCOPERS_H_
|
|
#define PUBLIC_CPP_FPDF_SCOPERS_H_
|
|
|
|
#include <memory>
|
|
#include <type_traits>
|
|
|
|
#include "public/cpp/fpdf_deleters.h"
|
|
|
|
// Versions of FPDF types that clean up the object at scope exit.
|
|
|
|
using ScopedFPDFAnnotation =
|
|
std::unique_ptr<std::remove_pointer<FPDF_ANNOTATION>::type,
|
|
FPDFAnnotationDeleter>;
|
|
|
|
using ScopedFPDFAvail =
|
|
std::unique_ptr<std::remove_pointer<FPDF_AVAIL>::type, FPDFAvailDeleter>;
|
|
|
|
using ScopedFPDFBitmap =
|
|
std::unique_ptr<std::remove_pointer<FPDF_BITMAP>::type, FPDFBitmapDeleter>;
|
|
|
|
using ScopedFPDFClipPath =
|
|
std::unique_ptr<std::remove_pointer<FPDF_CLIPPATH>::type,
|
|
FPDFClipPathDeleter>;
|
|
|
|
using ScopedFPDFDocument =
|
|
std::unique_ptr<std::remove_pointer<FPDF_DOCUMENT>::type,
|
|
FPDFDocumentDeleter>;
|
|
|
|
using ScopedFPDFFont =
|
|
std::unique_ptr<std::remove_pointer<FPDF_FONT>::type, FPDFFontDeleter>;
|
|
|
|
using ScopedFPDFFormHandle =
|
|
std::unique_ptr<std::remove_pointer<FPDF_FORMHANDLE>::type,
|
|
FPDFFormHandleDeleter>;
|
|
|
|
using ScopedFPDFJavaScriptAction =
|
|
std::unique_ptr<std::remove_pointer<FPDF_JAVASCRIPT_ACTION>::type,
|
|
FPDFJavaScriptActionDeleter>;
|
|
|
|
using ScopedFPDFPage =
|
|
std::unique_ptr<std::remove_pointer<FPDF_PAGE>::type, FPDFPageDeleter>;
|
|
|
|
using ScopedFPDFPageLink =
|
|
std::unique_ptr<std::remove_pointer<FPDF_PAGELINK>::type,
|
|
FPDFPageLinkDeleter>;
|
|
|
|
using ScopedFPDFPageObject =
|
|
std::unique_ptr<std::remove_pointer<FPDF_PAGEOBJECT>::type,
|
|
FPDFPageObjectDeleter>;
|
|
|
|
using ScopedFPDFStructTree =
|
|
std::unique_ptr<std::remove_pointer<FPDF_STRUCTTREE>::type,
|
|
FPDFStructTreeDeleter>;
|
|
|
|
using ScopedFPDFTextFind =
|
|
std::unique_ptr<std::remove_pointer<FPDF_SCHHANDLE>::type,
|
|
FPDFTextFindDeleter>;
|
|
|
|
using ScopedFPDFTextPage =
|
|
std::unique_ptr<std::remove_pointer<FPDF_TEXTPAGE>::type,
|
|
FPDFTextPageDeleter>;
|
|
|
|
#endif // PUBLIC_CPP_FPDF_SCOPERS_H_
|