helpcontent2                            |    2 +-
 xmloff/source/text/XMLRedlineExport.cxx |   13 ++++++-------
 xmloff/source/text/XMLRedlineExport.hxx |    2 +-
 3 files changed, 8 insertions(+), 9 deletions(-)

New commits:
commit f3ee33c8e3400d4d53d4a06c6765d78eeb6b9a0e
Author:     Olivier Hallot <olivier.hal...@libreoffice.org>
AuthorDate: Sat Sep 3 13:37:11 2022 +0200
Commit:     Gerrit Code Review <ger...@gerrit.libreoffice.org>
CommitDate: Sat Sep 3 13:37:11 2022 +0200

    Update git submodules
    
    * Update helpcontent2 from branch 'master'
      to 0d08951af8c17d621ed2787a8c68738add6d151c
      - tdf#150445 remaining references of "gear" in menus/toolbars
    
        Change-Id: If47eb4b4987a48fddf9a2ffb1d4bcc7bdae76d53
        Reviewed-on: https://gerrit.libreoffice.org/c/help/+/139295
        Tested-by: Jenkins
        Reviewed-by: Olivier Hallot <olivier.hal...@libreoffice.org>

diff --git a/helpcontent2 b/helpcontent2
index 54f3eaba5c78..0d08951af8c1 160000
--- a/helpcontent2
+++ b/helpcontent2
@@ -1 +1 @@
-Subproject commit 54f3eaba5c786a531fd2839646d517b97b279127
+Subproject commit 0d08951af8c17d621ed2787a8c68738add6d151c
commit 4aa464f4634faa62499e6ff5737a647dc80d68cc
Author:     Noel Grandin <noelgran...@gmail.com>
AuthorDate: Fri Sep 2 18:41:02 2022 +0200
Commit:     Noel Grandin <noel.gran...@collabora.co.uk>
CommitDate: Sat Sep 3 11:37:34 2022 +0200

    no need to use unique_ptr for this map in XMLRedlineExport
    
    map is already a node based data structure, so the values will stay
    in the same place in memory
    
    Change-Id: Id555367e9a3e44f60295b8296aadabb9c1681e6a
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/139271
    Tested-by: Jenkins
    Reviewed-by: Noel Grandin <noel.gran...@collabora.co.uk>

diff --git a/xmloff/source/text/XMLRedlineExport.cxx 
b/xmloff/source/text/XMLRedlineExport.cxx
index eb8f8d68ad65..aa9b364fedb4 100644
--- a/xmloff/source/text/XMLRedlineExport.cxx
+++ b/xmloff/source/text/XMLRedlineExport.cxx
@@ -129,10 +129,10 @@ void XMLRedlineExport::ExportChangesList(
     if (aFind == aChangeMap.end())
         return;
 
-    ChangesVectorType* pChangesList = aFind->second.get();
+    ChangesVectorType& rChangesList = aFind->second;
 
     // export only if changes are found
-    if (pChangesList->empty())
+    if (rChangesList.empty())
         return;
 
     // changes container element
@@ -141,7 +141,7 @@ void XMLRedlineExport::ExportChangesList(
                                 true, true);
 
     // iterate over changes list
-    for (auto const& change : *pChangesList)
+    for (auto const& change : rChangesList)
     {
         ExportChangedRegion(change);
     }
@@ -158,12 +158,11 @@ void XMLRedlineExport::SetCurrentXText(
         ChangesMapType::iterator aIter = aChangeMap.find(rText);
         if (aIter == aChangeMap.end())
         {
-            ChangesVectorType* pList = new ChangesVectorType;
-            aChangeMap[rText].reset( pList );
-            pCurrentChangesList = pList;
+            auto rv = aChangeMap.emplace(std::piecewise_construct, 
std::forward_as_tuple(rText), std::forward_as_tuple());
+            pCurrentChangesList = &rv.first->second;
         }
         else
-            pCurrentChangesList = aIter->second.get();
+            pCurrentChangesList = &aIter->second;
     }
     else
     {
diff --git a/xmloff/source/text/XMLRedlineExport.hxx 
b/xmloff/source/text/XMLRedlineExport.hxx
index 5eee02a5db39..9031aacdbd20 100644
--- a/xmloff/source/text/XMLRedlineExport.hxx
+++ b/xmloff/source/text/XMLRedlineExport.hxx
@@ -42,7 +42,7 @@ typedef ::std::vector<
 // store a list of redline properties for each XText
 typedef ::std::map<
             css::uno::Reference< css::text::XText>,
-            std::unique_ptr<ChangesVectorType> > ChangesMapType;
+            ChangesVectorType > ChangesMapType;
 
 
 /**

Reply via email to