https://bugs.freedesktop.org/show_bug.cgi?id=56562

--- Comment #3 from Matthew Francis <[email protected]> ---
Dug into this one a little further. The issue is in platform independent code,
although quite possibly only OSX consumes the information in question.

When saving an ODF, this happens during the process:
    SvXMLExport::exportDoc
        ImplExportMeta
            _ExportMeta
                xDocProps->setGenerator(generator);

    SfxObjectShell::DoSaveCompleted
        getDocProperties()->setGenerator(
::utl::DocInfoHelper::GetGeneratorString() );
        ...
        xModel->attachResource( aURL, aMediaDescr );
        ...
        InvalidateName()

Because setGenerator() is first called beneath SvXMLExport::exportDoc(), the
later call to setGenerator() with the same string in
SfxObjectShell::DoSaveCompleted() has no effect, and the window title isn't
actually changed until the call to InvalidateName(), after the file URL has
been set by the call to xModel->attachResource().

In contrast, when saving (exporting) a .doc, nothing calls setGenerator()
before SfxObjectShell::DoSaveCompleted(), so the following happens:

    SfxObjectShell::DoSaveCompleted
        getDocProperties()->setGenerator(
::utl::DocInfoHelper::GetGeneratorString() );
            SfxDocumentMetaData::setMetaTextAndNotify()
                setModified()
                    SfxDocInfoListener_Impl::modified
                        m_rShell.FlushDocInfo();
                            SetModified()
                                ModifyChanged()
                                    Broadcast( SfxSimpleHint(
SFX_HINT_TITLECHANGED ) );
        ...
        xModel->attachResource( aURL, aMediaDescr );
        ...
        InvalidateName()

Because setGenerator() actually changes the generator string within
DoSaveCompleted() this time, the window title ends up being set early, before
the file URL is set. Later in DoSaveCompleted(), when the call to
InvalidateName() is reached, nothing happens because the window title hasn't
actually changed again, and the fact that the URL has changed isn't considered

(In the ODF case, the earlier setGenerator() does not result in a title change
broadcast because SetModified() decides not to call ModifyChanged())


As yet I have no idea which strand of yarn to pull in order to untangle this.

-- 
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