correctly set the External flag for annotations loaded from documents

svn path=/trunk/KDE/kdegraphics/okular/; revision=746264
remotes/origin/KDE/4.0
Pino Toscano 19 years ago
parent 2eb9a53642
commit 870980da75
  1. 2
      core/textdocumentgenerator.cpp
  2. 2
      generators/djvu/generator_djvu.cpp
  3. 2
      generators/poppler/generator_pdf.cpp

@ -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;

@ -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;
}

@ -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);
}
}

Loading…
Cancel
Save