[Libreoffice-commits] core.git: xmloff/source

Libreoffice Gerrit user logerrit at kemper.freedesktop.org
Tue Sep 18 06:32:06 UTC 2018


 xmloff/source/text/txtflde.cxx |   13 ++-----------
 1 file changed, 2 insertions(+), 11 deletions(-)

New commits:
commit 36f2df8a32429ac3f3c91203c39a87003003260e
Author:     Arkadiy Illarionov <qarkai at gmail.com>
AuthorDate: Mon Sep 17 19:10:07 2018 +0300
Commit:     Noel Grandin <noel.grandin at collabora.co.uk>
CommitDate: Tue Sep 18 08:31:45 2018 +0200

    Replace manual copying with comphelper::containerToSequence
    
    30530afaaa715473a2f9c3f068beeed5f3a98daf follow-up
    
    Change-Id: I74082858c938087c5698ef0948a72b9a61b9127c
    Reviewed-on: https://gerrit.libreoffice.org/60593
    Reviewed-by: Noel Grandin <noel.grandin at collabora.co.uk>
    Tested-by: Noel Grandin <noel.grandin at collabora.co.uk>

diff --git a/xmloff/source/text/txtflde.cxx b/xmloff/source/text/txtflde.cxx
index ba5bba24ac6a..d607e15540dd 100644
--- a/xmloff/source/text/txtflde.cxx
+++ b/xmloff/source/text/txtflde.cxx
@@ -63,6 +63,7 @@
 #include <com/sun/star/text/BibliographyDataType.hpp>
 #include <com/sun/star/sdb/CommandType.hpp>
 #include <com/sun/star/rdf/XMetadatable.hpp>
+#include <comphelper/sequence.hxx>
 #include <o3tl/any.hxx>
 #include <rtl/ustrbuf.hxx>
 #include <tools/debug.hxx>
@@ -1922,17 +1923,7 @@ void XMLTextFieldExport::ExportFieldDeclarations(
             if (aMapIter != pUsedMasters->end())
             {
                 // found the set of used field masters
-                set<OUString> & rOurMasters = aMapIter->second;
-
-                // copy set to sequence
-                aFieldMasters.realloc( rOurMasters.size() );
-                sal_Int32 i = 0;
-                for( const auto& rMaster : rOurMasters )
-                {
-                    aFieldMasters[i] = rMaster;
-                    ++i;
-                }
-
+                aFieldMasters = comphelper::containerToSequence(aMapIter->second);
                 pUsedMasters->erase(rText);
             }
             // else: XText not found -> ignore


More information about the Libreoffice-commits mailing list