[Libreoffice-commits] core.git: Branch 'libreoffice-4-2' - sc/source

Kohei Yoshida kohei.yoshida at collabora.com
Wed Jul 30 00:41:47 PDT 2014


 sc/source/filter/oox/revisionfragment.cxx |    2 ++
 1 file changed, 2 insertions(+)

New commits:
commit 1f2d0f87e85375a86289b79dad7ed7d1b9014dc8
Author: Kohei Yoshida <kohei.yoshida at collabora.com>
Date:   Tue Jul 29 10:33:04 2014 -0400

    bnc#885548: Reset the default user to the document owner at the end.
    
    Otherwise the user name is set to the name of the user in the last revision
    record, which will be used when recording new revisions.
    
    Change-Id: I9b5e39c3b3a85614af67f86db9ed2bb3509a9e2b
    (cherry picked from commit 227d3e72b0b29b73440157b64d6fb56fa151e05e)
    Reviewed-on: https://gerrit.libreoffice.org/10610
    Reviewed-by: Matúš Kukan <matus.kukan at collabora.com>
    Tested-by: Matúš Kukan <matus.kukan at collabora.com>

diff --git a/sc/source/filter/oox/revisionfragment.cxx b/sc/source/filter/oox/revisionfragment.cxx
index dd8cc4b..463b663 100644
--- a/sc/source/filter/oox/revisionfragment.cxx
+++ b/sc/source/filter/oox/revisionfragment.cxx
@@ -249,6 +249,7 @@ void RevisionHeadersFragment::finalizeImport()
 {
     ScDocument& rDoc = getScDocument();
     o3tl::heap_ptr<ScChangeTrack> pCT(new ScChangeTrack(&rDoc));
+    OUString aSelfUser = pCT->GetUser(); // owner of this document.
     pCT->SetUseFixDateTime(true);
 
     const oox::core::Relations& rRels = getRelations();
@@ -268,6 +269,7 @@ void RevisionHeadersFragment::finalizeImport()
         importOoxFragment(xFragment, *xParser);
     }
 
+    pCT->SetUser(aSelfUser); // set the default user to the document owner.
     rDoc.SetChangeTrack(pCT.release());
 
     // Turn on visibility of tracked changes.


More information about the Libreoffice-commits mailing list