diff --git a/core/document.cpp b/core/document.cpp index 0ebc34edb..7c511541c 100644 --- a/core/document.cpp +++ b/core/document.cpp @@ -2356,7 +2356,6 @@ void Document::modifyPageAnnotation( int page, Annotation * newannotation ) if ( !d->m_generator || !kp ) return; - kp->d->modifyAnnotation( newannotation ); // notify observers about the change foreachObserver( notifyPageChanged( page, DocumentObserver::Annotations ) ); } diff --git a/core/page.cpp b/core/page.cpp index 9f7400da7..3e4c07cc7 100644 --- a/core/page.cpp +++ b/core/page.cpp @@ -596,34 +596,6 @@ void Page::addAnnotation( Annotation * annotation ) m_rects.append( rect ); } -void PagePrivate::modifyAnnotation(Annotation * newannotation ) -{ - if(!newannotation) - return; - - QLinkedList< Annotation * >::iterator aIt = m_page->m_annotations.begin(), aEnd = m_page->m_annotations.end(); - for ( ; aIt != aEnd; ++aIt ) - { - if((*aIt)==newannotation) - return; //modified already - if((*aIt) && (*aIt)->uniqueName()==newannotation->uniqueName()) - { - int rectfound = false; - QLinkedList< ObjectRect * >::iterator it = m_page->m_rects.begin(), end = m_page->m_rects.end(); - for ( ; it != end && !rectfound; ++it ) - if ( ( (*it)->objectType() == ObjectRect::OAnnotation ) && ( (*it)->object() == (*aIt) ) ) - { - delete *it; - *it = new AnnotationObjectRect( newannotation ); - rectfound = true; - } - delete *aIt; - *aIt = newannotation; - break; - } - } -} - bool Page::removeAnnotation( Annotation * annotation ) { if ( !annotation || ( annotation->flags() & Annotation::DenyDelete ) ) diff --git a/core/page_p.h b/core/page_p.h index 72e330e53..38caeabe4 100644 --- a/core/page_p.h +++ b/core/page_p.h @@ -66,13 +66,6 @@ class PagePrivate */ void saveLocalContents( QDomNode & parentNode, QDomDocument & document, PageItems what = AllPageItems ) const; - /** - * Modifies an existing annotation by replacing it with a new @p annotation. - * - * The unique name is used to find the old annotation. - */ - void modifyAnnotation( Annotation * annotation ); - /** * Rotates the image and object rects of the page to the given @p orientation. */