• László Németh's avatar
    tdf#107690 OOXML import/export of setting "Open as read-only" · 9a5c56a9
    László Németh yazdı
    Import custom document property _MarkAsFinal as LoadReadonly
    setting, export LoadReadonly as _MarkAsFinal in DOCX, XLSX
    and PPTX documents.
    
    Before this fix, LibreOffice opened read-only OOXML documents
    as editable, also saved and exported _MarkAsFinal=true silently,
    resulting unintented read-only warning info bar in MSO.
    
    This commit improves interoperability a lot, because this is a
    basic document protection of MSO, recommended on its UI.
    
    Note: LoadReadonly (on File->Properties...->Security, property
    "Open file read-only") doesn't show "Edit read-only" info bar
    from commit 630186ff,
    but it's still possible to switch on editing by Edit->Edit Mode.
    MSO shows info bar for _MarkAsFinal. (There is an advantage to
    hide the info bar in LibreOffice in a mixed environment,
    to avoid overwriting of press-ready MSO files by LibreOffice.)
    
    Note 2: Other differences of LoadReadonly in LO and _MarkAsFinal
    in MSO: (1) Switching on editing doesn't remove the LoadReadonly
    property automatically in LO. (2) Saving with LoadReadonly doesn't
    switch off editing of the actual (still opened) document in LO.
    
    Change-Id: Ie279c0670090d075103384cfa44ff1c2a2898216
    Reviewed-on: https://gerrit.libreoffice.org/56180
    Tested-by: Jenkins
    Reviewed-by: 's avatarLászló Németh <nemeth@numbertext.org>
    9a5c56a9
excdoc.cxx 31.2 KB