correctly set the External flag for annotations loaded from documents

svn path=/trunk/KDE/kdegraphics/okular/; revision=746264
This commit is contained in:
Pino Toscano 2007-12-08 13:45:06 +00:00
parent 2eb9a53642
commit 870980da75
3 changed files with 6 additions and 0 deletions

View file

@ -93,6 +93,8 @@ void TextDocumentGeneratorPrivate::addAnnotation( Annotation *annotation, int cu
if ( !annotation )
return;
annotation->setFlags( annotation->flags() | Okular::Annotation::External );
AnnotationPosition position;
position.annotation = annotation;
position.startPosition = cursorBegin;

View file

@ -448,6 +448,8 @@ Okular::Annotation* DjVuGenerator::convertKDjVuAnnotation( int w, int h, KDjVu::
uid.chop( 1 );
uid.remove( QLatin1Char( '-' ) );
newann->setUniqueName( uid );
// is external
newann->setFlags( newann->flags() | Okular::Annotation::External );
}
return newann;
}

View file

@ -1261,6 +1261,8 @@ void PDFGenerator::addAnnotations( Poppler::Page * popplerPage, Okular::Page * p
QString contents = newann->contents();
contents.replace( QLatin1Char( '\r' ), QLatin1Char( '\n' ) );
newann->setContents( contents );
// explicitely mark as external
newann->setFlags( newann->flags() | Okular::Annotation::External );
page->addAnnotation(newann);
}
}