sw/source/uibase/uno/unotxdoc.cxx |    7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

New commits:
commit 654f972a97c374fa90eb3984a44c7f54ddba9c61
Author:     Miklos Vajna <vmik...@collabora.com>
AuthorDate: Mon Jan 16 16:35:08 2023 +0100
Commit:     Miklos Vajna <vmik...@collabora.com>
CommitDate: Mon Jan 16 18:47:20 2023 +0000

    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 <vmik...@collabora.com>

diff --git a/sw/source/uibase/uno/unotxdoc.cxx 
b/sw/source/uibase/uno/unotxdoc.cxx
index 176bc8db2748..35ff90d58865 100644
--- a/sw/source/uibase/uno/unotxdoc.cxx
+++ b/sw/source/uibase/uno/unotxdoc.cxx
@@ -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();
+            }
         }
     }
 

Reply via email to