[okular] [Bug 425148] New: okular import of old embedded annotations does not import the original create/modify time stamp

bugzilla_noreply at kde.org bugzilla_noreply at kde.org
Sat Aug 8 20:50:28 BST 2020


https://bugs.kde.org/show_bug.cgi?id=425148

            Bug ID: 425148
           Summary: okular import of old embedded annotations does not
                    import the original create/modify time stamp
           Product: okular
           Version: unspecified
          Platform: Ubuntu Packages
                OS: Linux
            Status: REPORTED
          Severity: normal
          Priority: NOR
         Component: general
          Assignee: okular-devel at kde.org
          Reporter: jprorama at gmail.com
  Target Milestone: ---

SUMMARY

Observed with okular versions since 1.3.3 on Ubuntu 18.04.  When opening a PDF
with annotations using the old "internal format" storage the user is prompted
to save the annotations to the PDF file.


"This document contains annotations or form data that were saved internally by
a previous Okular version. Internal storage is no longer supported.
Please save to a file in order to move them if you want to continue to edit the
document."

When saving the annotations, the original create and modify time stamps are
lost and replaced with the current datetime.

STEPS TO REPRODUCE
1. use current version of okular to open a PDF with annotations stored in the
original internal storage (eg. okular xml file for pdf in 
~/.kde/share/apps/okular/docdata/)
2. the need to migrate is detected
3. saving the file to a new PDF preserves the original annotation.
4. the create and modify time stamps of from the original annotation are lost
and replaced with the current date.

OBSERVED RESULT

The original time stamps for create and modify of an annotation are lost on
import to the PDF and replaced with the current date.

EXPECTED RESULT

The original time stamps for create and modify of an annotation are should be
preserved and imported to the PDF.


SOFTWARE/OS VERSIONS
Windows: 
macOS: 
Linux/KDE Plasma: Ubuntu 18.04 is test system but any version of okular seems
to behave this way.
(available in About System)
KDE Plasma Version:  
KDE Frameworks Version:  5.44.0 and above
Qt Version: 5.9.5 (built against 5.9.5) and above

ADDITIONAL INFORMATION

This appears to be part of how the annotations are imported.  The annotation is
properly reconstructed from the original annotation but the metadata on the
annotation is not migrated to the new annotation format.

The migration logic seems to begin here: 

https://github.com/KDE/okular/blob/master/core/document.cpp#L1192

This appears to reach the code where the local data is converted to new
annotation format.

https://github.com/KDE/okular/blob/master/core/page.cpp#L811

The newly instantiated annotations don't appear to have their time stamps
explicitly set from the original so the new instance timestamps are the ones
that get saved.

-- 
You are receiving this mail because:
You are the assignee for the bug.


More information about the Okular-devel mailing list