Remove GooList completely
diff --git a/CMakeLists.txt b/CMakeLists.txt
index e3b8e8d..9c7c962 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -580,7 +580,6 @@
${CMAKE_CURRENT_BINARY_DIR}/poppler/poppler-config.h
DESTINATION include/poppler)
install(FILES
- goo/GooList.h
goo/GooTimer.h
goo/GooString.h
goo/gmem.h
diff --git a/cpp/poppler-font.cpp b/cpp/poppler-font.cpp
index 8b788cb..c8cacb8 100644
--- a/cpp/poppler-font.cpp
+++ b/cpp/poppler-font.cpp
@@ -217,7 +217,7 @@
++d->current_page;
- GooList<FontInfo*> *items = d->font_info_scanner.scan(1);
+ std::vector<FontInfo*> *items = d->font_info_scanner.scan(1);
if (!items) {
return std::vector<font_info>();
}
diff --git a/cpp/poppler-toc-private.h b/cpp/poppler-toc-private.h
index 8560ca3..8788992 100644
--- a/cpp/poppler-toc-private.h
+++ b/cpp/poppler-toc-private.h
@@ -25,8 +25,6 @@
#include <vector>
-#include "goo/GooList.h"
-
class Outline;
class OutlineItem;
@@ -55,7 +53,7 @@
toc_item_private& operator=(const toc_item_private &) = delete;
void load(const OutlineItem *item);
- void load_children(const GooList<OutlineItem*> *items);
+ void load_children(const std::vector<OutlineItem*> *items);
std::vector<toc_item*> children;
ustring title;
diff --git a/cpp/poppler-toc.cpp b/cpp/poppler-toc.cpp
index 7aacee9..8d0edb8 100644
--- a/cpp/poppler-toc.cpp
+++ b/cpp/poppler-toc.cpp
@@ -25,7 +25,6 @@
#include "poppler-toc-private.h"
#include "poppler-private.h"
-#include "GooList.h"
#include "Outline.h"
using namespace poppler;
@@ -44,7 +43,7 @@
return nullptr;
}
- const GooList<OutlineItem*> *items = outline->getItems();
+ const std::vector<OutlineItem*> *items = outline->getItems();
if (!items || items->size() < 1) {
return nullptr;
}
@@ -74,7 +73,7 @@
is_open = item->isOpen();
}
-void toc_item_private::load_children(const GooList<OutlineItem*> *items)
+void toc_item_private::load_children(const std::vector<OutlineItem*> *items)
{
const int num_items = items->size();
children.resize(num_items);
@@ -86,7 +85,7 @@
children[i] = new_item;
item->open();
- const GooList<OutlineItem*> *item_children = item->getKids();
+ const std::vector<OutlineItem*> *item_children = item->getKids();
if (item_children) {
new_item->d->load_children(item_children);
}
diff --git a/glib/poppler-document.cc b/glib/poppler-document.cc
index e1d4614..9772c16 100644
--- a/glib/poppler-document.cc
+++ b/glib/poppler-document.cc
@@ -23,7 +23,6 @@
#include <string.h>
#ifndef __GI_SCANNER__
-#include <goo/GooList.h>
#include <splash/SplashBitmap.h>
#include <DateInfo.h>
#include <GlobalParams.h>
@@ -2163,7 +2162,7 @@
struct _PopplerIndexIter
{
PopplerDocument *document;
- const GooList<OutlineItem*> *items;
+ const std::vector<OutlineItem*> *items;
int index;
};
@@ -2238,7 +2237,7 @@
{
PopplerIndexIter *iter;
Outline *outline;
- const GooList<OutlineItem*> *items;
+ const std::vector<OutlineItem*> *items;
outline = document->doc->getOutline();
if (outline == nullptr)
@@ -2401,7 +2400,7 @@
struct _PopplerFontsIter
{
- GooList<FontInfo*> *items;
+ std::vector<FontInfo*> *items;
int index;
};
@@ -2632,7 +2631,7 @@
new_iter = g_slice_dup (PopplerFontsIter, iter);
- new_iter->items = new GooList<FontInfo*> ();
+ new_iter->items = new std::vector<FontInfo*> ();
for (std::size_t i = 0; i < iter->items->size(); i++) {
FontInfo *info = (*iter->items)[i];
new_iter->items->push_back (new FontInfo (*info));
@@ -2662,7 +2661,7 @@
}
static PopplerFontsIter *
-poppler_fonts_iter_new (GooList<FontInfo*> *items)
+poppler_fonts_iter_new (std::vector<FontInfo*> *items)
{
PopplerFontsIter *iter;
@@ -2766,7 +2765,7 @@
int n_pages,
PopplerFontsIter **iter)
{
- GooList<FontInfo*> *items;
+ std::vector<FontInfo*> *items;
g_return_val_if_fail (iter != nullptr, FALSE);
diff --git a/glib/poppler-page.cc b/glib/poppler-page.cc
index b2db640..279ab45 100644
--- a/glib/poppler-page.cc
+++ b/glib/poppler-page.cc
@@ -20,7 +20,6 @@
#include <math.h>
#ifndef __GI_SCANNER__
-#include <goo/GooList.h>
#include <GlobalParams.h>
#include <PDFDoc.h>
#include <Outline.h>
diff --git a/goo/GooList.h b/goo/GooList.h
deleted file mode 100644
index c95dbcc..0000000
--- a/goo/GooList.h
+++ /dev/null
@@ -1,53 +0,0 @@
-//========================================================================
-//
-// GooList.h
-//
-// Copyright 2001-2003 Glyph & Cog, LLC
-//
-//========================================================================
-
-//========================================================================
-//
-// 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) 2012, 2018 Albert Astals Cid <aacid@kde.org>
-// Copyright (C) 2018 Adam Reichold <adam.reichold@t-online.de>
-//
-// 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 GOO_LIST_H
-#define GOO_LIST_H
-
-#include <algorithm>
-#include <vector>
-
-//------------------------------------------------------------------------
-// GooList
-//------------------------------------------------------------------------
-
-template <typename T>
-class GooList : public std::vector<T> {
-public:
-
- // Create an empty list.
- GooList() = default;
-
- // Movable but not copyable
- GooList(GooList &&other) = default;
- GooList& operator=(GooList &&other) = default;
-
- GooList(const GooList &other) = delete;
- GooList& operator=(const GooList &other) = delete;
-
- // Zero cost conversion from std::vector
- explicit GooList(const std::vector<T>& vec) : std::vector<T>(vec) {}
- explicit GooList(std::vector<T>&& vec) : std::vector<T>(std::move(vec)) {}
-};
-
-#endif // GOO_LIST_H
diff --git a/poppler/Annot.cc b/poppler/Annot.cc
index 7f459c1..e6788ac 100644
--- a/poppler/Annot.cc
+++ b/poppler/Annot.cc
@@ -56,7 +56,6 @@
#include <assert.h>
#include "goo/gmem.h"
#include "goo/gstrtod.h"
-#include "GooList.h"
#include "Error.h"
#include "Object.h"
#include "Catalog.h"
@@ -756,7 +755,7 @@
fontPtSize = -1;
if (da) {
- GooList<GooString*> * daToks = new GooList<GooString*>();
+ std::vector<GooString*> * daToks = new std::vector<GooString*>();
int i = FormFieldText::tokenizeDA(da, daToks, "Tf");
if (i >= 1) {
@@ -4031,7 +4030,7 @@
bool txField, bool forceZapfDingbats,
XRef *xref, bool *addedDingbatsResource,
bool password) {
- GooList<GooString*> *daToks;
+ std::vector<GooString*> *daToks;
GooString *tok;
GooString convertedText;
const GfxFont *font;
@@ -4049,7 +4048,7 @@
// parse the default appearance string
tfPos = tmPos = -1;
if (da) {
- daToks = new GooList<GooString*>();
+ daToks = new std::vector<GooString*>();
i = 0;
while (i < da->getLength()) {
while (i < da->getLength() && Lexer::isSpace(da->getChar(i))) {
@@ -4449,7 +4448,7 @@
// Draw the variable text or caption for a field.
bool AnnotAppearanceBuilder::drawListBox(const FormFieldChoice *fieldChoice, const AnnotBorder *border, const PDFRectangle *rect,
const GooString *da, const GfxResources *resources, int quadding) {
- GooList<GooString*> *daToks;
+ std::vector<GooString*> *daToks;
GooString *tok;
GooString convertedText;
const GfxFont *font;
@@ -4463,7 +4462,7 @@
// parse the default appearance string
tfPos = tmPos = -1;
if (da) {
- daToks = new GooList<GooString*>();
+ daToks = new std::vector<GooString*>();
i = 0;
while (i < da->getLength()) {
while (i < da->getLength() && Lexer::isSpace(da->getChar(i))) {
diff --git a/poppler/FontInfo.cc b/poppler/FontInfo.cc
index 3549581..6ed7517 100644
--- a/poppler/FontInfo.cc
+++ b/poppler/FontInfo.cc
@@ -51,7 +51,7 @@
FontInfoScanner::~FontInfoScanner() {
}
-GooList<FontInfo*> *FontInfoScanner::scan(int nPages) {
+std::vector<FontInfo*> *FontInfoScanner::scan(int nPages) {
Page *page;
Dict *resDict;
Annots *annots;
@@ -61,7 +61,7 @@
return nullptr;
}
- auto result = new GooList<FontInfo*>();
+ auto result = new std::vector<FontInfo*>();
lastPage = currentPage + nPages;
if (lastPage > doc->getNumPages() + 1) {
@@ -92,7 +92,7 @@
return result;
}
-void FontInfoScanner::scanFonts(XRef *xrefA, Dict *resDict, GooList<FontInfo*> *fontsList) {
+void FontInfoScanner::scanFonts(XRef *xrefA, Dict *resDict, std::vector<FontInfo*> *fontsList) {
GfxFontDict *gfxFontDict;
GfxFont *font;
diff --git a/poppler/FontInfo.h b/poppler/FontInfo.h
index e851288..3a70568 100644
--- a/poppler/FontInfo.h
+++ b/poppler/FontInfo.h
@@ -26,7 +26,6 @@
#define FONT_INFO_H
#include "Object.h"
-#include "goo/GooList.h"
class GfxFont;
class PDFDoc;
@@ -89,7 +88,7 @@
// Destructor.
~FontInfoScanner();
- GooList<FontInfo*> *scan(int nPages);
+ std::vector<FontInfo*> *scan(int nPages);
private:
@@ -98,7 +97,7 @@
std::set<int> fonts;
std::set<int> visitedObjects;
- void scanFonts(XRef *xrefA, Dict *resDict, GooList<FontInfo*> *fontsList);
+ void scanFonts(XRef *xrefA, Dict *resDict, std::vector<FontInfo*> *fontsList);
};
#endif
diff --git a/poppler/Form.cc b/poppler/Form.cc
index 880c233..691a0d5 100644
--- a/poppler/Form.cc
+++ b/poppler/Form.cc
@@ -1213,7 +1213,7 @@
double FormFieldText::getTextFontSize()
{
- GooList<GooString*>* daToks = new GooList<GooString*>();
+ std::vector<GooString*>* daToks = new std::vector<GooString*>();
int idx = parseDA(daToks);
double fontSize = -1;
if (idx >= 0) {
@@ -1232,7 +1232,7 @@
void FormFieldText::setTextFontSize(int fontSize)
{
if (fontSize > 0 && obj.isDict()) {
- GooList<GooString*>* daToks = new GooList<GooString*>();
+ std::vector<GooString*>* daToks = new std::vector<GooString*>();
int idx = parseDA(daToks);
if (idx == -1) {
error(errSyntaxError, -1, "FormFieldText:: invalid DA object\n");
@@ -1264,7 +1264,7 @@
}
}
-int FormFieldText::tokenizeDA(const GooString* da, GooList<GooString*>* daToks, const char* searchTok)
+int FormFieldText::tokenizeDA(const GooString* da, std::vector<GooString*>* daToks, const char* searchTok)
{
int idx = -1;
if(da && daToks) {
@@ -1288,7 +1288,7 @@
return idx;
}
-int FormFieldText::parseDA(GooList<GooString*>* daToks)
+int FormFieldText::parseDA(std::vector<GooString*>* daToks)
{
int idx = -1;
if (obj.isDict()) {
diff --git a/poppler/Form.h b/poppler/Form.h
index 496680b..948dfd6 100644
--- a/poppler/Form.h
+++ b/poppler/Form.h
@@ -24,7 +24,6 @@
#ifndef FORM_H
#define FORM_H
-#include "goo/GooList.h"
#include "Object.h"
#include "Annot.h"
@@ -426,10 +425,10 @@
void print(int indent) override;
- static int tokenizeDA(const GooString* daString, GooList<GooString*>* daToks, const char* searchTok);
+ static int tokenizeDA(const GooString* daString, std::vector<GooString*>* daToks, const char* searchTok);
protected:
- int parseDA(GooList<GooString*>* daToks);
+ int parseDA(std::vector<GooString*>* daToks);
GooString* content;
bool multiline;
diff --git a/poppler/Gfx.h b/poppler/Gfx.h
index 47ae015..e480ea5 100644
--- a/poppler/Gfx.h
+++ b/poppler/Gfx.h
@@ -34,7 +34,6 @@
#define GFX_H
#include "poppler-config.h"
-#include "goo/GooList.h"
#include "GfxState.h"
#include "Object.h"
#include "PopplerCache.h"
diff --git a/poppler/GfxState.cc b/poppler/GfxState.cc
index c1f1742..f492b33 100644
--- a/poppler/GfxState.cc
+++ b/poppler/GfxState.cc
@@ -432,7 +432,7 @@
return cs;
}
-void GfxColorSpace::createMapping(GooList<GfxSeparationColorSpace*> *separationList, int maxSepComps) {
+void GfxColorSpace::createMapping(std::vector<GfxSeparationColorSpace*> *separationList, int maxSepComps) {
return;
}
@@ -2857,7 +2857,7 @@
color->c[0] = gfxColorComp1;
}
-void GfxSeparationColorSpace::createMapping(GooList<GfxSeparationColorSpace*> *separationList, int maxSepComps) {
+void GfxSeparationColorSpace::createMapping(std::vector<GfxSeparationColorSpace*> *separationList, int maxSepComps) {
if (nonMarking)
return;
mapping = (int *)gmalloc(sizeof(int));
@@ -2914,7 +2914,7 @@
GooString **namesA,
GfxColorSpace *altA,
Function *funcA,
- GooList<GfxSeparationColorSpace*> *sepsCSA) {
+ std::vector<GfxSeparationColorSpace*> *sepsCSA) {
int i;
nComps = nCompsA;
@@ -2949,7 +2949,7 @@
GooString **namesA,
GfxColorSpace *altA,
Function *funcA,
- GooList<GfxSeparationColorSpace*> *sepsCSA,
+ std::vector<GfxSeparationColorSpace*> *sepsCSA,
int *mappingA,
bool nonMarkingA,
unsigned int overprintMaskA) {
@@ -2987,7 +2987,7 @@
int i;
int *mappingA = nullptr;
- auto sepsCSA = new GooList<GfxSeparationColorSpace*>();
+ auto sepsCSA = new std::vector<GfxSeparationColorSpace*>();
sepsCSA->reserve(sepsCS->size());
for (std::size_t i = 0; i < sepsCS->size(); i++) {
GfxSeparationColorSpace *scs = (*sepsCS)[i];
@@ -3012,7 +3012,7 @@
Function *funcA;
Object obj1;
int i;
- auto separationList = new GooList<GfxSeparationColorSpace*>();
+ auto separationList = new std::vector<GfxSeparationColorSpace*>();
if (arr->getLength() != 4 && arr->getLength() != 5) {
error(errSyntaxWarning, -1, "Bad DeviceN color space");
@@ -3154,7 +3154,7 @@
}
}
-void GfxDeviceNColorSpace::createMapping(GooList<GfxSeparationColorSpace*> *separationList, int maxSepComps) {
+void GfxDeviceNColorSpace::createMapping(std::vector<GfxSeparationColorSpace*> *separationList, int maxSepComps) {
if (nonMarking) // None
return;
mapping = (int *)gmalloc(sizeof(int) * nComps);
diff --git a/poppler/GfxState.h b/poppler/GfxState.h
index 4bd7620..ed06e9f 100644
--- a/poppler/GfxState.h
+++ b/poppler/GfxState.h
@@ -235,7 +235,7 @@
virtual void getDeviceNLine(unsigned char * /*in*/, unsigned char * /*out*/, int /*length*/) { error(errInternal, -1, "GfxColorSpace::getDeviceNLine this should not happen"); }
// create mapping for spot colorants
- virtual void createMapping(GooList<GfxSeparationColorSpace*> *separationList, int maxSepComps);
+ virtual void createMapping(std::vector<GfxSeparationColorSpace*> *separationList, int maxSepComps);
// Does this ColorSpace support getRGBLine?
virtual bool useGetRGBLine() const { return false; }
@@ -621,7 +621,7 @@
unsigned char *getLookup() { return lookup; }
GfxColor *mapColorToBase(const GfxColor *color, GfxColor *baseColor) const;
unsigned int getOverprintMask() { return base->getOverprintMask(); }
- void createMapping(GooList<GfxSeparationColorSpace*> *separationList, int maxSepComps) override
+ void createMapping(std::vector<GfxSeparationColorSpace*> *separationList, int maxSepComps) override
{ base->createMapping(separationList, maxSepComps); }
@@ -653,7 +653,7 @@
void getCMYK(const GfxColor *color, GfxCMYK *cmyk) const override;
void getDeviceN(const GfxColor *color, GfxColor *deviceN) const override;
- void createMapping(GooList<GfxSeparationColorSpace*> *separationList, int maxSepComps) override;
+ void createMapping(std::vector<GfxSeparationColorSpace*> *separationList, int maxSepComps) override;
int getNComps() const override { return 1; }
void getDefaultColor(GfxColor *color) override;
@@ -685,7 +685,7 @@
public:
GfxDeviceNColorSpace(int nCompsA, GooString **namesA,
- GfxColorSpace *alt, Function *func, GooList<GfxSeparationColorSpace*> *sepsCS);
+ GfxColorSpace *alt, Function *func, std::vector<GfxSeparationColorSpace*> *sepsCS);
~GfxDeviceNColorSpace();
GfxColorSpace *copy() override;
GfxColorSpaceMode getMode() override { return csDeviceN; }
@@ -698,7 +698,7 @@
void getCMYK(const GfxColor *color, GfxCMYK *cmyk) const override;
void getDeviceN(const GfxColor *color, GfxColor *deviceN) const override;
- void createMapping(GooList<GfxSeparationColorSpace*> *separationList, int maxSepComps) override;
+ void createMapping(std::vector<GfxSeparationColorSpace*> *separationList, int maxSepComps) override;
int getNComps() const override { return nComps; }
void getDefaultColor(GfxColor *color) override;
@@ -713,13 +713,8 @@
private:
GfxDeviceNColorSpace(int nCompsA, GooString **namesA,
-<<<<<<< HEAD
- GfxColorSpace *alt, Function *func, GooList *sepsCSA,
+ GfxColorSpace *alt, Function *func, std::vector<GfxSeparationColorSpace*> *sepsCSA,
int *mappingA, bool nonMarkingA, unsigned int overprintMaskA);
-=======
- GfxColorSpace *alt, Function *func, GooList<GfxSeparationColorSpace*> *sepsCSA,
- int *mappingA, bool nonMarkingA, Guint overprintMaskA);
->>>>>>> Make GooList a template type
int nComps; // number of components
GooString // colorant names
@@ -727,7 +722,7 @@
GfxColorSpace *alt; // alternate color space
Function *func; // tint transform (into alternate color space)
bool nonMarking;
- GooList<GfxSeparationColorSpace*> *sepsCS; // list of separation cs for spot colorants;
+ std::vector<GfxSeparationColorSpace*> *sepsCS; // list of separation cs for spot colorants;
};
//------------------------------------------------------------------------
diff --git a/poppler/GlobalParams.cc b/poppler/GlobalParams.cc
index 3acd60d..0f17bf5 100644
--- a/poppler/GlobalParams.cc
+++ b/poppler/GlobalParams.cc
@@ -58,7 +58,6 @@
#include "goo/glibc.h"
#include "goo/gmem.h"
#include "goo/GooString.h"
-#include "goo/GooList.h"
#include "goo/gfile.h"
#include "goo/gdir.h"
#include "Error.h"
@@ -246,11 +245,11 @@
const char *path);
#endif
- GooList<SysFontInfo*> *fonts;
+ std::vector<SysFontInfo*> *fonts;
};
SysFontList::SysFontList() {
- fonts = new GooList<SysFontInfo*>();
+ fonts = new std::vector<SysFontInfo*>();
}
SysFontList::~SysFontList() {
@@ -397,7 +396,7 @@
nameToUnicodeZapfDingbats = new NameToCharCode();
nameToUnicodeText = new NameToCharCode();
- toUnicodeDirs = new GooList<GooString*>();
+ toUnicodeDirs = new std::vector<GooString*>();
sysFonts = new SysFontList();
psExpandSmaller = false;
psShrinkLarger = true;
@@ -1209,9 +1208,9 @@
return getUnicodeMap2(textEncoding);
}
-GooList<GooString*> *GlobalParams::getEncodingNames()
+std::vector<GooString*> *GlobalParams::getEncodingNames()
{
- auto* const result = new GooList<GooString*>;
+ auto* const result = new std::vector<GooString*>;
for (const auto& unicodeMap : residentUnicodeMaps) {
result->push_back(new GooString(unicodeMap.first));
}
diff --git a/poppler/GlobalParams.h b/poppler/GlobalParams.h
index 0277ee2..b20bd4e 100644
--- a/poppler/GlobalParams.h
+++ b/poppler/GlobalParams.h
@@ -44,6 +44,7 @@
#include <unordered_map>
#include <string>
#include <mutex>
+#include <vector>
class GooString;
class NameToCharCode;
@@ -144,7 +145,7 @@
CMap *getCMap(const GooString *collection, GooString *cMapName, Stream *stream = nullptr);
UnicodeMap *getTextEncoding();
- GooList<GooString*> *getEncodingNames();
+ std::vector<GooString*> *getEncodingNames();
//----- functions to set parameters
void addFontFile(GooString *fontName, GooString *path);
@@ -194,7 +195,7 @@
std::unordered_map<std::string, std::string> unicodeMaps;
// list of CMap dirs, indexed by collection
std::unordered_multimap<std::string, std::string> cMapDirs;
- GooList<GooString*> *toUnicodeDirs; // list of ToUnicode CMap dirs
+ std::vector<GooString*> *toUnicodeDirs; // list of ToUnicode CMap dirs
bool baseFontsInitialized;
#ifdef _WIN32
// windows font substitutes (for CID fonts)
diff --git a/poppler/GlobalParamsWin.cc b/poppler/GlobalParamsWin.cc
index 6d13f72..6680d2f 100644
--- a/poppler/GlobalParamsWin.cc
+++ b/poppler/GlobalParamsWin.cc
@@ -34,7 +34,6 @@
#include "goo/gmem.h"
#include "goo/GooString.h"
-#include "goo/GooList.h"
#include "goo/gfile.h"
#include "Error.h"
#include "NameToCharCode.h"
diff --git a/poppler/JBIG2Stream.cc b/poppler/JBIG2Stream.cc
index e9177ab..1bb4751 100644
--- a/poppler/JBIG2Stream.cc
+++ b/poppler/JBIG2Stream.cc
@@ -35,7 +35,6 @@
#include <stdlib.h>
#include <limits.h>
-#include "goo/GooList.h"
#include "Error.h"
#include "JArithmeticDecoder.h"
#include "JBIG2Stream.h"
@@ -1244,7 +1243,7 @@
void JBIG2Stream::reset() {
// read the globals stream
- globalSegments = new GooList<JBIG2Segment*>();
+ globalSegments = new std::vector<JBIG2Segment*>();
if (globalsStream.isStream()) {
segments = globalSegments;
curStr = globalsStream.getStream();
@@ -1257,7 +1256,7 @@
}
// read the main stream
- segments = new GooList<JBIG2Segment*>();
+ segments = new std::vector<JBIG2Segment*>();
curStr = str;
curStr->reset();
arithDecoder->setStream(curStr);
@@ -1562,7 +1561,7 @@
JBIG2HuffmanTable *huffDHTable, *huffDWTable;
JBIG2HuffmanTable *huffBMSizeTable, *huffAggInstTable;
JBIG2Segment *seg;
- GooList<JBIG2Segment*> *codeTables;
+ std::vector<JBIG2Segment*> *codeTables;
JBIG2SymbolDict *inputSymbolDict;
unsigned int flags, sdTemplate, sdrTemplate, huff, refAgg;
unsigned int huffDH, huffDW, huffBMSize, huffAggInst;
@@ -1633,7 +1632,7 @@
}
// get referenced segments: input symbol dictionaries and code tables
- codeTables = new GooList<JBIG2Segment*>();
+ codeTables = new std::vector<JBIG2Segment*>();
numInputSyms = 0;
for (i = 0; i < nRefSegs; ++i) {
// This is need by bug 12014, returning false makes it not crash
@@ -2025,7 +2024,7 @@
JBIG2HuffmanTable *huffRDWTable, *huffRDHTable;
JBIG2HuffmanTable *huffRDXTable, *huffRDYTable, *huffRSizeTable;
JBIG2Segment *seg;
- GooList<JBIG2Segment*> *codeTables;
+ std::vector<JBIG2Segment*> *codeTables;
JBIG2SymbolDict *symbolDict;
JBIG2Bitmap **syms;
unsigned int w, h, x, y, segInfoFlags, extCombOp;
@@ -2089,7 +2088,7 @@
}
// get symbol dictionaries and tables
- codeTables = new GooList<JBIG2Segment*>();
+ codeTables = new std::vector<JBIG2Segment*>();
numSyms = 0;
for (i = 0; i < nRefSegs; ++i) {
if ((seg = findSegment(refSegs[i]))) {
diff --git a/poppler/JBIG2Stream.h b/poppler/JBIG2Stream.h
index f410134..630bdc7 100644
--- a/poppler/JBIG2Stream.h
+++ b/poppler/JBIG2Stream.h
@@ -133,8 +133,8 @@
unsigned int pageDefPixel;
JBIG2Bitmap *pageBitmap;
unsigned int defCombOp;
- GooList<JBIG2Segment*> *segments;
- GooList<JBIG2Segment*> *globalSegments;
+ std::vector<JBIG2Segment*> *segments;
+ std::vector<JBIG2Segment*> *globalSegments;
Stream *curStr;
unsigned char *dataPtr;
unsigned char *dataEnd;
diff --git a/poppler/Link.cc b/poppler/Link.cc
index d9498ab..e1ab66e 100644
--- a/poppler/Link.cc
+++ b/poppler/Link.cc
@@ -35,7 +35,6 @@
#include <string.h>
#include "goo/gmem.h"
#include "goo/GooString.h"
-#include "goo/GooList.h"
#include "Error.h"
#include "Object.h"
#include "Array.h"
@@ -162,7 +161,7 @@
// parse the next actions
const Object nextObj = obj->dictLookup("Next");
- GooList<LinkAction*> *actionList = nullptr;
+ std::vector<LinkAction*> *actionList = nullptr;
if (nextObj.isDict()) {
// Prevent circles in the tree by checking the ref against used refs in
@@ -176,13 +175,13 @@
}
}
- actionList = new GooList<LinkAction*>();
+ actionList = new std::vector<LinkAction*>();
actionList->reserve(1);
actionList->push_back(parseAction(&nextObj, nullptr, seenNextActions));
} else if (nextObj.isArray()) {
const Array *a = nextObj.getArray();
const int n = a->getLength();
- actionList = new GooList<LinkAction*>();
+ actionList = new std::vector<LinkAction*>();
actionList->reserve(n);
for (int i = 0; i < n; ++i) {
const Object obj3 = a->get(i);
@@ -210,11 +209,11 @@
return action;
}
-const GooList<LinkAction*> *LinkAction::nextActions() const {
+const std::vector<LinkAction*> *LinkAction::nextActions() const {
return nextActionList;
}
-void LinkAction::setNextActions(GooList<LinkAction*> *actions) {
+void LinkAction::setNextActions(std::vector<LinkAction*> *actions) {
delete nextActionList;
nextActionList = actions;
}
@@ -828,7 +827,7 @@
// LinkOCGState
//------------------------------------------------------------------------
LinkOCGState::LinkOCGState(const Object *obj) {
- stateList = new GooList<StateList*>();
+ stateList = new std::vector<StateList*>();
preserveRB = true;
Object obj1 = obj->dictLookup("State");
@@ -843,7 +842,7 @@
const char *name = obj2.getName();
stList = new StateList();
- stList->list = new GooList<Ref*>();
+ stList->list = new std::vector<Ref*>();
if (!strcmp (name, "ON")) {
stList->st = On;
} else if (!strcmp (name, "OFF")) {
diff --git a/poppler/Link.h b/poppler/Link.h
index e7830fa..6d99a57 100644
--- a/poppler/Link.h
+++ b/poppler/Link.h
@@ -29,7 +29,6 @@
#ifndef LINK_H
#define LINK_H
-#include "goo/GooList.h"
#include "Object.h"
#include <memory>
#include <set>
@@ -85,15 +84,15 @@
// A List of the next actions to execute in order.
// The list contains pointer to LinkAction objects.
- const GooList<LinkAction*> *nextActions() const;
+ const std::vector<LinkAction*> *nextActions() const;
// Sets the next action list. Takes ownership of the actions.
- void setNextActions(GooList<LinkAction*> *actions);
+ void setNextActions(std::vector<LinkAction*> *actions);
private:
static LinkAction *parseAction(const Object *obj, const GooString *baseURI, std::set<int> *seenNextActions);
- GooList<LinkAction*> *nextActionList;
+ std::vector<LinkAction*> *nextActionList;
};
//------------------------------------------------------------------------
@@ -452,14 +451,14 @@
StateList(const StateList &) = delete;
StateList& operator=(const StateList &) = delete;
State st;
- GooList<Ref*> *list;
+ std::vector<Ref*> *list;
};
- const GooList<StateList*> *getStateList() const { return stateList; }
+ const std::vector<StateList*> *getStateList() const { return stateList; }
bool getPreserveRB() const { return preserveRB; }
private:
- GooList<StateList*> *stateList;
+ std::vector<StateList*> *stateList;
bool preserveRB;
};
diff --git a/poppler/OptionalContent.cc b/poppler/OptionalContent.cc
index e2b293a..7dfde6a 100644
--- a/poppler/OptionalContent.cc
+++ b/poppler/OptionalContent.cc
@@ -17,7 +17,6 @@
#include "goo/gmem.h"
#include "goo/GooString.h"
-#include "goo/GooList.h"
#include "Error.h"
#include "OptionalContent.h"
@@ -432,22 +431,22 @@
void OCDisplayNode::addChild(OCDisplayNode *child) {
if (!children) {
- children = new GooList<OCDisplayNode*>();
+ children = new std::vector<OCDisplayNode*>();
}
children->push_back(child);
}
-void OCDisplayNode::addChildren(GooList<OCDisplayNode*> *childrenA) {
+void OCDisplayNode::addChildren(std::vector<OCDisplayNode*> *childrenA) {
if (!children) {
- children = new GooList<OCDisplayNode*>();
+ children = new std::vector<OCDisplayNode*>();
}
children->reserve(children->size() + childrenA->size());
children->insert(children->end(), childrenA->begin(), childrenA->end());
delete childrenA;
}
-GooList<OCDisplayNode*> *OCDisplayNode::takeChildren() {
- GooList<OCDisplayNode*> *childrenA = children;
+std::vector<OCDisplayNode*> *OCDisplayNode::takeChildren() {
+ std::vector<OCDisplayNode*> *childrenA = children;
children = nullptr;
return childrenA;
diff --git a/poppler/OptionalContent.h b/poppler/OptionalContent.h
index 1c060f0..e9e15e0 100644
--- a/poppler/OptionalContent.h
+++ b/poppler/OptionalContent.h
@@ -14,7 +14,6 @@
#ifndef OPTIONALCONTENT_H
#define OPTIONALCONTENT_H
-#include "goo/GooList.h"
#include "Object.h"
#include "CharTypes.h"
#include <unordered_map>
@@ -135,12 +134,12 @@
OCDisplayNode(const GooString *nameA);
OCDisplayNode(OptionalContentGroup *ocgA);
void addChild(OCDisplayNode *child);
- void addChildren(GooList<OCDisplayNode*> *childrenA);
- GooList<OCDisplayNode*> *takeChildren();
+ void addChildren(std::vector<OCDisplayNode*> *childrenA);
+ std::vector<OCDisplayNode*> *takeChildren();
GooString *name; // display name (may be nullptr)
OptionalContentGroup *ocg; // nullptr for display labels
- GooList<OCDisplayNode*> *children; // nullptr if there are no children
+ std::vector<OCDisplayNode*> *children; // nullptr if there are no children
// [OCDisplayNode]
};
diff --git a/poppler/Outline.cc b/poppler/Outline.cc
index 20d4f41..a05c753 100644
--- a/poppler/Outline.cc
+++ b/poppler/Outline.cc
@@ -30,7 +30,6 @@
#include "goo/gmem.h"
#include "goo/GooString.h"
-#include "goo/GooList.h"
#include "XRef.h"
#include "Link.h"
#include "PDFDocEncoding.h"
@@ -111,8 +110,8 @@
}
}
-GooList<OutlineItem*> *OutlineItem::readItemList(OutlineItem *parent, const Object *firstItemRef, XRef *xrefA) {
- auto items = new GooList<OutlineItem*>();
+std::vector<OutlineItem*> *OutlineItem::readItemList(OutlineItem *parent, const Object *firstItemRef, XRef *xrefA) {
+ auto items = new std::vector<OutlineItem*>();
char* alreadyRead = (char *)gmalloc(xrefA->getNumObjects());
memset(alreadyRead, 0, xrefA->getNumObjects());
diff --git a/poppler/Outline.h b/poppler/Outline.h
index edd5c87..984bc94 100644
--- a/poppler/Outline.h
+++ b/poppler/Outline.h
@@ -26,7 +26,6 @@
#include "Object.h"
#include "CharTypes.h"
-#include "goo/GooList.h"
class GooString;
class XRef;
@@ -44,11 +43,11 @@
Outline(const Outline &) = delete;
Outline& operator=(const Outline &) = delete;
- const GooList<OutlineItem*> *getItems() const { return items; }
+ const std::vector<OutlineItem*> *getItems() const { return items; }
private:
- GooList<OutlineItem*> *items; // nullptr if document has no outline,
+ std::vector<OutlineItem*> *items; // nullptr if document has no outline,
};
//------------------------------------------------------------------------
@@ -62,7 +61,7 @@
OutlineItem(const OutlineItem &) = delete;
OutlineItem& operator=(const OutlineItem &) = delete;
- static GooList<OutlineItem*> *readItemList(OutlineItem *parent, const Object *firstItemRef, XRef *xrefA);
+ static std::vector<OutlineItem*> *readItemList(OutlineItem *parent, const Object *firstItemRef, XRef *xrefA);
void open();
void close();
@@ -72,7 +71,7 @@
const LinkAction *getAction() const { return action; }
bool isOpen() const { return startsOpen; }
bool hasKids() const { return firstRef.isRef(); }
- const GooList<OutlineItem*> *getKids() const { return kids; }
+ const std::vector<OutlineItem*> *getKids() const { return kids; }
private:
@@ -86,7 +85,7 @@
Object lastRef;
Object nextRef;
bool startsOpen;
- GooList<OutlineItem*> *kids; // nullptr if this item is closed or has no kids
+ std::vector<OutlineItem*> *kids; // nullptr if this item is closed or has no kids
};
#endif
diff --git a/poppler/PDFDocFactory.cc b/poppler/PDFDocFactory.cc
index 9ac973f..bda6d28 100644
--- a/poppler/PDFDocFactory.cc
+++ b/poppler/PDFDocFactory.cc
@@ -15,7 +15,6 @@
#include "PDFDocFactory.h"
-#include "goo/GooList.h"
#include "goo/GooString.h"
#include "PDFDoc.h"
#include "LocalPDFDocBuilder.h"
@@ -29,12 +28,12 @@
// PDFDocFactory
//------------------------------------------------------------------------
-PDFDocFactory::PDFDocFactory(GooList<PDFDocBuilder*> *pdfDocBuilders)
+PDFDocFactory::PDFDocFactory(std::vector<PDFDocBuilder*> *pdfDocBuilders)
{
if (pdfDocBuilders) {
builders = pdfDocBuilders;
} else {
- builders = new GooList<PDFDocBuilder*>();
+ builders = new std::vector<PDFDocBuilder*>();
}
builders->push_back(new LocalPDFDocBuilder());
builders->push_back(new StdinPDFDocBuilder());
diff --git a/poppler/PDFDocFactory.h b/poppler/PDFDocFactory.h
index fa735bf..b029b31 100644
--- a/poppler/PDFDocFactory.h
+++ b/poppler/PDFDocFactory.h
@@ -33,7 +33,7 @@
public:
- PDFDocFactory(GooList<PDFDocBuilder*> *pdfDocBuilders = nullptr);
+ PDFDocFactory(std::vector<PDFDocBuilder*> *pdfDocBuilders = nullptr);
~PDFDocFactory();
PDFDocFactory(const PDFDocFactory &) = delete;
@@ -50,7 +50,7 @@
private:
- GooList<PDFDocBuilder*> *builders;
+ std::vector<PDFDocBuilder*> *builders;
};
diff --git a/poppler/PSOutputDev.cc b/poppler/PSOutputDev.cc
index cd65ee0..5de0e40 100644
--- a/poppler/PSOutputDev.cc
+++ b/poppler/PSOutputDev.cc
@@ -52,7 +52,6 @@
#include <algorithm>
#include <array>
#include "goo/GooString.h"
-#include "goo/GooList.h"
#include "poppler-config.h"
#include "GlobalParams.h"
#include "Object.h"
@@ -1325,7 +1324,7 @@
paperMatch = false;
}
Page *page;
- paperSizes = new GooList<PSOutPaperSize*>();
+ paperSizes = new std::vector<PSOutPaperSize*>();
for (size_t pgi = 0; pgi < pages.size(); ++pgi) {
const int pg = pages[pgi];
page = catalog->getPage(pg);
diff --git a/poppler/PSOutputDev.h b/poppler/PSOutputDev.h
index 8ce7613..119a1d6 100644
--- a/poppler/PSOutputDev.h
+++ b/poppler/PSOutputDev.h
@@ -498,7 +498,7 @@
int numTilingPatterns; // current number of nested tiling patterns
int nextFunc; // next unique number to use for a function
- GooList<PSOutPaperSize*> *paperSizes; // list of used paper sizes, if paperMatch
+ std::vector<PSOutPaperSize*> *paperSizes; // list of used paper sizes, if paperMatch
// is true
std::map<int,int> pagePaperSize; // page num to paperSize entry mapping
double tx0, ty0; // global translation
diff --git a/poppler/TextOutputDev.cc b/poppler/TextOutputDev.cc
index d8b7f0d..35fc0b4 100644
--- a/poppler/TextOutputDev.cc
+++ b/poppler/TextOutputDev.cc
@@ -63,7 +63,6 @@
#include "goo/gfile.h"
#include "goo/gmem.h"
#include "goo/GooString.h"
-#include "goo/GooList.h"
#include "poppler-config.h"
#include "Error.h"
#include "GlobalParams.h"
@@ -2281,7 +2280,7 @@
TextWord **wordArray;
int nWords, i;
- words = new GooList<TextWord*>();
+ words = new std::vector<TextWord*>();
if (text->rawOrder) {
for (word = text->rawWords; word; word = word->next) {
@@ -2373,11 +2372,11 @@
blocks = nullptr;
rawWords = nullptr;
rawLastWord = nullptr;
- fonts = new GooList<TextFontInfo*>();
+ fonts = new std::vector<TextFontInfo*>();
lastFindXMin = lastFindYMin = 0;
haveLastFind = false;
- underlines = new GooList<TextUnderline*>();
- links = new GooList<TextLink*>();
+ underlines = new std::vector<TextUnderline*>();
+ links = new std::vector<TextLink*>();
mergeCombining = true;
}
@@ -2480,9 +2479,9 @@
blocks = nullptr;
rawWords = nullptr;
rawLastWord = nullptr;
- fonts = new GooList<TextFontInfo*>();
- underlines = new GooList<TextUnderline*>();
- links = new GooList<TextLink*>();
+ fonts = new std::vector<TextFontInfo*>();
+ underlines = new std::vector<TextUnderline*>();
+ links = new std::vector<TextLink*>();
}
void TextPage::updateFont(GfxState *state) {
@@ -4427,16 +4426,16 @@
void endPage();
GooString *getText(void);
- GooList<TextWordSelection*> **takeWordList(int *nLines);
+ std::vector<TextWordSelection*> **takeWordList(int *nLines);
private:
void startLine();
void finishLine();
- GooList<TextWordSelection*> **lines;
+ std::vector<TextWordSelection*> **lines;
int nLines, linesSize;
- GooList<TextWordSelection*> *words;
+ std::vector<TextWordSelection*> *words;
int tableId;
TextBlock *currentBlock;
};
@@ -4445,7 +4444,7 @@
: TextSelectionVisitor(page)
{
linesSize = 256;
- lines = (GooList<TextWordSelection*> **)gmallocn(linesSize, sizeof(GooList<TextWordSelection*> *));
+ lines = (std::vector<TextWordSelection*> **)gmallocn(linesSize, sizeof(std::vector<TextWordSelection*> *));
nLines = 0;
tableId = -1;
@@ -4467,14 +4466,14 @@
void TextSelectionDumper::startLine()
{
finishLine();
- words = new GooList<TextWordSelection*>();
+ words = new std::vector<TextWordSelection*>();
}
void TextSelectionDumper::finishLine()
{
if (nLines == linesSize) {
linesSize *= 2;
- lines = (GooList<TextWordSelection*> **)grealloc(lines, linesSize * sizeof(GooList<TextWordSelection*> *));
+ lines = (std::vector<TextWordSelection*> **)grealloc(lines, linesSize * sizeof(std::vector<TextWordSelection*> *));
}
if (words && words->size() > 0)
@@ -4549,7 +4548,7 @@
eolLen = uMap->mapUnicode(0x0a, eol, sizeof(eol));
for (i = 0; i < nLines; i++) {
- GooList<TextWordSelection*> *lineWords = lines[i];
+ std::vector<TextWordSelection*> *lineWords = lines[i];
for (std::size_t j = 0; j < lineWords->size(); j++) {
TextWordSelection *sel = (*lineWords)[j];
@@ -4566,9 +4565,9 @@
return text;
}
-GooList<TextWordSelection*> **TextSelectionDumper::takeWordList(int *nLinesOut)
+std::vector<TextWordSelection*> **TextSelectionDumper::takeWordList(int *nLinesOut)
{
- GooList<TextWordSelection*> **returnValue = lines;
+ std::vector<TextWordSelection*> **returnValue = lines;
*nLinesOut = nLines;
if (nLines == 0)
@@ -4598,10 +4597,10 @@
void visitWord (TextWord *word, int begin, int end,
PDFRectangle *selection) override { };
- GooList<PDFRectangle*> *getRegion () { return list; }
+ std::vector<PDFRectangle*> *getRegion () { return list; }
private:
- GooList<PDFRectangle*> *list;
+ std::vector<PDFRectangle*> *list;
double scale;
};
@@ -4609,7 +4608,7 @@
: TextSelectionVisitor(page),
scale(scale)
{
- list = new GooList<PDFRectangle*>();
+ list = new std::vector<PDFRectangle*>();
}
void TextSelectionSizer::visitLine (TextLine *line,
@@ -4664,7 +4663,7 @@
OutputDev *out;
GfxColor *glyph_color;
GfxState *state;
- GooList<TextWordSelection*> *selectionList;
+ std::vector<TextWordSelection*> *selectionList;
Matrix ctm, ictm;
};
@@ -4680,7 +4679,7 @@
{
PDFRectangle box(0, 0, page->pageWidth, page->pageHeight);
- selectionList = new GooList<TextWordSelection*>();
+ selectionList = new std::vector<TextWordSelection*>();
state = new GfxState(72 * scale, 72 * scale, &box, rotation, false);
state->getCTM(&ctm);
@@ -5143,7 +5142,7 @@
painter.endPage();
}
-GooList<PDFRectangle*> *TextPage::getSelectionRegion(PDFRectangle *selection,
+std::vector<PDFRectangle*> *TextPage::getSelectionRegion(PDFRectangle *selection,
SelectionStyle style,
double scale) {
TextSelectionSizer sizer(this, scale);
@@ -5164,7 +5163,7 @@
return dumper.getText();
}
-GooList<TextWordSelection*> **TextPage::getSelectionWords(PDFRectangle *selection,
+std::vector<TextWordSelection*> **TextPage::getSelectionWords(PDFRectangle *selection,
SelectionStyle style,
int *nLines)
{
@@ -5922,7 +5921,7 @@
text->drawSelection(out, scale, rotation, selection, style, glyph_color, box_color);
}
-GooList<PDFRectangle*> *TextOutputDev::getSelectionRegion(PDFRectangle *selection,
+std::vector<PDFRectangle*> *TextOutputDev::getSelectionRegion(PDFRectangle *selection,
SelectionStyle style,
double scale) {
return text->getSelectionRegion(selection, style, scale);
diff --git a/poppler/TextOutputDev.h b/poppler/TextOutputDev.h
index 8ebc4b7..6e158b8 100644
--- a/poppler/TextOutputDev.h
+++ b/poppler/TextOutputDev.h
@@ -519,7 +519,7 @@
private:
- GooList<TextWord*> *words;
+ std::vector<TextWord*> *words;
};
#endif // TEXTOUT_WORD_LIST
@@ -637,14 +637,14 @@
SelectionStyle style,
GfxColor *glyph_color, GfxColor *box_color);
- GooList<PDFRectangle*> *getSelectionRegion(PDFRectangle *selection,
+ std::vector<PDFRectangle*> *getSelectionRegion(PDFRectangle *selection,
SelectionStyle style,
double scale);
GooString *getSelectionText(PDFRectangle *selection,
SelectionStyle style);
- GooList<TextWordSelection*> **getSelectionWords(PDFRectangle *selection,
+ std::vector<TextWordSelection*> **getSelectionWords(PDFRectangle *selection,
SelectionStyle style,
int *nLines);
@@ -709,14 +709,14 @@
// rawOrder is set)
TextWord *rawLastWord; // last word on rawWords list
- GooList<TextFontInfo*> *fonts;// all font info objects used on this page
+ std::vector<TextFontInfo*> *fonts;// all font info objects used on this page
double lastFindXMin, // coordinates of the last "find" result
lastFindYMin;
bool haveLastFind;
- GooList<TextUnderline*> *underlines;
- GooList<TextLink*> *links;
+ std::vector<TextUnderline*> *underlines;
+ std::vector<TextLink*> *links;
int refCnt;
@@ -876,7 +876,7 @@
SelectionStyle style,
GfxColor *glyph_color, GfxColor *box_color);
- GooList<PDFRectangle*> *getSelectionRegion(PDFRectangle *selection,
+ std::vector<PDFRectangle*> *getSelectionRegion(PDFRectangle *selection,
SelectionStyle style,
double scale);
diff --git a/poppler/UnicodeMap.cc b/poppler/UnicodeMap.cc
index a1244ea..6066cc8 100644
--- a/poppler/UnicodeMap.cc
+++ b/poppler/UnicodeMap.cc
@@ -32,7 +32,6 @@
#include "goo/gmem.h"
#include "goo/gfile.h"
#include "goo/GooString.h"
-#include "goo/GooList.h"
#include "Error.h"
#include "GlobalParams.h"
#include "UnicodeMap.h"
diff --git a/qt5/src/poppler-document.cc b/qt5/src/poppler-document.cc
index 213cde3..0b70a97 100644
--- a/qt5/src/poppler-document.cc
+++ b/qt5/src/poppler-document.cc
@@ -590,7 +590,7 @@
if ( !outline )
return nullptr;
- const GooList<OutlineItem*> * items = outline->getItems();
+ const std::vector<::OutlineItem*> * items = outline->getItems();
if ( !items || items->size() < 1 )
return nullptr;
@@ -606,7 +606,7 @@
QVector<OutlineItem> result;
if (::Outline *outline = m_doc->doc->getOutline()) {
- if (const GooList *items = outline->getItems()) {
+ if (const auto *items = outline->getItems()) {
for (void *item : *items) {
result.push_back(OutlineItem{new OutlineItemData{static_cast<::OutlineItem *>(item), m_doc}});
}
diff --git a/qt5/src/poppler-fontinfo.cc b/qt5/src/poppler-fontinfo.cc
index 08a2422..ae826ab 100644
--- a/qt5/src/poppler-fontinfo.cc
+++ b/qt5/src/poppler-fontinfo.cc
@@ -127,7 +127,7 @@
++d->currentPage;
QList<FontInfo> fonts;
- GooList<::FontInfo*> *items = d->fontInfoScanner.scan( 1 );
+ std::vector<::FontInfo*> *items = d->fontInfoScanner.scan( 1 );
if ( !items )
return fonts;
fonts.reserve( items->size() );
diff --git a/qt5/src/poppler-outline.cc b/qt5/src/poppler-outline.cc
index c0fbefa..3963694 100644
--- a/qt5/src/poppler-outline.cc
+++ b/qt5/src/poppler-outline.cc
@@ -23,7 +23,6 @@
#include "poppler-private.h"
#include "poppler-outline-private.h"
-#include "GooList.h"
#include "Link.h"
#include "Outline.h"
@@ -166,7 +165,7 @@
if (::OutlineItem *data = m_data->data) {
data->open();
- if (const GooList *kids = data->getKids()) {
+ if (const auto *kids = data->getKids()) {
for (void *kid : *kids) {
result.push_back(OutlineItem{new OutlineItemData{static_cast<::OutlineItem *>(kid), m_data->documentData}});
}
diff --git a/qt5/src/poppler-page.cc b/qt5/src/poppler-page.cc
index 7e7193d..6c66640 100644
--- a/qt5/src/poppler-page.cc
+++ b/qt5/src/poppler-page.cc
@@ -362,7 +362,7 @@
if ( popplerLink )
{
- const GooList<::LinkAction*> *nextActions = a->nextActions();
+ const std::vector<::LinkAction*> *nextActions = a->nextActions();
if ( nextActions )
{
QVector<Link *> links;
diff --git a/qt5/src/poppler-private.cc b/qt5/src/poppler-private.cc
index 9fb230e..941c603 100644
--- a/qt5/src/poppler-private.cc
+++ b/qt5/src/poppler-private.cc
@@ -282,7 +282,7 @@
}
- void DocumentData::addTocChildren( QDomDocument * docSyn, QDomNode * parent, const GooList<OutlineItem*> * items )
+ void DocumentData::addTocChildren( QDomDocument * docSyn, QDomNode * parent, const std::vector<::OutlineItem*> * items )
{
for ( std::size_t i = 0; i < items->size(); ++i )
{
@@ -308,7 +308,7 @@
// 3. recursively descend over children
outlineItem->open();
- const GooList<OutlineItem*> * children = outlineItem->getKids();
+ const std::vector<::OutlineItem*> * children = outlineItem->getKids();
if ( children )
addTocChildren( docSyn, &item, children );
}
diff --git a/qt5/src/poppler-private.h b/qt5/src/poppler-private.h
index 47df701..659900d 100644
--- a/qt5/src/poppler-private.h
+++ b/qt5/src/poppler-private.h
@@ -124,7 +124,7 @@
DocumentData(const DocumentData &) = delete;
DocumentData& operator=(const DocumentData &) = delete;
- void addTocChildren( QDomDocument * docSyn, QDomNode * parent, const GooList<OutlineItem*> * items );
+ void addTocChildren( QDomDocument * docSyn, QDomNode * parent, const std::vector<::OutlineItem*> * items );
void setPaperColor(const QColor &color)
{
diff --git a/splash/Splash.cc b/splash/Splash.cc
index 6be2477..2ab7963 100644
--- a/splash/Splash.cc
+++ b/splash/Splash.cc
@@ -36,7 +36,6 @@
#include <math.h>
#include "goo/gmem.h"
#include "goo/GooLikely.h"
-#include "goo/GooList.h"
#include "poppler/Error.h"
#include "SplashErrorCodes.h"
#include "SplashMath.h"
diff --git a/splash/SplashBitmap.cc b/splash/SplashBitmap.cc
index 0afa3fc..37e936c 100644
--- a/splash/SplashBitmap.cc
+++ b/splash/SplashBitmap.cc
@@ -46,7 +46,6 @@
#include "goo/PNGWriter.h"
#include "goo/TiffWriter.h"
#include "goo/ImgWriter.h"
-#include "goo/GooList.h"
//------------------------------------------------------------------------
// SplashBitmap
@@ -54,7 +53,7 @@
SplashBitmap::SplashBitmap(int widthA, int heightA, int rowPadA,
SplashColorMode modeA, bool alphaA,
- bool topDown, GooList<GfxSeparationColorSpace*> *separationListA) {
+ bool topDown, std::vector<GfxSeparationColorSpace*> *separationListA) {
width = widthA;
height = heightA;
mode = modeA;
@@ -124,7 +123,7 @@
} else {
alpha = nullptr;
}
- separationList = new GooList<GfxSeparationColorSpace*>();
+ separationList = new std::vector<GfxSeparationColorSpace*>();
if (separationListA != nullptr)
for (std::size_t i = 0; i < separationListA->size(); i++)
separationList->push_back((GfxSeparationColorSpace*)( (*separationListA)[i])->copy());
diff --git a/splash/SplashBitmap.h b/splash/SplashBitmap.h
index 4ad9b62..fb06684 100644
--- a/splash/SplashBitmap.h
+++ b/splash/SplashBitmap.h
@@ -51,7 +51,7 @@
// upside-down, i.e., with the last row first in memory.
SplashBitmap(int widthA, int heightA, int rowPad,
SplashColorMode modeA, bool alphaA,
- bool topDown = true, GooList<GfxSeparationColorSpace*> *separationList = nullptr);
+ bool topDown = true, std::vector<GfxSeparationColorSpace*> *separationList = nullptr);
static SplashBitmap *copy(SplashBitmap *src);
~SplashBitmap();
@@ -67,7 +67,7 @@
SplashColorMode getMode() { return mode; }
SplashColorPtr getDataPtr() { return data; }
unsigned char *getAlphaPtr() { return alpha; }
- GooList<GfxSeparationColorSpace*> *getSeparationList() { return separationList; }
+ std::vector<GfxSeparationColorSpace*> *getSeparationList() { return separationList; }
SplashError writePNMFile(char *fileName);
SplashError writePNMFile(FILE *f);
@@ -117,7 +117,7 @@
SplashColorPtr data; // pointer to row zero of the color data
unsigned char *alpha; // pointer to row zero of the alpha data
// (always top-down)
- GooList<GfxSeparationColorSpace*> *separationList; // list of spot colorants and their mapping functions
+ std::vector<GfxSeparationColorSpace*> *separationList; // list of spot colorants and their mapping functions
friend class Splash;
diff --git a/test/perf-test.cc b/test/perf-test.cc
index a9573af..109d3f6 100644
--- a/test/perf-test.cc
+++ b/test/perf-test.cc
@@ -51,7 +51,6 @@
#include "Error.h"
#include "ErrorCodes.h"
#include "goo/GooString.h"
-#include "goo/GooList.h"
#include "goo/GooTimer.h"
#include "GlobalParams.h"
#include "splash/SplashBitmap.h"
diff --git a/utils/HtmlOutputDev.cc b/utils/HtmlOutputDev.cc
index 721a6f0..1c7416b 100644
--- a/utils/HtmlOutputDev.cc
+++ b/utils/HtmlOutputDev.cc
@@ -59,7 +59,6 @@
#include <iostream>
#include "goo/GooString.h"
#include "goo/gbasename.h"
-#include "goo/GooList.h"
#include "goo/gbase64.h"
#include "goo/gbasename.h"
#include "UnicodeMap.h"
@@ -279,7 +278,7 @@
yxCur1 = yxCur2 = nullptr;
fonts=new HtmlFontAccu();
links=new HtmlLinks();
- imgList=new GooList<HtmlImage*>();
+ imgList=new std::vector<HtmlImage*>();
pageWidth=0;
pageHeight=0;
fontsPageMarker = 0;
@@ -1102,7 +1101,7 @@
needClose = false;
pages = new HtmlPage(rawOrder);
- glMetaVars = new GooList<HtmlMetaVar*>();
+ glMetaVars = new std::vector<HtmlMetaVar*>();
glMetaVars->push_back(new HtmlMetaVar("generator", "pdftohtml 0.36"));
if( author ) glMetaVars->push_back(new HtmlMetaVar("author", author));
if( keywords ) glMetaVars->push_back(new HtmlMetaVar("keywords", keywords));
@@ -1693,7 +1692,7 @@
if (!outline)
return false;
- const GooList<OutlineItem*> *outlines = outline->getItems();
+ const std::vector<OutlineItem*> *outlines = outline->getItems();
if (!outlines)
return false;
@@ -1750,7 +1749,7 @@
return true;
}
-bool HtmlOutputDev::newHtmlOutlineLevel(FILE *output, const GooList<OutlineItem*> *outlines, int level)
+bool HtmlOutputDev::newHtmlOutlineLevel(FILE *output, const std::vector<OutlineItem*> *outlines, int level)
{
bool atLeastOne = false;
@@ -1818,7 +1817,7 @@
return atLeastOne;
}
-void HtmlOutputDev::newXmlOutlineLevel(FILE *output, const GooList<OutlineItem*> *outlines)
+void HtmlOutputDev::newXmlOutlineLevel(FILE *output, const std::vector<OutlineItem*> *outlines)
{
fputs("<outline>\n", output);
diff --git a/utils/HtmlOutputDev.h b/utils/HtmlOutputDev.h
index e5e34d2..c9fe69c 100644
--- a/utils/HtmlOutputDev.h
+++ b/utils/HtmlOutputDev.h
@@ -35,7 +35,6 @@
#define HTMLOUTPUTDEV_H
#include <stdio.h>
-#include "goo/GooList.h"
#include "goo/gbasename.h"
#include "GfxFont.h"
#include "OutputDev.h"
@@ -187,7 +186,7 @@
int fontsPageMarker;
HtmlFontAccu *fonts;
HtmlLinks *links;
- GooList<HtmlImage*> *imgList;
+ std::vector<HtmlImage*> *imgList;
GooString *DocName;
int pageWidth;
@@ -322,8 +321,8 @@
GooString* getLinkDest(AnnotLink *link);
void dumpMetaVars(FILE *);
void doFrame(int firstPage);
- bool newHtmlOutlineLevel(FILE *output, const GooList<OutlineItem*> *outlines, int level = 1);
- void newXmlOutlineLevel(FILE *output, const GooList<OutlineItem*> *outlines);
+ bool newHtmlOutlineLevel(FILE *output, const std::vector<OutlineItem*> *outlines, int level = 1);
+ void newXmlOutlineLevel(FILE *output, const std::vector<OutlineItem*> *outlines);
int getOutlinePageNum(OutlineItem *item);
void drawJpegImage(GfxState *state, Stream *str);
void drawPngImage(GfxState *state, Stream *str, int width, int height,
@@ -345,7 +344,7 @@
int maxPageHeight;
GooString *Docname;
GooString *docTitle;
- GooList<HtmlMetaVar*> *glMetaVars;
+ std::vector<HtmlMetaVar*> *glMetaVars;
Catalog *catalog;
Page *docPage;
std::vector<std::string> backgroundImages;
diff --git a/utils/pdfdetach.cc b/utils/pdfdetach.cc
index 3ec155c..0648478 100644
--- a/utils/pdfdetach.cc
+++ b/utils/pdfdetach.cc
@@ -28,7 +28,6 @@
#include <poppler-config.h>
#include <stdio.h>
#include "goo/gmem.h"
-#include "goo/GooList.h"
#include "parseargs.h"
#include "Annot.h"
#include "GlobalParams.h"
diff --git a/utils/pdffonts.cc b/utils/pdffonts.cc
index 26be4b9..97ee7ab 100644
--- a/utils/pdffonts.cc
+++ b/utils/pdffonts.cc
@@ -164,7 +164,7 @@
// get the fonts
{
FontInfoScanner scanner(doc, firstPage - 1);
- GooList<FontInfo*> *fonts = scanner.scan(lastPage - firstPage + 1);
+ std::vector<FontInfo*> *fonts = scanner.scan(lastPage - firstPage + 1);
if (showSubst) {
// print the font substitutions
diff --git a/utils/printencodings.cc b/utils/printencodings.cc
index 841bcde..92355cb 100644
--- a/utils/printencodings.cc
+++ b/utils/printencodings.cc
@@ -18,15 +18,16 @@
* Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
*/
+#include <algorithm>
+
#include "printencodings.h"
#include "GlobalParams.h"
-#include "goo/GooList.h"
#include "goo/GooString.h"
void printEncodings()
{
- GooList<GooString*> *encNames = globalParams->getEncodingNames();
+ std::vector<GooString*> *encNames = globalParams->getEncodingNames();
std::sort(encNames->begin(), encNames->end(), [](void *lhs, void *rhs) {
return static_cast<GooString *>(lhs)->cmp(static_cast<GooString *>(rhs)) < 0;