Commit 13708e8f authored by Albert Astals Cid's avatar Albert Astals Cid Committed by Albert Astals Cid

Annot: Remove some inc/defRef by Object moving

parent aa864c87
......@@ -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;
......
This diff is collapsed.
......@@ -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;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment