https://bugs.documentfoundation.org/show_bug.cgi?id=82402

--- Comment #13 from Maxim Monastirsky <[email protected]> ---
[Sorry for the long post]

We create/refresh saved thumbnail at different times, like file open/save/close
(see Bug 37775). But we do this only if the document is flagged as
non-modified, otherwise a generic icon is used, or a previously saved thumbnail
if there is any. In this bug a document is erroneously flagged as modified
right upon opening, so no valid thumbnail will be created.

The reason for this behavior (I guess) is that if a document is modified but
not saved, we don't want the unsaved modifications to be shown in the
thumbnail. What's not clear to me is:

1. This check seems to be needed only at file close, i.e. a user is closing the
file, while rejecting the changes he made to it. But I wonder why do we need to
refresh the recent list at all at this stage? In order to close a file, one
first needs to open it, isn't it? So the recent item is *already exists*. And
if modifications were made and were saved - then again, the thumbnail will be
updated already at this stage. The only uncovered case is when a user clears
the recent list using the "Clear List" menu item, while the document is open.
But I wonder whether it's a good idea to re-add the document to the list upon
closing, even though the user clearly showed his intention to keep the list
clear for now.

In case all of the above is correct - it means that the thumbnail creation
doesn't have to depend on whether the document was modified or not, and it will
solve this bug.

2. At least when the thumbnail creation method is called upon file open, why
should we care whether the document is flagged as modified (for some reason),
given that we know for sure that the document is just opened, and the user
hadn't a chance to make any manual changes to it?

As kendy is the one who introduced this is-modified check, would be great to
hear his opinion on this, and in particular what were the reasons for
introducing this check in the first place.

--------

But I must clarify 2 things:

1. The real bug here is that documents are flagged as modified while they're
not. (BTW I looked at SfxObjectShell::IsModified, and it seems that the
modified state comes from the embedded charts. I commented there the code that
checks the status of embedded objects, and this caused all of those files to
show thumbnails in the start center.)

2. I don't like the idea of changing a working code (which is always a recipe
for regressions), just to workaround some uncommon cases. We should consider
this only if we'll see a critical mass of documents that won't show in the
start center. We're still not there.

-- 
You are receiving this mail because:
You are the assignee for the bug.
_______________________________________________
Libreoffice-bugs mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/libreoffice-bugs

Reply via email to