Commit 8794789a authored by Albert Astals Cid's avatar Albert Astals Cid

Delete lots of copy constructors and copy assignment operators

Fixes rule-of-three and copyable-polymorphic warnings reported by clazy.

The default copy constructor and copy assignment operator are
only valid for simple classes so we delete them (i.e. make then not exist)
when we have either a virtual class or a destructor, the code still compiles
so this doesn't fix any bug, it is more a protection for when you think you
can copy a class and don't realize the default copy constrcutor is not doing
what you want and you get crashes. Hopefully this helps us in the future :)
parent 4c781434
/*
* Copyright (C) 2009-2011, Pino Toscano <pino@kde.org>
* Copyright (C) 2018, Albert Astals Cid <aacid@kde.org>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
......@@ -39,6 +40,9 @@ public:
initer();
~initer();
initer(const initer &) = delete;
initer& operator=(const initer &) = delete;
private:
static unsigned int count;
};
......
/*
* Copyright (C) 2009, 2011, Pino Toscano <pino@kde.org>
* Copyright (C) 2018, Albert Astals Cid <aacid@kde.org>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
......@@ -30,6 +31,9 @@ public:
embedded_file_private(FileSpec *fs);
~embedded_file_private();
embedded_file_private(const embedded_file_private &) = delete;
embedded_file_private& operator=(const embedded_file_private &) = delete;
static embedded_file* create(FileSpec *fs);
FileSpec *file_spec;
......
......@@ -4,6 +4,7 @@
* Copyright (C) 2014, 2015 Hans-Peter Deifel <hpdeifel@gmx.de>
* Copyright (C) 2015, Tamas Szekeres <szekerest@gmail.com>
* Copyright (C) 2016 Jakub Alba <jakubalba@gmail.com>
* Copyright (C) 2018, Albert Astals Cid <aacid@kde.org>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
......@@ -47,6 +48,8 @@ struct MiniIconv
{}
~MiniIconv()
{ if (is_valid()) iconv_close(i_); }
MiniIconv(const MiniIconv &) = delete;
MiniIconv& operator=(const MiniIconv &) = delete;
bool is_valid() const
{ return i_ != (iconv_t)-1; }
operator iconv_t() const
......
/*
* Copyright (C) 2010, Pino Toscano <pino@kde.org>
* Copyright (C) 2018, Albert Astals Cid <aacid@kde.org>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
......@@ -30,6 +31,9 @@ public:
image_private(int iwidth, int iheight, image::format_enum iformat);
~image_private();
image_private(const image_private &) = delete;
image_private& operator=(const image_private &) = delete;
static image_private *create_data(int width, int height, image::format_enum format);
static image_private *create_data(char *data, int width, int height, image::format_enum format);
......
/*
* Copyright (C) 2010-2011, Pino Toscano <pino@kde.org>
* Copyright (C) 2013 Adrian Johnson <ajohnson@redneon.com>
* Copyright (C) 2017, Albert Astals Cid <aacid@kde.org>
* Copyright (C) 2017, 2018, Albert Astals Cid <aacid@kde.org>
* Copyright (C) 2017, Jeroen Ooms <jeroenooms@gmail.com>
*
* This program is free software; you can redistribute it and/or modify
......@@ -49,6 +49,8 @@ struct FileCloser {
: f(ff) {}
inline ~FileCloser()
{ (void)close(); }
FileCloser(const FileCloser &) = delete;
FileCloser& operator=(const FileCloser &) = delete;
inline bool close()
{ if (f) { const int c = fclose(f); f = 0; return c == 0; } return true; }
......
/*
* Copyright (C) 2009, Pino Toscano <pino@kde.org>
* Copyright (C) 2018, Albert Astals Cid <aacid@kde.org>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
......@@ -35,6 +36,9 @@ public:
page_private(document_private *doc, int index);
~page_private();
page_private(const page_private &) = delete;
page_private& operator=(const page_private &) = delete;
document_private *doc;
Page *page;
int index;
......
/*
* Copyright (C) 2009, Pino Toscano <pino@kde.org>
* Copyright (C) 2018, Albert Astals Cid <aacid@kde.org>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
......@@ -49,6 +50,9 @@ public:
toc_item_private();
~toc_item_private();
toc_item_private(const toc_item_private &) = delete;
toc_item_private& operator=(const toc_item_private &) = delete;
void load(OutlineItem *item);
void load_children(GooList *items);
......
......@@ -6,6 +6,20 @@
//
//========================================================================
//========================================================================
//
// Modified under the Poppler project - http://poppler.freedesktop.org
//
// All changes made under the Poppler project to this file are licensed
// under GPL version 2 or later
//
// Copyright (C) 2018 Albert Astals Cid <aacid@kde.org>
//
// To see a description of the changes please see the Changelog file that
// came with your tarball or type make ChangeLog if you are building from git
//
//========================================================================
#ifndef FOFIBASE_H
#define FOFIBASE_H
......@@ -25,6 +39,8 @@ typedef void (*FoFiOutputFunc)(void *stream, const char *data, int len);
class FoFiBase {
public:
FoFiBase(const FoFiBase &) = delete;
FoFiBase& operator=(const FoFiBase &other) = delete;
virtual ~FoFiBase();
......
......@@ -14,6 +14,7 @@
// under GPL version 2 or later
//
// Copyright (C) 2013 Christoph Duelli <duelli@melosgmbh.de>
// Copyright (C) 2018 Albert Astals Cid <aacid@kde.org>
//
// To see a description of the changes please see the Changelog file that
// came with your tarball or type make ChangeLog if you are building from git
......@@ -36,6 +37,9 @@ namespace { // do not pollute global namespace
class Reader {
public:
Reader() = default;
Reader(const Reader &) = delete;
Reader& operator=(const Reader &other) = delete;
virtual ~Reader() {}
......
......@@ -17,7 +17,7 @@
//
// Copyright (C) 2009 Kovid Goyal <kovid@kovidgoyal.net>
// Copyright (C) 2013 Thomas Freitag <Thomas.Freitag@alfa.de>
// Copyright (C) 2013 Albert Astals Cid <aacid@kde.org>
// Copyright (C) 2013, 2018 Albert Astals Cid <aacid@kde.org>
// Copyright (C) 2013 Adam Reichold <adamreichold@myopera.com>
// Copyright (C) 2014 Bogdan Cristea <cristeab@gmail.com>
// Copyright (C) 2014 Peter Breitenlohner <peb@mppmu.mpg.de>
......@@ -81,6 +81,9 @@ public:
MutexLocker(GooMutex *mutexA) : mutex(mutexA) { gLockMutex(mutex); }
~MutexLocker() { gUnlockMutex(mutex); }
MutexLocker(const MutexLocker &) = delete;
MutexLocker& operator=(const MutexLocker &other) = delete;
private:
GooMutex *mutex;
};
......
......@@ -5,7 +5,7 @@
// This file is licensed under the GPLv2 or later
//
// Copyright (C) 2009 Stefan Thomas <thomas@eload24.com>
// Copyright (C) 2009, 2011 Albert Astals Cid <aacid@kde.org>
// Copyright (C) 2009, 2011, 2018 Albert Astals Cid <aacid@kde.org>
// Copyright (C) 2010 Adrian Johnson <ajohnson@redneon.com>
// Copyright (C) 2010 Brian Cameron <brian.cameron@oracle.com>
// Copyright (C) 2011 Thomas Freitag <Thomas.Freitag@alfa.de>
......@@ -20,6 +20,10 @@
class ImgWriter
{
public:
ImgWriter() = default;
ImgWriter(const ImgWriter &) = delete;
ImgWriter& operator=(const ImgWriter &other) = delete;
virtual ~ImgWriter();
virtual bool init(FILE *f, int width, int height, int hDPI, int vDPI) = 0;
......
......@@ -16,7 +16,7 @@
// under GPL version 2 or later
//
// Copyright (C) 2006 Kristian Høgsberg <krh@redhat.com>
// Copyright (C) 2009, 2011, 2012, 2017 Albert Astals Cid <aacid@kde.org>
// Copyright (C) 2009, 2011, 2012, 2017, 2018 Albert Astals Cid <aacid@kde.org>
// Copyright (C) 2009 Kovid Goyal <kovid@kovidgoyal.net>
// Copyright (C) 2013 Adam Reichold <adamreichold@myopera.com>
// Copyright (C) 2013, 2017 Adrian Johnson <ajohnson@redneon.com>
......@@ -137,6 +137,9 @@ extern Goffset GoffsetMax();
class GooFile
{
public:
GooFile(const GooFile &) = delete;
GooFile& operator=(const GooFile &other) = delete;
int read(char *buf, int n, Goffset offset) const;
Goffset size() const;
......
......@@ -21,7 +21,7 @@
// Copyright (C) 2008 Hugo Mercier <hmercier31@gmail.com>
// Copyright (C) 2008 Pino Toscano <pino@kde.org>
// Copyright (C) 2008 Tomas Are Haavet <tomasare@gmail.com>
// Copyright (C) 2009-2011, 2013, 2016, 2017 Albert Astals Cid <aacid@kde.org>
// Copyright (C) 2009-2011, 2013, 2016-2018 Albert Astals Cid <aacid@kde.org>
// Copyright (C) 2012, 2013 Fabio D'Urso <fabiodurso@hotmail.it>
// Copyright (C) 2012, 2015 Tobias Koenig <tokoe@kdab.com>
// Copyright (C) 2013 Thomas Freitag <Thomas.Freitag@alfa.de>
......@@ -105,6 +105,9 @@ public:
AnnotPath(AnnotCoord **coords, int coordLength);
~AnnotPath();
AnnotPath(const AnnotPath &) = delete;
AnnotPath& operator=(const AnnotPath &other) = delete;
double getX(int coord) const;
double getY(int coord) const;
AnnotCoord *getCoord(int coord) const;
......@@ -126,6 +129,9 @@ public:
AnnotCalloutLine(double x1, double y1, double x2, double y2);
virtual ~AnnotCalloutLine() { }
AnnotCalloutLine(const AnnotCalloutLine &) = delete;
AnnotCalloutLine& operator=(const AnnotCalloutLine &other) = delete;
double getX1() const { return coord1.getX(); }
double getY1() const { return coord1.getY(); }
double getX2() const { return coord2.getX(); }
......@@ -195,6 +201,9 @@ public:
AnnotQuadrilaterals(AnnotQuadrilateral **quads, int quadsLength);
~AnnotQuadrilaterals();
AnnotQuadrilaterals(const AnnotQuadrilaterals &) = delete;
AnnotQuadrilaterals& operator=(const AnnotQuadrilaterals &other) = delete;
double getX1(int quadrilateral);
double getY1(int quadrilateral);
double getX2(int quadrilateral);
......@@ -231,6 +240,9 @@ public:
virtual ~AnnotBorder();
AnnotBorder(const AnnotBorder &) = delete;
AnnotBorder& operator=(const AnnotBorder &other) = delete;
virtual void setWidth(double new_width) { width = new_width; }
virtual AnnotBorderType getType() const = 0;
......@@ -429,6 +441,9 @@ public:
AnnotAppearanceCharacs(Dict *dict);
~AnnotAppearanceCharacs();
AnnotAppearanceCharacs(const AnnotAppearanceCharacs &) = delete;
AnnotAppearanceCharacs& operator=(const AnnotAppearanceCharacs &) = delete;
int getRotation() { return rotation; }
AnnotColor *getBorderColor() { return borderColor; }
AnnotColor *getBackColor() { return backColor; }
......@@ -1420,6 +1435,9 @@ public:
Params(Dict *dict);
~Params();
Params(const Params &) = delete;
Params& operator=(const Params &) = delete;
GooString* getFlashVars() const;
private:
......@@ -1439,6 +1457,9 @@ public:
Instance(Dict *dict);
~Instance();
Instance(const Instance &) = delete;
Instance& operator=(const Instance &) = delete;
Type getType() const;
Params* getParams() const;
......@@ -1460,6 +1481,9 @@ public:
Configuration(Dict *dict);
~Configuration();
Configuration(const Configuration &) = delete;
Configuration& operator=(const Configuration &) = delete;
Type getType() const;
GooString* getName() const;
int getInstancesCount() const;
......@@ -1480,6 +1504,9 @@ public:
Asset();
~Asset();
Asset(const Asset &) = delete;
Asset& operator=(const Asset &) = delete;
GooString* getName() const;
Object* getFileSpec() const;
......@@ -1495,6 +1522,9 @@ public:
Content(Dict *dict);
~Content();
Content(const Content &) = delete;
Content& operator=(const Content &) = delete;
int getConfigurationsCount() const;
Configuration* getConfiguration(int index) const;
......@@ -1549,6 +1579,9 @@ public:
Settings(Dict *dict);
~Settings();
Settings(const Settings &) = delete;
Settings& operator=(const Settings &) = delete;
Activation* getActivation() const;
Deactivation* getDeactivation() const;
......@@ -1589,6 +1622,9 @@ public:
~Annots();
Annots(const Annots &) = delete;
Annots& operator=(const Annots &) = delete;
// Iterate through list of annotations.
int getNumAnnots() { return nAnnots; }
Annot *getAnnot(int i) { return annots[i]; }
......
......@@ -16,7 +16,7 @@
// Copyright (C) 2005 Kristian Høgsberg <krh@redhat.com>
// Copyright (C) 2012 Fabio D'Urso <fabiodurso@hotmail.it>
// Copyright (C) 2013 Thomas Freitag <Thomas.Freitag@alfa.de>
// Copyright (C) 2017 Albert Astals Cid <aacid@kde.org>
// Copyright (C) 2017, 2018 Albert Astals Cid <aacid@kde.org>
// Copyright (C) 2017 Adrian Johnson <ajohnson@redneon.com>
//
// To see a description of the changes please see the Changelog file that
......@@ -50,6 +50,9 @@ public:
// Destructor.
~Array();
Array(const Array &) = delete;
Array& operator=(const Array &) = delete;
// Get number of elements.
int getLength() const { return length; }
......
......@@ -6,6 +6,20 @@
//
//========================================================================
//========================================================================
//
// Modified under the Poppler project - http://poppler.freedesktop.org
//
// All changes made under the Poppler project to this file are licensed
// under GPL version 2 or later
//
// Copyright (C) 2018 Albert Astals Cid <aacid@kde.org>
//
// To see a description of the changes please see the Changelog file that
// came with your tarball or type make ChangeLog if you are building from git
//
//========================================================================
#ifndef BUILTINFONT_H
#define BUILTINFONT_H
......@@ -42,6 +56,10 @@ public:
BuiltinFontWidths(BuiltinFontWidth *widths, int sizeA);
~BuiltinFontWidths();
BuiltinFontWidths(const BuiltinFontWidths &) = delete;
BuiltinFontWidths& operator=(const BuiltinFontWidths &) = delete;
GBool getWidth(const char *name, Gushort *width);
private:
......
......@@ -14,7 +14,7 @@
// under GPL version 2 or later
//
// Copyright (C) 2008 Koji Otani <sho@bbr.jp>
// Copyright (C) 2009 Albert Astals Cid <aacid@kde.org>
// Copyright (C) 2009, 2018 Albert Astals Cid <aacid@kde.org>
// Copyright (C) 2012, 2017 Adrian Johnson <ajohnson@redneon.com>
//
// To see a description of the changes please see the Changelog file that
......@@ -71,6 +71,9 @@ public:
~CMap();
CMap(const CMap &) = delete;
CMap& operator=(const CMap &) = delete;
void incRefCnt();
void decRefCnt();
......@@ -129,6 +132,9 @@ public:
CMapCache();
~CMapCache();
CMapCache(const CMapCache &) = delete;
CMapCache& operator=(const CMapCache &) = delete;
// Get the <cMapName> CMap for the specified character collection.
// Increments its reference count; there will be one reference for
// the cache plus one for the caller of this function.
......
......@@ -8,7 +8,7 @@
//
// Copyright 2009 Stefan Thomas <thomas@eload24.com>
// Copyright 2010 Hib Eris <hib@hiberis.nl>
// Copyright 2010 Albert Astals Cid <aacid@kde.org>
// Copyright 2010, 2018 Albert Astals Cid <aacid@kde.org>
//
//========================================================================
......@@ -47,6 +47,9 @@ public:
CachedFile(CachedFileLoader *cacheLoader, GooString *uri);
CachedFile(const CachedFile &) = delete;
CachedFile& operator=(const CachedFile &) = delete;
Guint getLength() { return length; }
long int tell();
int seek(long int offset, int origin);
......@@ -127,8 +130,12 @@ class CachedFileLoader {
public:
CachedFileLoader() = default;
virtual ~CachedFileLoader() {};
CachedFileLoader(const CachedFileLoader &) = delete;
CachedFileLoader& operator=(const CachedFileLoader &) = delete;
// Initializes the file load.
// Returns the length of the file.
// The caller is responsible for deleting uri and cachedFile.
......
......@@ -15,7 +15,7 @@
// under GPL version 2 or later
//
// Copyright (C) 2005, 2006 Kristian Høgsberg <krh@redhat.com>
// Copyright (C) 2005 Albert Astals Cid <aacid@kde.org>
// Copyright (C) 2005, 2018 Albert Astals Cid <aacid@kde.org>
// Copyright (C) 2006, 2007 Jeff Muizelaar <jeff@infidigm.net>
// Copyright (C) 2006, 2010 Carlos Garcia Campos <carlosgc@gnome.org>
// Copyright (C) 2008, 2017 Adrian Johnson <ajohnson@redneon.com>
......@@ -51,6 +51,8 @@ public:
GBool substitute,
GBool printing);
virtual ~CairoFont();
CairoFont(const CairoFont &) = delete;
CairoFont& operator=(const CairoFont &other) = delete;
virtual GBool matches(Ref &other, GBool printing);
cairo_font_face_t *getFontFace(void);
......@@ -114,6 +116,8 @@ public:
// Create a font engine.
CairoFontEngine(FT_Library libA);
~CairoFontEngine();
CairoFontEngine(const CairoFontEngine &) = delete;
CairoFontEngine& operator=(const CairoFontEngine &other) = delete;
CairoFont *getFont(GfxFont *gfxFont, PDFDoc *doc, GBool printing, XRef *xref);
......
......@@ -23,6 +23,7 @@
// Copyright (C) 2010-2013 Thomas Freitag <Thomas.Freitag@alfa.de>
// Copyright (C) 2015 Suzuki Toshiya <mpsuzuki@hiroshima-u.ac.jp>
// Copyright (C) 2016 Jason Crain <jason@aquaticape.us>
// Copyright (C) 2018 Albert Astals Cid <aacid@kde.org>
//
// To see a description of the changes please see the Changelog file that
// came with your tarball or type make ChangeLog if you are building from git
......@@ -63,6 +64,9 @@ public:
// Destructor.
~CairoImage ();
CairoImage(const CairoImage &) = delete;
CairoImage& operator=(const CairoImage &) = delete;
// Set the image cairo surface
void setImage (cairo_surface_t *image);
......
......@@ -30,6 +30,7 @@
// under GPL version 2 or later
//
// Copyright (C) 2012 Adrian Johnson <ajohnson@redneon.com>
// Copyright (C) 2018 Albert Astals Cid <aacid@kde.org>
//
// To see a description of the changes please see the Changelog file that
// came with your tarball or type make ChangeLog if you are building from git
......@@ -48,6 +49,9 @@ public:
CairoRescaleBox() {};
virtual ~CairoRescaleBox() {};
CairoRescaleBox(const CairoRescaleBox &) = delete;
CairoRescaleBox& operator=(const CairoRescaleBox &) = delete;
virtual GBool downScaleImage(unsigned orig_width, unsigned orig_height,
signed scaled_width, signed scaled_height,
unsigned short int start_column, unsigned short int start_row,
......
......@@ -14,7 +14,7 @@
// under GPL version 2 or later
//
// Copyright (C) 2005 Kristian Høgsberg <krh@redhat.com>
// Copyright (C) 2005, 2007, 2009-2011, 2013, 2017 Albert Astals Cid <aacid@kde.org>
// Copyright (C) 2005, 2007, 2009-2011, 2013, 2017, 2018 Albert Astals Cid <aacid@kde.org>
// Copyright (C) 2005 Jonathan Blandford <jrb@redhat.com>
// Copyright (C) 2005, 2006, 2008 Brad Hards <bradh@frogmouth.net>
// Copyright (C) 2007 Julien Rebetez <julienr@svn.gnome.org>
......@@ -68,6 +68,10 @@ class NameTree {
public:
NameTree();
~NameTree();
NameTree(const NameTree &) = delete;
NameTree& operator=(const NameTree &) = delete;
void init(XRef *xref, Object *tree);
Object lookup(GooString *name);
int numEntries() { return length; };
......@@ -110,6 +114,9 @@ public:
// Destructor.
~Catalog();
Catalog(const Catalog &) = delete;
Catalog& operator=(const Catalog &) = delete;
// Is catalog valid?
GBool isOk() { return ok; }
......
......@@ -17,7 +17,7 @@
//
// Copyright (C) 2007 Julien Rebetez <julienr@svn.gnome.org>
// Copyright (C) 2007 Koji Otani <sho@bbr.jp>
// Copyright (C) 2008, 2011, 2012 Albert Astals Cid <aacid@kde.org>
// Copyright (C) 2008, 2011, 2012, 2018 Albert Astals Cid <aacid@kde.org>
// Copyright (C) 2017 Adrian Johnson <ajohnson@redneon.com>
//
// To see a description of the changes please see the Changelog file that
......@@ -78,6 +78,9 @@ public:
~CharCodeToUnicode();
CharCodeToUnicode(const CharCodeToUnicode &) = delete;
CharCodeToUnicode& operator=(const CharCodeToUnicode &) = delete;
void incRefCnt();
void decRefCnt();
......@@ -130,6 +133,9 @@ public:
CharCodeToUnicodeCache(int sizeA);
~CharCodeToUnicodeCache();
CharCodeToUnicodeCache(const CharCodeToUnicodeCache &) = delete;
CharCodeToUnicodeCache& operator=(const CharCodeToUnicodeCache &) = delete;
// Get the CharCodeToUnicode object for <tag>. Increments its
// reference count; there will be one reference for the cache plus
// one for the caller of this function. Returns NULL on failure.
......
......@@ -16,7 +16,7 @@
// Copyright (C) 2005 Kristian Høgsberg <krh@redhat.com>
// Copyright (C) 2006 Krzysztof Kowalczyk <kkowalczyk@gmail.com>
// Copyright (C) 2007-2008 Julien Rebetez <julienr@svn.gnome.org>
// Copyright (C) 2010, 2017 Albert Astals Cid <aacid@kde.org>
// Copyright (C) 2010, 2017, 2018 Albert Astals Cid <aacid@kde.org>
// Copyright (C) 2010 Paweł Wiejacha <pawel.wiejacha@gmail.com>
// Copyright (C) 2013 Thomas Freitag <Thomas.Freitag@alfa.de>
// Copyright (C) 2017 Adrian Johnson <ajohnson@redneon.com>
......@@ -57,6 +57,9 @@ public:
// Destructor.
~Dict();
Dict(const Dict &) = delete;
Dict& operator=(const Dict &) = delete;
// Get number of entries.
int getLength() const { return length; }
......
......@@ -6,7 +6,7 @@
// under GPL version 2 or later
//
// Copyright (C) 2008 Carlos Garcia Campos <carlosgc@gnome.org>
// Copyright (C) 2017 Albert Astals Cid <aacid@kde.org>
// Copyright (C) 2017, 2018 Albert Astals Cid <aacid@kde.org>
//
// To see a description of the changes please see the Changelog file that
// came with your tarball or type make ChangeLog if you are building from git
......@@ -27,6 +27,9 @@ public:
EmbFile(Object *efStream);
~EmbFile();
EmbFile(const EmbFile &) = delete;
EmbFile& operator=(const EmbFile &) = delete;
int size() { return m_size; }
GooString *modDate() { return m_modDate; }
GooString *createDate() { return m_createDate; }
......@@ -53,6 +56,9 @@ public:
FileSpec(Object *fileSpec);
~FileSpec();
FileSpec(const FileSpec &) = delete;
FileSpec& operator=(const FileSpec &) = delete;
GBool isOk() { return ok; }
GooString *getFileName() const { return fileName; }
......
......@@ -3,7 +3,7 @@
// FontInfo.h
//
// Copyright (C) 2005 Kristian Høgsberg <krh@redhat.com>
// Copyright (C) 2005-2008, 2010, 2011 Albert Astals Cid <aacid@kde.org>
// Copyright (C) 2005-2008, 2010, 2011, 2018 Albert Astals Cid <aacid@kde.org>
// Copyright (C) 2005 Brad Hards <bradh@frogmouth.net>
// Copyright (C) 2009 Pino Toscano <pino@kde.org>
// Copyright (C) 2012 Adrian Johnson <ajohnson@redneon.com>
......@@ -56,6 +56,8 @@ public:
// Destructor.
~FontInfo();
FontInfo& operator=(const FontInfo &) = delete;
GooString *getName() { return name; };
GooString *getSubstituteName() { return substituteName; };
GooString *getFile() { return file; };
......
......@@ -6,7 +6,7 @@
//
// Copyright 2006 Julien Rebetez <julienr@svn.gnome.org>
// Copyright 2007, 2008, 2011 Carlos Garcia Campos <carlosgc@gnome.org>
// Copyright 2007-2010, 2012, 2015-2017 Albert Astals Cid <aacid@kde.org>
// Copyright 2007-2010, 2012, 2015-2018 Albert Astals Cid <aacid@kde.org>
// Copyright 2010 Mark Riedesel <mark@klowner.com>
// Copyright 2011 Pino Toscano <pino@kde.org>
// Copyright 2012 Fabio D'Urso <fabiodurso@hotmail.it>
......@@ -563,6 +563,9 @@ public:
~Form();
Form(const Form &) = delete;
Form& operator=(const Form &) = delete;
// Look up an inheritable field dictionary entry.
static Object fieldLookup(Dict *field, const char *key);
......@@ -611,6 +614,9 @@ public:
FormPageWidgets (Annots* annots, unsigned int page, Form *form);
~FormPageWidgets();
FormPageWidgets(const FormPageWidgets &) = delete;
FormPageWidgets& operator=(const FormPageWidgets &) = delete;
int getNumWidgets() const { return numWidgets; }
FormWidget* getWidget(int i) const { return widgets[i]; }
......
......@@ -13,7 +13,7 @@
// All changes made under the Poppler project to this file are licensed
// under GPL version 2 or later
//
// Copyright (C) 2009, 2010 Albert Astals Cid <aacid@kde.org>
// Copyright (C) 2009, 2010, 2018 Albert Astals Cid <aacid@kde.org>
// Copyright (C) 2010 Christian Feuersänger <cfeuersaenger@googlemail.com>
// Copyright (C) 2011 Andrea Canciani <ranma42@gmail.com>
// Copyright (C) 2012 Thomas Freitag <Thomas.Freitag@alfa.de>
......@@ -56,6 +56,9 @@ public:
virtual ~Function();
Function(const Function &) = delete;
Function& operator=(const Function &other) = delete;
// Construct a function. Returns NULL if unsuccessful.
static Function *parse(Object *funcObj);
......
......@@ -14,7 +14,7 @@
// under GPL version 2 or later
//
// Copyright (C) 2005 Jonathan Blandford <jrb@redhat.com>
// Copyright (C) 2005-2013, 2015-2017 Albert Astals Cid <aacid@kde.org>
// Copyright (C) 2005-2013, 2015-2018 Albert Astals Cid <aacid@kde.org>
// Copyright (C) 2006 Thorkild Stray <thorkild@ifi.uio.no>
// Copyright (C) 2006 Kristian Høgsberg <krh@redhat.com>
// Copyright (C) 2006-2011 Carlos Garcia Campos <carlosgc@gnome.org>
......@@ -5115,6 +5115,9 @@ struct GfxStackStateSaver {
gfx->restoreState();
}
GfxStackStateSaver(const GfxStackStateSaver &) = delete;
GfxStackStateSaver& operator=(const GfxStackStateSaver &) = delete;
Gfx * const gfx;
};
......
......@@ -17,7 +17,7 @@
// Copyright (C) 2007 Iñigo Martínez <inigomartinez@gmail.com>
// Copyright (C) 2008 Brad Hards <bradh@kde.org>
// Copyright (C) 2008, 2010 Carlos Garcia Campos <carlosgc@gnome.org>
// Copyright (C) 2009-2013, 2017 Albert Astals Cid <aacid@kde.org>
// Copyright (C) 2009-2013, 2017, 2018 Albert Astals Cid <aacid@kde.org>
// Copyright (C) 2009, 2010, 2012, 2013 Thomas Freitag <Thomas.Freitag@alfa.de>
// Copyright (C) 2010 David Benjamin <davidben@mit.edu>
// Copyright (C) 2010 Christian Feuersänger <cfeuersaenger@googlemail.com>
......@@ -112,6 +112,9 @@ public: