• Giuseppe Castagno's avatar
    tdf#82744: fix WebDAV lock/unlock behaviour - part 3 · b4576f3d
    Giuseppe Castagno yazdı
    Changes done to the code in sfx2, ucbhelper, ucb, unotools in no particular order
    
    - add method helpers to call the ucb lock/unlock
    
    - add lock/unlock 'real' management
    
    - make DateChange property retrieval working for WebDAV as well
    
    - add check for changed content of a WebDAV file, in order to reload
    it correctly when 'Edit Mode' command is activated from GUI
    
    - Unlock WebDAV file while saving only if explicitly enabled
      Needed in order to avoid the small window of file unlocked state that
      opens while saving a file.
      When saving LO actually does as follows:
      - unlock the prevoius version of the file
      - prepares operations to save the modified version
      - lock the new file
      - save the new version
    
    - the lock method is enabled if the DAV resource supports it.
    In case the lock is not supported, for example example DAV with lock
    disabled, the lock method is disabled.
    
    Exception: when the resource is first created and the lock is not
    supported: a lock command is sent anyway, because if the resource is not
    yet present, there is no method to detect the lock/unlock availability
    in this case.
    
    - cppcheck:noExplicitConstructor
    
    Change-Id: I0aa876c4e3364d86e5740977b97f3db9a01e4491
    Reviewed-on: https://gerrit.libreoffice.org/17189Reviewed-by: 's avatarJan Holesovsky <kendy@collabora.com>
    Tested-by: 's avatarJan Holesovsky <kendy@collabora.com>
    b4576f3d
mediadescriptor.cxx 25.2 KB