[poppler] glib/poppler-action.cc poppler/Annot.cc poppler/Annot.h
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Thu Nov 15 22:45:50 UTC 2018
glib/poppler-action.cc | 2
poppler/Annot.cc | 200 ++++++++++++++++++++++++-------------------------
poppler/Annot.h | 46 +++++------
3 files changed, 124 insertions(+), 124 deletions(-)
New commits:
commit 13708e8fd48b4ce72276a99f32d54a2b3b016897
Author: Albert Astals Cid <aacid at kde.org>
Date: Wed Nov 14 14:53:04 2018 +0100
Annot: Remove some inc/defRef by Object moving
diff --git a/glib/poppler-action.cc b/glib/poppler-action.cc
index dcee6fb3..9af67571 100644
--- a/glib/poppler-action.cc
+++ b/glib/poppler-action.cc
@@ -477,7 +477,7 @@ find_annot_movie_for_action (PopplerDocument *document,
if (annotObj.isDict ()) {
Object tmp;
- annot = new AnnotMovie (document->doc, &annotObj, &tmp);
+ annot = new AnnotMovie (document->doc, std::move(annotObj), &tmp);
if (!annot->isOk ()) {
delete annot;
annot = nullptr;
diff --git a/poppler/Annot.cc b/poppler/Annot.cc
index 0732de92..b5eac641 100644
--- a/poppler/Annot.cc
+++ b/poppler/Annot.cc
@@ -1158,16 +1158,16 @@ Annot::Annot(PDFDoc *docA, PDFRectangle *rectA) {
initialize (docA, annotObj.getDict());
}
-Annot::Annot(PDFDoc *docA, Object *dictObject) {
+Annot::Annot(PDFDoc *docA, Object &&dictObject) {
refCnt = 1;
hasRef = false;
flags = flagUnknown;
type = typeUnknown;
- annotObj = dictObject->copy();
- initialize (docA, dictObject->getDict());
+ annotObj = std::move(dictObject);
+ initialize (docA, annotObj.getDict());
}
-Annot::Annot(PDFDoc *docA, Object *dictObject, Object *obj) {
+Annot::Annot(PDFDoc *docA, Object &&dictObject, const Object *obj) {
refCnt = 1;
if (obj->isRef()) {
hasRef = true;
@@ -1177,8 +1177,8 @@ Annot::Annot(PDFDoc *docA, Object *dictObject, Object *obj) {
}
flags = flagUnknown;
type = typeUnknown;
- annotObj = dictObject->copy();
- initialize (docA, dictObject->getDict());
+ annotObj = std::move(dictObject);
+ initialize (docA, annotObj.getDict());
}
void Annot::initialize(PDFDoc *docA, Dict *dict) {
@@ -1856,10 +1856,10 @@ AnnotPopup::AnnotPopup(PDFDoc *docA, PDFRectangle *rect) :
initialize (docA, annotObj.getDict());
}
-AnnotPopup::AnnotPopup(PDFDoc *docA, Object *dictObject, Object *obj) :
- Annot(docA, dictObject, obj) {
+AnnotPopup::AnnotPopup(PDFDoc *docA, Object &&dictObject, const Object *obj) :
+ Annot(docA, std::move(dictObject), obj) {
type = typePopup;
- initialize(docA, dictObject->getDict());
+ initialize(docA, annotObj.getDict());
}
AnnotPopup::~AnnotPopup() {
@@ -1894,17 +1894,17 @@ void AnnotPopup::setOpen(bool openA) {
//------------------------------------------------------------------------
AnnotMarkup::AnnotMarkup(PDFDoc *docA, PDFRectangle *rect) :
Annot(docA, rect) {
- initialize(docA, annotObj.getDict(), &annotObj);
+ initialize(docA, annotObj.getDict());
}
-AnnotMarkup::AnnotMarkup(PDFDoc *docA, Object *dictObject, Object *obj) :
- Annot(docA, dictObject, obj) {
- initialize(docA, dictObject->getDict(), obj);
+AnnotMarkup::AnnotMarkup(PDFDoc *docA, Object &&dictObject, const Object *obj) :
+ Annot(docA, std::move(dictObject), obj) {
+ initialize(docA, annotObj.getDict());
}
AnnotMarkup::~AnnotMarkup() = default;
-void AnnotMarkup::initialize(PDFDoc *docA, Dict *dict, Object *obj) {
+void AnnotMarkup::initialize(PDFDoc *docA, Dict *dict) {
Object obj1, obj2;
obj1 = dict->lookup("T");
@@ -1912,10 +1912,10 @@ void AnnotMarkup::initialize(PDFDoc *docA, Dict *dict, Object *obj) {
label.reset(obj1.getString()->copy());
}
- obj1 = dict->lookup("Popup");
+ Object popupObj = dict->lookup("Popup");
obj2 = dict->lookupNF("Popup");
- if (obj1.isDict() && obj2.isRef()) {
- popup = std::make_unique<AnnotPopup>(docA, &obj1, &obj2);
+ if (popupObj.isDict() && obj2.isRef()) {
+ popup = std::make_unique<AnnotPopup>(docA, std::move(popupObj), &obj2);
}
obj1 = dict->lookup("CA");
@@ -2052,12 +2052,12 @@ AnnotText::AnnotText(PDFDoc *docA, PDFRectangle *rect) :
initialize (docA, annotObj.getDict());
}
-AnnotText::AnnotText(PDFDoc *docA, Object *dictObject, Object *obj) :
- AnnotMarkup(docA, dictObject, obj) {
+AnnotText::AnnotText(PDFDoc *docA, Object &&dictObject, const Object *obj) :
+ AnnotMarkup(docA, std::move(dictObject), obj) {
type = typeText;
flags |= flagNoZoom | flagNoRotate;
- initialize (docA, dictObject->getDict());
+ initialize (docA, annotObj.getDict());
}
AnnotText::~AnnotText() = default;
@@ -2481,11 +2481,11 @@ AnnotLink::AnnotLink(PDFDoc *docA, PDFRectangle *rect) :
initialize (docA, annotObj.getDict());
}
-AnnotLink::AnnotLink(PDFDoc *docA, Object *dictObject, Object *obj) :
- Annot(docA, dictObject, obj) {
+AnnotLink::AnnotLink(PDFDoc *docA, Object &&dictObject, const Object *obj) :
+ Annot(docA, std::move(dictObject), obj) {
type = typeLink;
- initialize (docA, dictObject->getDict());
+ initialize (docA, annotObj.getDict());
}
AnnotLink::~AnnotLink() = default;
@@ -2570,10 +2570,10 @@ AnnotFreeText::AnnotFreeText(PDFDoc *docA, PDFRectangle *rect, const DefaultAppe
initialize (docA, annotObj.getDict());
}
-AnnotFreeText::AnnotFreeText(PDFDoc *docA, Object *dictObject, Object *obj) :
- AnnotMarkup(docA, dictObject, obj) {
+AnnotFreeText::AnnotFreeText(PDFDoc *docA, Object &&dictObject, const Object *obj) :
+ AnnotMarkup(docA, std::move(dictObject), obj) {
type = typeFreeText;
- initialize(docA, dictObject->getDict());
+ initialize(docA, annotObj.getDict());
}
AnnotFreeText::~AnnotFreeText() = default;
@@ -2933,10 +2933,10 @@ AnnotLine::AnnotLine(PDFDoc *docA, PDFRectangle *rect) :
initialize (docA, annotObj.getDict());
}
-AnnotLine::AnnotLine(PDFDoc *docA, Object *dictObject, Object *obj) :
- AnnotMarkup(docA, dictObject, obj) {
+AnnotLine::AnnotLine(PDFDoc *docA, Object &&dictObject, const Object *obj) :
+ AnnotMarkup(docA, std::move(dictObject), obj) {
type = typeLine;
- initialize(docA, dictObject->getDict());
+ initialize(docA, annotObj.getDict());
}
AnnotLine::~AnnotLine() = default;
@@ -3463,11 +3463,11 @@ AnnotTextMarkup::AnnotTextMarkup(PDFDoc *docA, PDFRectangle *rect, AnnotSubtype
initialize(docA, annotObj.getDict());
}
-AnnotTextMarkup::AnnotTextMarkup(PDFDoc *docA, Object *dictObject, Object *obj) :
- AnnotMarkup(docA, dictObject, obj) {
+AnnotTextMarkup::AnnotTextMarkup(PDFDoc *docA, Object &&dictObject, const Object *obj) :
+ AnnotMarkup(docA, std::move(dictObject), obj) {
// the real type will be read in initialize()
type = typeHighlight;
- initialize(docA, dictObject->getDict());
+ initialize(docA, annotObj.getDict());
}
AnnotTextMarkup::~AnnotTextMarkup() = default;
@@ -3712,15 +3712,15 @@ void AnnotTextMarkup::draw(Gfx *gfx, bool printing) {
// AnnotWidget
//------------------------------------------------------------------------
-AnnotWidget::AnnotWidget(PDFDoc *docA, Object *dictObject, Object *obj) :
- Annot(docA, dictObject, obj) {
+AnnotWidget::AnnotWidget(PDFDoc *docA, Object &&dictObject, const Object *obj) :
+ Annot(docA, std::move(dictObject), obj) {
type = typeWidget;
field = nullptr;
- initialize(docA, dictObject->getDict());
+ initialize(docA, annotObj.getDict());
}
AnnotWidget::AnnotWidget(PDFDoc *docA, Object *dictObject, Object *obj, FormField *fieldA) :
- Annot(docA, dictObject, obj) {
+ Annot(docA, dictObject->copy(), obj) {
type = typeWidget;
field = fieldA;
initialize(docA, dictObject->getDict());
@@ -4986,10 +4986,10 @@ AnnotMovie::AnnotMovie(PDFDoc *docA, PDFRectangle *rect, Movie *movieA) :
initialize(docA, annotObj.getDict());
}
-AnnotMovie::AnnotMovie(PDFDoc *docA, Object *dictObject, Object *obj) :
- Annot(docA, dictObject, obj) {
+AnnotMovie::AnnotMovie(PDFDoc *docA, Object &&dictObject, const Object *obj) :
+ Annot(docA, std::move(dictObject), obj) {
type = typeMovie;
- initialize(docA, dictObject->getDict());
+ initialize(docA, annotObj.getDict());
}
AnnotMovie::~AnnotMovie() = default;
@@ -5106,10 +5106,10 @@ AnnotScreen::AnnotScreen(PDFDoc *docA, PDFRectangle *rect) :
initialize(docA, annotObj.getDict());
}
-AnnotScreen::AnnotScreen(PDFDoc *docA, Object *dictObject, Object *obj) :
- Annot(docA, dictObject, obj) {
+AnnotScreen::AnnotScreen(PDFDoc *docA, Object &&dictObject, const Object *obj) :
+ Annot(docA, std::move(dictObject), obj) {
type = typeScreen;
- initialize(docA, dictObject->getDict());
+ initialize(docA, annotObj.getDict());
}
AnnotScreen::~AnnotScreen() = default;
@@ -5158,10 +5158,10 @@ AnnotStamp::AnnotStamp(PDFDoc *docA, PDFRectangle *rect) :
initialize(docA, annotObj.getDict());
}
-AnnotStamp::AnnotStamp(PDFDoc *docA, Object *dictObject, Object *obj) :
- AnnotMarkup(docA, dictObject, obj) {
+AnnotStamp::AnnotStamp(PDFDoc *docA, Object &&dictObject, const Object *obj) :
+ AnnotMarkup(docA, std::move(dictObject), obj) {
type = typeStamp;
- initialize(docA, dictObject->getDict());
+ initialize(docA, annotObj.getDict());
}
AnnotStamp::~AnnotStamp() = default;
@@ -5206,11 +5206,11 @@ AnnotGeometry::AnnotGeometry(PDFDoc *docA, PDFRectangle *rect, AnnotSubtype subT
initialize(docA, annotObj.getDict());
}
-AnnotGeometry::AnnotGeometry(PDFDoc *docA, Object *dictObject, Object *obj) :
- AnnotMarkup(docA, dictObject, obj) {
+AnnotGeometry::AnnotGeometry(PDFDoc *docA, Object &&dictObject, const Object *obj) :
+ AnnotMarkup(docA, std::move(dictObject), obj) {
// the real type will be read in initialize()
type = typeSquare;
- initialize(docA, dictObject->getDict());
+ initialize(docA, annotObj.getDict());
}
AnnotGeometry::~AnnotGeometry() = default;
@@ -5408,11 +5408,11 @@ AnnotPolygon::AnnotPolygon(PDFDoc *docA, PDFRectangle *rect, AnnotSubtype subTyp
initialize(docA, annotObj.getDict());
}
-AnnotPolygon::AnnotPolygon(PDFDoc *docA, Object *dictObject, Object *obj) :
- AnnotMarkup(docA, dictObject, obj) {
+AnnotPolygon::AnnotPolygon(PDFDoc *docA, Object &&dictObject, const Object *obj) :
+ AnnotMarkup(docA, std::move(dictObject), obj) {
// the real type will be read in initialize()
type = typePolygon;
- initialize(docA, dictObject->getDict());
+ initialize(docA, annotObj.getDict());
}
AnnotPolygon::~AnnotPolygon() = default;
@@ -5640,10 +5640,10 @@ AnnotCaret::AnnotCaret(PDFDoc *docA, PDFRectangle *rect) :
initialize(docA, annotObj.getDict());
}
-AnnotCaret::AnnotCaret(PDFDoc *docA, Object *dictObject, Object *obj) :
- AnnotMarkup(docA, dictObject, obj) {
+AnnotCaret::AnnotCaret(PDFDoc *docA, Object &&dictObject, const Object *obj) :
+ AnnotMarkup(docA, std::move(dictObject), obj) {
type = typeCaret;
- initialize(docA, dictObject->getDict());
+ initialize(docA, annotObj.getDict());
}
AnnotCaret::~AnnotCaret() = default;
@@ -5694,10 +5694,10 @@ AnnotInk::AnnotInk(PDFDoc *docA, PDFRectangle *rect) :
initialize(docA, annotObj.getDict());
}
-AnnotInk::AnnotInk(PDFDoc *docA, Object *dictObject, Object *obj) :
- AnnotMarkup(docA, dictObject, obj) {
+AnnotInk::AnnotInk(PDFDoc *docA, Object &&dictObject, const Object *obj) :
+ AnnotMarkup(docA, std::move(dictObject), obj) {
type = typeInk;
- initialize(docA, dictObject->getDict());
+ initialize(docA, annotObj.getDict());
}
AnnotInk::~AnnotInk() {
@@ -5844,10 +5844,10 @@ AnnotFileAttachment::AnnotFileAttachment(PDFDoc *docA, PDFRectangle *rect, GooSt
initialize(docA, annotObj.getDict());
}
-AnnotFileAttachment::AnnotFileAttachment(PDFDoc *docA, Object *dictObject, Object *obj) :
- AnnotMarkup(docA, dictObject, obj) {
+AnnotFileAttachment::AnnotFileAttachment(PDFDoc *docA, Object &&dictObject, const Object *obj) :
+ AnnotMarkup(docA, std::move(dictObject), obj) {
type = typeFileAttachment;
- initialize(docA, dictObject->getDict());
+ initialize(docA, annotObj.getDict());
}
AnnotFileAttachment::~AnnotFileAttachment() = default;
@@ -6041,10 +6041,10 @@ AnnotSound::AnnotSound(PDFDoc *docA, PDFRectangle *rect, Sound *soundA) :
initialize(docA, annotObj.getDict());
}
-AnnotSound::AnnotSound(PDFDoc *docA, Object *dictObject, Object *obj) :
- AnnotMarkup(docA, dictObject, obj) {
+AnnotSound::AnnotSound(PDFDoc *docA, Object &&dictObject, const Object *obj) :
+ AnnotMarkup(docA, std::move(dictObject), obj) {
type = typeSound;
- initialize(docA, dictObject->getDict());
+ initialize(docA, annotObj.getDict());
}
AnnotSound::~AnnotSound() = default;
@@ -6185,10 +6185,10 @@ Annot3D::Annot3D(PDFDoc *docA, PDFRectangle *rect) :
initialize(docA, annotObj.getDict());
}
-Annot3D::Annot3D(PDFDoc *docA, Object *dictObject, Object *obj) :
- Annot(docA, dictObject, obj) {
+Annot3D::Annot3D(PDFDoc *docA, Object &&dictObject, const Object *obj) :
+ Annot(docA, std::move(dictObject), obj) {
type = type3D;
- initialize(docA, dictObject->getDict());
+ initialize(docA, annotObj.getDict());
}
Annot3D::~Annot3D() = default;
@@ -6296,10 +6296,10 @@ AnnotRichMedia::AnnotRichMedia(PDFDoc *docA, PDFRectangle *rect) :
initialize(docA, annotObj.getDict());
}
-AnnotRichMedia::AnnotRichMedia(PDFDoc *docA, Object *dictObject, Object *obj) :
- Annot(docA, dictObject, obj) {
+AnnotRichMedia::AnnotRichMedia(PDFDoc *docA, Object &&dictObject, const Object *obj) :
+ Annot(docA, std::move(dictObject), obj) {
type = typeRichMedia;
- initialize(docA, dictObject->getDict());
+ initialize(docA, annotObj.getDict());
}
AnnotRichMedia::~AnnotRichMedia() = default;
@@ -6645,7 +6645,7 @@ Annots::Annots(PDFDoc *docA, int page, Object *annotsObj) {
Object obj1 = annotsObj->arrayGet(i);
if (obj1.isDict()) {
Object obj2 = annotsObj->arrayGetNF(i);
- annot = createAnnot (&obj1, &obj2);
+ annot = createAnnot (std::move(obj1), &obj2);
if (annot) {
if (annot->isOk()) {
annot->setPage(page, false); // Don't change /P
@@ -6677,48 +6677,48 @@ bool Annots::removeAnnot(Annot *annot) {
}
}
-Annot *Annots::createAnnot(Object* dictObject, Object *obj) {
+Annot *Annots::createAnnot(Object &&dictObject, const Object *obj) {
Annot *annot = nullptr;
- Object obj1 = dictObject->dictLookup("Subtype");
+ Object obj1 = dictObject.dictLookup("Subtype");
if (obj1.isName()) {
const char *typeName = obj1.getName();
if (!strcmp(typeName, "Text")) {
- annot = new AnnotText(doc, dictObject, obj);
+ annot = new AnnotText(doc, std::move(dictObject), obj);
} else if (!strcmp(typeName, "Link")) {
- annot = new AnnotLink(doc, dictObject, obj);
+ annot = new AnnotLink(doc, std::move(dictObject), obj);
} else if (!strcmp(typeName, "FreeText")) {
- annot = new AnnotFreeText(doc, dictObject, obj);
+ annot = new AnnotFreeText(doc, std::move(dictObject), obj);
} else if (!strcmp(typeName, "Line")) {
- annot = new AnnotLine(doc, dictObject, obj);
+ annot = new AnnotLine(doc, std::move(dictObject), obj);
} else if (!strcmp(typeName, "Square")) {
- annot = new AnnotGeometry(doc, dictObject, obj);
+ annot = new AnnotGeometry(doc, std::move(dictObject), obj);
} else if (!strcmp(typeName, "Circle")) {
- annot = new AnnotGeometry(doc, dictObject, obj);
+ annot = new AnnotGeometry(doc, std::move(dictObject), obj);
} else if (!strcmp(typeName, "Polygon")) {
- annot = new AnnotPolygon(doc, dictObject, obj);
+ annot = new AnnotPolygon(doc, std::move(dictObject), obj);
} else if (!strcmp(typeName, "PolyLine")) {
- annot = new AnnotPolygon(doc, dictObject, obj);
+ annot = new AnnotPolygon(doc, std::move(dictObject), obj);
} else if (!strcmp(typeName, "Highlight")) {
- annot = new AnnotTextMarkup(doc, dictObject, obj);
+ annot = new AnnotTextMarkup(doc, std::move(dictObject), obj);
} else if (!strcmp(typeName, "Underline")) {
- annot = new AnnotTextMarkup(doc, dictObject, obj);
+ annot = new AnnotTextMarkup(doc, std::move(dictObject), obj);
} else if (!strcmp(typeName, "Squiggly")) {
- annot = new AnnotTextMarkup(doc, dictObject, obj);
+ annot = new AnnotTextMarkup(doc, std::move(dictObject), obj);
} else if (!strcmp(typeName, "StrikeOut")) {
- annot = new AnnotTextMarkup(doc, dictObject, obj);
+ annot = new AnnotTextMarkup(doc, std::move(dictObject), obj);
} else if (!strcmp(typeName, "Stamp")) {
- annot = new AnnotStamp(doc, dictObject, obj);
+ annot = new AnnotStamp(doc, std::move(dictObject), obj);
} else if (!strcmp(typeName, "Caret")) {
- annot = new AnnotCaret(doc, dictObject, obj);
+ annot = new AnnotCaret(doc, std::move(dictObject), obj);
} else if (!strcmp(typeName, "Ink")) {
- annot = new AnnotInk(doc, dictObject, obj);
+ annot = new AnnotInk(doc, std::move(dictObject), obj);
} else if (!strcmp(typeName, "FileAttachment")) {
- annot = new AnnotFileAttachment(doc, dictObject, obj);
+ annot = new AnnotFileAttachment(doc, std::move(dictObject), obj);
} else if (!strcmp(typeName, "Sound")) {
- annot = new AnnotSound(doc, dictObject, obj);
+ annot = new AnnotSound(doc, std::move(dictObject), obj);
} else if(!strcmp(typeName, "Movie")) {
- annot = new AnnotMovie(doc, dictObject, obj);
+ annot = new AnnotMovie(doc, std::move(dictObject), obj);
} else if(!strcmp(typeName, "Widget")) {
// Find the annot in forms
if (obj->isRef()) {
@@ -6732,31 +6732,31 @@ Annot *Annots::createAnnot(Object* dictObject, Object *obj) {
}
}
if (!annot)
- annot = new AnnotWidget(doc, dictObject, obj);
+ annot = new AnnotWidget(doc, std::move(dictObject), obj);
} else if(!strcmp(typeName, "Screen")) {
- annot = new AnnotScreen(doc, dictObject, obj);
+ annot = new AnnotScreen(doc, std::move(dictObject), obj);
} else if(!strcmp(typeName, "PrinterMark")) {
- annot = new Annot(doc, dictObject, obj);
+ annot = new Annot(doc, std::move(dictObject), obj);
} else if (!strcmp(typeName, "TrapNet")) {
- annot = new Annot(doc, dictObject, obj);
+ annot = new Annot(doc, std::move(dictObject), obj);
} else if (!strcmp(typeName, "Watermark")) {
- annot = new Annot(doc, dictObject, obj);
+ annot = new Annot(doc, std::move(dictObject), obj);
} else if (!strcmp(typeName, "3D")) {
- annot = new Annot3D(doc, dictObject, obj);
+ annot = new Annot3D(doc, std::move(dictObject), obj);
} else if (!strcmp(typeName, "RichMedia")) {
- annot = new AnnotRichMedia(doc, dictObject, obj);
+ annot = new AnnotRichMedia(doc, std::move(dictObject), obj);
} else if (!strcmp(typeName, "Popup")) {
/* Popup annots are already handled by markup annots
* Here we only care about popup annots without a
* markup annotation associated
*/
- Object obj2 = dictObject->dictLookup("Parent");
+ Object obj2 = dictObject.dictLookup("Parent");
if (obj2.isNull())
- annot = new AnnotPopup(doc, dictObject, obj);
+ annot = new AnnotPopup(doc, std::move(dictObject), obj);
else
annot = nullptr;
} else {
- annot = new Annot(doc, dictObject, obj);
+ annot = new Annot(doc, std::move(dictObject), obj);
}
}
diff --git a/poppler/Annot.h b/poppler/Annot.h
index e5151155..93ea3125 100644
--- a/poppler/Annot.h
+++ b/poppler/Annot.h
@@ -655,8 +655,8 @@ public:
};
Annot(PDFDoc *docA, PDFRectangle *rectA);
- Annot(PDFDoc *docA, Object *dictObject);
- Annot(PDFDoc *docA, Object *dictObject, Object *obj);
+ Annot(PDFDoc *docA, Object &&dictObject);
+ Annot(PDFDoc *docA, Object &&dictObject, const Object *obj);
bool isOk() { return ok; }
void incRefCnt();
@@ -782,7 +782,7 @@ protected:
class AnnotPopup: public Annot {
public:
AnnotPopup(PDFDoc *docA, PDFRectangle *rect);
- AnnotPopup(PDFDoc *docA, Object *dictObject, Object *obj);
+ AnnotPopup(PDFDoc *docA, Object &&dictObject, const Object *obj);
~AnnotPopup();
Object *getParentNF() { return &parent; }
@@ -809,7 +809,7 @@ public:
};
AnnotMarkup(PDFDoc *docA, PDFRectangle *rect);
- AnnotMarkup(PDFDoc *docA, Object *dictObject, Object *obj);
+ AnnotMarkup(PDFDoc *docA, Object &&dictObject, const Object *obj);
~AnnotMarkup();
// getters
@@ -846,7 +846,7 @@ protected:
AnnotExternalDataType exData; // ExData
private:
- void initialize(PDFDoc *docA, Dict *dict, Object *obj);
+ void initialize(PDFDoc *docA, Dict *dict);
};
//------------------------------------------------------------------------
@@ -869,7 +869,7 @@ public:
};
AnnotText(PDFDoc *docA, PDFRectangle *rect);
- AnnotText(PDFDoc *docA, Object *dictObject, Object *obj);
+ AnnotText(PDFDoc *docA, Object &&dictObject, const Object *obj);
~AnnotText();
void draw(Gfx *gfx, bool printing) override;
@@ -902,7 +902,7 @@ private:
class AnnotMovie: public Annot {
public:
AnnotMovie(PDFDoc *docA, PDFRectangle *rect, Movie *movieA);
- AnnotMovie(PDFDoc *docA, Object *dictObject, Object *obj);
+ AnnotMovie(PDFDoc *docA, Object &&dictObject, const Object *obj);
~AnnotMovie();
void draw(Gfx *gfx, bool printing) override;
@@ -926,7 +926,7 @@ class AnnotScreen: public Annot {
public:
AnnotScreen(PDFDoc *docA, PDFRectangle *rect);
- AnnotScreen(PDFDoc *docA, Object *dictObject, Object *obj);
+ AnnotScreen(PDFDoc *docA, Object &&dictObject, const Object *obj);
~AnnotScreen();
const GooString* getTitle() const { return title.get(); }
@@ -962,7 +962,7 @@ public:
};
AnnotLink(PDFDoc *docA, PDFRectangle *rect);
- AnnotLink(PDFDoc *docA, Object *dictObject, Object *obj);
+ AnnotLink(PDFDoc *docA, Object &&dictObject, const Object *obj);
~AnnotLink();
void draw(Gfx *gfx, bool printing) override;
@@ -1003,7 +1003,7 @@ public:
};
AnnotFreeText(PDFDoc *docA, PDFRectangle *rect, const DefaultAppearance &da);
- AnnotFreeText(PDFDoc *docA, Object *dictObject, Object *obj);
+ AnnotFreeText(PDFDoc *docA, Object &&dictObject, const Object *obj);
~AnnotFreeText();
void draw(Gfx *gfx, bool printing) override;
@@ -1066,7 +1066,7 @@ public:
};
AnnotLine(PDFDoc *docA, PDFRectangle *rect);
- AnnotLine(PDFDoc *docA, Object *dictObject, Object *obj);
+ AnnotLine(PDFDoc *docA, Object &&dictObject, const Object *obj);
~AnnotLine();
void draw(Gfx *gfx, bool printing) override;
@@ -1135,7 +1135,7 @@ class AnnotTextMarkup: public AnnotMarkup {
public:
AnnotTextMarkup(PDFDoc *docA, PDFRectangle *rect, AnnotSubtype subType);
- AnnotTextMarkup(PDFDoc *docA, Object *dictObject, Object *obj);
+ AnnotTextMarkup(PDFDoc *docA, Object &&dictObject, const Object *obj);
~AnnotTextMarkup();
void draw(Gfx *gfx, bool printing) override;
@@ -1162,7 +1162,7 @@ class AnnotStamp: public AnnotMarkup {
public:
AnnotStamp(PDFDoc *docA, PDFRectangle *rect);
- AnnotStamp(PDFDoc *docA, Object *dictObject, Object *obj);
+ AnnotStamp(PDFDoc *docA, Object &&dictObject, const Object *obj);
~AnnotStamp();
void setIcon(GooString *new_icon);
@@ -1185,7 +1185,7 @@ class AnnotGeometry: public AnnotMarkup {
public:
AnnotGeometry(PDFDoc *docA, PDFRectangle *rect, AnnotSubtype subType);
- AnnotGeometry(PDFDoc *docA, Object *dictObject, Object *obj);
+ AnnotGeometry(PDFDoc *docA, Object &&dictObject, const Object *obj);
~AnnotGeometry();
void draw(Gfx *gfx, bool printing) override;
@@ -1221,7 +1221,7 @@ public:
};
AnnotPolygon(PDFDoc *docA, PDFRectangle *rect, AnnotSubtype subType);
- AnnotPolygon(PDFDoc *docA, Object *dictObject, Object *obj);
+ AnnotPolygon(PDFDoc *docA, Object &&dictObject, const Object *obj);
~AnnotPolygon();
void draw(Gfx *gfx, bool printing) override;
@@ -1271,7 +1271,7 @@ public:
};
AnnotCaret(PDFDoc *docA, PDFRectangle *rect);
- AnnotCaret(PDFDoc *docA, Object *dictObject, Object *obj);
+ AnnotCaret(PDFDoc *docA, Object &&dictObject, const Object *obj);
~AnnotCaret();
void setSymbol(AnnotCaretSymbol new_symbol);
@@ -1296,7 +1296,7 @@ class AnnotInk: public AnnotMarkup {
public:
AnnotInk(PDFDoc *docA, PDFRectangle *rect);
- AnnotInk(PDFDoc *docA, Object *dictObject, Object *obj);
+ AnnotInk(PDFDoc *docA, Object &&dictObject, const Object *obj);
~AnnotInk();
void draw(Gfx *gfx, bool printing) override;
@@ -1331,7 +1331,7 @@ class AnnotFileAttachment: public AnnotMarkup {
public:
AnnotFileAttachment(PDFDoc *docA, PDFRectangle *rect, GooString *filename);
- AnnotFileAttachment(PDFDoc *docA, Object *dictObject, Object *obj);
+ AnnotFileAttachment(PDFDoc *docA, Object &&dictObject, const Object *obj);
~AnnotFileAttachment();
void draw(Gfx *gfx, bool printing) override;
@@ -1359,7 +1359,7 @@ class AnnotSound: public AnnotMarkup {
public:
AnnotSound(PDFDoc *docA, PDFRectangle *rect, Sound *soundA);
- AnnotSound(PDFDoc *docA, Object *dictObject, Object *obj);
+ AnnotSound(PDFDoc *docA, Object &&dictObject, const Object *obj);
~AnnotSound();
void draw(Gfx *gfx, bool printing) override;
@@ -1393,7 +1393,7 @@ public:
highlightModePush // P,T
};
- AnnotWidget(PDFDoc *docA, Object *dictObject, Object *obj);
+ AnnotWidget(PDFDoc *docA, Object &&dictObject, const Object *obj);
AnnotWidget(PDFDoc *docA, Object *dictObject, Object *obj, FormField *fieldA);
~AnnotWidget();
@@ -1472,7 +1472,7 @@ class Annot3D: public Annot {
public:
Annot3D(PDFDoc *docA, PDFRectangle *rect);
- Annot3D(PDFDoc *docA, Object *dictObject, Object *obj);
+ Annot3D(PDFDoc *docA, Object &&dictObject, const Object *obj);
~Annot3D();
// getters
@@ -1652,7 +1652,7 @@ public:
};
AnnotRichMedia(PDFDoc *docA, PDFRectangle *rect);
- AnnotRichMedia(PDFDoc *docA, Object *dictObject, Object *obj);
+ AnnotRichMedia(PDFDoc *docA, Object &&dictObject, const Object *obj);
~AnnotRichMedia();
Content* getContent() const;
@@ -1692,7 +1692,7 @@ public:
bool removeAnnot(Annot *annot);
private:
- Annot* createAnnot(Object* dictObject, Object *obj);
+ Annot* createAnnot(Object &&dictObject, const Object *obj);
Annot *findAnnot(Ref *ref);
PDFDoc *doc;
More information about the poppler
mailing list