https://bz.apache.org/ooo/show_bug.cgi?id=126869

--- Comment #39 from Arrigo Marchiori <[email protected]> ---
(still talking to myself ;-) from comment #38)
> When saving a Writer document ("Save" instead of "Save as") the sequence
> seems to be a bit different:
> 
>  1- close a fd linked to a temporary file (probably containing the final
> document)
> 
>  2- reopen the same file in read-only mode
> 
>  3- open the destination file in write-mode
> 
>  3b- close the destination file

This is a truncation!
It's probably done at main/sfx2/source/doc/docfile.cxx:1794
that is basically:
        aOriginalContent.setPropertyValue("Size", 0);

>  3c- reopen the destination file

File contents are (re)written here.

>  4- close the destination file
> 
>  5- close the source file
> 
> It's strange that the destination file is opened, then closed, then reopened.

This has now been solved: the first open-close cycle (steps 3-3b) is a
truncation. But I found out something else: file is reopened _later_ for
writing! It is a bit hard to debug what's going on; it will take some more
time.

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

Reply via email to