D8642: Rework saving of annotations and form data

Albert Astals Cid noreply at phabricator.kde.org
Fri Nov 3 16:04:05 UTC 2017


aacid created this revision.
aacid added a project: Okular.
Restricted Application added a subscriber: Okular.

REVISION SUMMARY
  Changes are no longer saved as part of the local configuration files, they can be either saved back to file, to an .okular file (if the file format doesn't support annotations) or not saved at all.
  
  You are probably better having a look at each of the changes individually of
  git log  origin/master...origin/dont-use-docdata-for-annots-and-forms

TEST PLAN
  
  
  - Open pdf file, add anotation, close app
    - You get dialog about losing changes, check that save, discard, cancel all do what they say
  
  - Open png file, add anotation, close app
    - You get dialog about losing changes, check that save, discard, cancel all do what they say
      - Check for saving suggests saving as okular archive to not lose the annotation
        - Check that opening the saved .okular file indeed keeps the annotation
  
  - With old version of okular, add annotation to pdf file, then open with new version, see you get the top bar about having to migrate the contents, save it as a different file, then open again the original file with old version of okular and verify the "annotation that was saved in docdata" is gone, open the second file and confirm the annotation is there.
  
  - Open pdf file with forms for example autotests/data/formSamples.pdf and modify all fields, also add an annotation and move it, resize it, change its color and delete it. Now check that you can undo/redo and save at all of the steps of the stack. This is important because saving indeed is like an internal reload so the structures of the undo/redo stack need to be updated to the new values seamlessly
  
  - Open png file add an annotation and save it as okular archive. Then move the annotation, resize it, change its color and delete it. Now check that you can undo/redo and save at all of the steps of the stack. This is important because saving indeed is like an internal reload so the structures of the undo/redo stack need to be updated to the new values seamlessly

REPOSITORY
  R223 Okular

REVISION DETAIL
  https://phabricator.kde.org/D8642

AFFECTED FILES
  autotests/data/file1-docdata.xml
  autotests/documenttest.cpp
  autotests/parttest.cpp
  core/document.cpp
  core/document.h
  core/document_p.h
  core/documentcommands.cpp
  core/documentcommands_p.h
  core/generator.cpp
  core/generator.h
  core/observer.h
  core/page.cpp
  core/page.h
  core/page_p.h
  doc/index.docbook
  generators/kimgio/generator_kimgio.cpp
  generators/kimgio/generator_kimgio.h
  generators/poppler/generator_pdf.cpp
  generators/poppler/generator_pdf.h
  part.cpp
  part.h
  part.rc
  shell/shell.cpp
  shell/shell.h
  ui/annotationmodel.cpp
  ui/annotwindow.cpp
  ui/annotwindow.h
  ui/bookmarklist.cpp
  ui/formwidgets.cpp
  ui/formwidgets.h
  ui/pageview.cpp
  ui/pageview.h
  ui/pageviewmouseannotation.cpp
  ui/pageviewmouseannotation.h
  ui/pageviewutils.cpp
  ui/pageviewutils.h

To: aacid
Cc: #okular, aacid
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/okular-devel/attachments/20171103/a4de91b9/attachment.html>


More information about the Okular-devel mailing list