[Libreoffice-bugs] [Bug 143778] incorrect detection whether document changed

bugzilla-daemon at bugs.documentfoundation.org bugzilla-daemon at bugs.documentfoundation.org
Mon Aug 16 14:37:44 UTC 2021


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

Caolán McNamara <caolanm at redhat.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Assignee|libreoffice-bugs at lists.free |caolanm at redhat.com
                   |desktop.org                 |
             Status|NEW                         |ASSIGNED

--- Comment #4 from Caolán McNamara <caolanm at redhat.com> ---
The start of SwDrawShell::ExecDrawDlg has...

bool bChanged = pDoc->IsChanged();
pDoc->SetChanged(false);

and the end has

if (pDoc->IsChanged())
    GetShell().SetModified();
else
    if (bChanged)
        pDoc->SetChanged();

and before async dialogs the start and end happened before and after the dialog
appeared and disappeared. The intent seems to be unset the doc-changed and
restore its original state if the dialogs caused nothing to happen and to
explicitly set SetModified if something did.

Now the async dialogs callback happens after SwDrawShell::ExecDrawDlg has ended
and so the callbacks start with SdrModel::IsChanged at its original value
(restored by the end of ExecDrawDlg), not the "false" they were originally
written to expect

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/libreoffice-bugs/attachments/20210816/12eb2278/attachment-0001.htm>


More information about the Libreoffice-bugs mailing list