Blame SOURCES/0069-bnc-885548-Reset-the-default-user-to-the-document-ow.patch

f085be
From 1f2d0f87e85375a86289b79dad7ed7d1b9014dc8 Mon Sep 17 00:00:00 2001
f085be
From: Kohei Yoshida <kohei.yoshida@collabora.com>
f085be
Date: Tue, 29 Jul 2014 10:33:04 -0400
f085be
Subject: [PATCH 069/137] bnc#885548: Reset the default user to the document
f085be
 owner at the end.
f085be
MIME-Version: 1.0
f085be
Content-Type: text/plain; charset=UTF-8
f085be
Content-Transfer-Encoding: 8bit
f085be
f085be
Otherwise the user name is set to the name of the user in the last revision
f085be
record, which will be used when recording new revisions.
f085be
f085be
Change-Id: I9b5e39c3b3a85614af67f86db9ed2bb3509a9e2b
f085be
(cherry picked from commit 227d3e72b0b29b73440157b64d6fb56fa151e05e)
f085be
Reviewed-on: https://gerrit.libreoffice.org/10610
f085be
Reviewed-by: Matúš Kukan <matus.kukan@collabora.com>
f085be
Tested-by: Matúš Kukan <matus.kukan@collabora.com>
f085be
---
f085be
 sc/source/filter/oox/revisionfragment.cxx | 2 ++
f085be
 1 file changed, 2 insertions(+)
f085be
f085be
diff --git a/sc/source/filter/oox/revisionfragment.cxx b/sc/source/filter/oox/revisionfragment.cxx
f085be
index dd8cc4b..463b663 100644
f085be
--- a/sc/source/filter/oox/revisionfragment.cxx
f085be
+++ b/sc/source/filter/oox/revisionfragment.cxx
f085be
@@ -249,6 +249,7 @@ void RevisionHeadersFragment::finalizeImport()
f085be
 {
f085be
     ScDocument& rDoc = getScDocument();
f085be
     o3tl::heap_ptr<ScChangeTrack> pCT(new ScChangeTrack(&rDoc));
f085be
+    OUString aSelfUser = pCT->GetUser(); // owner of this document.
f085be
     pCT->SetUseFixDateTime(true);
f085be
 
f085be
     const oox::core::Relations& rRels = getRelations();
f085be
@@ -268,6 +269,7 @@ void RevisionHeadersFragment::finalizeImport()
f085be
         importOoxFragment(xFragment, *xParser);
f085be
     }
f085be
 
f085be
+    pCT->SetUser(aSelfUser); // set the default user to the document owner.
f085be
     rDoc.SetChangeTrack(pCT.release());
f085be
 
f085be
     // Turn on visibility of tracked changes.
f085be
-- 
f085be
1.9.3
f085be