sw lok: make sure author name change doesn't mark the doc as modified

This was added in commit d4760b5d4b49fef1c832357059c7e184b3cc0bc4 (sw:
lok: use redline author for saved author fields, 2023-01-09), but it
makes online.git unit-wopi-save-on-exit fail.

Try to get up to date author names + passing tests at the same time by
still updating the fields but not marking the doc as modified right
after load.

Change-Id: Ic07fcc4464058e778f07d5a88b1d8479dbd8c144
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/145623
Tested-by: Jenkins
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
This commit is contained in:
Miklos Vajna 2023-01-16 16:35:08 +01:00
parent 0045c49cf4
commit 654f972a97

View File

@ -3596,8 +3596,11 @@ void SwXTextDocument::initializeForTiledRendering(const css::uno::Sequence<css::
SwView* pFirstView = static_cast<SwView*>(SfxViewShell::GetFirst());
if (pFirstView && SfxViewShell::GetNext(*pFirstView) == nullptr)
{
if (SwViewShell* pShell = &pFirstView->GetWrtShell())
pShell->UpdateFields(true);
if (SwEditShell* pShell = &pFirstView->GetWrtShell())
{
pShell->SwViewShell::UpdateFields(true);
pShell->ResetModified();
}
}
}