[Libreoffice-commits] core.git: 7 commits - include/osl sc/inc sc/source xmloff/source

Michael Stahl mstahl at redhat.com
Tue Jan 12 03:26:33 PST 2016


 include/osl/file.hxx                  |    2 -
 sc/inc/olinetab.hxx                   |    7 ++--
 sc/inc/unitconv.hxx                   |    5 +--
 sc/source/core/data/bcaslot.cxx       |   18 ++++++-----
 sc/source/core/data/formulacell.cxx   |   25 ++++++++-------
 sc/source/core/data/olinetab.cxx      |   54 +++++++++++++++++-----------------
 sc/source/core/inc/bcaslot.hxx        |    8 +++--
 sc/source/core/tool/unitconv.cxx      |    8 ++---
 sc/source/filter/excel/frmbase.cxx    |   18 ++++++-----
 sc/source/filter/inc/formel.hxx       |    9 +++--
 sc/source/ui/docshell/docfuncutil.cxx |    6 ++-
 sc/source/ui/inc/undobase.hxx         |    5 +--
 xmloff/source/text/txtimp.cxx         |    2 -
 13 files changed, 91 insertions(+), 76 deletions(-)

New commits:
commit 7a6ce0d408f1cc08f63a05357049082de50a0e31
Author: Michael Stahl <mstahl at redhat.com>
Date:   Tue Jan 12 11:52:12 2016 +0100

    sc: replace boost::ptr_map with std::map<std::unique_ptr>
    
    Change-Id: I596cafb971d522b0f1414d0ebe0bea36d8f30e59

diff --git a/sc/source/core/data/formulacell.cxx b/sc/source/core/data/formulacell.cxx
index 450cf40..f4110f5 100644
--- a/sc/source/core/data/formulacell.cxx
+++ b/sc/source/core/data/formulacell.cxx
@@ -48,6 +48,7 @@
 #include <formula/errorcodes.hxx>
 #include <formula/vectortoken.hxx>
 #include <svl/intitem.hxx>
+#include <o3tl/make_unique.hxx>
 #include <rtl/strbuf.hxx>
 #include "formulagroup.hxx"
 #include "listenercontext.hxx"
@@ -62,7 +63,7 @@
 #include <grouparealistener.hxx>
 
 #include <memory>
-#include <boost/ptr_container/ptr_map.hpp>
+#include <map>
 
 using namespace formula;
 
@@ -553,13 +554,13 @@ struct AreaListenerKey
     }
 };
 
-typedef boost::ptr_map<AreaListenerKey, sc::FormulaGroupAreaListener> AreaListenersType;
+typedef std::map<AreaListenerKey, std::unique_ptr<sc::FormulaGroupAreaListener>> AreaListenersType;
 
 }
 
 struct ScFormulaCellGroup::Impl
 {
-    AreaListenersType maAreaListeners;
+    AreaListenersType m_AreaListeners;
 };
 
 ScFormulaCellGroup::ScFormulaCellGroup() :
@@ -624,31 +625,31 @@ sc::FormulaGroupAreaListener* ScFormulaCellGroup::getAreaListener(
 {
     AreaListenerKey aKey(rRange, bStartFixed, bEndFixed);
 
-    AreaListenersType::iterator it = mpImpl->maAreaListeners.lower_bound(aKey);
-    if (it == mpImpl->maAreaListeners.end() || mpImpl->maAreaListeners.key_comp()(aKey, it->first))
+    AreaListenersType::iterator it = mpImpl->m_AreaListeners.lower_bound(aKey);
+    if (it == mpImpl->m_AreaListeners.end() || mpImpl->m_AreaListeners.key_comp()(aKey, it->first))
     {
         // Insert a new one.
-        it = mpImpl->maAreaListeners.insert(
-            it, aKey, new sc::FormulaGroupAreaListener(
-                rRange, *(*ppTopCell)->GetDocument(), (*ppTopCell)->aPos, mnLength, bStartFixed, bEndFixed));
+        it = mpImpl->m_AreaListeners.insert(
+            it, std::make_pair(aKey, o3tl::make_unique<sc::FormulaGroupAreaListener>(
+                rRange, *(*ppTopCell)->GetDocument(), (*ppTopCell)->aPos, mnLength, bStartFixed, bEndFixed)));
     }
 
-    return it->second;
+    return it->second.get();
 }
 
 void ScFormulaCellGroup::endAllGroupListening( ScDocument& rDoc )
 {
-    AreaListenersType::iterator it = mpImpl->maAreaListeners.begin(), itEnd = mpImpl->maAreaListeners.end();
+    AreaListenersType::iterator it = mpImpl->m_AreaListeners.begin(), itEnd = mpImpl->m_AreaListeners.end();
     for (; it != itEnd; ++it)
     {
-        sc::FormulaGroupAreaListener* pListener = it->second;
+        sc::FormulaGroupAreaListener *const pListener = it->second.get();
         ScRange aListenRange = pListener->getListeningRange();
         // This "always listen" special range is never grouped.
         bool bGroupListening = (aListenRange != BCA_LISTEN_ALWAYS);
         rDoc.EndListeningArea(aListenRange, bGroupListening, pListener);
     }
 
-    mpImpl->maAreaListeners.clear();
+    mpImpl->m_AreaListeners.clear();
 }
 
 ScFormulaCell::ScFormulaCell( ScDocument* pDoc, const ScAddress& rPos ) :
commit e10f7dd302a0cd42cc6fce3972f32bfb7aa33349
Author: Michael Stahl <mstahl at redhat.com>
Date:   Tue Jan 12 11:51:52 2016 +0100

    sc: replace boost::ptr_map with std::map<std::unique_ptr>
    
    Change-Id: I2fbce996afcd7d1dabd7c540272d8877d034cf14

diff --git a/sc/source/ui/docshell/docfuncutil.cxx b/sc/source/ui/docshell/docfuncutil.cxx
index 3c71dc5..86d82d9 100644
--- a/sc/source/ui/docshell/docfuncutil.cxx
+++ b/sc/source/ui/docshell/docfuncutil.cxx
@@ -24,6 +24,8 @@
 #include <global.hxx>
 #include <undoblk.hxx>
 
+#include <o3tl/make_unique.hxx>
+
 #include <memory>
 #include <utility>
 
@@ -99,11 +101,11 @@ std::unique_ptr<ScSimpleUndo::DataSpansType> DocFuncUtil::getNonEmptyCellSpans(
         SCROW nRow1 = rRange.aStart.Row(), nRow2 = rRange.aEnd.Row();
 
         std::pair<ScSimpleUndo::DataSpansType::iterator,bool> r =
-            pDataSpans->insert(nTab, new sc::ColumnSpanSet(false));
+            pDataSpans->insert(std::make_pair(nTab, o3tl::make_unique<sc::ColumnSpanSet>(false)));
 
         if (r.second)
         {
-            sc::ColumnSpanSet* pSet = r.first->second;
+            sc::ColumnSpanSet *const pSet = r.first->second.get();
             pSet->scan(rDoc, nTab, nCol1, nRow1, nCol2, nRow2, true);
         }
     }
diff --git a/sc/source/ui/inc/undobase.hxx b/sc/source/ui/inc/undobase.hxx
index f501f5b..b81af20 100644
--- a/sc/source/ui/inc/undobase.hxx
+++ b/sc/source/ui/inc/undobase.hxx
@@ -26,7 +26,8 @@
 #include "docsh.hxx"
 #include <columnspanset.hxx>
 
-#include <boost/ptr_container/ptr_map.hpp>
+#include <memory>
+#include <map>
 
 class ScDocument;
 class ScDocShell;
@@ -39,7 +40,7 @@ class ScSimpleUndo: public SfxUndoAction
     ScSimpleUndo(const ScSimpleUndo&) = delete;
 
 public:
-    typedef boost::ptr_map<SCTAB,sc::ColumnSpanSet> DataSpansType;
+    typedef std::map<SCTAB, std::unique_ptr<sc::ColumnSpanSet>> DataSpansType;
 
                     ScSimpleUndo( ScDocShell* pDocSh );
     virtual         ~ScSimpleUndo();
commit 9ec53cce39f8b337cf6f4b9dd381d1e7ff7b02a2
Author: Michael Stahl <mstahl at redhat.com>
Date:   Tue Jan 12 11:51:17 2016 +0100

    sc: replace boost::ptr_map with std::map<std::unique_ptr>
    
    Change-Id: I319c7141749df11f7ec0b03b43f4f86cb743ada5

diff --git a/sc/source/filter/excel/frmbase.cxx b/sc/source/filter/excel/frmbase.cxx
index 4e77af8..c31d2f8 100644
--- a/sc/source/filter/excel/frmbase.cxx
+++ b/sc/source/filter/excel/frmbase.cxx
@@ -19,6 +19,8 @@
 
 #include "formel.hxx"
 
+#include <o3tl/make_unique.hxx>
+
 _ScRangeListTabs::_ScRangeListTabs()
 {
 }
@@ -55,12 +57,12 @@ void _ScRangeListTabs::Append( const ScAddress& aSRD, SCTAB nTab, const bool b )
     if (nTab < 0 || MAXTAB < nTab)
         return;
 
-    TabRangeType::iterator itr = maTabRanges.find(nTab);
-    if (itr == maTabRanges.end())
+    TabRangeType::iterator itr = m_TabRanges.find(nTab);
+    if (itr == m_TabRanges.end())
     {
         // No entry for this table yet.  Insert a new one.
         std::pair<TabRangeType::iterator, bool> r =
-            maTabRanges.insert(nTab, new RangeListType);
+            m_TabRanges.insert(std::make_pair(nTab, o3tl::make_unique<RangeListType>()));
 
         if (!r.second)
             // Insertion failed.
@@ -125,12 +127,12 @@ void _ScRangeListTabs::Append( const ScRange& aCRD, SCTAB nTab, bool b )
     if (nTab < 0 || MAXTAB < nTab)
         return;
 
-    TabRangeType::iterator itr = maTabRanges.find(nTab);
-    if (itr == maTabRanges.end())
+    TabRangeType::iterator itr = m_TabRanges.find(nTab);
+    if (itr == m_TabRanges.end())
     {
         // No entry for this table yet.  Insert a new one.
         std::pair<TabRangeType::iterator, bool> r =
-            maTabRanges.insert(nTab, new RangeListType);
+            m_TabRanges.insert(std::make_pair(nTab, o3tl::make_unique<RangeListType>()));
 
         if (!r.second)
             // Insertion failed.
@@ -145,8 +147,8 @@ const ScRange* _ScRangeListTabs::First( SCTAB n )
 {
     OSL_ENSURE( ValidTab(n), "-_ScRangeListTabs::First(): Good bye!" );
 
-    TabRangeType::iterator itr = maTabRanges.find(n);
-    if (itr == maTabRanges.end())
+    TabRangeType::iterator itr = m_TabRanges.find(n);
+    if (itr == m_TabRanges.end())
         // No range list exists for this table.
         return nullptr;
 
diff --git a/sc/source/filter/inc/formel.hxx b/sc/source/filter/inc/formel.hxx
index e5d1e46..76c8a81 100644
--- a/sc/source/filter/inc/formel.hxx
+++ b/sc/source/filter/inc/formel.hxx
@@ -26,8 +26,9 @@
 #include "root.hxx"
 #include "tokstack.hxx"
 
-#include <boost/ptr_container/ptr_map.hpp>
+#include <memory>
 #include <vector>
+#include <map>
 
 namespace svl {
 
@@ -60,8 +61,8 @@ enum FORMULA_TYPE
 class _ScRangeListTabs
 {
     typedef ::std::vector<ScRange> RangeListType;
-    typedef ::boost::ptr_map<SCTAB, RangeListType> TabRangeType;
-    TabRangeType maTabRanges;
+    typedef ::std::map<SCTAB, std::unique_ptr<RangeListType>> TabRangeType;
+    TabRangeType m_TabRanges;
     RangeListType::const_iterator maItrCur;
     RangeListType::const_iterator maItrCurEnd;
 
@@ -75,7 +76,7 @@ public:
     const ScRange* First ( SCTAB nTab = 0 );
     const ScRange* Next ();
 
-    bool HasRanges () const { return !maTabRanges.empty(); }
+    bool HasRanges () const { return !m_TabRanges.empty(); }
 };
 
 class ConverterBase
commit 79257f615e87dbd140bd8a6bd191cf7f027c137c
Author: Michael Stahl <mstahl at redhat.com>
Date:   Tue Jan 12 11:50:32 2016 +0100

    sc: replace boost::ptr_map with std::map
    
    Change-Id: If254d2e6ae02cb1dfc4c967c1a8d0a1132bb6ad1

diff --git a/sc/inc/unitconv.hxx b/sc/inc/unitconv.hxx
index 2afa84d..607cc5d 100644
--- a/sc/inc/unitconv.hxx
+++ b/sc/inc/unitconv.hxx
@@ -21,7 +21,8 @@
 #define INCLUDED_SC_INC_UNITCONV_HXX
 
 #include <boost/noncopyable.hpp>
-#include <boost/ptr_container/ptr_map.hpp>
+
+#include <map>
 
 class ScUnitConverterData
 {
@@ -44,7 +45,7 @@ public:
 
 class ScUnitConverter : public boost::noncopyable
 {
-    typedef boost::ptr_map<OUString, ScUnitConverterData> MapType;
+    typedef std::map<OUString, ScUnitConverterData> MapType;
     MapType maData;
 
 public:
diff --git a/sc/source/core/tool/unitconv.cxx b/sc/source/core/tool/unitconv.cxx
index ef72184..c7560bf 100644
--- a/sc/source/core/tool/unitconv.cxx
+++ b/sc/source/core/tool/unitconv.cxx
@@ -103,9 +103,9 @@ ScUnitConverter::ScUnitConverter()
                 pProperties[nIndex++] >>= sToUnit;
                 pProperties[nIndex++] >>= fFactor;
 
-                ScUnitConverterData* pNew = new ScUnitConverterData( sFromUnit, sToUnit, fFactor );
-                OUString aIndex  = pNew->GetIndexString();
-                maData.insert(aIndex, pNew);
+                ScUnitConverterData aNew(sFromUnit, sToUnit, fFactor);
+                OUString const aIndex = aNew.GetIndexString();
+                maData.insert(std::make_pair(aIndex, aNew));
             }
         }
     }
@@ -124,7 +124,7 @@ bool ScUnitConverter::GetValue(
         return false;
     }
 
-    fValue = it->second->GetValue();
+    fValue = it->second.GetValue();
     return true;
 }
 
commit be983cfdd1205a02f9ced9b26e79eea5b1d2db44
Author: Michael Stahl <mstahl at redhat.com>
Date:   Tue Jan 12 11:49:50 2016 +0100

    sc: replace boost::ptr_map with std::map<std::unique_ptr>
    
    Change-Id: I5571d9e4437a34df7ac567878a774ccd9b4496e4

diff --git a/sc/source/core/data/bcaslot.cxx b/sc/source/core/data/bcaslot.cxx
index 632767e..5fc786a 100644
--- a/sc/source/core/data/bcaslot.cxx
+++ b/sc/source/core/data/bcaslot.cxx
@@ -34,6 +34,8 @@
 #include <grouparealistener.hxx>
 #endif
 
+#include <o3tl/make_unique.hxx>
+
 // Number of slots per dimension
 // must be integer divisors of MAXCOLCOUNT respectively MAXROWCOUNT
 #define BCA_SLOTS_COL ((MAXCOLCOUNT_DEFINE) / 16)
@@ -1128,27 +1130,27 @@ bool ScBroadcastAreaSlotMachine::InsertBulkArea( const ScBroadcastArea* pArea )
 
 void ScBroadcastAreaSlotMachine::InsertBulkGroupArea( ScBroadcastArea* pArea, const ScRange& rRange )
 {
-    BulkGroupAreasType::iterator it = maBulkGroupAreas.lower_bound(pArea);
-    if (it == maBulkGroupAreas.end() || maBulkGroupAreas.key_comp()(pArea, it->first))
+    BulkGroupAreasType::iterator it = m_BulkGroupAreas.lower_bound(pArea);
+    if (it == m_BulkGroupAreas.end() || m_BulkGroupAreas.key_comp()(pArea, it->first))
     {
         // Insert a new one.
-        it = maBulkGroupAreas.insert(it, pArea, new sc::ColumnSpanSet(false));
+        it = m_BulkGroupAreas.insert(it, std::make_pair(pArea, o3tl::make_unique<sc::ColumnSpanSet>(false)));
     }
 
-    sc::ColumnSpanSet* pSet = it->second;
+    sc::ColumnSpanSet *const pSet = it->second.get();
     assert(pSet);
     pSet->set(rRange, true);
 }
 
 void ScBroadcastAreaSlotMachine::BulkBroadcastGroupAreas()
 {
-    if (maBulkGroupAreas.empty())
+    if (m_BulkGroupAreas.empty())
         return;
 
     sc::BulkDataHint aHint(*pDoc, nullptr);
 
     bool bBroadcasted = false;
-    BulkGroupAreasType::iterator it = maBulkGroupAreas.begin(), itEnd = maBulkGroupAreas.end();
+    BulkGroupAreasType::iterator it = m_BulkGroupAreas.begin(), itEnd = m_BulkGroupAreas.end();
     for (; it != itEnd; ++it)
     {
         ScBroadcastArea* pArea = it->first;
@@ -1162,7 +1164,7 @@ void ScBroadcastAreaSlotMachine::BulkBroadcastGroupAreas()
         }
         else
         {
-            const sc::ColumnSpanSet* pSpans = it->second;
+            const sc::ColumnSpanSet *const pSpans = it->second.get();
             assert(pSpans);
             aHint.setSpans(pSpans);
             rBC.Broadcast(aHint);
@@ -1170,7 +1172,7 @@ void ScBroadcastAreaSlotMachine::BulkBroadcastGroupAreas()
         }
     }
 
-    maBulkGroupAreas.clear();
+    m_BulkGroupAreas.clear();
     if (bBroadcasted)
         pDoc->TrackFormulas();
 }
diff --git a/sc/source/core/inc/bcaslot.hxx b/sc/source/core/inc/bcaslot.hxx
index 8221af1..745fc02 100644
--- a/sc/source/core/inc/bcaslot.hxx
+++ b/sc/source/core/inc/bcaslot.hxx
@@ -21,9 +21,11 @@
 #define INCLUDED_SC_SOURCE_CORE_INC_BCASLOT_HXX
 
 #include <functional>
+#include <memory>
+#include <map>
 #include <set>
 #include <unordered_set>
-#include <boost/ptr_container/ptr_map.hpp>
+
 #include <boost/noncopyable.hpp>
 
 #include <svl/broadcast.hxx>
@@ -248,7 +250,7 @@ public:
 class  ScBroadcastAreaSlotMachine
 {
 private:
-    typedef boost::ptr_map<ScBroadcastArea*, sc::ColumnSpanSet> BulkGroupAreasType;
+    typedef std::map<ScBroadcastArea*, std::unique_ptr<sc::ColumnSpanSet>> BulkGroupAreasType;
 
     /**
         Slot offset arrangement of columns and rows, once per sheet.
@@ -289,7 +291,7 @@ private:
 
 private:
     ScBroadcastAreasBulk  aBulkBroadcastAreas;
-    BulkGroupAreasType maBulkGroupAreas;
+    BulkGroupAreasType m_BulkGroupAreas;
     TableSlotsMap         aTableSlotsMap;
     AreasToBeErased       maAreasToBeErased;
     SvtBroadcaster       *pBCAlways;             // for the RC_ALWAYS special range
commit 2b396651759db58a96b21b375721d8fefa2ce38e
Author: Michael Stahl <mstahl at redhat.com>
Date:   Tue Jan 12 11:48:56 2016 +0100

    sc: replace boost::ptr_map with std::map<std::unique_ptr>
    
    Change-Id: I8301ee6e52c9fc5ae62df662c452e27672612759

diff --git a/sc/inc/olinetab.hxx b/sc/inc/olinetab.hxx
index c46871a..a6038ff 100644
--- a/sc/inc/olinetab.hxx
+++ b/sc/inc/olinetab.hxx
@@ -23,7 +23,8 @@
 #include "scdllapi.h"
 #include "address.hxx"
 
-#include <boost/ptr_container/ptr_map.hpp>
+#include <memory>
+#include <map>
 
 #define SC_OL_MAXDEPTH      7
 
@@ -63,7 +64,7 @@ public:
 
 class ScOutlineCollection
 {
-    typedef boost::ptr_map<SCCOLROW, ScOutlineEntry> MapType;
+    typedef std::map<SCCOLROW, std::unique_ptr<ScOutlineEntry>> MapType;
     MapType maEntries;
 
 public:
@@ -74,7 +75,7 @@ public:
 
     size_t size() const;
     void clear();
-    void insert(ScOutlineEntry* pEntry);
+    void insert(std::unique_ptr<ScOutlineEntry> pEntry);
     iterator begin();
     iterator end();
     const_iterator begin() const;
diff --git a/sc/source/core/data/olinetab.cxx b/sc/source/core/data/olinetab.cxx
index cb2b006..8039e88 100644
--- a/sc/source/core/data/olinetab.cxx
+++ b/sc/source/core/data/olinetab.cxx
@@ -25,6 +25,8 @@
 #include "address.hxx"
 #include "table.hxx"
 
+#include <o3tl/make_unique.hxx>
+
 #include <osl/diagnose.h>
 
 ScOutlineEntry::ScOutlineEntry( SCCOLROW nNewStart, SCCOLROW nNewSize, bool bNewHidden ) :
@@ -97,10 +99,10 @@ void ScOutlineCollection::clear()
     maEntries.clear();
 }
 
-void ScOutlineCollection::insert(ScOutlineEntry* pEntry)
+void ScOutlineCollection::insert(std::unique_ptr<ScOutlineEntry> pEntry)
 {
     SCCOLROW nStart = pEntry->GetStart();
-    maEntries.insert(nStart, pEntry);
+    maEntries.insert(std::make_pair(nStart, std::move(pEntry)));
 }
 
 ScOutlineCollection::iterator ScOutlineCollection::begin()
@@ -150,8 +152,8 @@ ScOutlineArray::ScOutlineArray( const ScOutlineArray& rArray ) :
         ScOutlineCollection::const_iterator it = rColl.begin(), itEnd = rColl.end();
         for (; it != itEnd; ++it)
         {
-            const ScOutlineEntry* pEntry = it->second;
-            aCollections[nLevel].insert(new ScOutlineEntry(*pEntry));
+            const ScOutlineEntry *const pEntry = it->second.get();
+            aCollections[nLevel].insert(o3tl::make_unique<ScOutlineEntry>(ScOutlineEntry(*pEntry)));
         }
     }
 }
@@ -171,7 +173,7 @@ void ScOutlineArray::FindEntry(
         ScOutlineCollection::iterator it = pCollect->begin(), itEnd = pCollect->end();
         for (; it != itEnd; ++it)
         {
-            ScOutlineEntry* pEntry = it->second;
+            ScOutlineEntry *const pEntry = it->second.get();
             if (pEntry->GetStart() <= nSearchPos && pEntry->GetEnd() >= nSearchPos)
             {
                 rFindLevel = nLevel + 1; // Next Level (for insertion)
@@ -242,7 +244,7 @@ bool ScOutlineArray::Insert(
             ScOutlineCollection::iterator it = rColl.begin(), itEnd = rColl.end();
             while (it != itEnd)
             {
-                ScOutlineEntry* pEntry = it->second;
+                ScOutlineEntry *const pEntry = it->second.get();
                 SCCOLROW nEntryStart = pEntry->GetStart();
                 if (nEntryStart >= nStartCol && nEntryStart <= nEndCol)
                 {
@@ -251,7 +253,7 @@ bool ScOutlineArray::Insert(
                         rSizeChanged = false; // No more room
                         return false;
                     }
-                    aCollections[nMoveLevel+1].insert(new ScOutlineEntry(*pEntry));
+                    aCollections[nMoveLevel+1].insert(o3tl::make_unique<ScOutlineEntry>(*pEntry));
                     size_t nPos = std::distance(rColl.begin(), it);
                     rColl.erase(it);
                     it = rColl.begin();
@@ -280,9 +282,9 @@ bool ScOutlineArray::Insert(
         rSizeChanged = true;
     }
 
-    ScOutlineEntry* pNewEntry = new ScOutlineEntry( nStartCol, nEndCol+1-nStartCol, bHidden );
+    std::unique_ptr<ScOutlineEntry> pNewEntry(new ScOutlineEntry(nStartCol, nEndCol+1-nStartCol, bHidden));
     pNewEntry->SetVisible( bVisible );
-    aCollections[nLevel].insert(pNewEntry);
+    aCollections[nLevel].insert(std::move(pNewEntry));
 
     return true;
 }
@@ -299,7 +301,7 @@ bool ScOutlineArray::FindTouchedLevel(
         ScOutlineCollection::const_iterator it = pCollect->begin(), itEnd = pCollect->end();
         for (; it != itEnd; ++it)
         {
-            const ScOutlineEntry* pEntry = it->second;
+            const ScOutlineEntry *const pEntry = it->second.get();
             SCCOLROW nStart = pEntry->GetStart();
             SCCOLROW nEnd   = pEntry->GetEnd();
 
@@ -325,7 +327,7 @@ void ScOutlineArray::RemoveSub(SCCOLROW nStartPos, SCCOLROW nEndPos, size_t nLev
     ScOutlineCollection::iterator it = rColl.begin(), itEnd = rColl.end();
     while (it != itEnd)
     {
-        ScOutlineEntry* pEntry = it->second;
+        ScOutlineEntry *const pEntry = it->second.get();
         SCCOLROW nStart = pEntry->GetStart();
         SCCOLROW nEnd   = pEntry->GetEnd();
         if (nStart >= nStartPos && nEnd <= nEndPos)
@@ -349,7 +351,7 @@ void ScOutlineArray::RemoveSub(SCCOLROW nStartPos, SCCOLROW nEndPos, size_t nLev
 
     while (it != itEnd)
     {
-        ScOutlineEntry* pEntry = it->second;
+        ScOutlineEntry *const pEntry = it->second.get();
         SCCOLROW nStart = pEntry->GetStart();
         SCCOLROW nEnd   = pEntry->GetEnd();
 
@@ -383,12 +385,12 @@ void ScOutlineArray::PromoteSub(SCCOLROW nStartPos, SCCOLROW nEndPos, size_t nSt
         ScOutlineCollection::iterator it = rColl.begin(), itEnd = rColl.end();
         while (it != itEnd)
         {
-            ScOutlineEntry* pEntry = it->second;
+            ScOutlineEntry *const pEntry = it->second.get();
             SCCOLROW nStart = pEntry->GetStart();
             SCCOLROW nEnd   = pEntry->GetEnd();
             if (nStart >= nStartPos && nEnd <= nEndPos)
             {
-                aCollections[nLevel-1].insert(new ScOutlineEntry(*pEntry));
+                aCollections[nLevel-1].insert(o3tl::make_unique<ScOutlineEntry>(*pEntry));
 
                 // Re-calc iterator positions after the tree gets invalidated
                 size_t nPos = std::distance(rColl.begin(), it);
@@ -406,12 +408,12 @@ void ScOutlineArray::PromoteSub(SCCOLROW nStartPos, SCCOLROW nEndPos, size_t nSt
 
         while (it != itEnd)
         {
-            ScOutlineEntry* pEntry = it->second;
+            ScOutlineEntry *const pEntry = it->second.get();
             SCCOLROW nStart = pEntry->GetStart();
             SCCOLROW nEnd   = pEntry->GetEnd();
             if (nStart >= nStartPos && nEnd <= nEndPos)
             {
-                aCollections[nLevel-1].insert(new ScOutlineEntry(*pEntry));
+                aCollections[nLevel-1].insert(o3tl::make_unique<ScOutlineEntry>(*pEntry));
 
                 // Re-calc iterator positions after the tree gets invalidated
                 size_t nPos = std::distance(rColl.begin(), it);
@@ -461,7 +463,7 @@ bool ScOutlineArray::Remove( SCCOLROW nBlockStart, SCCOLROW nBlockEnd, bool& rSi
     bool bAny = false;
     while (it != itEnd)
     {
-        ScOutlineEntry* pEntry = it->second;
+        ScOutlineEntry *const pEntry = it->second.get();
         SCCOLROW nStart = pEntry->GetStart();
         SCCOLROW nEnd   = pEntry->GetEnd();
         if (nBlockStart <= nEnd && nBlockEnd >= nStart)
@@ -495,7 +497,7 @@ ScOutlineEntry* ScOutlineArray::GetEntry(size_t nLevel, size_t nIndex)
 
     ScOutlineCollection::iterator it = rColl.begin();
     std::advance(it, nIndex);
-    return it->second;
+    return it->second.get();
 }
 
 const ScOutlineEntry* ScOutlineArray::GetEntry(size_t nLevel, size_t nIndex) const
@@ -509,7 +511,7 @@ const ScOutlineEntry* ScOutlineArray::GetEntry(size_t nLevel, size_t nIndex) con
 
     ScOutlineCollection::const_iterator it = rColl.begin();
     std::advance(it, nIndex);
-    return it->second;
+    return it->second.get();
 }
 
 size_t ScOutlineArray::GetCount(size_t nLevel) const
@@ -529,7 +531,7 @@ const ScOutlineEntry* ScOutlineArray::GetEntryByPos(size_t nLevel, SCCOLROW nPos
     ScOutlineCollection::const_iterator it = rColl.begin(), itEnd = rColl.end();
     for (; it != itEnd; ++it)
     {
-        const ScOutlineEntry* pEntry = it->second;
+        const ScOutlineEntry *const pEntry = it->second.get();
         if (pEntry->GetStart() <= nPos && nPos <= pEntry->GetEnd())
             return pEntry;
     }
@@ -547,7 +549,7 @@ bool ScOutlineArray::GetEntryIndex(size_t nLevel, SCCOLROW nPos, size_t& rnIndex
     ScOutlineCollection::const_iterator it = rColl.begin(), itEnd = rColl.end();
     for (; it != itEnd; ++it)
     {
-        const ScOutlineEntry* p = it->second;
+        const ScOutlineEntry *const p = it->second.get();
         if (p->GetStart() <= nPos && nPos <= p->GetEnd())
         {
             rnIndex = std::distance(rColl.begin(), it);
@@ -568,7 +570,7 @@ bool ScOutlineArray::GetEntryIndexInRange(
     ScOutlineCollection::const_iterator it = rColl.begin(), itEnd = rColl.end();
     for (; it != itEnd; ++it)
     {
-        const ScOutlineEntry* p = it->second;
+        const ScOutlineEntry *const p = it->second.get();
         if (nBlockStart <= p->GetStart() && p->GetEnd() <= nBlockEnd)
         {
             rnIndex = std::distance(rColl.begin(), it);
@@ -594,7 +596,7 @@ void ScOutlineArray::SetVisibleBelow(
         ScOutlineCollection::iterator it = rColl.begin(), itEnd = rColl.end();
         for (; it != itEnd; ++it)
         {
-            ScOutlineEntry* p = it->second;
+            ScOutlineEntry *const  p = it->second.get();
             if (p->GetStart() >= nStart && p->GetEnd() <= nEnd)
             {
                 p->SetVisible(bValue);
@@ -634,7 +636,7 @@ void ScOutlineArray::ExtendBlock(size_t nLevel, SCCOLROW& rBlkStart, SCCOLROW& r
     ScOutlineCollection::const_iterator it = rColl.begin(), itEnd = rColl.end();
     for (; it != itEnd; ++it)
     {
-        const ScOutlineEntry* pEntry = it->second;
+        const ScOutlineEntry *const pEntry = it->second.get();
         SCCOLROW nStart = pEntry->GetStart();
         SCCOLROW nEnd   = pEntry->GetEnd();
 
@@ -824,7 +826,7 @@ ScSubOutlineIterator::ScSubOutlineIterator(
     const ScOutlineCollection& rColl = pArray->aCollections[nLevel];
     ScOutlineCollection::const_iterator it = rColl.begin();
     std::advance(it, nEntry);
-    const ScOutlineEntry* pEntry = it->second;
+    const ScOutlineEntry* pEntry = it->second.get();
     nStart = pEntry->GetStart();
     nEnd   = pEntry->GetEnd();
     nSubLevel = nLevel + 1;
@@ -846,7 +848,7 @@ ScOutlineEntry* ScSubOutlineIterator::GetNext()
         {
             ScOutlineCollection::iterator it = rColl.begin();
             std::advance(it, nSubEntry);
-            pEntry = it->second;
+            pEntry = it->second.get();
 
             if (pEntry->GetStart() >= nStart && pEntry->GetEnd() <= nEnd)
                 bFound = true;
commit 2bebf6779024ea0fb1dbac1fe9f10abc9ff128a3
Author: Michael Stahl <mstahl at redhat.com>
Date:   Mon Jan 11 18:23:31 2016 +0100

    typos
    
    Change-Id: I970429c266cc1a8cf36cfba379b447899b5dbce9

diff --git a/include/osl/file.hxx b/include/osl/file.hxx
index 87d11fb..7e09e90 100644
--- a/include/osl/file.hxx
+++ b/include/osl/file.hxx
@@ -594,7 +594,7 @@ public:
     /** Determine the name of the volume device's File System.
 
         @return
-        The name of the volume's fielsystem if this information is valid,
+        The name of the volume's filesystem if this information is valid,
         otherwise an empty string.
     */
 
diff --git a/xmloff/source/text/txtimp.cxx b/xmloff/source/text/txtimp.cxx
index 53b6037..eb087aa 100644
--- a/xmloff/source/text/txtimp.cxx
+++ b/xmloff/source/text/txtimp.cxx
@@ -2810,7 +2810,7 @@ void XMLTextImportHelper::AddCrossRefHeadingMapping(OUString const& rFrom, OUStr
     m_xImpl->m_pCrossRefHeadingBookmarkMap->insert(std::make_pair(rFrom, rTo));
 }
 
-// tdf#94804: hack to map cross reference fiels that reference duplicate marks
+// tdf#94804: hack to map cross reference fields that reference duplicate marks
 // note that we can't really check meta:generator for this since the file might
 // be round-tripped by different versions preserving duplicates => always map
 void XMLTextImportHelper::MapCrossRefHeadingFieldsHorribly()


More information about the Libreoffice-commits mailing list