When a property of an annotation changes we need to invalidate the appearance stream so that next time it's drawn, it's regenerated. There's a method for that, but it's called only by the qt frontends, and sometimes unnecessarily (called when the property change doesn't affect the appearance of the annotation, for example).
Attached patches should fix this problem by moving the invalidation handling to the core (which also fixes the annots appearance stream regeneration in the glib frontend for free). Could Fabio or someone else check that this works for qt? Thanks!
pgp3ZpiCGHJ7R.pgp
Description: PGP signature
>From a7616c34611a2a0407977174aa2e3c08ccc28be9 Mon Sep 17 00:00:00 2001 From: Carlos Garcia Campos <[email protected]> Date: Sun, 30 Jun 2013 11:23:54 +0200 Subject: [PATCH 1/4] annots: do not set the default appearance state when invalidating appearances We are setting the default appareance state to Off and then we are updating AS dictionary to NULL in the XRef. The appearance state is only required when there's more than once appearance stream, but when invalidating the apperance we remove all streams. --- poppler/Annot.cc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/poppler/Annot.cc b/poppler/Annot.cc index 791a645..9e225d1 100644 --- a/poppler/Annot.cc +++ b/poppler/Annot.cc @@ -1504,7 +1504,8 @@ void Annot::invalidateAppearance() { delete appearStreams; appearStreams = NULL; - setAppearanceState("Off"); // Default appearance state + appearance.free(); + appearance.initNull(); Object obj1; obj1.initNull(); -- 1.7.10.4
>From e5b2424818e74ab98e77e044cf0ec0d68dc47ddc Mon Sep 17 00:00:00 2001 From: Carlos Garcia Campos <[email protected]> Date: Sun, 30 Jun 2013 11:40:15 +0200 Subject: [PATCH 2/4] annots: Do not update AP and AS entries if they are not present when invaliding the appaearance stream --- poppler/Annot.cc | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/poppler/Annot.cc b/poppler/Annot.cc index 9e225d1..a70ca47 100644 --- a/poppler/Annot.cc +++ b/poppler/Annot.cc @@ -1504,13 +1504,24 @@ void Annot::invalidateAppearance() { delete appearStreams; appearStreams = NULL; + delete appearState; + appearState = NULL; + + delete appearBBox; + appearBBox = NULL; + appearance.free(); appearance.initNull(); - Object obj1; + Object obj1, obj2; obj1.initNull(); - update ("AP", &obj1); // Remove AP - update ("AS", &obj1); // Remove AS + if (!annotObj.dictLookup("AP", &obj2)->isNull()) + update ("AP", &obj1); // Remove AP + obj2.free(); + + if (!annotObj.dictLookup("AS", &obj2)->isNull()) + update ("AS", &obj1); // Remove AS + obj2.free(); } double Annot::getXMin() { -- 1.7.10.4
>From 08e4adf8533b08ee24e575057f5d7dd2d312efd6 Mon Sep 17 00:00:00 2001 From: Carlos Garcia Campos <[email protected]> Date: Sun, 30 Jun 2013 11:44:59 +0200 Subject: [PATCH 3/4] annots: Remove unused variable --- poppler/Annot.cc | 1 - 1 file changed, 1 deletion(-) diff --git a/poppler/Annot.cc b/poppler/Annot.cc index a70ca47..5b62f3a 100644 --- a/poppler/Annot.cc +++ b/poppler/Annot.cc @@ -1082,7 +1082,6 @@ void AnnotAppearanceBBox::extendTo(double x, double y) { } void AnnotAppearanceBBox::getBBoxRect(double bbox[4]) const { - Object obj2; bbox[0] = minX - borderWidth; bbox[1] = minY - borderWidth; bbox[2] = maxX + borderWidth; -- 1.7.10.4
>From ad8a63140fbb5c7e7783a59cfd2cf1d264423f89 Mon Sep 17 00:00:00 2001 From: Carlos Garcia Campos <[email protected]> Date: Sun, 30 Jun 2013 13:14:07 +0200 Subject: [PATCH 4/4] annots: Invalidate the appearance stream when annot properties change Make invalidateAppearance() protected and only call it when properties that affect the appearance stream are updated. Remove all calls to invalidateAppearance() from qt frontend, this is now handled by the core and fixes the appearance stream regeneration in the glib frontend too. --- poppler/Annot.cc | 35 +++++++++++++++++++++++++++++++++++ poppler/Annot.h | 10 ++++++---- qt4/src/poppler-annotation.cc | 34 ---------------------------------- qt5/src/poppler-annotation.cc | 34 ---------------------------------- 4 files changed, 41 insertions(+), 72 deletions(-) diff --git a/poppler/Annot.cc b/poppler/Annot.cc index 5b62f3a..aa6581b 100644 --- a/poppler/Annot.cc +++ b/poppler/Annot.cc @@ -1344,6 +1344,7 @@ void Annot::setRect(double x1, double y1, double x2, double y2) { obj1.arrayAdd (obj2.initReal (rect->y2)); update("Rect", &obj1); + invalidateAppearance(); } GBool Annot::inRect(double x, double y) const { @@ -1436,6 +1437,7 @@ void Annot::setBorder(AnnotBorderArray *new_border) { } else { border = NULL; } + invalidateAppearance(); } void Annot::setColor(AnnotColor *new_color) { @@ -1450,6 +1452,7 @@ void Annot::setColor(AnnotColor *new_color) { } else { color = NULL; } + invalidateAppearance(); } void Annot::setPage(int pageIndex, GBool updateP) { @@ -2001,6 +2004,7 @@ void AnnotMarkup::setOpacity(double opacityA) { opacity = opacityA; obj1.initReal(opacity); update ("CA", &obj1); + invalidateAppearance(); } void AnnotMarkup::setDate(GooString *new_date) { @@ -2159,6 +2163,7 @@ void AnnotText::setIcon(GooString *new_icon) { Object obj1; obj1.initName (icon->getCString()); update("Name", &obj1); + invalidateAppearance(); } #define ANNOT_TEXT_AP_NOTE \ @@ -2704,6 +2709,11 @@ void AnnotFreeText::initialize(PDFDoc *docA, Dict *dict) { obj1.free(); } +void AnnotFreeText::setContents(GooString *new_content) { + Annot::setContents(new_content); + invalidateAppearance(); +} + void AnnotFreeText::setAppearanceString(GooString *new_string) { delete appearanceString; @@ -2716,6 +2726,7 @@ void AnnotFreeText::setAppearanceString(GooString *new_string) { Object obj1; obj1.initString(appearanceString->copy()); update ("DA", &obj1); + invalidateAppearance(); } void AnnotFreeText::setQuadding(AnnotFreeTextQuadding new_quadding) { @@ -2723,6 +2734,7 @@ void AnnotFreeText::setQuadding(AnnotFreeTextQuadding new_quadding) { quadding = new_quadding; obj1.initInt((int)quadding); update ("Q", &obj1); + invalidateAppearance(); } void AnnotFreeText::setStyleString(GooString *new_string) { @@ -2773,6 +2785,7 @@ void AnnotFreeText::setCalloutLine(AnnotCalloutLine *line) { } update("CL", &obj1); + invalidateAppearance(); } void AnnotFreeText::setIntent(AnnotFreeTextIntent new_intent) { @@ -3189,6 +3202,12 @@ void AnnotLine::initialize(PDFDoc *docA, Dict *dict) { obj1.free(); } +void AnnotLine::setContents(GooString *new_content) { + Annot::setContents(new_content); + if (caption) + invalidateAppearance(); +} + void AnnotLine::setVertices(double x1, double y1, double x2, double y2) { Object obj1, obj2; @@ -3204,6 +3223,7 @@ void AnnotLine::setVertices(double x1, double y1, double x2, double y2) { obj1.arrayAdd( obj2.initReal(y2) ); update("L", &obj1); + invalidateAppearance(); } void AnnotLine::setStartEndStyle(AnnotLineEndingStyle start, AnnotLineEndingStyle end) { @@ -3217,6 +3237,7 @@ void AnnotLine::setStartEndStyle(AnnotLineEndingStyle start, AnnotLineEndingStyl obj1.arrayAdd( obj2.initName(convertAnnotLineEndingStyle( endStyle )) ); update("LE", &obj1); + invalidateAppearance(); } void AnnotLine::setInteriorColor(AnnotColor *new_color) { @@ -3230,6 +3251,7 @@ void AnnotLine::setInteriorColor(AnnotColor *new_color) { } else { interiorColor = NULL; } + invalidateAppearance(); } void AnnotLine::setLeaderLineLength(double len) { @@ -3238,6 +3260,7 @@ void AnnotLine::setLeaderLineLength(double len) { leaderLineLength = len; obj1.initReal(len); update ("LL", &obj1); + invalidateAppearance(); } void AnnotLine::setLeaderLineExtension(double len) { @@ -3250,6 +3273,7 @@ void AnnotLine::setLeaderLineExtension(double len) { // LL is required if LLE is present obj1.initReal(leaderLineLength); update ("LL", &obj1); + invalidateAppearance(); } void AnnotLine::setCaption(bool new_cap) { @@ -3258,6 +3282,7 @@ void AnnotLine::setCaption(bool new_cap) { caption = new_cap; obj1.initBool(new_cap); update ("Cap", &obj1); + invalidateAppearance(); } void AnnotLine::setIntent(AnnotLineIntent new_intent) { @@ -3600,6 +3625,7 @@ void AnnotTextMarkup::setType(AnnotSubtype new_type) { type = new_type; update("Subtype", &obj1); + invalidateAppearance(); } void AnnotTextMarkup::setQuadrilaterals(AnnotQuadrilaterals *quadPoints) { @@ -3620,6 +3646,7 @@ void AnnotTextMarkup::setQuadrilaterals(AnnotQuadrilaterals *quadPoints) { quadrilaterals = new AnnotQuadrilaterals(obj1.getArray(), rect); annotObj.dictSet ("QuadPoints", &obj1); + invalidateAppearance(); } void AnnotTextMarkup::draw(Gfx *gfx, GBool printing) { @@ -5330,6 +5357,7 @@ void AnnotStamp::setIcon(GooString *new_icon) { Object obj1; obj1.initName (icon->getCString()); update("Name", &obj1); + invalidateAppearance(); } //------------------------------------------------------------------------ @@ -5417,6 +5445,7 @@ void AnnotGeometry::setType(AnnotSubtype new_type) { type = new_type; update("Subtype", &obj1); + invalidateAppearance(); } void AnnotGeometry::setInteriorColor(AnnotColor *new_color) { @@ -5430,6 +5459,7 @@ void AnnotGeometry::setInteriorColor(AnnotColor *new_color) { } else { interiorColor = NULL; } + invalidateAppearance(); } void AnnotGeometry::draw(Gfx *gfx, GBool printing) { @@ -5697,6 +5727,7 @@ void AnnotPolygon::setType(AnnotSubtype new_type) { type = new_type; update("Subtype", &obj1); + invalidateAppearance(); } void AnnotPolygon::setVertices(AnnotPath *path) { @@ -5713,6 +5744,7 @@ void AnnotPolygon::setVertices(AnnotPath *path) { vertices = new AnnotPath(obj1.getArray()); update("Vertices", &obj1); + invalidateAppearance(); } void AnnotPolygon::setStartEndStyle(AnnotLineEndingStyle start, AnnotLineEndingStyle end) { @@ -5726,6 +5758,7 @@ void AnnotPolygon::setStartEndStyle(AnnotLineEndingStyle start, AnnotLineEndingS obj1.arrayAdd( obj2.initName(convertAnnotLineEndingStyle( endStyle )) ); update("LE", &obj1); + invalidateAppearance(); } void AnnotPolygon::setInteriorColor(AnnotColor *new_color) { @@ -5739,6 +5772,7 @@ void AnnotPolygon::setInteriorColor(AnnotColor *new_color) { } else { interiorColor = NULL; } + invalidateAppearance(); } void AnnotPolygon::setIntent(AnnotPolygonIntent new_intent) { @@ -5990,6 +6024,7 @@ void AnnotInk::setInkList(AnnotPath **paths, int n_paths) { parseInkList(obj1.getArray()); annotObj.dictSet ("InkList", &obj1); + invalidateAppearance(); } void AnnotInk::draw(Gfx *gfx, GBool printing) { diff --git a/poppler/Annot.h b/poppler/Annot.h index 7be2114..48a7d3d 100644 --- a/poppler/Annot.h +++ b/poppler/Annot.h @@ -561,7 +561,7 @@ public: // Sets the annot contents to new_content // new_content should never be NULL - void setContents(GooString *new_content); + virtual void setContents(GooString *new_content); void setName(GooString *new_name); void setModified(GooString *new_date); void setFlags(Guint new_flags); @@ -574,9 +574,6 @@ public: void setAppearanceState(const char *state); - // Delete appearance streams and reset appearance state - void invalidateAppearance(); - // getters PDFDoc *getDoc() const { return doc; } XRef *getXRef() const { return xref; } @@ -629,6 +626,9 @@ protected: // and sets M to the current time void update(const char *key, Object *value); + // Delete appearance streams and reset appearance state + void invalidateAppearance(); + int refCnt; Object annotObj; @@ -902,6 +902,7 @@ public: virtual void draw(Gfx *gfx, GBool printing); virtual Object *getAppearanceResDict(Object *dest); + virtual void setContents(GooString *new_content); void setAppearanceString(GooString *new_string); void setQuadding(AnnotFreeTextQuadding new_quadding); @@ -965,6 +966,7 @@ public: virtual void draw(Gfx *gfx, GBool printing); virtual Object *getAppearanceResDict(Object *dest); + virtual void setContents(GooString *new_content); void setVertices(double x1, double y1, double x2, double y2); void setStartEndStyle(AnnotLineEndingStyle start, AnnotLineEndingStyle end); diff --git a/qt4/src/poppler-annotation.cc b/qt4/src/poppler-annotation.cc index 5ecea80..ea9d878 100644 --- a/qt4/src/poppler-annotation.cc +++ b/qt4/src/poppler-annotation.cc @@ -1117,7 +1117,6 @@ void Annotation::setContents( const QString &contents ) GooString *s = QStringToUnicodeGooString(contents); d->pdfAnnot->setContents(s); delete s; - d->pdfAnnot->invalidateAppearance(); } QString Annotation::uniqueName() const @@ -1281,7 +1280,6 @@ void Annotation::setFlags( int flags ) } d->pdfAnnot->setFlags(toPdfFlags( flags )); - d->pdfAnnot->invalidateAppearance(); } QRectF Annotation::boundary() const @@ -1307,7 +1305,6 @@ void Annotation::setBoundary( const QRectF &boundary ) PDFRectangle rect = d->toPdfRectangle(boundary); d->pdfAnnot->setRect(&rect); - d->pdfAnnot->invalidateAppearance(); } Annotation::Style Annotation::style() const @@ -1388,7 +1385,6 @@ void Annotation::setStyle( const Annotation::Style& style ) border->setHorizontalCorner( style.xCorners() ); border->setVerticalCorner( style.yCorners() ); d->pdfAnnot->setBorder(border); - d->pdfAnnot->invalidateAppearance(); } Annotation::Popup Annotation::popup() const @@ -1801,7 +1797,6 @@ void TextAnnotation::setTextIcon( const QString &icon ) QByteArray encoded = icon.toLatin1(); GooString s(encoded.constData()); textann->setIcon(&s); - d->pdfAnnot->invalidateAppearance(); } } @@ -1849,7 +1844,6 @@ void TextAnnotation::setTextFont( const QFont &font ) GooString * da = TextAnnotationPrivate::toAppearanceString(font); ftextann->setAppearanceString(da); delete da; - d->pdfAnnot->invalidateAppearance(); } int TextAnnotation::inplaceAlign() const @@ -1882,7 +1876,6 @@ void TextAnnotation::setInplaceAlign( int align ) { AnnotFreeText * ftextann = static_cast<AnnotFreeText*>(d->pdfAnnot); ftextann->setQuadding((AnnotFreeText::AnnotFreeTextQuadding)align); - d->pdfAnnot->invalidateAppearance(); } } @@ -1951,7 +1944,6 @@ void TextAnnotation::setCalloutPoints( const QVector<QPointF> &points ) if (count == 0) { ftextann->setCalloutLine(0); - d->pdfAnnot->invalidateAppearance(); return; } @@ -1981,7 +1973,6 @@ void TextAnnotation::setCalloutPoints( const QVector<QPointF> &points ) ftextann->setCalloutLine(callout); delete callout; - d->pdfAnnot->invalidateAppearance(); } TextAnnotation::InplaceIntent TextAnnotation::inplaceIntent() const @@ -2014,7 +2005,6 @@ void TextAnnotation::setInplaceIntent( TextAnnotation::InplaceIntent intent ) { AnnotFreeText * ftextann = static_cast<AnnotFreeText*>(d->pdfAnnot); ftextann->setIntent((AnnotFreeText::AnnotFreeTextIntent)intent); - d->pdfAnnot->invalidateAppearance(); } } @@ -2301,8 +2291,6 @@ void LineAnnotation::setLinePoints( const QLinkedList<QPointF> &points ) polyann->setVertices(p); delete p; } - - d->pdfAnnot->invalidateAppearance(); } LineAnnotation::TermStyle LineAnnotation::lineStartStyle() const @@ -2344,8 +2332,6 @@ void LineAnnotation::setLineStartStyle( LineAnnotation::TermStyle style ) AnnotPolygon *polyann = static_cast<AnnotPolygon*>(d->pdfAnnot); polyann->setStartEndStyle((AnnotLineEndingStyle)style, polyann->getEndStyle()); } - - d->pdfAnnot->invalidateAppearance(); } LineAnnotation::TermStyle LineAnnotation::lineEndStyle() const @@ -2387,8 +2373,6 @@ void LineAnnotation::setLineEndStyle( LineAnnotation::TermStyle style ) AnnotPolygon *polyann = static_cast<AnnotPolygon*>(d->pdfAnnot); polyann->setStartEndStyle(polyann->getStartStyle(), (AnnotLineEndingStyle)style); } - - d->pdfAnnot->invalidateAppearance(); } bool LineAnnotation::isLineClosed() const @@ -2428,8 +2412,6 @@ void LineAnnotation::setLineClosed( bool closed ) if (polyann->getIntent() == AnnotPolygon::polygonDimension) polyann->setIntent( AnnotPolygon::polylineDimension ); } - - d->pdfAnnot->invalidateAppearance(); } } @@ -2478,8 +2460,6 @@ void LineAnnotation::setLineInnerColor( const QColor &color ) AnnotPolygon *polyann = static_cast<AnnotPolygon*>(d->pdfAnnot); polyann->setInteriorColor(c); } - - d->pdfAnnot->invalidateAppearance(); } double LineAnnotation::lineLeadingForwardPoint() const @@ -2512,7 +2492,6 @@ void LineAnnotation::setLineLeadingForwardPoint( double point ) { AnnotLine *lineann = static_cast<AnnotLine*>(d->pdfAnnot); lineann->setLeaderLineLength(point); - d->pdfAnnot->invalidateAppearance(); } } @@ -2546,7 +2525,6 @@ void LineAnnotation::setLineLeadingBackPoint( double point ) { AnnotLine *lineann = static_cast<AnnotLine*>(d->pdfAnnot); lineann->setLeaderLineExtension(point); - d->pdfAnnot->invalidateAppearance(); } } @@ -2580,7 +2558,6 @@ void LineAnnotation::setLineShowCaption( bool show ) { AnnotLine *lineann = static_cast<AnnotLine*>(d->pdfAnnot); lineann->setCaption(show); - d->pdfAnnot->invalidateAppearance(); } } @@ -2637,8 +2614,6 @@ void LineAnnotation::setLineIntent( LineAnnotation::LineIntent intent ) polyann->setIntent( AnnotPolygon::polylineDimension ); } } - - d->pdfAnnot->invalidateAppearance(); } @@ -2776,8 +2751,6 @@ void GeomAnnotation::setGeomType( GeomAnnotation::GeomType type ) geomann->setType(Annot::typeSquare); else // GeomAnnotation::InscribedCircle geomann->setType(Annot::typeCircle); - - d->pdfAnnot->invalidateAppearance(); } QColor GeomAnnotation::geomInnerColor() const @@ -2803,7 +2776,6 @@ void GeomAnnotation::setGeomInnerColor( const QColor &color ) AnnotGeometry * geomann = static_cast<AnnotGeometry*>(d->pdfAnnot); geomann->setInteriorColor(convertQColor( color )); - d->pdfAnnot->invalidateAppearance(); } @@ -3061,7 +3033,6 @@ void HighlightAnnotation::setHighlightType( HighlightAnnotation::HighlightType t AnnotTextMarkup * hlann = static_cast<AnnotTextMarkup*>(d->pdfAnnot); hlann->setType(HighlightAnnotationPrivate::toAnnotSubType( type )); - d->pdfAnnot->invalidateAppearance(); } QList< HighlightAnnotation::Quad > HighlightAnnotation::highlightQuads() const @@ -3089,7 +3060,6 @@ void HighlightAnnotation::setHighlightQuads( const QList< HighlightAnnotation::Q AnnotQuadrilaterals * quadrilaterals = d->toQuadrilaterals(quads); hlann->setQuadrilaterals(quadrilaterals); delete quadrilaterals; - d->pdfAnnot->invalidateAppearance(); } @@ -3215,7 +3185,6 @@ void StampAnnotation::setStampIconName( const QString &name ) QByteArray encoded = name.toLatin1(); GooString s(encoded.constData()); stampann->setIcon(&s); - d->pdfAnnot->invalidateAppearance(); } /** InkAnnotation [Annotation] */ @@ -3428,8 +3397,6 @@ void InkAnnotation::setInkPaths( const QList< QLinkedList<QPointF> > &paths ) for (int i = 0; i < pathsNumber; ++i) delete annotpaths[i]; delete[] annotpaths; - - d->pdfAnnot->invalidateAppearance(); } @@ -3897,7 +3864,6 @@ void CaretAnnotation::setCaretSymbol( CaretAnnotation::CaretSymbol symbol ) AnnotCaret * caretann = static_cast<AnnotCaret *>(d->pdfAnnot); caretann->setSymbol((AnnotCaret::AnnotCaretSymbol)symbol); - d->pdfAnnot->invalidateAppearance(); } /** FileAttachmentAnnotation [Annotation] */ diff --git a/qt5/src/poppler-annotation.cc b/qt5/src/poppler-annotation.cc index 956e028..90654fc 100644 --- a/qt5/src/poppler-annotation.cc +++ b/qt5/src/poppler-annotation.cc @@ -1114,7 +1114,6 @@ void Annotation::setContents( const QString &contents ) GooString *s = QStringToUnicodeGooString(contents); d->pdfAnnot->setContents(s); delete s; - d->pdfAnnot->invalidateAppearance(); } QString Annotation::uniqueName() const @@ -1278,7 +1277,6 @@ void Annotation::setFlags( int flags ) } d->pdfAnnot->setFlags(toPdfFlags( flags )); - d->pdfAnnot->invalidateAppearance(); } QRectF Annotation::boundary() const @@ -1304,7 +1302,6 @@ void Annotation::setBoundary( const QRectF &boundary ) PDFRectangle rect = d->toPdfRectangle(boundary); d->pdfAnnot->setRect(&rect); - d->pdfAnnot->invalidateAppearance(); } Annotation::Style Annotation::style() const @@ -1385,7 +1382,6 @@ void Annotation::setStyle( const Annotation::Style& style ) border->setHorizontalCorner( style.xCorners() ); border->setVerticalCorner( style.yCorners() ); d->pdfAnnot->setBorder(border); - d->pdfAnnot->invalidateAppearance(); } Annotation::Popup Annotation::popup() const @@ -1798,7 +1794,6 @@ void TextAnnotation::setTextIcon( const QString &icon ) QByteArray encoded = icon.toLatin1(); GooString s(encoded.constData()); textann->setIcon(&s); - d->pdfAnnot->invalidateAppearance(); } } @@ -1846,7 +1841,6 @@ void TextAnnotation::setTextFont( const QFont &font ) GooString * da = TextAnnotationPrivate::toAppearanceString(font); ftextann->setAppearanceString(da); delete da; - d->pdfAnnot->invalidateAppearance(); } int TextAnnotation::inplaceAlign() const @@ -1879,7 +1873,6 @@ void TextAnnotation::setInplaceAlign( int align ) { AnnotFreeText * ftextann = static_cast<AnnotFreeText*>(d->pdfAnnot); ftextann->setQuadding((AnnotFreeText::AnnotFreeTextQuadding)align); - d->pdfAnnot->invalidateAppearance(); } } @@ -1938,7 +1931,6 @@ void TextAnnotation::setCalloutPoints( const QVector<QPointF> &points ) if (count == 0) { ftextann->setCalloutLine(0); - d->pdfAnnot->invalidateAppearance(); return; } @@ -1968,7 +1960,6 @@ void TextAnnotation::setCalloutPoints( const QVector<QPointF> &points ) ftextann->setCalloutLine(callout); delete callout; - d->pdfAnnot->invalidateAppearance(); } TextAnnotation::InplaceIntent TextAnnotation::inplaceIntent() const @@ -2001,7 +1992,6 @@ void TextAnnotation::setInplaceIntent( TextAnnotation::InplaceIntent intent ) { AnnotFreeText * ftextann = static_cast<AnnotFreeText*>(d->pdfAnnot); ftextann->setIntent((AnnotFreeText::AnnotFreeTextIntent)intent); - d->pdfAnnot->invalidateAppearance(); } } @@ -2288,8 +2278,6 @@ void LineAnnotation::setLinePoints( const QLinkedList<QPointF> &points ) polyann->setVertices(p); delete p; } - - d->pdfAnnot->invalidateAppearance(); } LineAnnotation::TermStyle LineAnnotation::lineStartStyle() const @@ -2331,8 +2319,6 @@ void LineAnnotation::setLineStartStyle( LineAnnotation::TermStyle style ) AnnotPolygon *polyann = static_cast<AnnotPolygon*>(d->pdfAnnot); polyann->setStartEndStyle((AnnotLineEndingStyle)style, polyann->getEndStyle()); } - - d->pdfAnnot->invalidateAppearance(); } LineAnnotation::TermStyle LineAnnotation::lineEndStyle() const @@ -2374,8 +2360,6 @@ void LineAnnotation::setLineEndStyle( LineAnnotation::TermStyle style ) AnnotPolygon *polyann = static_cast<AnnotPolygon*>(d->pdfAnnot); polyann->setStartEndStyle(polyann->getStartStyle(), (AnnotLineEndingStyle)style); } - - d->pdfAnnot->invalidateAppearance(); } bool LineAnnotation::isLineClosed() const @@ -2415,8 +2399,6 @@ void LineAnnotation::setLineClosed( bool closed ) if (polyann->getIntent() == AnnotPolygon::polygonDimension) polyann->setIntent( AnnotPolygon::polylineDimension ); } - - d->pdfAnnot->invalidateAppearance(); } } @@ -2465,8 +2447,6 @@ void LineAnnotation::setLineInnerColor( const QColor &color ) AnnotPolygon *polyann = static_cast<AnnotPolygon*>(d->pdfAnnot); polyann->setInteriorColor(c); } - - d->pdfAnnot->invalidateAppearance(); } double LineAnnotation::lineLeadingForwardPoint() const @@ -2499,7 +2479,6 @@ void LineAnnotation::setLineLeadingForwardPoint( double point ) { AnnotLine *lineann = static_cast<AnnotLine*>(d->pdfAnnot); lineann->setLeaderLineLength(point); - d->pdfAnnot->invalidateAppearance(); } } @@ -2533,7 +2512,6 @@ void LineAnnotation::setLineLeadingBackPoint( double point ) { AnnotLine *lineann = static_cast<AnnotLine*>(d->pdfAnnot); lineann->setLeaderLineExtension(point); - d->pdfAnnot->invalidateAppearance(); } } @@ -2567,7 +2545,6 @@ void LineAnnotation::setLineShowCaption( bool show ) { AnnotLine *lineann = static_cast<AnnotLine*>(d->pdfAnnot); lineann->setCaption(show); - d->pdfAnnot->invalidateAppearance(); } } @@ -2624,8 +2601,6 @@ void LineAnnotation::setLineIntent( LineAnnotation::LineIntent intent ) polyann->setIntent( AnnotPolygon::polylineDimension ); } } - - d->pdfAnnot->invalidateAppearance(); } @@ -2763,8 +2738,6 @@ void GeomAnnotation::setGeomType( GeomAnnotation::GeomType type ) geomann->setType(Annot::typeSquare); else // GeomAnnotation::InscribedCircle geomann->setType(Annot::typeCircle); - - d->pdfAnnot->invalidateAppearance(); } QColor GeomAnnotation::geomInnerColor() const @@ -2790,7 +2763,6 @@ void GeomAnnotation::setGeomInnerColor( const QColor &color ) AnnotGeometry * geomann = static_cast<AnnotGeometry*>(d->pdfAnnot); geomann->setInteriorColor(convertQColor( color )); - d->pdfAnnot->invalidateAppearance(); } @@ -3048,7 +3020,6 @@ void HighlightAnnotation::setHighlightType( HighlightAnnotation::HighlightType t AnnotTextMarkup * hlann = static_cast<AnnotTextMarkup*>(d->pdfAnnot); hlann->setType(HighlightAnnotationPrivate::toAnnotSubType( type )); - d->pdfAnnot->invalidateAppearance(); } QList< HighlightAnnotation::Quad > HighlightAnnotation::highlightQuads() const @@ -3076,7 +3047,6 @@ void HighlightAnnotation::setHighlightQuads( const QList< HighlightAnnotation::Q AnnotQuadrilaterals * quadrilaterals = d->toQuadrilaterals(quads); hlann->setQuadrilaterals(quadrilaterals); delete quadrilaterals; - d->pdfAnnot->invalidateAppearance(); } @@ -3202,7 +3172,6 @@ void StampAnnotation::setStampIconName( const QString &name ) QByteArray encoded = name.toLatin1(); GooString s(encoded.constData()); stampann->setIcon(&s); - d->pdfAnnot->invalidateAppearance(); } /** InkAnnotation [Annotation] */ @@ -3415,8 +3384,6 @@ void InkAnnotation::setInkPaths( const QList< QLinkedList<QPointF> > &paths ) for (int i = 0; i < pathsNumber; ++i) delete annotpaths[i]; delete[] annotpaths; - - d->pdfAnnot->invalidateAppearance(); } @@ -3884,7 +3851,6 @@ void CaretAnnotation::setCaretSymbol( CaretAnnotation::CaretSymbol symbol ) AnnotCaret * caretann = static_cast<AnnotCaret *>(d->pdfAnnot); caretann->setSymbol((AnnotCaret::AnnotCaretSymbol)symbol); - d->pdfAnnot->invalidateAppearance(); } /** FileAttachmentAnnotation [Annotation] */ -- 1.7.10.4
-- Carlos Garcia Campos PGP key: http://pgp.mit.edu:11371/pks/lookup?op=get&search=0x523E6462
_______________________________________________ poppler mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/poppler
