[Libreoffice-commits] core.git: 4 commits - include/o3tl reportdesign/inc reportdesign/source sal/qa sc/inc sc/qa sc/source svtools/source

Stephan Bergmann sbergman at redhat.com
Tue Sep 30 08:51:57 PDT 2014


 include/o3tl/ptr_container.hxx                               |   61 +++++++++++
 reportdesign/inc/UndoEnv.hxx                                 |    2 
 reportdesign/source/core/inc/ReportUndoFactory.hxx           |    2 
 reportdesign/source/core/inc/Shape.hxx                       |    2 
 reportdesign/source/filter/xml/xmlExport.cxx                 |    8 -
 reportdesign/source/filter/xml/xmlExport.hxx                 |    4 
 reportdesign/source/filter/xml/xmlHelper.hxx                 |    4 
 reportdesign/source/filter/xml/xmlImportDocumentHandler.cxx  |    8 -
 reportdesign/source/filter/xml/xmlImportDocumentHandler.hxx  |    4 
 reportdesign/source/filter/xml/xmlfilter.hxx                 |   28 ++---
 reportdesign/source/ui/dlg/Navigator.cxx                     |    2 
 reportdesign/source/ui/inc/AddField.hxx                      |    2 
 reportdesign/source/ui/inc/DataProviderHandler.hxx           |    4 
 reportdesign/source/ui/inc/DefaultInspection.hxx             |    2 
 reportdesign/source/ui/inc/GeometryHandler.hxx               |    4 
 reportdesign/source/ui/inc/Navigator.hxx                     |    2 
 reportdesign/source/ui/inc/ReportComponentHandler.hxx        |    4 
 reportdesign/source/ui/inc/ReportControllerObserver.hxx      |    2 
 reportdesign/source/ui/inc/ReportSection.hxx                 |    2 
 reportdesign/source/ui/inc/ReportWindow.hxx                  |    2 
 reportdesign/source/ui/misc/UITools.cxx                      |   20 ---
 reportdesign/source/ui/report/DesignView.cxx                 |   16 --
 reportdesign/source/ui/report/ReportController.cxx           |   16 --
 reportdesign/source/ui/report/ReportSection.cxx              |    3 
 reportdesign/source/ui/report/propbrw.cxx                    |    2 
 sal/qa/osl/file/osl_File.cxx                                 |   10 -
 sc/inc/chartlock.hxx                                         |    2 
 sc/inc/dociter.hxx                                           |    4 
 sc/inc/document.hxx                                          |   14 +-
 sc/inc/dptabsrc.hxx                                          |    4 
 sc/inc/editsrc.hxx                                           |    8 -
 sc/inc/macromgr.hxx                                          |    2 
 sc/inc/scextopt.hxx                                          |    2 
 sc/inc/segmenttree.hxx                                       |   12 --
 sc/qa/unit/ucalc.cxx                                         |    2 
 sc/source/core/data/documen2.cxx                             |    4 
 sc/source/core/data/dpobject.cxx                             |   28 ++---
 sc/source/core/data/dpsave.cxx                               |    4 
 sc/source/core/data/dptabsrc.cxx                             |    3 
 sc/source/core/data/postit.cxx                               |    4 
 sc/source/core/inc/cellkeytranslator.hxx                     |    2 
 sc/source/core/tool/cellkeytranslator.cxx                    |    2 
 sc/source/core/tool/dbdata.cxx                               |   24 +---
 sc/source/core/tool/doubleref.cxx                            |    6 -
 sc/source/core/tool/interpr1.cxx                             |   30 +----
 sc/source/core/tool/interpr4.cxx                             |    6 -
 sc/source/filter/excel/xelink.cxx                            |    4 
 sc/source/filter/excel/xichart.cxx                           |   36 ++----
 sc/source/filter/excel/xicontent.cxx                         |   37 ++----
 sc/source/filter/excel/xihelper.cxx                          |    2 
 sc/source/filter/ftools/fprogressbar.cxx                     |    1 
 sc/source/filter/html/htmlpars.cxx                           |   21 +--
 sc/source/filter/inc/connectionsbuffer.hxx                   |    2 
 sc/source/filter/inc/defnamesbuffer.hxx                      |    4 
 sc/source/filter/inc/drawingfragment.hxx                     |    2 
 sc/source/filter/inc/formulaparser.hxx                       |    2 
 sc/source/filter/inc/fprogressbar.hxx                        |    6 -
 sc/source/filter/inc/htmlpars.hxx                            |    8 -
 sc/source/filter/inc/pagesettings.hxx                        |    2 
 sc/source/filter/inc/stylesbuffer.hxx                        |    2 
 sc/source/filter/inc/themebuffer.hxx                         |    2 
 sc/source/filter/inc/worksheetfragment.hxx                   |    2 
 sc/source/filter/inc/xcl97esc.hxx                            |    6 -
 sc/source/filter/inc/xcl97rec.hxx                            |    2 
 sc/source/filter/inc/xehelper.hxx                            |    4 
 sc/source/filter/inc/xestyle.hxx                             |    2 
 sc/source/filter/inc/xicontent.hxx                           |    2 
 sc/source/filter/inc/xihelper.hxx                            |    4 
 sc/source/filter/inc/xilink.hxx                              |    6 -
 sc/source/filter/inc/xistyle.hxx                             |    2 
 sc/source/filter/inc/xlpage.hxx                              |    2 
 sc/source/filter/oox/workbookhelper.cxx                      |   42 +++----
 sc/source/filter/oox/worksheethelper.cxx                     |    4 
 sc/source/filter/xcl97/xcl97esc.cxx                          |    4 
 sc/source/filter/xml/XMLTableShapeResizer.cxx                |    6 -
 sc/source/filter/xml/xmlcelli.cxx                            |    4 
 sc/source/filter/xml/xmldrani.cxx                            |   16 --
 sc/source/filter/xml/xmlimprt.cxx                            |   12 +-
 sc/source/filter/xml/xmltabi.cxx                             |    1 
 sc/source/filter/xml/xmltabi.hxx                             |    2 
 sc/source/ui/Accessibility/AccessibleCell.cxx                |   14 +-
 sc/source/ui/Accessibility/AccessibleCsvControl.cxx          |   16 +-
 sc/source/ui/Accessibility/AccessibleDocumentPagePreview.cxx |    6 -
 sc/source/ui/Accessibility/AccessibleEditObject.cxx          |    6 -
 sc/source/ui/Accessibility/AccessiblePageHeaderArea.cxx      |    6 -
 sc/source/ui/Accessibility/AccessiblePreviewCell.cxx         |    6 -
 sc/source/ui/Accessibility/AccessiblePreviewHeaderCell.cxx   |    6 -
 sc/source/ui/dbgui/csvgrid.cxx                               |    2 
 sc/source/ui/docshell/dbdocfun.cxx                           |   30 +----
 sc/source/ui/docshell/docfunc.cxx                            |   45 +++-----
 sc/source/ui/docshell/docsh5.cxx                             |   14 --
 sc/source/ui/docshell/externalrefmgr.cxx                     |   14 --
 sc/source/ui/inc/AccessibleCell.hxx                          |    2 
 sc/source/ui/inc/AccessibleCsvControl.hxx                    |    4 
 sc/source/ui/inc/AccessibleText.hxx                          |    4 
 sc/source/ui/inc/anyrefdg.hxx                                |    4 
 sc/source/ui/inc/csvgrid.hxx                                 |    2 
 sc/source/ui/inc/inputwin.hxx                                |    2 
 sc/source/ui/inc/spelldialog.hxx                             |    8 -
 sc/source/ui/inc/undotab.hxx                                 |   16 --
 sc/source/ui/miscdlgs/anyrefdg.cxx                           |    1 
 sc/source/ui/undo/undorangename.cxx                          |   16 +-
 sc/source/ui/undo/undotab.cxx                                |   23 +---
 sc/source/ui/unoobj/chart2uno.cxx                            |   56 +++-------
 sc/source/ui/unoobj/editsrc.cxx                              |   14 +-
 sc/source/ui/unoobj/servuno.cxx                              |    2 
 sc/source/ui/vba/vbaaxis.hxx                                 |    4 
 sc/source/ui/vba/vbachartobject.hxx                          |    4 
 sc/source/ui/vba/vbatitle.hxx                                |    4 
 sc/source/ui/view/gridwin.cxx                                |    2 
 sc/source/ui/view/gridwin2.cxx                               |    4 
 sc/source/ui/view/viewfun2.cxx                               |   18 +--
 sc/source/ui/view/viewfun3.cxx                               |   24 +---
 svtools/source/svhtml/parhtml.cxx                            |    5 
 114 files changed, 430 insertions(+), 587 deletions(-)

New commits:
commit 89c72084b23b14780d0799f2f2f32c579212f497
Author: Stephan Bergmann <sbergman at redhat.com>
Date:   Tue Sep 30 17:26:48 2014 +0200

    sc: std::auto_ptr -> std::unique_ptr
    
    Change-Id: I25468d578de597ff9aeba3ffc850c630fa532767

diff --git a/include/o3tl/ptr_container.hxx b/include/o3tl/ptr_container.hxx
index 6ce04c1..e89e567 100644
--- a/include/o3tl/ptr_container.hxx
+++ b/include/o3tl/ptr_container.hxx
@@ -13,11 +13,41 @@
 #include <sal/config.h>
 
 #include <memory>
+#include <utility>
 
 // Some glue for using std::unique_ptr with the Boost Pointer Container Library:
 
 namespace o3tl { namespace ptr_container {
 
+template<typename C, typename T> inline std::pair<typename C::iterator, bool>
+insert(C & container, std::unique_ptr<T> && element) {
+    std::pair<typename C::iterator, bool> r(container.insert(element.get()));
+    element.release();
+    return r;
+}
+
+template<typename C, typename T> inline std::pair<typename C::iterator, bool>
+insert(
+    C & container, typename C::key_type const & key,
+    std::unique_ptr<T> && element)
+{
+    // At least Boost <= 1.56.0 boost::ptr_map_adaptor has odd key const-ness
+    // discrepancy between
+    //
+    //   std::pair<iterator,bool> insert( key_type& k, T* x )
+    //
+    // and
+    //
+    //   template< class U >
+    //   std::pair<iterator,bool> insert( const key_type& k,
+    //                                    std::auto_ptr<U> x )
+    std::pair<typename C::iterator, bool> r(
+        container.insert(
+            const_cast<typename C::key_type &>(key), element.get()));
+    element.release();
+    return r;
+}
+
 template<typename C, typename T>
 inline void push_back(C & container, std::unique_ptr<T> && element) {
     container.push_back(element.get());
diff --git a/sc/inc/chartlock.hxx b/sc/inc/chartlock.hxx
index 497942b..c5383a6 100644
--- a/sc/inc/chartlock.hxx
+++ b/sc/inc/chartlock.hxx
@@ -65,7 +65,7 @@ public:
 private:
     ScDocument*                         mpDoc;
     Timer                               maTimer;
-    std::auto_ptr< ScChartLockGuard >   mapScChartLockGuard;
+    std::unique_ptr< ScChartLockGuard >   mapScChartLockGuard;
 
     DECL_LINK(TimeoutHdl, void *);
 
diff --git a/sc/inc/dociter.hxx b/sc/inc/dociter.hxx
index 675d1991..2230b81 100644
--- a/sc/inc/dociter.hxx
+++ b/sc/inc/dociter.hxx
@@ -172,8 +172,8 @@ private:
         SCCOL mnCols;
     };
 
-    ::std::auto_ptr<ScDBQueryParamBase> mpParam;
-    ::std::auto_ptr<DataAccess>         mpData;
+    ::std::unique_ptr<ScDBQueryParamBase> mpParam;
+    ::std::unique_ptr<DataAccess>         mpData;
 
 public:
                     ScDBQueryDataIterator(ScDocument* pDocument, ScDBQueryParamBase* pParam);
diff --git a/sc/inc/document.hxx b/sc/inc/document.hxx
index 9c462d7..1d14b9f 100644
--- a/sc/inc/document.hxx
+++ b/sc/inc/document.hxx
@@ -290,7 +290,7 @@ private:
     ScDBCollection*     pDBCollection;
     ScDPCollection*     pDPCollection;
     ScChartCollection*  pChartCollection;
-    std::auto_ptr< ScTemporaryChartLock > apTemporaryChartLock;
+    std::unique_ptr< ScTemporaryChartLock > apTemporaryChartLock;
     ScPatternAttr*      pSelectionAttr;                 // Attributes of a block
     ScFormulaCell*      pFormulaTree;                   // formula tree (start)
     ScFormulaCell*      pEOFormulaTree;                 // formula tree (end), last cell
@@ -311,14 +311,14 @@ private:
 
     ScFieldEditEngine*  pCacheFieldEditEngine;
 
-    ::std::auto_ptr<ScDocProtection> pDocProtection;
-    ::std::auto_ptr<ScClipParam>     mpClipParam;
+    ::std::unique_ptr<ScDocProtection> pDocProtection;
+    ::std::unique_ptr<ScClipParam>     mpClipParam;
 
-    ::std::auto_ptr<ScExternalRefManager> pExternalRefMgr;
-    ::std::auto_ptr<ScMacroManager> mpMacroMgr;
+    ::std::unique_ptr<ScExternalRefManager> pExternalRefMgr;
+    ::std::unique_ptr<ScMacroManager> mpMacroMgr;
 
     // mutable for lazy construction
-    mutable ::std::auto_ptr< ScFormulaParserPool >
+    mutable ::std::unique_ptr< ScFormulaParserPool >
                         mxFormulaParserPool;            /// Pool for all external formula parsers used by this document.
 
     OUString       aDocName;                       // optional: name of document
@@ -338,7 +338,7 @@ private:
 
     ScLookupCacheMapImpl* pLookupCacheMapImpl;          // cache for lookups like VLOOKUP and MATCH
 
-    SfxItemSet*         pPreviewFont; // convert to std::auto_ptr or whatever
+    SfxItemSet*         pPreviewFont; // convert to std::unique_ptr or whatever
     ScStyleSheet*       pPreviewCellStyle;
     ScMarkData          maPreviewSelection;
     sal_Int64           nUnoObjectId;                   // counted up for UNO objects
diff --git a/sc/inc/dptabsrc.hxx b/sc/inc/dptabsrc.hxx
index c3e636f..f57b516 100644
--- a/sc/inc/dptabsrc.hxx
+++ b/sc/inc/dptabsrc.hxx
@@ -119,9 +119,7 @@ private:
     bool                    bResultOverflow;
     bool                    bPageFiltered;      // set if page field filters have been applied to cache table
 
-    SAL_WNODEPRECATED_DECLARATIONS_PUSH
-    ::std::auto_ptr<OUString> mpGrandTotalName;
-    SAL_WNODEPRECATED_DECLARATIONS_POP
+    ::std::unique_ptr<OUString> mpGrandTotalName;
 
     void                    CreateRes_Impl();
     void                    FillMemberResults();
diff --git a/sc/inc/editsrc.hxx b/sc/inc/editsrc.hxx
index ffc9e43..8625b70 100644
--- a/sc/inc/editsrc.hxx
+++ b/sc/inc/editsrc.hxx
@@ -133,14 +133,10 @@ public:
 class ScAccessibilityEditSource : public SvxEditSource
 {
 private:
-    SAL_WNODEPRECATED_DECLARATIONS_PUSH
-    ::std::auto_ptr < ScAccessibleTextData > mpAccessibleTextData;
-    SAL_WNODEPRECATED_DECLARATIONS_POP
+    ::std::unique_ptr < ScAccessibleTextData > mpAccessibleTextData;
 
 public:
-    SAL_WNODEPRECATED_DECLARATIONS_PUSH
-                        ScAccessibilityEditSource( ::std::auto_ptr < ScAccessibleTextData > pAccessibleCellTextData );
-    SAL_WNODEPRECATED_DECLARATIONS_POP
+                        ScAccessibilityEditSource( ::std::unique_ptr < ScAccessibleTextData > && pAccessibleCellTextData );
     virtual             ~ScAccessibilityEditSource();
 
     virtual SvxEditSource*      Clone() const SAL_OVERRIDE;
diff --git a/sc/inc/macromgr.hxx b/sc/inc/macromgr.hxx
index ecbf08f..fbf78ae 100644
--- a/sc/inc/macromgr.hxx
+++ b/sc/inc/macromgr.hxx
@@ -42,7 +42,7 @@ private:
     NameBoolMap mhFuncToVolatile;
     com::sun::star::uno::Reference< com::sun::star::container::XContainerListener > mxContainerListener;
 
-    ::std::auto_ptr<ScUserMacroDepTracker> mpDepTracker;
+    ::std::unique_ptr<ScUserMacroDepTracker> mpDepTracker;
     ScDocument* mpDoc;
 };
 
diff --git a/sc/inc/scextopt.hxx b/sc/inc/scextopt.hxx
index 30b0dad..8edc960 100644
--- a/sc/inc/scextopt.hxx
+++ b/sc/inc/scextopt.hxx
@@ -114,7 +114,7 @@ public:
     void                SetCodeName( SCTAB nTab, const OUString& rCodeName );
 
 private:
-    ::std::auto_ptr< ScExtDocOptionsImpl > mxImpl;
+    ::std::unique_ptr< ScExtDocOptionsImpl > mxImpl;
 };
 
 #endif
diff --git a/sc/inc/segmenttree.hxx b/sc/inc/segmenttree.hxx
index f1775fd..72d45b6 100644
--- a/sc/inc/segmenttree.hxx
+++ b/sc/inc/segmenttree.hxx
@@ -76,9 +76,7 @@ public:
     SCROW findLastNotOf(bool bValue) const;
 
 private:
-    SAL_WNODEPRECATED_DECLARATIONS_PUSH
-    ::std::auto_ptr<ScFlatBoolSegmentsImpl> mpImpl;
-    SAL_WNODEPRECATED_DECLARATIONS_POP
+    ::std::unique_ptr<ScFlatBoolSegmentsImpl> mpImpl;
 };
 
 class ScFlatBoolColSegments
@@ -101,9 +99,7 @@ public:
     void insertSegment(SCCOL nCol, SCCOL nSize, bool bSkipStartBoundary);
 
 private:
-    SAL_WNODEPRECATED_DECLARATIONS_PUSH
-    ::std::auto_ptr<ScFlatBoolSegmentsImpl> mpImpl;
-    SAL_WNODEPRECATED_DECLARATIONS_POP
+    ::std::unique_ptr<ScFlatBoolSegmentsImpl> mpImpl;
 };
 
 class ScFlatUInt16SegmentsImpl;
@@ -150,9 +146,7 @@ public:
     void enableTreeSearch(bool bEnable);
 
 private:
-    SAL_WNODEPRECATED_DECLARATIONS_PUSH
-    ::std::auto_ptr<ScFlatUInt16SegmentsImpl> mpImpl;
-    SAL_WNODEPRECATED_DECLARATIONS_POP
+    ::std::unique_ptr<ScFlatUInt16SegmentsImpl> mpImpl;
 };
 
 #endif
diff --git a/sc/qa/unit/ucalc.cxx b/sc/qa/unit/ucalc.cxx
index 1cc3b63..efcfc8e 100644
--- a/sc/qa/unit/ucalc.cxx
+++ b/sc/qa/unit/ucalc.cxx
@@ -3522,7 +3522,7 @@ void Test::testCopyPasteTranspose()
     ScDocument aNewClipDoc(SCDOCMODE_CLIP);
     copyToClip(m_pDoc, aSrcRange, &aNewClipDoc);
 
-    ::std::auto_ptr<ScDocument> pTransClip;
+    ::std::unique_ptr<ScDocument> pTransClip;
     pTransClip.reset(new ScDocument(SCDOCMODE_CLIP));
     aNewClipDoc.TransposeClip(pTransClip.get(), IDF_ALL, false);
     ScDocument* pTransposedClip = pTransClip.release();
diff --git a/sc/source/core/data/documen2.cxx b/sc/source/core/data/documen2.cxx
index c16b059..fdce240 100644
--- a/sc/source/core/data/documen2.cxx
+++ b/sc/source/core/data/documen2.cxx
@@ -156,10 +156,6 @@ ScDocument::ScDocument( ScDocumentMode eMode, SfxObjectShell* pDocShell ) :
         pChangeViewSettings( NULL ),
         pScriptTypeData( NULL ),
         pCacheFieldEditEngine( NULL ),
-        pDocProtection( NULL ),
-        mpClipParam( NULL),
-        pExternalRefMgr( NULL ),
-        mpMacroMgr( NULL ),
         pViewOptions( NULL ),
         pDocOptions( NULL ),
         pExtDocOptions( NULL ),
diff --git a/sc/source/core/data/dpobject.cxx b/sc/source/core/data/dpobject.cxx
index 387747c..472d8eb 100644
--- a/sc/source/core/data/dpobject.cxx
+++ b/sc/source/core/data/dpobject.cxx
@@ -68,12 +68,14 @@
 #include <comphelper/processfactory.hxx>
 #include <comphelper/string.hxx>
 #include <comphelper/types.hxx>
+#include <o3tl/ptr_container.hxx>
 #include <sal/macros.h>
 #include <tools/debug.hxx>
 #include <tools/diagnose_ex.h>
 #include <svl/zforlist.hxx>
 #include <vcl/msgbox.hxx>
 
+#include <utility>
 #include <vector>
 #include <memory>
 
@@ -2385,9 +2387,9 @@ bool ScDPObject::FillLabelData(ScPivotParam& rParam)
 
     for (sal_Int32 nDim = 0; nDim < nDimCount; ++nDim)
     {
-        std::auto_ptr<ScDPLabelData> pNewLabel(new ScDPLabelData);
+        std::unique_ptr<ScDPLabelData> pNewLabel(new ScDPLabelData);
         FillLabelDataForDimension(xDims, nDim, *pNewLabel);
-        rParam.maLabelArray.push_back(pNewLabel);
+        o3tl::ptr_container::push_back(rParam.maLabelArray, std::move(pNewLabel));
     }
 
     return true;
@@ -2866,9 +2868,7 @@ const ScDPCache* ScDPCollection::SheetCaches::getCache(const ScRange& rRange, co
     }
 
     // Not cached.  Create a new cache.
-    SAL_WNODEPRECATED_DECLARATIONS_PUSH
-    ::std::auto_ptr<ScDPCache> pCache(new ScDPCache(mpDoc));
-    SAL_WNODEPRECATED_DECLARATIONS_POP
+    ::std::unique_ptr<ScDPCache> pCache(new ScDPCache(mpDoc));
     pCache->InitFromDoc(mpDoc, rRange);
     if (pDimData)
         pDimData->WriteToCache(*pCache);
@@ -2890,7 +2890,7 @@ const ScDPCache* ScDPCollection::SheetCaches::getCache(const ScRange& rRange, co
     }
 
     const ScDPCache* p = pCache.get();
-    maCaches.insert(nIndex, pCache);
+    o3tl::ptr_container::insert(maCaches, nIndex, std::move(pCache));
     return p;
 }
 
@@ -3037,15 +3037,13 @@ const ScDPCache* ScDPCollection::NameCaches::getCache(
         // already cached.
         return itr->second;
 
-    SAL_WNODEPRECATED_DECLARATIONS_PUSH
-    ::std::auto_ptr<ScDPCache> pCache(new ScDPCache(mpDoc));
-    SAL_WNODEPRECATED_DECLARATIONS_POP
+    ::std::unique_ptr<ScDPCache> pCache(new ScDPCache(mpDoc));
     pCache->InitFromDoc(mpDoc, rRange);
     if (pDimData)
         pDimData->WriteToCache(*pCache);
 
     const ScDPCache* p = pCache.get();
-    maCaches.insert(rName, pCache);
+    o3tl::ptr_container::insert(maCaches, rName, std::move(pCache));
     return p;
 }
 
@@ -3126,9 +3124,7 @@ const ScDPCache* ScDPCollection::DBCaches::getCache(
     if (!xRowSet.is())
         return NULL;
 
-    SAL_WNODEPRECATED_DECLARATIONS_PUSH
-    ::std::auto_ptr<ScDPCache> pCache(new ScDPCache(mpDoc));
-    SAL_WNODEPRECATED_DECLARATIONS_POP
+    ::std::unique_ptr<ScDPCache> pCache(new ScDPCache(mpDoc));
     SvNumberFormatter aFormat( comphelper::getProcessComponentContext(), ScGlobal::eLnge);
     DBConnector aDB(*pCache, xRowSet, *aFormat.GetNullDate());
     if (!aDB.isValid())
@@ -3146,7 +3142,7 @@ const ScDPCache* ScDPCollection::DBCaches::getCache(
 
     ::comphelper::disposeComponent(xRowSet);
     const ScDPCache* p = pCache.get();
-    maCaches.insert(aType, pCache);
+    o3tl::ptr_container::insert(maCaches, aType, std::move(pCache));
     return p;
 }
 
@@ -3500,10 +3496,10 @@ void ScDPCollection::CopyToTab( SCTAB nOld, SCTAB nNew )
         ScAddress& e = aOutRange.aEnd;
         s.SetTab(nNew);
         e.SetTab(nNew);
-        std::auto_ptr<ScDPObject> pNew(new ScDPObject(rObj));
+        std::unique_ptr<ScDPObject> pNew(new ScDPObject(rObj));
         pNew->SetOutRange(aOutRange);
         mpDoc->ApplyFlagsTab(s.Col(), s.Row(), e.Col(), e.Row(), s.Tab(), SC_MF_DP_TABLE);
-        aAdded.push_back(pNew);
+        o3tl::ptr_container::push_back(aAdded, std::move(pNew));
     }
 
     maTables.transfer(maTables.end(), aAdded.begin(), aAdded.end(), aAdded);
diff --git a/sc/source/core/data/dpsave.cxx b/sc/source/core/data/dpsave.cxx
index 51b524f..2afe33f 100644
--- a/sc/source/core/data/dpsave.cxx
+++ b/sc/source/core/data/dpsave.cxx
@@ -53,7 +53,7 @@ using namespace com::sun::star;
 using namespace com::sun::star::sheet;
 using ::com::sun::star::uno::Reference;
 using ::com::sun::star::uno::Any;
-using ::std::auto_ptr;
+using ::std::unique_ptr;
 
 #define SC_DPSAVEMODE_DONTKNOW 2
 
@@ -1360,7 +1360,7 @@ void ScDPSaveData::BuildAllDimensionMembers(ScDPTableData* pData)
                 // this member instance already exists. nothing to do.
                 continue;
 
-            auto_ptr<ScDPSaveMember> pNewMember(new ScDPSaveMember(aMemName));
+            unique_ptr<ScDPSaveMember> pNewMember(new ScDPSaveMember(aMemName));
             pNewMember->SetIsVisible(true);
             iter->AddMember(pNewMember.release());
         }
diff --git a/sc/source/core/data/dptabsrc.cxx b/sc/source/core/data/dptabsrc.cxx
index dc10d43..95d221e 100644
--- a/sc/source/core/data/dptabsrc.cxx
+++ b/sc/source/core/data/dptabsrc.cxx
@@ -111,8 +111,7 @@ ScDPSource::ScDPSource( ScDPTableData* pD ) :
     pColResults( NULL ),
     pRowResults( NULL ),
     bResultOverflow( false ),
-    bPageFiltered( false ),
-    mpGrandTotalName(NULL)
+    bPageFiltered( false )
 {
     pData->SetEmptyFlags( bIgnoreEmptyRows, bRepeatIfEmpty );
 }
diff --git a/sc/source/core/data/postit.cxx b/sc/source/core/data/postit.cxx
index c1d56b0..9eeabbf 100644
--- a/sc/source/core/data/postit.cxx
+++ b/sc/source/core/data/postit.cxx
@@ -446,8 +446,8 @@ ScNoteCaptionCreator::ScNoteCaptionCreator( ScDocument& rDoc, const ScAddress& r
 
 struct ScCaptionInitData
 {
-    typedef ::std::auto_ptr< SfxItemSet >           SfxItemSetPtr;
-    typedef ::std::auto_ptr< OutlinerParaObject >   OutlinerParaObjPtr;
+    typedef ::std::unique_ptr< SfxItemSet >           SfxItemSetPtr;
+    typedef ::std::unique_ptr< OutlinerParaObject >   OutlinerParaObjPtr;
 
     SfxItemSetPtr       mxItemSet;          /// Caption object formatting.
     OutlinerParaObjPtr  mxOutlinerObj;      /// Text object with all text portion formatting.
diff --git a/sc/source/core/inc/cellkeytranslator.hxx b/sc/source/core/inc/cellkeytranslator.hxx
index d756a22..33a50a6 100644
--- a/sc/source/core/inc/cellkeytranslator.hxx
+++ b/sc/source/core/inc/cellkeytranslator.hxx
@@ -75,7 +75,7 @@ private:
                   OpCode eOpCode = ocNone);
     void addToMap(const TransItem* pItems, const ::com::sun::star::lang::Locale& rLocale);
 
-    static ::std::auto_ptr<ScCellKeywordTranslator> spInstance;
+    static ::std::unique_ptr<ScCellKeywordTranslator> spInstance;
     ScCellKeywordHashMap maStringNameMap;
     ::utl::TransliterationWrapper maTransWrapper;
 };
diff --git a/sc/source/core/tool/cellkeytranslator.cxx b/sc/source/core/tool/cellkeytranslator.cxx
index ea57d06..6bb3254 100644
--- a/sc/source/core/tool/cellkeytranslator.cxx
+++ b/sc/source/core/tool/cellkeytranslator.cxx
@@ -73,7 +73,7 @@ ScCellKeyword::ScCellKeyword(const sal_Char* pName, OpCode eOpCode, const lang::
 {
 }
 
-::std::auto_ptr<ScCellKeywordTranslator> ScCellKeywordTranslator::spInstance(NULL);
+::std::unique_ptr<ScCellKeywordTranslator> ScCellKeywordTranslator::spInstance;
 
 static void lclMatchKeyword(OUString& rName, const ScCellKeywordHashMap& aMap,
                             OpCode eOpCode = ocNone, const lang::Locale* pLocale = NULL)
diff --git a/sc/source/core/tool/dbdata.cxx b/sc/source/core/tool/dbdata.cxx
index c5ba011..e96e5b8 100644
--- a/sc/source/core/tool/dbdata.cxx
+++ b/sc/source/core/tool/dbdata.cxx
@@ -17,6 +17,9 @@
  *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
  */
 
+#include <sal/config.h>
+
+#include <o3tl/ptr_container.hxx>
 #include <unotools/transliterationwrapper.hxx>
 
 #include "dbdata.hxx"
@@ -31,8 +34,9 @@
 #include "sortparam.hxx"
 
 #include <memory>
+#include <utility>
 
-using ::std::auto_ptr;
+using ::std::unique_ptr;
 using ::std::unary_function;
 using ::std::for_each;
 using ::std::find_if;
@@ -685,13 +689,11 @@ ScDBData* ScDBCollection::NamedDBs::findByUpperName(const OUString& rName)
 
 bool ScDBCollection::NamedDBs::insert(ScDBData* p)
 {
-    SAL_WNODEPRECATED_DECLARATIONS_PUSH
-    auto_ptr<ScDBData> pData(p);
-    SAL_WNODEPRECATED_DECLARATIONS_POP
+    unique_ptr<ScDBData> pData(p);
     if (!pData->GetIndex())
         pData->SetIndex(mrParent.nEntryIndex++);
 
-    pair<DBsType::iterator, bool> r = maDBs.insert(pData);
+    pair<DBsType::iterator, bool> r = o3tl::ptr_container::insert(maDBs, std::move(pData));
 
     if (r.second && p->HasImportParam() && !p->HasImportSelection())
     {
@@ -767,23 +769,19 @@ ScDBData* ScDBCollection::AnonDBs::getByRange(const ScRange& rRange)
     {
         // Insert a new db data.  They all have identical names.
         OUString aName(STR_DB_GLOBAL_NONAME);
-        SAL_WNODEPRECATED_DECLARATIONS_PUSH
-        ::std::auto_ptr<ScDBData> pNew(new ScDBData(
+        ::std::unique_ptr<ScDBData> pNew(new ScDBData(
             aName, rRange.aStart.Tab(), rRange.aStart.Col(), rRange.aStart.Row(),
             rRange.aEnd.Col(), rRange.aEnd.Row(), true, false));
-        SAL_WNODEPRECATED_DECLARATIONS_POP
         pData = pNew.get();
-        maDBs.push_back(pNew);
+        o3tl::ptr_container::push_back(maDBs, std::move(pNew));
     }
     return const_cast<ScDBData*>(pData);
 }
 
 void ScDBCollection::AnonDBs::insert(ScDBData* p)
 {
-    SAL_WNODEPRECATED_DECLARATIONS_PUSH
-    ::std::auto_ptr<ScDBData> pNew(p);
-        SAL_WNODEPRECATED_DECLARATIONS_POP
-    maDBs.push_back(pNew);
+    ::std::unique_ptr<ScDBData> pNew(p);
+    o3tl::ptr_container::push_back(maDBs, std::move(pNew));
 }
 
 bool ScDBCollection::AnonDBs::empty() const
diff --git a/sc/source/core/tool/doubleref.cxx b/sc/source/core/tool/doubleref.cxx
index 2499c71..5451eb1 100644
--- a/sc/source/core/tool/doubleref.cxx
+++ b/sc/source/core/tool/doubleref.cxx
@@ -31,7 +31,7 @@
 #include <memory>
 #include <vector>
 
-using ::std::auto_ptr;
+using ::std::unique_ptr;
 using ::std::vector;
 
 namespace {
@@ -356,7 +356,7 @@ SCCOL ScDBInternalRange::findFieldColumn(const OUString& rStr, sal_uInt16* pErr)
 
 ScDBQueryParamBase* ScDBInternalRange::createQueryParam(const ScDBRangeBase* pQueryRef) const
 {
-    auto_ptr<ScDBQueryParamInternal> pParam(new ScDBQueryParamInternal);
+    unique_ptr<ScDBQueryParamInternal> pParam(new ScDBQueryParamInternal);
 
     // Set the database range first.
     const ScAddress& s = maRange.aStart;
@@ -451,7 +451,7 @@ SCCOL ScDBExternalRange::findFieldColumn(const OUString& rStr, sal_uInt16* pErr)
 
 ScDBQueryParamBase* ScDBExternalRange::createQueryParam(const ScDBRangeBase* pQueryRef) const
 {
-    auto_ptr<ScDBQueryParamMatrix> pParam(new ScDBQueryParamMatrix);
+    unique_ptr<ScDBQueryParamMatrix> pParam(new ScDBQueryParamMatrix);
     pParam->mpMatrix = mpMatrix;
     fillQueryOptions(pParam.get());
 
diff --git a/sc/source/core/tool/interpr1.cxx b/sc/source/core/tool/interpr1.cxx
index d9e8e36..7c7dff3 100644
--- a/sc/source/core/tool/interpr1.cxx
+++ b/sc/source/core/tool/interpr1.cxx
@@ -81,7 +81,7 @@ ScTokenStack* ScInterpreter::pGlobalStack = NULL;
 bool ScInterpreter::bGlobalStackInUse = false;
 
 using namespace formula;
-using ::std::auto_ptr;
+using ::std::unique_ptr;
 
 void ScInterpreter::ScIfJump()
 {
@@ -6626,9 +6626,7 @@ ScDBQueryParamBase* ScInterpreter::GetDBParams( bool& rMissingField )
     if ( GetByte() == 3 )
     {
         // First, get the query criteria range.
-        SAL_WNODEPRECATED_DECLARATIONS_PUSH
-        ::std::auto_ptr<ScDBRangeBase> pQueryRef( PopDBDoubleRef() );
-        SAL_WNODEPRECATED_DECLARATIONS_POP
+        ::std::unique_ptr<ScDBRangeBase> pQueryRef( PopDBDoubleRef() );
         if (!pQueryRef.get())
             return NULL;
 
@@ -6690,9 +6688,7 @@ ScDBQueryParamBase* ScInterpreter::GetDBParams( bool& rMissingField )
         if (nGlobalError)
             return NULL;
 
-        SAL_WNODEPRECATED_DECLARATIONS_PUSH
-        auto_ptr<ScDBRangeBase> pDBRef( PopDBDoubleRef() );
-        SAL_WNODEPRECATED_DECLARATIONS_POP
+        unique_ptr<ScDBRangeBase> pDBRef( PopDBDoubleRef() );
 
         if (nGlobalError || !pDBRef.get())
             return NULL;
@@ -6724,9 +6720,7 @@ ScDBQueryParamBase* ScInterpreter::GetDBParams( bool& rMissingField )
         if (!ValidCol(nField))
             return NULL;
 
-        SAL_WNODEPRECATED_DECLARATIONS_PUSH
-        auto_ptr<ScDBQueryParamBase> pParam( pDBRef->createQueryParam(pQueryRef.get()) );
-        SAL_WNODEPRECATED_DECLARATIONS_POP
+        unique_ptr<ScDBQueryParamBase> pParam( pDBRef->createQueryParam(pQueryRef.get()) );
 
         if (pParam.get())
         {
@@ -6767,9 +6761,7 @@ void ScInterpreter::DBIterator( ScIterFunc eFunc )
     bool bNull = true;
     sal_uLong nCount = 0;
     bool bMissingField = false;
-    SAL_WNODEPRECATED_DECLARATIONS_PUSH
-    auto_ptr<ScDBQueryParamBase> pQueryParam( GetDBParams(bMissingField) );
-    SAL_WNODEPRECATED_DECLARATIONS_POP
+    unique_ptr<ScDBQueryParamBase> pQueryParam( GetDBParams(bMissingField) );
     if (pQueryParam.get())
     {
         if (!pQueryParam->IsValidFieldIndex())
@@ -6834,9 +6826,7 @@ void ScInterpreter::ScDBSum()
 void ScInterpreter::ScDBCount()
 {
     bool bMissingField = true;
-    SAL_WNODEPRECATED_DECLARATIONS_PUSH
-    auto_ptr<ScDBQueryParamBase> pQueryParam( GetDBParams(bMissingField) );
-    SAL_WNODEPRECATED_DECLARATIONS_POP
+    unique_ptr<ScDBQueryParamBase> pQueryParam( GetDBParams(bMissingField) );
     if (pQueryParam.get())
     {
         sal_uLong nCount = 0;
@@ -6894,9 +6884,7 @@ void ScInterpreter::ScDBCount()
 void ScInterpreter::ScDBCount2()
 {
     bool bMissingField = true;
-    SAL_WNODEPRECATED_DECLARATIONS_PUSH
-    auto_ptr<ScDBQueryParamBase> pQueryParam( GetDBParams(bMissingField) );
-    SAL_WNODEPRECATED_DECLARATIONS_POP
+    unique_ptr<ScDBQueryParamBase> pQueryParam( GetDBParams(bMissingField) );
     if (pQueryParam.get())
     {
         if (!pQueryParam->IsValidFieldIndex())
@@ -6952,9 +6940,7 @@ void ScInterpreter::GetDBStVarParams( double& rVal, double& rValCount )
     rValCount = 0.0;
     double fSum    = 0.0;
     bool bMissingField = false;
-    SAL_WNODEPRECATED_DECLARATIONS_PUSH
-    auto_ptr<ScDBQueryParamBase> pQueryParam( GetDBParams(bMissingField) );
-    SAL_WNODEPRECATED_DECLARATIONS_POP
+    unique_ptr<ScDBQueryParamBase> pQueryParam( GetDBParams(bMissingField) );
     if (pQueryParam.get())
     {
         if (!pQueryParam->IsValidFieldIndex())
diff --git a/sc/source/core/tool/interpr4.cxx b/sc/source/core/tool/interpr4.cxx
index e65e08b..7909202 100644
--- a/sc/source/core/tool/interpr4.cxx
+++ b/sc/source/core/tool/interpr4.cxx
@@ -76,7 +76,7 @@
 
 using namespace com::sun::star;
 using namespace formula;
-using ::std::auto_ptr;
+using ::std::unique_ptr;
 
 #define ADDIN_MAXSTRLEN 256
 
@@ -2427,9 +2427,7 @@ ScMatValType ScInterpreter::GetDoubleOrStringFromMatrix(
 void ScInterpreter::ScDBGet()
 {
     bool bMissingField = false;
-    SAL_WNODEPRECATED_DECLARATIONS_PUSH
-    auto_ptr<ScDBQueryParamBase> pQueryParam( GetDBParams(bMissingField) );
-    SAL_WNODEPRECATED_DECLARATIONS_POP
+    unique_ptr<ScDBQueryParamBase> pQueryParam( GetDBParams(bMissingField) );
     if (!pQueryParam.get())
     {
         // Failed to create query param.
diff --git a/sc/source/filter/excel/xelink.cxx b/sc/source/filter/excel/xelink.cxx
index ec074de..7e7786d 100644
--- a/sc/source/filter/excel/xelink.cxx
+++ b/sc/source/filter/excel/xelink.cxx
@@ -32,7 +32,7 @@
 #include <vector>
 #include <memory>
 
-using ::std::auto_ptr;
+using ::std::unique_ptr;
 using ::std::find_if;
 using ::std::vector;
 using ::com::sun::star::uno::Any;
@@ -110,7 +110,7 @@ private:
 
 private:
     const XclExpSupbook&    mrSupbook;
-    auto_ptr<ScTokenArray>  mpArray;
+    unique_ptr<ScTokenArray>  mpArray;
 };
 
 // List of external names =====================================================
diff --git a/sc/source/filter/excel/xichart.cxx b/sc/source/filter/excel/xichart.cxx
index b0ec5bdf..610b4e2 100644
--- a/sc/source/filter/excel/xichart.cxx
+++ b/sc/source/filter/excel/xichart.cxx
@@ -21,6 +21,7 @@
 
 #include <algorithm>
 #include <memory>
+#include <utility>
 
 #include <com/sun/star/frame/XModel.hpp>
 #include <com/sun/star/drawing/Direction3D.hpp>
@@ -74,6 +75,7 @@
 #include <com/sun/star/chart2/data/XDataSink.hpp>
 #include <com/sun/star/chart2/data/LabeledDataSequence.hpp>
 
+#include <o3tl/ptr_container.hxx>
 #include <sfx2/objsh.hxx>
 #include <svx/svdpage.hxx>
 #include <svx/unoapi.hxx>
@@ -122,7 +124,7 @@ using ::formula::FormulaToken;
 using ::formula::StackVar;
 using ::boost::shared_ptr;
 using ::std::pair;
-using ::std::auto_ptr;
+using ::std::unique_ptr;
 
 namespace cssc = ::com::sun::star::chart;
 namespace cssc2 = ::com::sun::star::chart2;
@@ -2102,12 +2104,10 @@ void XclImpChSeries::ReadChSerTrendLine( XclImpStream& rStrm )
 
 void XclImpChSeries::ReadChSerErrorBar( XclImpStream& rStrm )
 {
-    SAL_WNODEPRECATED_DECLARATIONS_PUSH
-    auto_ptr<XclImpChSerErrorBar> pErrorBar(new XclImpChSerErrorBar(GetChRoot()));
-    SAL_WNODEPRECATED_DECLARATIONS_POP
+    unique_ptr<XclImpChSerErrorBar> pErrorBar(new XclImpChSerErrorBar(GetChRoot()));
     pErrorBar->ReadChSerErrorBar(rStrm);
     sal_uInt8 nBarType = pErrorBar->GetBarType();
-    maErrorBars.insert(nBarType, pErrorBar);
+    o3tl::ptr_container::insert(maErrorBars, nBarType, std::move(pErrorBar));
 }
 
 XclImpChDataFormatRef XclImpChSeries::CreateDataFormat( sal_uInt16 nPointIdx, sal_uInt16 nFormatIdx )
@@ -2763,19 +2763,15 @@ void XclImpChTypeGroup::ReadChDropBar( XclImpStream& rStrm )
 {
     if (maDropBars.find(EXC_CHDROPBAR_UP) == maDropBars.end())
     {
-        SAL_WNODEPRECATED_DECLARATIONS_PUSH
-        auto_ptr<XclImpChDropBar> p(new XclImpChDropBar(EXC_CHDROPBAR_UP));
-        SAL_WNODEPRECATED_DECLARATIONS_POP
+        unique_ptr<XclImpChDropBar> p(new XclImpChDropBar(EXC_CHDROPBAR_UP));
         p->ReadRecordGroup(rStrm);
-        maDropBars.insert(EXC_CHDROPBAR_UP, p);
+        o3tl::ptr_container::insert(maDropBars, EXC_CHDROPBAR_UP, std::move(p));
     }
     else if(maDropBars.find(EXC_CHDROPBAR_DOWN) == maDropBars.end())
     {
-        SAL_WNODEPRECATED_DECLARATIONS_PUSH
-        auto_ptr<XclImpChDropBar> p(new XclImpChDropBar(EXC_CHDROPBAR_DOWN));
-        SAL_WNODEPRECATED_DECLARATIONS_POP
+        unique_ptr<XclImpChDropBar> p(new XclImpChDropBar(EXC_CHDROPBAR_DOWN));
         p->ReadRecordGroup(rStrm);
-        maDropBars.insert(EXC_CHDROPBAR_DOWN, p);
+        o3tl::ptr_container::insert(maDropBars, EXC_CHDROPBAR_DOWN, std::move(p));
     }
 }
 
@@ -3814,11 +3810,9 @@ void XclImpChChart::ReadChDefaultText( XclImpStream& rStrm )
     sal_uInt16 nTextId = rStrm.ReaduInt16();
     if( (rStrm.GetNextRecId() == EXC_ID_CHTEXT) && rStrm.StartNextRecord() )
     {
-        SAL_WNODEPRECATED_DECLARATIONS_PUSH
-        auto_ptr<XclImpChText> pText(new XclImpChText(GetChRoot()));
-        SAL_WNODEPRECATED_DECLARATIONS_POP
+        unique_ptr<XclImpChText> pText(new XclImpChText(GetChRoot()));
         pText->ReadRecordGroup(rStrm);
-        maDefTexts.insert(nTextId, pText);
+        o3tl::ptr_container::insert(maDefTexts, nTextId, std::move(pText));
     }
 }
 
@@ -3966,16 +3960,12 @@ void XclImpChChart::Convert( const Reference<XChartDocument>& xChartDoc,
     ScDocument& rDoc = GetRoot().GetDoc();
     if( ScChartListenerCollection* pChartCollection = rDoc.GetChartListenerCollection() )
     {
-        SAL_WNODEPRECATED_DECLARATIONS_PUSH
-        ::std::auto_ptr< ::std::vector< ScTokenRef > > xRefTokens( new ::std::vector< ScTokenRef > );
-        SAL_WNODEPRECATED_DECLARATIONS_POP
+        ::std::unique_ptr< ::std::vector< ScTokenRef > > xRefTokens( new ::std::vector< ScTokenRef > );
         for( XclImpChSeriesVec::const_iterator aIt = maSeries.begin(), aEnd = maSeries.end(); aIt != aEnd; ++aIt )
             (*aIt)->FillAllSourceLinks( *xRefTokens );
         if( !xRefTokens->empty() )
         {
-            SAL_WNODEPRECATED_DECLARATIONS_PUSH
-            ::std::auto_ptr< ScChartListener > xListener( new ScChartListener( rObjName, &rDoc, xRefTokens.release() ) );
-            SAL_WNODEPRECATED_DECLARATIONS_POP
+            ::std::unique_ptr< ScChartListener > xListener( new ScChartListener( rObjName, &rDoc, xRefTokens.release() ) );
             xListener->SetUsed( true );
             xListener->StartListeningTo();
             pChartCollection->insert( xListener.release() );
diff --git a/sc/source/filter/excel/xicontent.cxx b/sc/source/filter/excel/xicontent.cxx
index 491517a9..79c78ea 100644
--- a/sc/source/filter/excel/xicontent.cxx
+++ b/sc/source/filter/excel/xicontent.cxx
@@ -60,9 +60,10 @@
 #include "documentimport.hxx"
 
 #include <memory>
+#include <utility>
 
 using ::com::sun::star::uno::Sequence;
-using ::std::auto_ptr;
+using ::std::unique_ptr;
 
 // Shared string table ========================================================
 
@@ -240,11 +241,9 @@ OUString XclImpHyperlink::ReadEmbeddedData( XclImpStream& rStrm )
 
     OSL_ENSURE( aGuid == XclTools::maGuidStdLink, "XclImpHyperlink::ReadEmbeddedData - unknown header GUID" );
 
-    SAL_WNODEPRECATED_DECLARATIONS_PUSH
-    ::std::auto_ptr< OUString > xLongName;    // link / file name
-    ::std::auto_ptr< OUString > xShortName;   // 8.3-representation of file name
-    ::std::auto_ptr< OUString > xTextMark;    // text mark
-    SAL_WNODEPRECATED_DECLARATIONS_POP
+    ::std::unique_ptr< OUString > xLongName;    // link / file name
+    ::std::unique_ptr< OUString > xShortName;   // 8.3-representation of file name
+    ::std::unique_ptr< OUString > xTextMark;    // text mark
 
     // description (ignore)
     if( ::get_flag( nFlags, EXC_HLINK_DESCR ) )
@@ -320,7 +319,7 @@ OUString XclImpHyperlink::ReadEmbeddedData( XclImpStream& rStrm )
     OSL_ENSURE( rStrm.GetRecLeft() == 0, "XclImpHyperlink::ReadEmbeddedData - record size mismatch" );
 
     if( !xLongName.get() && xShortName.get() )
-        xLongName = xShortName;
+        xLongName = std::move(xShortName);
     else if( !xLongName.get() && xTextMark.get() )
         xLongName.reset( new OUString );
 
@@ -625,9 +624,7 @@ void XclImpCondFormat::ReadCF( XclImpStream& rStrm )
     const ScAddress& rPos = maRanges.front()->aStart;    // assured above that maRanges is not empty
     ExcelToSc& rFmlaConv = GetOldFmlaConverter();
 
-    SAL_WNODEPRECATED_DECLARATIONS_PUSH
-    ::std::auto_ptr< ScTokenArray > xTokArr1;
-    SAL_WNODEPRECATED_DECLARATIONS_POP
+    ::std::unique_ptr< ScTokenArray > xTokArr1;
     if( nFmlaSize1 > 0 )
     {
         const ScTokenArray* pTokArr = 0;
@@ -638,9 +635,7 @@ void XclImpCondFormat::ReadCF( XclImpStream& rStrm )
             xTokArr1.reset( pTokArr->Clone() );
     }
 
-    SAL_WNODEPRECATED_DECLARATIONS_PUSH
-    ::std::auto_ptr< ScTokenArray > pTokArr2;
-    SAL_WNODEPRECATED_DECLARATIONS_POP
+    ::std::unique_ptr< ScTokenArray > pTokArr2;
     if( nFmlaSize2 > 0 )
     {
         const ScTokenArray* pTokArr = 0;
@@ -762,9 +757,7 @@ void XclImpValidationManager::ReadDV( XclImpStream& rStrm )
     // first formula
     // string list is single tStr token with NUL separators -> replace them with LF
     rStrm.SetNulSubstChar( '\n' );
-    SAL_WNODEPRECATED_DECLARATIONS_PUSH
-    ::std::auto_ptr< ScTokenArray > xTokArr1;
-    SAL_WNODEPRECATED_DECLARATIONS_POP
+    ::std::unique_ptr< ScTokenArray > xTokArr1;
 
     sal_uInt16 nLen = 0;
     rStrm >> nLen;
@@ -781,9 +774,7 @@ void XclImpValidationManager::ReadDV( XclImpStream& rStrm )
     rStrm.SetNulSubstChar();    // back to default
 
     // second formula
-    SAL_WNODEPRECATED_DECLARATIONS_PUSH
-    ::std::auto_ptr< ScTokenArray > xTokArr2;
-    SAL_WNODEPRECATED_DECLARATIONS_POP
+    ::std::unique_ptr< ScTokenArray > xTokArr2;
 
     nLen = 0;
     rStrm >> nLen;
@@ -1192,9 +1183,7 @@ void XclImpDocProtectBuffer::Apply() const
         // If neither is set then the document is not protected at all.
         return;
 
-    SAL_WNODEPRECATED_DECLARATIONS_PUSH
-    auto_ptr<ScDocProtection> pProtect(new ScDocProtection);
-    SAL_WNODEPRECATED_DECLARATIONS_POP
+    unique_ptr<ScDocProtection> pProtect(new ScDocProtection);
     pProtect->setProtected(true);
 
     if (mnPassHash)
@@ -1290,9 +1279,7 @@ void XclImpSheetProtectBuffer::Apply() const
             // This sheet is (for whatever reason) not protected.
             continue;
 
-        SAL_WNODEPRECATED_DECLARATIONS_PUSH
-        auto_ptr<ScTableProtection> pProtect(new ScTableProtection);
-        SAL_WNODEPRECATED_DECLARATIONS_POP
+        unique_ptr<ScTableProtection> pProtect(new ScTableProtection);
         pProtect->setProtected(true);
 
         // 16-bit hash password
diff --git a/sc/source/filter/excel/xihelper.cxx b/sc/source/filter/excel/xihelper.cxx
index 7e95368..6a98771 100644
--- a/sc/source/filter/excel/xihelper.cxx
+++ b/sc/source/filter/excel/xihelper.cxx
@@ -227,7 +227,7 @@ void XclImpStringHelper::SetToDocument(
     if (rString.GetText().isEmpty())
         return;
 
-    ::std::auto_ptr< EditTextObject > pTextObj( lclCreateTextObject( rRoot, rString, EXC_FONTITEM_EDITENG, nXFIndex ) );
+    ::std::unique_ptr< EditTextObject > pTextObj( lclCreateTextObject( rRoot, rString, EXC_FONTITEM_EDITENG, nXFIndex ) );
 
     if (pTextObj.get())
     {
diff --git a/sc/source/filter/ftools/fprogressbar.cxx b/sc/source/filter/ftools/fprogressbar.cxx
index bc3980d..1dfc905 100644
--- a/sc/source/filter/ftools/fprogressbar.cxx
+++ b/sc/source/filter/ftools/fprogressbar.cxx
@@ -22,7 +22,6 @@
 #include "progress.hxx"
 
 ScfProgressBar::ScfProgressSegment::ScfProgressSegment( sal_Size nSize ) :
-    mxProgress( 0 ),
     mnSize( nSize ),
     mnPos( 0 )
 {
diff --git a/sc/source/filter/html/htmlpars.cxx b/sc/source/filter/html/htmlpars.cxx
index 00ce6f1..48e1d96 100644
--- a/sc/source/filter/html/htmlpars.cxx
+++ b/sc/source/filter/html/htmlpars.cxx
@@ -17,8 +17,13 @@
  *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
  */
 
+#include <sal/config.h>
+
+#include <utility>
+
 #include <boost/shared_ptr.hpp>
 #include <comphelper/string.hxx>
+#include <o3tl/ptr_container.hxx>
 
 #include "scitems.hxx"
 #include <editeng/eeitem.hxx>
@@ -84,10 +89,8 @@ void ScHTMLStyles::add(const char* pElemName, size_t nElemName, const char* pCla
             if (itrElem == maElemProps.end())
             {
                 // new element
-                SAL_WNODEPRECATED_DECLARATIONS_PUSH
-                std::auto_ptr<NamePropsType> p(new NamePropsType);
-                SAL_WNODEPRECATED_DECLARATIONS_POP
-                std::pair<ElemsType::iterator, bool> r = maElemProps.insert(aElem, p);
+                std::unique_ptr<NamePropsType> p(new NamePropsType);
+                std::pair<ElemsType::iterator, bool> r = o3tl::ptr_container::insert(maElemProps, aElem, std::move(p));
                 if (!r.second)
                     // insertion failed.
                     return;
@@ -170,10 +173,8 @@ void ScHTMLStyles::insertProp(
     if (itr == rStore.end())
     {
         // new element
-        SAL_WNODEPRECATED_DECLARATIONS_PUSH
-        std::auto_ptr<PropsType> p(new PropsType);
-        SAL_WNODEPRECATED_DECLARATIONS_POP
-        std::pair<NamePropsType::iterator, bool> r = rStore.insert(aName, p);
+        std::unique_ptr<PropsType> p(new PropsType);
+        std::pair<NamePropsType::iterator, bool> r = o3tl::ptr_container::insert(rStore, aName, std::move(p));
         if (!r.second)
             // insertion failed.
             return;
@@ -2140,9 +2141,7 @@ void ScHTMLTable::DataOn( const ImportInfo& rInfo )
     {
         // read needed options from the <td> tag
         ScHTMLSize aSpanSize( 1, 1 );
-        SAL_WNODEPRECATED_DECLARATIONS_PUSH
-        ::std::auto_ptr<OUString> pValStr, pNumStr;
-        SAL_WNODEPRECATED_DECLARATIONS_POP
+        ::std::unique_ptr<OUString> pValStr, pNumStr;
         const HTMLOptions& rOptions = static_cast<HTMLParser*>(rInfo.pParser)->GetOptions();
         HTMLOptions::const_iterator itr = rOptions.begin(), itrEnd = rOptions.end();
         sal_uInt32 nNumberFormat = NUMBERFORMAT_ENTRY_NOT_FOUND;
diff --git a/sc/source/filter/inc/connectionsbuffer.hxx b/sc/source/filter/inc/connectionsbuffer.hxx
index 00cd1d0..03f36d9 100644
--- a/sc/source/filter/inc/connectionsbuffer.hxx
+++ b/sc/source/filter/inc/connectionsbuffer.hxx
@@ -62,7 +62,7 @@ struct WebPrModel
 /** Common properties of an external data connection. */
 struct ConnectionModel
 {
-    typedef ::std::auto_ptr< WebPrModel > WebPrModelPtr;
+    typedef ::std::unique_ptr< WebPrModel > WebPrModelPtr;
 
     WebPrModelPtr       mxWebPr;            /// Special settings for web queries.
     OUString     maName;             /// Unique name of this connection.
diff --git a/sc/source/filter/inc/defnamesbuffer.hxx b/sc/source/filter/inc/defnamesbuffer.hxx
index 4adc1b7c..09f1579 100644
--- a/sc/source/filter/inc/defnamesbuffer.hxx
+++ b/sc/source/filter/inc/defnamesbuffer.hxx
@@ -136,8 +136,8 @@ private:
     void                implImportBiffFormula();
 
 private:
-    typedef ::std::auto_ptr< StreamDataSequence >   StreamDataSeqPtr;
-    typedef ::std::auto_ptr< BiffInputStreamPos >   BiffStreamPosPtr;
+    typedef ::std::unique_ptr< StreamDataSequence >   StreamDataSeqPtr;
+    typedef ::std::unique_ptr< BiffInputStreamPos >   BiffStreamPosPtr;
 
     ScRangeData*        mpScRangeData;       /// ScRangeData of the defined name.
     sal_Int32           mnTokenIndex;       /// Name index used in API token array.
diff --git a/sc/source/filter/inc/drawingfragment.hxx b/sc/source/filter/inc/drawingfragment.hxx
index 1afd26f..4e36ad6 100644
--- a/sc/source/filter/inc/drawingfragment.hxx
+++ b/sc/source/filter/inc/drawingfragment.hxx
@@ -112,7 +112,7 @@ protected:
     virtual void        onEndElement() SAL_OVERRIDE;
 
 private:
-    typedef ::std::auto_ptr< ShapeAnchor > ShapeAnchorRef;
+    typedef ::std::unique_ptr< ShapeAnchor > ShapeAnchorRef;
 
     ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XShapes >
                         mxDrawPage;             /// Drawing page of this sheet.
diff --git a/sc/source/filter/inc/formulaparser.hxx b/sc/source/filter/inc/formulaparser.hxx
index 47d0cf2..9bc058d 100644
--- a/sc/source/filter/inc/formulaparser.hxx
+++ b/sc/source/filter/inc/formulaparser.hxx
@@ -139,7 +139,7 @@ public:
     OUString     importMacroName( const OUString& rFormulaString );
 
 private:
-    ::std::auto_ptr< FormulaParserImpl > mxImpl;
+    ::std::unique_ptr< FormulaParserImpl > mxImpl;
 };
 
 } // namespace xls
diff --git a/sc/source/filter/inc/fprogressbar.hxx b/sc/source/filter/inc/fprogressbar.hxx
index 1c9d3f7..5b2a844 100644
--- a/sc/source/filter/inc/fprogressbar.hxx
+++ b/sc/source/filter/inc/fprogressbar.hxx
@@ -152,7 +152,7 @@ private:
     /** Contains all data of a segment of the progress bar. */
     struct ScfProgressSegment
     {
-        typedef ::std::auto_ptr< ScfProgressBar > ScfProgressBarPtr;
+        typedef ::std::unique_ptr< ScfProgressBar > ScfProgressBarPtr;
 
         ScfProgressBarPtr   mxProgress;     /// Pointer to sub progress bar for this segment.
         sal_Size            mnSize;         /// Size of this segment.
@@ -162,7 +162,7 @@ private:
                             ~ScfProgressSegment();
     };
 
-    typedef ::std::auto_ptr< ScProgress >           ScProgressPtr;
+    typedef ::std::unique_ptr< ScProgress >         ScProgressPtr;
     typedef boost::ptr_vector< ScfProgressSegment > ScfSegmentList;
 
     ScfSegmentList      maSegments;         /// List of progress segments.
@@ -216,7 +216,7 @@ private:
     void                Init( SfxObjectShell* pDocShell, const OUString& rText );
 
 private:
-    typedef ::std::auto_ptr< ScfSimpleProgressBar > ScfSimpleProgressBarPtr;
+    typedef ::std::unique_ptr< ScfSimpleProgressBar > ScfSimpleProgressBarPtr;
 
     ScfSimpleProgressBarPtr mxProgress; /// The used progress bar.
     SvStream&           mrStrm;         /// The used stream.
diff --git a/sc/source/filter/inc/htmlpars.hxx b/sc/source/filter/inc/htmlpars.hxx
index b24ab98..d39737a 100644
--- a/sc/source/filter/inc/htmlpars.hxx
+++ b/sc/source/filter/inc/htmlpars.hxx
@@ -464,12 +464,12 @@ protected:
     void                RecalcDocPos( const ScHTMLPos& rBasePos );
 
 private:
-    typedef ::std::auto_ptr< ScHTMLTableMap >           ScHTMLTableMapPtr;
-    typedef ::std::auto_ptr< SfxItemSet >               SfxItemSetPtr;
+    typedef ::std::unique_ptr< ScHTMLTableMap >         ScHTMLTableMapPtr;
+    typedef ::std::unique_ptr< SfxItemSet >             SfxItemSetPtr;
     typedef ::std::vector< SCCOLROW >                   ScSizeVec;
     typedef ::std::list< ScHTMLEntry* >                 ScHTMLEntryList;
     typedef ::std::map< ScHTMLPos, ScHTMLEntryList >    ScHTMLEntryMap;
-    typedef ::std::auto_ptr< ScHTMLEntry >              ScHTMLEntryPtr;
+    typedef ::std::unique_ptr< ScHTMLEntry >            ScHTMLEntryPtr;
 
     /** Returns true, if the current cell does not contain an entry yet. */
     bool                IsEmptyCell() const;
@@ -632,7 +632,7 @@ private:
     DECL_LINK( HTMLImportHdl, const ImportInfo* );
 
 private:
-    typedef ::std::auto_ptr< ScHTMLGlobalTable >    ScHTMLGlobalTablePtr;
+    typedef ::std::unique_ptr< ScHTMLGlobalTable >    ScHTMLGlobalTablePtr;
 
     OUStringBuffer maTitle;            /// The title of the document.
     ScHTMLGlobalTablePtr mxGlobTable;       /// Contains the entire imported document.
diff --git a/sc/source/filter/inc/pagesettings.hxx b/sc/source/filter/inc/pagesettings.hxx
index dc5b93a..f9a9ff2 100644
--- a/sc/source/filter/inc/pagesettings.hxx
+++ b/sc/source/filter/inc/pagesettings.hxx
@@ -168,7 +168,7 @@ private:
                             const OUString& rContent );
 
 private:
-    typedef ::std::auto_ptr< HeaderFooterParser > HeaderFooterParserPtr;
+    typedef ::std::unique_ptr< HeaderFooterParser > HeaderFooterParserPtr;
     HeaderFooterParserPtr mxHFParser;
     HFHelperData        maHeaderData;
     HFHelperData        maFooterData;
diff --git a/sc/source/filter/inc/stylesbuffer.hxx b/sc/source/filter/inc/stylesbuffer.hxx
index b2e1186..88e9db8 100644
--- a/sc/source/filter/inc/stylesbuffer.hxx
+++ b/sc/source/filter/inc/stylesbuffer.hxx
@@ -672,7 +672,7 @@ public:
     const ::ScPatternAttr& createPattern( bool bSkipPoolDefs = false );
 
 private:
-    typedef ::std::auto_ptr< ::ScPatternAttr > ScPatternAttrPtr;
+    typedef ::std::unique_ptr< ::ScPatternAttr > ScPatternAttrPtr;
 
     ScPatternAttrPtr    mpPattern;          /// Calc item set.
 
diff --git a/sc/source/filter/inc/themebuffer.hxx b/sc/source/filter/inc/themebuffer.hxx
index 0617c21..84ff9ea 100644
--- a/sc/source/filter/inc/themebuffer.hxx
+++ b/sc/source/filter/inc/themebuffer.hxx
@@ -41,7 +41,7 @@ public:
     inline const FontModel& getDefaultFontModel() const { return *mxDefFontModel; }
 
 private:
-    typedef ::std::auto_ptr< FontModel > FontModelPtr;
+    typedef ::std::unique_ptr< FontModel > FontModelPtr;
     FontModelPtr        mxDefFontModel;
 };
 
diff --git a/sc/source/filter/inc/worksheetfragment.hxx b/sc/source/filter/inc/worksheetfragment.hxx
index 1f37603..5c68ff5 100644
--- a/sc/source/filter/inc/worksheetfragment.hxx
+++ b/sc/source/filter/inc/worksheetfragment.hxx
@@ -44,7 +44,7 @@ private:
     void                importDataValidation( SequenceInputStream& rStrm );
 
 private:
-    ::std::auto_ptr< ValidationModel > mxValModel;
+    ::std::unique_ptr< ValidationModel > mxValModel;
 };
 
 class WorksheetFragment : public WorksheetFragmentBase
diff --git a/sc/source/filter/inc/xcl97esc.hxx b/sc/source/filter/inc/xcl97esc.hxx
index 795208c..1b90097 100644
--- a/sc/source/filter/inc/xcl97esc.hxx
+++ b/sc/source/filter/inc/xcl97esc.hxx
@@ -41,10 +41,8 @@ private:
     virtual SvStream*   ImplQueryPictureStream() SAL_OVERRIDE;
 
 private:
-    SAL_WNODEPRECATED_DECLARATIONS_PUSH
-    ::std::auto_ptr< ::utl::TempFile > mxPicTempFile;
-    ::std::auto_ptr< SvStream > mxPicStrm;
-    SAL_WNODEPRECATED_DECLARATIONS_POP
+    ::std::unique_ptr< ::utl::TempFile > mxPicTempFile;
+    ::std::unique_ptr< SvStream > mxPicStrm;
 };
 
 class XclObj;
diff --git a/sc/source/filter/inc/xcl97rec.hxx b/sc/source/filter/inc/xcl97rec.hxx
index 4cc3576..e84241e 100644
--- a/sc/source/filter/inc/xcl97rec.hxx
+++ b/sc/source/filter/inc/xcl97rec.hxx
@@ -159,7 +159,7 @@ public:
 class XclObjComment : public XclObj
 {
     ScAddress                   maScPos;
-    std::auto_ptr< SdrCaptionObj >
+    std::unique_ptr< SdrCaptionObj >
                                 mpCaption;
     bool                        mbVisible;
     Rectangle                   maFrom;
diff --git a/sc/source/filter/inc/xehelper.hxx b/sc/source/filter/inc/xehelper.hxx
index f15a74a..7facf22 100644
--- a/sc/source/filter/inc/xehelper.hxx
+++ b/sc/source/filter/inc/xehelper.hxx
@@ -59,9 +59,7 @@ public:
     void                Progress();
 
 private:
-    SAL_WNODEPRECATED_DECLARATIONS_PUSH
-    typedef ::std::auto_ptr< ScfProgressBar > ScfProgressBarPtr;
-    SAL_WNODEPRECATED_DECLARATIONS_POP
+    typedef ::std::unique_ptr< ScfProgressBar > ScfProgressBarPtr;
 
     ScfProgressBarPtr   mxProgress;         /// Progress bar implementation.
     ScfProgressBar*     mpSubProgress;      /// Current sub progress bar.
diff --git a/sc/source/filter/inc/xestyle.hxx b/sc/source/filter/inc/xestyle.hxx
index 9d8453b..fd7f3e7 100644
--- a/sc/source/filter/inc/xestyle.hxx
+++ b/sc/source/filter/inc/xestyle.hxx
@@ -266,7 +266,7 @@ struct XclExpNumFmt
 };
 
 class SvNumberFormatter;
-typedef ::std::auto_ptr< SvNumberFormatter >    SvNumberFormatterPtr;
+typedef ::std::unique_ptr< SvNumberFormatter >    SvNumberFormatterPtr;
 
 /** Stores all number formats used in the document. */
 class XclExpNumFmtBuffer : public XclExpRecordBase, protected XclExpRoot
diff --git a/sc/source/filter/inc/xicontent.hxx b/sc/source/filter/inc/xicontent.hxx
index ba9ff3b..2e376f9 100644
--- a/sc/source/filter/inc/xicontent.hxx
+++ b/sc/source/filter/inc/xicontent.hxx
@@ -133,7 +133,7 @@ public:
     void                Apply();
 
 private:
-    typedef ::std::auto_ptr< ScConditionalFormat > ScCondFmtPtr;
+    typedef ::std::unique_ptr< ScConditionalFormat > ScCondFmtPtr;
 
     ScRangeList         maRanges;           /// Destination cell ranges.
     ScCondFmtPtr        mxScCondFmt;        /// Calc conditional format.
diff --git a/sc/source/filter/inc/xihelper.hxx b/sc/source/filter/inc/xihelper.hxx
index ce49f0e..3e54efe 100644
--- a/sc/source/filter/inc/xihelper.hxx
+++ b/sc/source/filter/inc/xihelper.hxx
@@ -177,7 +177,7 @@ public:
     sal_Int32           GetTotalHeight() const;
 
 private:    // types
-    typedef ::std::auto_ptr< XclFontData > XclFontDataPtr;
+    typedef ::std::unique_ptr< XclFontData > XclFontDataPtr;
 
     /** Enumerates the supported header/footer portions. */
     enum XclImpHFPortion { EXC_HF_LEFT, EXC_HF_CENTER, EXC_HF_RIGHT, EXC_HF_PORTION_COUNT };
@@ -313,7 +313,7 @@ public:
     sal_uInt16              GetScError() const;
 
 protected:
-    typedef ::std::auto_ptr< const ScTokenArray >   ScTokenArrayPtr;
+    typedef ::std::unique_ptr< const ScTokenArray >   ScTokenArrayPtr;
 
     OUString            maStr;      /// Cached value is a string.
     double              mfValue;    /// Cached value is a double.
diff --git a/sc/source/filter/inc/xilink.hxx b/sc/source/filter/inc/xilink.hxx
index f3fb721..4da2a70 100644
--- a/sc/source/filter/inc/xilink.hxx
+++ b/sc/source/filter/inc/xilink.hxx
@@ -149,8 +149,8 @@ public:
     sal_uInt32   GetStorageId() const { return mnStorageId; }
 
 private:
-    typedef ::std::auto_ptr< XclImpCachedMatrix > XclImpCachedMatrixPtr;
-    typedef ::std::auto_ptr< ScTokenArray >       TokenArrayPtr;
+    typedef ::std::unique_ptr< XclImpCachedMatrix > XclImpCachedMatrixPtr;
+    typedef ::std::unique_ptr< ScTokenArray >       TokenArrayPtr;
 
     XclImpCachedMatrixPtr mxDdeMatrix;      /// Cached results of the DDE link.
     MOper*              mpMOper;            /// Cached values for OLE link
@@ -219,7 +219,7 @@ public:
     const OUString&       GetMacroName( sal_uInt16 nExtSheet, sal_uInt16 nExtName ) const;
 
 private:
-    typedef ::std::auto_ptr< XclImpLinkManagerImpl > XclImpLinkMgrImplPtr;
+    typedef ::std::unique_ptr< XclImpLinkManagerImpl > XclImpLinkMgrImplPtr;
     XclImpLinkMgrImplPtr mxImpl;
 };
 
diff --git a/sc/source/filter/inc/xistyle.hxx b/sc/source/filter/inc/xistyle.hxx
index 6255b99..dd08823 100644
--- a/sc/source/filter/inc/xistyle.hxx
+++ b/sc/source/filter/inc/xistyle.hxx
@@ -428,7 +428,7 @@ private:
     void                SetUsedFlags( sal_uInt8 nUsedFlags );
 
 private:
-    typedef ::std::auto_ptr< ScPatternAttr > ScPatternAttrPtr;
+    typedef ::std::unique_ptr< ScPatternAttr > ScPatternAttrPtr;
 
     ScPatternAttrPtr    mpPattern;          /// Calc item set.
     ScStyleSheet*       mpStyleSheet;       /// Calc cell style sheet.
diff --git a/sc/source/filter/inc/xlpage.hxx b/sc/source/filter/inc/xlpage.hxx
index 9d395ce..f5333b9 100644
--- a/sc/source/filter/inc/xlpage.hxx
+++ b/sc/source/filter/inc/xlpage.hxx
@@ -91,7 +91,7 @@ class SvxBrushItem;
 /** Contains all page (print) settings for a single sheet. */
 struct XclPageData : private boost::noncopyable
 {
-    typedef ::std::auto_ptr< SvxBrushItem > SvxBrushItemPtr;
+    typedef ::std::unique_ptr< SvxBrushItem > SvxBrushItemPtr;
 
     ScfUInt16Vec        maHorPageBreaks;    /// Horizontal page breaks.
     ScfUInt16Vec        maVerPageBreaks;    /// Vertical page breaks.
diff --git a/sc/source/filter/oox/workbookhelper.cxx b/sc/source/filter/oox/workbookhelper.cxx
index 3b9665a..06ecc60 100644
--- a/sc/source/filter/oox/workbookhelper.cxx
+++ b/sc/source/filter/oox/workbookhelper.cxx
@@ -236,28 +236,28 @@ private:
     void recalcFormulaCells();
 
 private:
-    typedef ::std::auto_ptr< ScEditEngineDefaulter >    EditEngineDefaulterPtr;
-    typedef ::std::auto_ptr< FormulaBuffer >            FormulaBufferPtr;
-    typedef ::std::auto_ptr< SegmentProgressBar >       ProgressBarPtr;
-    typedef ::std::auto_ptr< WorkbookSettings >         WorkbookSettPtr;
-    typedef ::std::auto_ptr< ViewSettings >             ViewSettingsPtr;
-    typedef ::std::auto_ptr< WorksheetBuffer >          WorksheetBfrPtr;
+    typedef ::std::unique_ptr< ScEditEngineDefaulter >    EditEngineDefaulterPtr;
+    typedef ::std::unique_ptr< FormulaBuffer >          FormulaBufferPtr;
+    typedef ::std::unique_ptr< SegmentProgressBar >     ProgressBarPtr;
+    typedef ::std::unique_ptr< WorkbookSettings >       WorkbookSettPtr;
+    typedef ::std::unique_ptr< ViewSettings >           ViewSettingsPtr;
+    typedef ::std::unique_ptr< WorksheetBuffer >        WorksheetBfrPtr;
     typedef ::boost::shared_ptr< ThemeBuffer >          ThemeBfrRef;
-    typedef ::std::auto_ptr< StylesBuffer >             StylesBfrPtr;
-    typedef ::std::auto_ptr< SharedStringsBuffer >      SharedStrBfrPtr;
-    typedef ::std::auto_ptr< ExternalLinkBuffer >       ExtLinkBfrPtr;
-    typedef ::std::auto_ptr< DefinedNamesBuffer >       DefNamesBfrPtr;
-    typedef ::std::auto_ptr< TableBuffer >              TableBfrPtr;
-    typedef ::std::auto_ptr< ScenarioBuffer >           ScenarioBfrPtr;
-    typedef ::std::auto_ptr< ConnectionsBuffer >        ConnectionsBfrPtr;
-    typedef ::std::auto_ptr< PivotCacheBuffer >         PivotCacheBfrPtr;
-    typedef ::std::auto_ptr< PivotTableBuffer >         PivotTableBfrPtr;
-    typedef ::std::auto_ptr< FormulaParser >            FormulaParserPtr;
-    typedef ::std::auto_ptr< UnitConverter >            UnitConvPtr;
-    typedef ::std::auto_ptr< AddressConverter >         AddressConvPtr;
-    typedef ::std::auto_ptr< oox::drawingml::chart::ChartConverter >      ExcelChartConvPtr;
-    typedef ::std::auto_ptr< PageSettingsConverter >    PageSettConvPtr;
-    typedef ::std::auto_ptr< BiffCodecHelper >          BiffCodecHelperPtr;
+    typedef ::std::unique_ptr< StylesBuffer >           StylesBfrPtr;
+    typedef ::std::unique_ptr< SharedStringsBuffer >    SharedStrBfrPtr;
+    typedef ::std::unique_ptr< ExternalLinkBuffer >     ExtLinkBfrPtr;
+    typedef ::std::unique_ptr< DefinedNamesBuffer >     DefNamesBfrPtr;
+    typedef ::std::unique_ptr< TableBuffer >            TableBfrPtr;
+    typedef ::std::unique_ptr< ScenarioBuffer >         ScenarioBfrPtr;
+    typedef ::std::unique_ptr< ConnectionsBuffer >      ConnectionsBfrPtr;
+    typedef ::std::unique_ptr< PivotCacheBuffer >       PivotCacheBfrPtr;
+    typedef ::std::unique_ptr< PivotTableBuffer >       PivotTableBfrPtr;
+    typedef ::std::unique_ptr< FormulaParser >          FormulaParserPtr;
+    typedef ::std::unique_ptr< UnitConverter >          UnitConvPtr;
+    typedef ::std::unique_ptr< AddressConverter >       AddressConvPtr;
+    typedef ::std::unique_ptr< oox::drawingml::chart::ChartConverter > ExcelChartConvPtr;
+    typedef ::std::unique_ptr< PageSettingsConverter >  PageSettConvPtr;
+    typedef ::std::unique_ptr< BiffCodecHelper >        BiffCodecHelperPtr;
 
     OUString            maCellStyles;           /// Style family name for cell styles.
     OUString            maPageStyles;           /// Style family name for page styles.
diff --git a/sc/source/filter/oox/worksheethelper.cxx b/sc/source/filter/oox/worksheethelper.cxx
index 7ba4baf..69f018f 100644
--- a/sc/source/filter/oox/worksheethelper.cxx
+++ b/sc/source/filter/oox/worksheethelper.cxx
@@ -369,8 +369,8 @@ private:
     void UpdateRowProgress( const CellRangeAddress& rUsedArea, sal_Int32 nRow );
 
 private:
-    typedef ::std::auto_ptr< VmlDrawing >       VmlDrawingPtr;
-    typedef ::std::auto_ptr< BiffSheetDrawing > BiffSheetDrawingPtr;
+    typedef ::std::unique_ptr< VmlDrawing >       VmlDrawingPtr;
+    typedef ::std::unique_ptr< BiffSheetDrawing > BiffSheetDrawingPtr;
 
     const OUString      maSheetCellRanges;  /// Service name for a SheetCellRanges object.
     const OUString      maUrlTextField;     /// Service name for a URL text field.
diff --git a/sc/source/filter/xcl97/xcl97esc.cxx b/sc/source/filter/xcl97/xcl97esc.cxx
index b378c4a..216f3c5 100644
--- a/sc/source/filter/xcl97/xcl97esc.cxx
+++ b/sc/source/filter/xcl97/xcl97esc.cxx
@@ -410,7 +410,7 @@ void XclEscherEx::EndDocument()
 
 XclExpOcxControlObj* XclEscherEx::CreateOCXCtrlObj( Reference< XShape > xShape, const Rectangle* pChildAnchor )
 {
-    ::std::auto_ptr< XclExpOcxControlObj > xOcxCtrl;
+    ::std::unique_ptr< XclExpOcxControlObj > xOcxCtrl;
 
     Reference< XControlModel > xCtrlModel = XclControlHelper::GetControlModel( xShape );
     if( xCtrlModel.is() )
@@ -440,7 +440,7 @@ XclExpOcxControlObj* XclEscherEx::CreateOCXCtrlObj( Reference< XShape > xShape,
 
 XclExpTbxControlObj* XclEscherEx::CreateTBXCtrlObj( Reference< XShape > xShape, const Rectangle* pChildAnchor )
 {
-    ::std::auto_ptr< XclExpTbxControlObj > xTbxCtrl( new XclExpTbxControlObj( mrObjMgr, xShape, pChildAnchor ) );
+    ::std::unique_ptr< XclExpTbxControlObj > xTbxCtrl( new XclExpTbxControlObj( mrObjMgr, xShape, pChildAnchor ) );
     if( xTbxCtrl->GetObjType() == EXC_OBJTYPE_UNKNOWN )
         xTbxCtrl.reset();
 
diff --git a/sc/source/filter/xml/XMLTableShapeResizer.cxx b/sc/source/filter/xml/XMLTableShapeResizer.cxx
index a554068..6f3ce90 100644
--- a/sc/source/filter/xml/XMLTableShapeResizer.cxx
+++ b/sc/source/filter/xml/XMLTableShapeResizer.cxx
@@ -35,7 +35,7 @@
 #include <vector>
 
 using namespace ::com::sun::star;
-using ::std::auto_ptr;
+using ::std::unique_ptr;
 using ::std::vector;
 
 ScMyOLEFixer::ScMyOLEFixer(ScXMLImport& rTempImport)
@@ -82,9 +82,7 @@ void ScMyOLEFixer::CreateChartListener(ScDocument* pDoc,
     if (!pCollection)
         return;
 
-    SAL_WNODEPRECATED_DECLARATIONS_PUSH
-    auto_ptr< vector<ScTokenRef> > pRefTokens(new vector<ScTokenRef>);
-    SAL_WNODEPRECATED_DECLARATIONS_POP
+    unique_ptr< vector<ScTokenRef> > pRefTokens(new vector<ScTokenRef>);
         const sal_Unicode cSep = ScCompiler::GetNativeSymbolChar(ocSep);
     ScRefTokenHelper::compileRangeRepresentation(
         *pRefTokens, aRangeStr, pDoc, cSep, pDoc->GetGrammar());
diff --git a/sc/source/filter/xml/xmlcelli.cxx b/sc/source/filter/xml/xmlcelli.cxx
index e2ac747..10e1049 100644
--- a/sc/source/filter/xml/xmlcelli.cxx
+++ b/sc/source/filter/xml/xmlcelli.cxx
@@ -900,8 +900,8 @@ void ScXMLTableRowCellContext::SetAnnotation(const ScAddress& rPos)
         if( pObject )
         {
             // rescue settings from drawing object before the shape is removed
-            ::std::auto_ptr< SfxItemSet > xItemSet( new SfxItemSet( pObject->GetMergedItemSet() ) );
-            ::std::auto_ptr< OutlinerParaObject > xOutlinerObj;
+            ::std::unique_ptr< SfxItemSet > xItemSet( new SfxItemSet( pObject->GetMergedItemSet() ) );
+            ::std::unique_ptr< OutlinerParaObject > xOutlinerObj;
             if( OutlinerParaObject* pOutlinerObj = pObject->GetOutlinerParaObject() )
                 xOutlinerObj.reset( new OutlinerParaObject( *pOutlinerObj ) );
             Rectangle aCaptionRect;
diff --git a/sc/source/filter/xml/xmldrani.cxx b/sc/source/filter/xml/xmldrani.cxx
index 38db1b30..51d6506 100644
--- a/sc/source/filter/xml/xmldrani.cxx
+++ b/sc/source/filter/xml/xmldrani.cxx
@@ -288,10 +288,8 @@ ScDBData* ScXMLDatabaseRangeContext::ConvertToDBData(const OUString& rName)
 
     ScDocument* pDoc = GetScImport().GetDocument();
 
-    SAL_WNODEPRECATED_DECLARATIONS_PUSH
-    ::std::auto_ptr<ScDBData> pData(
+    ::std::unique_ptr<ScDBData> pData(
         new ScDBData(rName, maRange.aStart.Tab(), maRange.aStart.Col(), maRange.aStart.Row(), maRange.aEnd.Col(), maRange.aEnd.Row(), bByRow, bHasHeader));
-    SAL_WNODEPRECATED_DECLARATIONS_POP
 
     pData->SetAutoFilter(bAutoFilter);
     pData->SetKeepFmt(bKeepFormats);
@@ -448,9 +446,7 @@ void ScXMLDatabaseRangeContext::EndElement()
     if (meRangeType == ScDBCollection::SheetAnonymous)
     {
         OUString aName(STR_DB_LOCAL_NONAME);
-        SAL_WNODEPRECATED_DECLARATIONS_PUSH
-        ::std::auto_ptr<ScDBData> pData(ConvertToDBData(aName));
-        SAL_WNODEPRECATED_DECLARATIONS_POP
+        ::std::unique_ptr<ScDBData> pData(ConvertToDBData(aName));
 
         if (pData.get())
         {
@@ -465,9 +461,7 @@ void ScXMLDatabaseRangeContext::EndElement()
     else if (meRangeType == ScDBCollection::GlobalAnonymous)
     {
         OUString aName(STR_DB_GLOBAL_NONAME);
-        SAL_WNODEPRECATED_DECLARATIONS_PUSH
-        ::std::auto_ptr<ScDBData> pData(ConvertToDBData(aName));
-        SAL_WNODEPRECATED_DECLARATIONS_POP
+        ::std::unique_ptr<ScDBData> pData(ConvertToDBData(aName));
 
         if (pData.get())
         {
@@ -483,9 +477,7 @@ void ScXMLDatabaseRangeContext::EndElement()
     }
     else if (meRangeType == ScDBCollection::GlobalNamed)
     {
-        SAL_WNODEPRECATED_DECLARATIONS_PUSH
-        ::std::auto_ptr<ScDBData> pData(ConvertToDBData(sDatabaseRangeName));
-        SAL_WNODEPRECATED_DECLARATIONS_POP
+        ::std::unique_ptr<ScDBData> pData(ConvertToDBData(sDatabaseRangeName));
 
         if (pData.get())
         {
diff --git a/sc/source/filter/xml/xmlimprt.cxx b/sc/source/filter/xml/xmlimprt.cxx
index 1b9d10a..73080e9 100644
--- a/sc/source/filter/xml/xmlimprt.cxx
+++ b/sc/source/filter/xml/xmlimprt.cxx
@@ -17,6 +17,9 @@
  *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
  */
 
+#include <sal/config.h>
+
+#include <o3tl/ptr_container.hxx>
 #include <svl/zforlist.hxx>
 #include <sal/macros.h>
 
@@ -92,6 +95,7 @@
 #include <com/sun/star/beans/XPropertySet.hpp>
 
 #include <memory>
+#include <utility>
 
 #define SC_LOCALE           "Locale"
 #define SC_STANDARDFORMAT   "StandardFormat"
@@ -2396,13 +2400,13 @@ bool ScXMLImport::GetValidation(const OUString& sName, ScMyImportValidation& aVa
 
 void ScXMLImport::AddNamedExpression(SCTAB nTab, ScMyNamedExpression* pNamedExp)
 {
-    ::std::auto_ptr<ScMyNamedExpression> p(pNamedExp);
+    ::std::unique_ptr<ScMyNamedExpression> p(pNamedExp);
     SheetNamedExpMap::iterator itr = maSheetNamedExpressions.find(nTab);
     if (itr == maSheetNamedExpressions.end())
     {
         // No chain exists for this sheet.  Create one.
-        ::std::auto_ptr<ScMyNamedExpressions> pNew(new ScMyNamedExpressions);
-        ::std::pair<SheetNamedExpMap::iterator, bool> r = maSheetNamedExpressions.insert(nTab, pNew);
+        ::std::unique_ptr<ScMyNamedExpressions> pNew(new ScMyNamedExpressions);
+        ::std::pair<SheetNamedExpMap::iterator, bool> r = o3tl::ptr_container::insert(maSheetNamedExpressions, nTab, std::move(pNew));
         if (!r.second)
             // insertion failed.
             return;
@@ -2410,7 +2414,7 @@ void ScXMLImport::AddNamedExpression(SCTAB nTab, ScMyNamedExpression* pNamedExp)
         itr = r.first;
     }
     ScMyNamedExpressions& r = *itr->second;
-    r.push_back(p);
+    o3tl::ptr_container::push_back(r, std::move(p));
 }
 
 ScXMLChangeTrackingImportHelper* ScXMLImport::GetChangeTrackingImportHelper()
diff --git a/sc/source/filter/xml/xmltabi.cxx b/sc/source/filter/xml/xmltabi.cxx
index 548763e..8376558 100644
--- a/sc/source/filter/xml/xmltabi.cxx
+++ b/sc/source/filter/xml/xmltabi.cxx
@@ -141,7 +141,6 @@ ScXMLTableContext::ScXMLTableContext( ScXMLImport& rImport,
                                       const ::com::sun::star::uno::Reference<
                                       ::com::sun::star::xml::sax::XAttributeList>& xAttrList ) :
     SvXMLImportContext( rImport, nPrfx, rLName ),
-    pExternalRefInfo(NULL),
     nStartOffset(-1),
     bStartFormPage(false),
     bPrintEntireSheet(true)
diff --git a/sc/source/filter/xml/xmltabi.hxx b/sc/source/filter/xml/xmltabi.hxx
index 01c9065..62bd8c0 100644
--- a/sc/source/filter/xml/xmltabi.hxx
+++ b/sc/source/filter/xml/xmltabi.hxx
@@ -40,7 +40,7 @@ struct ScXMLExternalTabData
 class ScXMLTableContext : public SvXMLImportContext
 {
     OUString   sPrintRanges;
-    ::std::auto_ptr<ScXMLExternalTabData> pExternalRefInfo;
+    ::std::unique_ptr<ScXMLExternalTabData> pExternalRefInfo;
     sal_Int32       nStartOffset;
     bool            bStartFormPage;
     bool            bPrintEntireSheet;
diff --git a/sc/source/ui/Accessibility/AccessibleCell.cxx b/sc/source/ui/Accessibility/AccessibleCell.cxx
index 2989da5..a15e3f9 100644
--- a/sc/source/ui/Accessibility/AccessibleCell.cxx
+++ b/sc/source/ui/Accessibility/AccessibleCell.cxx
@@ -17,6 +17,10 @@
  *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
  */
 
+#include <sal/config.h>
+
+#include <utility>
+
 #include "AccessibleCell.hxx"
 #include "scitems.hxx"
 #include <editeng/eeitem.hxx>
@@ -388,20 +392,18 @@ ScDocument* ScAccessibleCell::GetDocument(ScTabViewShell* pViewShell)
     return pDoc;
 }
 
-SAL_WNODEPRECATED_DECLARATIONS_PUSH
-::std::auto_ptr< SvxEditSource > ScAccessibleCell::CreateEditSource(ScTabViewShell* pViewShell, ScAddress aCell, ScSplitPos eSplitPos)
+::std::unique_ptr< SvxEditSource > ScAccessibleCell::CreateEditSource(ScTabViewShell* pViewShell, ScAddress aCell, ScSplitPos eSplitPos)
 {
     if (IsFormulaMode())
     {
-        return ::std::auto_ptr< SvxEditSource >();
+        return ::std::unique_ptr< SvxEditSource >();
     }
-    ::std::auto_ptr < ScAccessibleTextData > pAccessibleCellTextData
+    ::std::unique_ptr < ScAccessibleTextData > pAccessibleCellTextData
         ( new ScAccessibleCellTextData( pViewShell, aCell, eSplitPos, this ) );
-    ::std::auto_ptr< SvxEditSource > pEditSource (new ScAccessibilityEditSource(pAccessibleCellTextData));
+    ::std::unique_ptr< SvxEditSource > pEditSource (new ScAccessibilityEditSource(std::move(pAccessibleCellTextData)));
 
     return pEditSource;
 }
-SAL_WNODEPRECATED_DECLARATIONS_POP
 
 void ScAccessibleCell::FillDependends(utl::AccessibleRelationSetHelper* pRelationSet)
 {
diff --git a/sc/source/ui/Accessibility/AccessibleCsvControl.cxx b/sc/source/ui/Accessibility/AccessibleCsvControl.cxx
index f23a91b..bb924f2 100644
--- a/sc/source/ui/Accessibility/AccessibleCsvControl.cxx
+++ b/sc/source/ui/Accessibility/AccessibleCsvControl.cxx
@@ -17,6 +17,10 @@
  *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
  */
 
+#include <sal/config.h>
+
+#include <utility>
+
 #include "AccessibleCsvControl.hxx"
 #include <com/sun/star/accessibility/AccessibleRole.hpp>
 #include <com/sun/star/accessibility/AccessibleRelationType.hpp>
@@ -1383,7 +1387,7 @@ ScAccessibleCsvCell::ScAccessibleCsvCell(
         const OUString& rCellText,
         sal_Int32 nRow, sal_Int32 nColumn ) :
     ScAccessibleCsvControl( rGrid.GetAccessible(), rGrid, nCellRole ),
-    AccessibleStaticTextBase( SvxEditSourcePtr( NULL ) ),
+    AccessibleStaticTextBase( SvxEditSourcePtr() ),
     maCellText( rCellText ),
     mnLine( nRow ? (nRow + rGrid.GetFirstVisLine() - 1) : CSV_LINE_HEADER ),
     mnColumn( lcl_GetGridColumn( nColumn ) ),
@@ -1399,7 +1403,7 @@ ScAccessibleCsvCell::~ScAccessibleCsvCell()
 void SAL_CALL ScAccessibleCsvCell::disposing()
 {
     SolarMutexGuard aGuard;
-    SetEditSource( SvxEditSourcePtr( NULL ) );
+    SetEditSource( SvxEditSourcePtr() );
     ScAccessibleCsvControl::disposing();
 }
 
@@ -1565,19 +1569,17 @@ Rectangle ScAccessibleCsvCell::implGetBoundingBox() const
     return aRect;
 }
 
-SAL_WNODEPRECATED_DECLARATIONS_PUSH
-::std::auto_ptr< SvxEditSource > ScAccessibleCsvCell::implCreateEditSource()
+::std::unique_ptr< SvxEditSource > ScAccessibleCsvCell::implCreateEditSource()
 {
     ScCsvGrid& rGrid = implGetGrid();
     Rectangle aBoundRect( implGetBoundingBox() );
     aBoundRect -= implGetRealPos();
 
-    ::std::auto_ptr< ScAccessibleTextData > pCsvTextData( new ScAccessibleCsvTextData(
+    ::std::unique_ptr< ScAccessibleTextData > pCsvTextData( new ScAccessibleCsvTextData(
         &rGrid, rGrid.GetEditEngine(), maCellText, aBoundRect, implGetRealSize() ) );
 
-    ::std::auto_ptr< SvxEditSource > pEditSource( new ScAccessibilityEditSource( pCsvTextData ) );
+    ::std::unique_ptr< SvxEditSource > pEditSource( new ScAccessibilityEditSource( std::move(pCsvTextData) ) );
     return pEditSource;
 }
-SAL_WNODEPRECATED_DECLARATIONS_POP
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/Accessibility/AccessibleDocumentPagePreview.cxx b/sc/source/ui/Accessibility/AccessibleDocumentPagePreview.cxx
index 9a4013a..f577923 100644
--- a/sc/source/ui/Accessibility/AccessibleDocumentPagePreview.cxx
+++ b/sc/source/ui/Accessibility/AccessibleDocumentPagePreview.cxx
@@ -142,11 +142,9 @@ ScNotesChildren::~ScNotesChildren()
 {
     ::accessibility::AccessibleTextHelper* pTextHelper = NULL;
 
-    SAL_WNODEPRECATED_DECLARATIONS_PUSH
-    ::std::auto_ptr < ScAccessibleTextData > pAccessiblePreviewHeaderCellTextData
+    ::std::unique_ptr < ScAccessibleTextData > pAccessiblePreviewHeaderCellTextData
         (new ScAccessibleNoteTextData(mpViewShell, rString, aCellPos, bMarkNote));
-    SAL_WNODEPRECATED_DECLARATIONS_POP
-    ::std::unique_ptr< SvxEditSource > pEditSource (new ScAccessibilityEditSource(pAccessiblePreviewHeaderCellTextData));
+    ::std::unique_ptr< SvxEditSource > pEditSource (new ScAccessibilityEditSource(std::move(pAccessiblePreviewHeaderCellTextData)));
 
     pTextHelper = new ::accessibility::AccessibleTextHelper(std::move(pEditSource));
 
diff --git a/sc/source/ui/Accessibility/AccessibleEditObject.cxx b/sc/source/ui/Accessibility/AccessibleEditObject.cxx
index 364ddab..0020a70 100644
--- a/sc/source/ui/Accessibility/AccessibleEditObject.cxx
+++ b/sc/source/ui/Accessibility/AccessibleEditObject.cxx
@@ -357,9 +357,7 @@ void ScAccessibleEditObject::CreateTextHelper()
 {
     if (!mpTextHelper)
     {
-        SAL_WNODEPRECATED_DECLARATIONS_PUSH
-        ::std::auto_ptr < ScAccessibleTextData > pAccessibleTextData;
-        SAL_WNODEPRECATED_DECLARATIONS_POP
+        ::std::unique_ptr < ScAccessibleTextData > pAccessibleTextData;
         if (meObjectType == CellInEditMode || meObjectType == EditControl)
         {
             pAccessibleTextData.reset
@@ -371,7 +369,7 @@ void ScAccessibleEditObject::CreateTextHelper()
                 (new ScAccessibleEditLineTextData(NULL, mpWindow));
         }
 
-        ::std::unique_ptr< SvxEditSource > pEditSource (new ScAccessibilityEditSource(pAccessibleTextData));
+        ::std::unique_ptr< SvxEditSource > pEditSource (new ScAccessibilityEditSource(std::move(pAccessibleTextData)));
         mpTextHelper = new ::accessibility::AccessibleTextHelper(std::move(pEditSource));
         mpTextHelper->SetEventSource(this);
         mpTextHelper->SetFocus(mbHasFocus);
diff --git a/sc/source/ui/Accessibility/AccessiblePageHeaderArea.cxx b/sc/source/ui/Accessibility/AccessiblePageHeaderArea.cxx
index b261af6..88403d8 100644
--- a/sc/source/ui/Accessibility/AccessiblePageHeaderArea.cxx
+++ b/sc/source/ui/Accessibility/AccessiblePageHeaderArea.cxx
@@ -300,11 +300,9 @@ void ScAccessiblePageHeaderArea::CreateTextHelper()
 {
     if (!mpTextHelper)
     {
-        SAL_WNODEPRECATED_DECLARATIONS_PUSH
-        ::std::auto_ptr < ScAccessibleTextData > pAccessibleHeaderTextData
+        ::std::unique_ptr < ScAccessibleTextData > pAccessibleHeaderTextData
             (new ScAccessibleHeaderTextData(mpViewShell, mpEditObj, mbHeader, meAdjust));
-        SAL_WNODEPRECATED_DECLARATIONS_POP
-        ::std::unique_ptr< SvxEditSource > pEditSource (new ScAccessibilityEditSource(pAccessibleHeaderTextData));
+        ::std::unique_ptr< SvxEditSource > pEditSource (new ScAccessibilityEditSource(std::move(pAccessibleHeaderTextData)));
 
         mpTextHelper = new ::accessibility::AccessibleTextHelper(std::move(pEditSource));
         mpTextHelper->SetEventSource(this);
diff --git a/sc/source/ui/Accessibility/AccessiblePreviewCell.cxx b/sc/source/ui/Accessibility/AccessiblePreviewCell.cxx
index ef0f0cf..b6f2dd5 100644
--- a/sc/source/ui/Accessibility/AccessiblePreviewCell.cxx
+++ b/sc/source/ui/Accessibility/AccessiblePreviewCell.cxx
@@ -283,11 +283,9 @@ void ScAccessiblePreviewCell::CreateTextHelper()
 {
     if (!mpTextHelper)
     {
-        SAL_WNODEPRECATED_DECLARATIONS_PUSH
-        ::std::auto_ptr < ScAccessibleTextData > pAccessiblePreviewCellTextData
+        ::std::unique_ptr < ScAccessibleTextData > pAccessiblePreviewCellTextData
             (new ScAccessiblePreviewCellTextData(mpViewShell, maCellAddress));
-        SAL_WNODEPRECATED_DECLARATIONS_POP
-        ::std::unique_ptr< SvxEditSource > pEditSource (new ScAccessibilityEditSource(pAccessiblePreviewCellTextData));
+        ::std::unique_ptr< SvxEditSource > pEditSource (new ScAccessibilityEditSource(std::move(pAccessiblePreviewCellTextData)));
 
         mpTextHelper = new ::accessibility::AccessibleTextHelper( std::move(pEditSource) );
         mpTextHelper->SetEventSource( this );
diff --git a/sc/source/ui/Accessibility/AccessiblePreviewHeaderCell.cxx b/sc/source/ui/Accessibility/AccessiblePreviewHeaderCell.cxx
index b42a305..cea59f9 100644
--- a/sc/source/ui/Accessibility/AccessiblePreviewHeaderCell.cxx
+++ b/sc/source/ui/Accessibility/AccessiblePreviewHeaderCell.cxx
@@ -427,11 +427,9 @@ void ScAccessiblePreviewHeaderCell::CreateTextHelper()
 {
     if (!mpTextHelper)
     {
-        SAL_WNODEPRECATED_DECLARATIONS_PUSH
-        ::std::auto_ptr < ScAccessibleTextData > pAccessiblePreviewHeaderCellTextData
+        ::std::unique_ptr < ScAccessibleTextData > pAccessiblePreviewHeaderCellTextData
             (new ScAccessiblePreviewHeaderCellTextData(mpViewShell, OUString(getAccessibleName()), maCellPos, mbColumnHeader, mbRowHeader));
-        SAL_WNODEPRECATED_DECLARATIONS_POP
-        ::std::unique_ptr< SvxEditSource > pEditSource (new ScAccessibilityEditSource(pAccessiblePreviewHeaderCellTextData));
+        ::std::unique_ptr< SvxEditSource > pEditSource (new ScAccessibilityEditSource(std::move(pAccessiblePreviewHeaderCellTextData)));
 
         mpTextHelper = new ::accessibility::AccessibleTextHelper(std::move(pEditSource));
         mpTextHelper->SetEventSource(this);
diff --git a/sc/source/ui/dbgui/csvgrid.cxx b/sc/source/ui/dbgui/csvgrid.cxx
index b61ce4d..b478f67 100644
--- a/sc/source/ui/dbgui/csvgrid.cxx
+++ b/sc/source/ui/dbgui/csvgrid.cxx
@@ -1349,7 +1349,7 @@ void ScCsvGrid::ImplDrawTrackingRect( sal_uInt32 nColIndex )
 
 ScAccessibleCsvControl* ScCsvGrid::ImplCreateAccessible()
 {
-    std::auto_ptr<ScAccessibleCsvControl> pControl(new ScAccessibleCsvGrid( *this ));
+    std::unique_ptr<ScAccessibleCsvControl> pControl(new ScAccessibleCsvGrid( *this ));
     pControl->Init();
     return pControl.release();
 }
diff --git a/sc/source/ui/docshell/dbdocfun.cxx b/sc/source/ui/docshell/dbdocfun.cxx
index fe843b5..2b438ce 100644
--- a/sc/source/ui/docshell/dbdocfun.cxx
+++ b/sc/source/ui/docshell/dbdocfun.cxx
@@ -1143,15 +1143,13 @@ bool isEditable(ScDocShell& rDocShell, const ScRangeList& rRanges, bool bApi)
     return true;
 }
 
-SAL_WNODEPRECATED_DECLARATIONS_PUSH
-void createUndoDoc(std::auto_ptr<ScDocument>& pUndoDoc, ScDocument* pDoc, const ScRange& rRange)
+void createUndoDoc(std::unique_ptr<ScDocument>& pUndoDoc, ScDocument* pDoc, const ScRange& rRange)
 {
     SCTAB nTab = rRange.aStart.Tab();
     pUndoDoc.reset(new ScDocument(SCDOCMODE_UNDO));
     pUndoDoc->InitUndo(pDoc, nTab, nTab);
     pDoc->CopyToDocument(rRange, IDF_ALL, false, pUndoDoc.get());
 }
-SAL_WNODEPRECATED_DECLARATIONS_POP
 
 bool checkNewOutputRange(ScDPObject& rDPObj, ScDocShell& rDocShell, ScRange& rNewOut, bool bApi)
 {
@@ -1229,10 +1227,8 @@ bool ScDBDocFunc::DataPilotUpdate( ScDPObject* pOldObj, const ScDPObject* pNewOb
     if (!isEditable(rDocShell, aRanges, bApi))
         return false;
 
-    SAL_WNODEPRECATED_DECLARATIONS_PUSH
-    std::auto_ptr<ScDocument> pOldUndoDoc;
-    std::auto_ptr<ScDocument> pNewUndoDoc;
-    SAL_WNODEPRECATED_DECLARATIONS_POP
+    std::unique_ptr<ScDocument> pOldUndoDoc;
+    std::unique_ptr<ScDocument> pNewUndoDoc;
 
     ScDPObject aUndoDPObj(*pOldObj); // for undo or revert on failure
 
@@ -1311,10 +1307,8 @@ bool ScDBDocFunc::RemovePivotTable(ScDPObject& rDPObj, bool bRecord, bool bApi)
     if (!isEditable(rDocShell, rDPObj.GetOutRange(), bApi))
         return false;
 
-    SAL_WNODEPRECATED_DECLARATIONS_PUSH
-    std::auto_ptr<ScDocument> pOldUndoDoc;
-    std::auto_ptr<ScDPObject> pUndoDPObj;
-    SAL_WNODEPRECATED_DECLARATIONS_POP
+    std::unique_ptr<ScDocument> pOldUndoDoc;
+    std::unique_ptr<ScDPObject> pUndoDPObj;
 
     if (bRecord)
         pUndoDPObj.reset(new ScDPObject(rDPObj));    // copy old settings for undo
@@ -1365,18 +1359,14 @@ bool ScDBDocFunc::CreatePivotTable(const ScDPObject& rDPObj, bool bRecord, bool
     if (!isEditable(rDocShell, ScRange(rDPObj.GetOutRange().aStart), bApi))
         return false;
 
-    SAL_WNODEPRECATED_DECLARATIONS_PUSH
-    std::auto_ptr<ScDocument> pNewUndoDoc;
-    SAL_WNODEPRECATED_DECLARATIONS_POP
+    std::unique_ptr<ScDocument> pNewUndoDoc;
 
     ScDocument& rDoc = rDocShell.GetDocument();
     if (bRecord && !rDoc.IsUndoEnabled())
         bRecord = false;
 
     //  output range must be set at pNewObj
-    SAL_WNODEPRECATED_DECLARATIONS_PUSH
-    std::auto_ptr<ScDPObject> pDestObj(new ScDPObject(rDPObj));
-    SAL_WNODEPRECATED_DECLARATIONS_POP
+    std::unique_ptr<ScDPObject> pDestObj(new ScDPObject(rDPObj));
 
     ScDPObject& rDestObj = *pDestObj;
 
@@ -1469,10 +1459,8 @@ bool ScDBDocFunc::UpdatePivotTable(ScDPObject& rDPObj, bool bRecord, bool bApi)
     if (!isEditable(rDocShell, rDPObj.GetOutRange(), bApi))
         return false;
 
-    SAL_WNODEPRECATED_DECLARATIONS_PUSH
-    std::auto_ptr<ScDocument> pOldUndoDoc;
-    std::auto_ptr<ScDocument> pNewUndoDoc;
-    SAL_WNODEPRECATED_DECLARATIONS_POP
+    std::unique_ptr<ScDocument> pOldUndoDoc;
+    std::unique_ptr<ScDocument> pNewUndoDoc;
 
     ScDPObject aUndoDPObj(rDPObj); // For undo or revert on failure.
 
diff --git a/sc/source/ui/docshell/docfunc.cxx b/sc/source/ui/docshell/docfunc.cxx
index b220f71..c20992a 100644
--- a/sc/source/ui/docshell/docfunc.cxx
+++ b/sc/source/ui/docshell/docfunc.cxx
@@ -86,6 +86,7 @@
 #include <rowheightcontext.hxx>
 
 #include <memory>
+#include <utility>
 #include <basic/basmgr.hxx>
 #include <boost/scoped_array.hpp>
 #include <boost/scoped_ptr.hpp>
@@ -967,9 +968,7 @@ bool ScDocFunc::SetStringOrEditCell( const ScAddress& rPos, const OUString& rStr
 
 bool ScDocFunc::SetFormulaCell( const ScAddress& rPos, ScFormulaCell* pCell, bool bInteraction )
 {
-    SAL_WNODEPRECATED_DECLARATIONS_PUSH
-    std::auto_ptr<ScFormulaCell> xCell(pCell);
-    SAL_WNODEPRECATED_DECLARATIONS_POP
+    std::unique_ptr<ScFormulaCell> xCell(pCell);
 
     ScDocShellModificator aModificator( rDocShell );
     ScDocument& rDoc = rDocShell.GetDocument();
@@ -3649,14 +3648,12 @@ void ScDocFunc::ProtectSheet( SCTAB nTab, const ScTableProtection& rProtect )
         OSL_ENSURE(pProtect, "ScDocFunc::Unprotect: ScTableProtection pointer is NULL!");
         if (pProtect)
         {
-            SAL_WNODEPRECATED_DECLARATIONS_PUSH
-            ::std::auto_ptr<ScTableProtection> p(new ScTableProtection(*pProtect));
-            SAL_WNODEPRECATED_DECLARATIONS_POP
+            ::std::unique_ptr<ScTableProtection> p(new ScTableProtection(*pProtect));
             p->setProtected(true); // just in case ...
             rDocShell.GetUndoManager()->AddUndoAction(
-                new ScUndoTabProtect(&rDocShell, nTab, p) );
+                new ScUndoTabProtect(&rDocShell, nTab, std::move(p)) );
 
-            // ownership of auto_ptr now transferred to ScUndoTabProtect.
+            // ownership of unique_ptr now transferred to ScUndoTabProtect.
         }
     }
 
@@ -3681,13 +3678,11 @@ bool ScDocFunc::Protect( SCTAB nTab, const OUString& rPassword, bool /*bApi*/ )
             OSL_ENSURE(pProtect, "ScDocFunc::Unprotect: ScDocProtection pointer is NULL!");
             if (pProtect)
             {
-                SAL_WNODEPRECATED_DECLARATIONS_PUSH
-                ::std::auto_ptr<ScDocProtection> p(new ScDocProtection(*pProtect));
-                SAL_WNODEPRECATED_DECLARATIONS_POP
+                ::std::unique_ptr<ScDocProtection> p(new ScDocProtection(*pProtect));
                 p->setProtected(true); // just in case ...
                 rDocShell.GetUndoManager()->AddUndoAction(
-                    new ScUndoDocProtect(&rDocShell, p) );
-                // ownership of auto_ptr is transferred to ScUndoDocProtect.
+                    new ScUndoDocProtect(&rDocShell, std::move(p)) );
+                // ownership of unique_ptr is transferred to ScUndoDocProtect.
             }
         }
     }
@@ -3705,13 +3700,11 @@ bool ScDocFunc::Protect( SCTAB nTab, const OUString& rPassword, bool /*bApi*/ )
             OSL_ENSURE(pProtect, "ScDocFunc::Unprotect: ScTableProtection pointer is NULL!");
             if (pProtect)
             {
-                SAL_WNODEPRECATED_DECLARATIONS_PUSH
-                ::std::auto_ptr<ScTableProtection> p(new ScTableProtection(*pProtect));
-                SAL_WNODEPRECATED_DECLARATIONS_POP
+                ::std::unique_ptr<ScTableProtection> p(new ScTableProtection(*pProtect));
                 p->setProtected(true); // just in case ...
                 rDocShell.GetUndoManager()->AddUndoAction(
-                    new ScUndoTabProtect(&rDocShell, nTab, p) );
-                // ownership of auto_ptr now transferred to ScUndoTabProtect.
+                    new ScUndoTabProtect(&rDocShell, nTab, std::move(p)) );
+                // ownership of unique_ptr now transferred to ScUndoTabProtect.
             }
         }
     }
@@ -3737,9 +3730,7 @@ bool ScDocFunc::Unprotect( SCTAB nTab, const OUString& rPassword, bool bApi )
             return true;
 
         // save the protection state before unprotect (for undo).
-        SAL_WNODEPRECATED_DECLARATIONS_PUSH
-        ::std::auto_ptr<ScDocProtection> pProtectCopy(new ScDocProtection(*pDocProtect));
-        SAL_WNODEPRECATED_DECLARATIONS_POP
+        ::std::unique_ptr<ScDocProtection> pProtectCopy(new ScDocProtection(*pDocProtect));
 
         if (!pDocProtect->verifyPassword(rPassword))
         {
@@ -3756,8 +3747,8 @@ bool ScDocFunc::Unprotect( SCTAB nTab, const OUString& rPassword, bool bApi )
         {
             pProtectCopy->setProtected(false);
             rDocShell.GetUndoManager()->AddUndoAction(
-                new ScUndoDocProtect(&rDocShell, pProtectCopy) );
-            // ownership of auto_ptr now transferred to ScUndoDocProtect.
+                new ScUndoDocProtect(&rDocShell, std::move(pProtectCopy)) );
+            // ownership of unique_ptr now transferred to ScUndoDocProtect.
         }
     }
     else
@@ -3770,9 +3761,7 @@ bool ScDocFunc::Unprotect( SCTAB nTab, const OUString& rPassword, bool bApi )
             return true;
 
         // save the protection state before unprotect (for undo).
-        SAL_WNODEPRECATED_DECLARATIONS_PUSH
-        ::std::auto_ptr<ScTableProtection> pProtectCopy(new ScTableProtection(*pTabProtect));
-        SAL_WNODEPRECATED_DECLARATIONS_POP
+        ::std::unique_ptr<ScTableProtection> pProtectCopy(new ScTableProtection(*pTabProtect));
         if (!pTabProtect->verifyPassword(rPassword))
         {
             if (!bApi)
@@ -3788,8 +3777,8 @@ bool ScDocFunc::Unprotect( SCTAB nTab, const OUString& rPassword, bool bApi )
         {
             pProtectCopy->setProtected(false);
             rDocShell.GetUndoManager()->AddUndoAction(
-                new ScUndoTabProtect(&rDocShell, nTab, pProtectCopy) );
-            // ownership of auto_ptr now transferred to ScUndoTabProtect.
+                new ScUndoTabProtect(&rDocShell, nTab, std::move(pProtectCopy)) );
+            // ownership of unique_ptr now transferred to ScUndoTabProtect.
         }
     }
 
diff --git a/sc/source/ui/docshell/docsh5.cxx b/sc/source/ui/docshell/docsh5.cxx
index 06186c7..c1ac703 100644
--- a/sc/source/ui/docshell/docsh5.cxx
+++ b/sc/source/ui/docshell/docsh5.cxx
@@ -60,7 +60,7 @@ using com::sun::star::container::XNameContainer;
 using com::sun::star::uno::Reference;
 using com::sun::star::uno::UNO_QUERY;
 
-using ::std::auto_ptr;
+using ::std::unique_ptr;
 using ::std::vector;
 
 //  former viewfunc/dbfunc methods
@@ -891,10 +891,8 @@ bool ScDocShell::MoveTable( SCTAB nSrcTab, SCTAB nDestTab, bool bCopy, bool bRec
 
             if (bRecord)
             {
-                SAL_WNODEPRECATED_DECLARATIONS_PUSH
-                auto_ptr< vector<SCTAB> > pSrcList(new vector<SCTAB>(1, nSrcTab));
-                auto_ptr< vector<SCTAB> > pDestList(new vector<SCTAB>(1, nDestTab));
-                SAL_WNODEPRECATED_DECLARATIONS_POP
+                unique_ptr< vector<SCTAB> > pSrcList(new vector<SCTAB>(1, nSrcTab));
+                unique_ptr< vector<SCTAB> > pDestList(new vector<SCTAB>(1, nDestTab));
                 GetUndoManager()->AddUndoAction(
                         new ScUndoCopyTab(this, pSrcList.release(), pDestList.release()));
             }
@@ -961,10 +959,8 @@ bool ScDocShell::MoveTable( SCTAB nSrcTab, SCTAB nDestTab, bool bCopy, bool bRec
         }
         else if (bRecord)
         {
-            SAL_WNODEPRECATED_DECLARATIONS_PUSH
-            auto_ptr< vector<SCTAB> > pSrcList(new vector<SCTAB>(1, nSrcTab));
-            auto_ptr< vector<SCTAB> > pDestList(new vector<SCTAB>(1, nDestTab));
-            SAL_WNODEPRECATED_DECLARATIONS_POP
+            unique_ptr< vector<SCTAB> > pSrcList(new vector<SCTAB>(1, nSrcTab));
+            unique_ptr< vector<SCTAB> > pDestList(new vector<SCTAB>(1, nDestTab));
             GetUndoManager()->AddUndoAction(
                     new ScUndoMoveTab(this, pSrcList.release(), pDestList.release()));
         }
diff --git a/sc/source/ui/docshell/externalrefmgr.cxx b/sc/source/ui/docshell/externalrefmgr.cxx
index bfed065..6449cbc 100644
--- a/sc/source/ui/docshell/externalrefmgr.cxx
+++ b/sc/source/ui/docshell/externalrefmgr.cxx
@@ -61,7 +61,7 @@
 
 #include <boost/scoped_ptr.hpp>
 
-using ::std::auto_ptr;
+using ::std::unique_ptr;
 using ::com::sun::star::uno::Any;
 using ::std::vector;
 using ::std::find;
@@ -1476,9 +1476,7 @@ static ScTokenArray* convertToTokenArray(
 
     ::boost::scoped_ptr<ScRange> pUsedRange;
 
-    SAL_WNODEPRECATED_DECLARATIONS_PUSH
-    auto_ptr<ScTokenArray> pArray(new ScTokenArray);
-    SAL_WNODEPRECATED_DECLARATIONS_POP
+    unique_ptr<ScTokenArray> pArray(new ScTokenArray);
     bool bFirstTab = true;
     vector<ScExternalRefCache::SingleRangeData>::iterator
         itrCache = rCacheData.begin(), itrCacheEnd = rCacheData.end();
@@ -1580,9 +1578,7 @@ static ScTokenArray* lcl_fillEmptyMatrix(const ScRange& rRange)
     ScMatrixRef xMat = new ScMatrix(nC, nR);
 
     ScMatrixToken aToken(xMat);
-    SAL_WNODEPRECATED_DECLARATIONS_PUSH
-    auto_ptr<ScTokenArray> pArray(new ScTokenArray);
-    SAL_WNODEPRECATED_DECLARATIONS_POP
+    unique_ptr<ScTokenArray> pArray(new ScTokenArray);
     pArray->AddToken(aToken);
     return pArray.release();
 }
@@ -2359,9 +2355,7 @@ SfxObjectShellRef ScExternalRefManager::loadSrcDocument(sal_uInt16 nFileId, OUSt
     // make medium hidden to prevent assertion from progress bar
     pSet->Put( SfxBoolItem(SID_HIDDEN, true) );
 
-    SAL_WNODEPRECATED_DECLARATIONS_PUSH
-    auto_ptr<SfxMedium> pMedium(new SfxMedium(aFile, STREAM_STD_READ, pFilter, pSet));
-    SAL_WNODEPRECATED_DECLARATIONS_POP
+    unique_ptr<SfxMedium> pMedium(new SfxMedium(aFile, STREAM_STD_READ, pFilter, pSet));
     if (pMedium->GetError() != ERRCODE_NONE)
         return NULL;
 
diff --git a/sc/source/ui/inc/AccessibleCell.hxx b/sc/source/ui/inc/AccessibleCell.hxx
index 01cfd99..03b8b22 100644
--- a/sc/source/ui/inc/AccessibleCell.hxx
+++ b/sc/source/ui/inc/AccessibleCell.hxx
@@ -171,7 +171,7 @@ private:
 
     ScDocument* GetDocument(ScTabViewShell* mpViewShell);
 
-    ::std::auto_ptr< SvxEditSource > CreateEditSource(ScTabViewShell* pViewShell, ScAddress aCell, ScSplitPos eSplitPos);
+    ::std::unique_ptr< SvxEditSource > CreateEditSource(ScTabViewShell* pViewShell, ScAddress aCell, ScSplitPos eSplitPos);
 
     void FillDependends(utl::AccessibleRelationSetHelper* pRelationSet);
     void FillPrecedents(utl::AccessibleRelationSetHelper* pRelationSet);
diff --git a/sc/source/ui/inc/AccessibleCsvControl.hxx b/sc/source/ui/inc/AccessibleCsvControl.hxx
index fc0b6ce..a26a873 100644
--- a/sc/source/ui/inc/AccessibleCsvControl.hxx
+++ b/sc/source/ui/inc/AccessibleCsvControl.hxx
@@ -538,7 +538,7 @@ class ScAccessibleCsvCell : public ScAccessibleCsvControl, public accessibility:
 protected:
     typedef ::com::sun::star::uno::Sequence<
         ::com::sun::star::beans::PropertyValue >    PropertyValueSeq;
-    typedef ::std::auto_ptr< SvxEditSource >        SvxEditSourcePtr;
+    typedef ::std::unique_ptr< SvxEditSource >      SvxEditSourcePtr;
 
 private:
     OUString                    maCellText; /// The text contents of this cell.
@@ -630,7 +630,7 @@ private:
     Rectangle implGetBoundingBox() const;
 
     /** Creates the edit source the text helper needs. */
-    ::std::auto_ptr< SvxEditSource > implCreateEditSource();
+    ::std::unique_ptr< SvxEditSource > implCreateEditSource();
 };
 
 #endif
diff --git a/sc/source/ui/inc/AccessibleText.hxx b/sc/source/ui/inc/AccessibleText.hxx
index 61cd3ae..b697137 100644
--- a/sc/source/ui/inc/AccessibleText.hxx
+++ b/sc/source/ui/inc/AccessibleText.hxx
@@ -282,8 +282,8 @@ private:
 class ScAccessibleCsvTextData : public ScAccessibleTextData
 {
 private:
-    typedef ::std::auto_ptr< SvxTextForwarder > TextForwarderPtr;
-    typedef ::std::auto_ptr< ScCsvViewForwarder > ViewForwarderPtr;
+    typedef ::std::unique_ptr< SvxTextForwarder > TextForwarderPtr;
+    typedef ::std::unique_ptr< ScCsvViewForwarder > ViewForwarderPtr;
 
     vcl::Window*                     mpWindow;
     EditEngine*                 mpEditEngine;
diff --git a/sc/source/ui/inc/anyrefdg.hxx b/sc/source/ui/inc/anyrefdg.hxx
index b189a28..6fcff6b 100644
--- a/sc/source/ui/inc/anyrefdg.hxx
+++ b/sc/source/ui/inc/anyrefdg.hxx
@@ -44,12 +44,12 @@ class ScRangeList;
 class ScFormulaReferenceHelper
 {
     IAnyRefDialog*      m_pDlg;
-    ::std::auto_ptr<ScCompiler>         pRefComp;
+    ::std::unique_ptr<ScCompiler>         pRefComp;
     formula::RefEdit*    pRefEdit;               // active input field
     formula::RefButton*  pRefBtn;                // associated button
     vcl::Window*             m_pWindow;
     SfxBindings*        m_pBindings;
-    ::std::auto_ptr<Accelerator>
+    ::std::unique_ptr<Accelerator>
                         pAccel;                 // for Enter/Escape
     ::std::vector<vcl::Window*> m_aHiddenWidgets;    // vector of hidden Controls
     sal_Int32           m_nOldBorderWidth;      // border width for expanded dialog
diff --git a/sc/source/ui/inc/csvgrid.hxx b/sc/source/ui/inc/csvgrid.hxx
index 1b60248..bab6dda 100644
--- a/sc/source/ui/inc/csvgrid.hxx
+++ b/sc/source/ui/inc/csvgrid.hxx
@@ -73,7 +73,7 @@ typedef ::std::vector< ScCsvColState > ScCsvColStateVec;
 class SC_DLLPUBLIC ScCsvGrid : public ScCsvControl, public utl::ConfigurationListener
 {
 private:
-    typedef ::std::auto_ptr< ScEditEngineDefaulter > ScEditEnginePtr;
+    typedef ::std::unique_ptr< ScEditEngineDefaulter > ScEditEnginePtr;
 
     VirtualDevice               maBackgrDev;        /// Grid background, headers, cell texts.
     VirtualDevice               maGridDev;          /// Data grid with selection and cursor.
diff --git a/sc/source/ui/inc/inputwin.hxx b/sc/source/ui/inc/inputwin.hxx
index e9ac66c..0c04545 100644
--- a/sc/source/ui/inc/inputwin.hxx
+++ b/sc/source/ui/inc/inputwin.hxx
@@ -285,7 +285,7 @@ protected:
     bool IsPointerAtResizePos();
 private:
     ScPosWnd        aWndPos;
-    std::auto_ptr<ScTextWndBase> pRuntimeWindow;
+    std::unique_ptr<ScTextWndBase> pRuntimeWindow;
     ScTextWndBase&  aTextWindow;
     ScInputHandler* pInputHdl;
     OUString        aTextOk;
diff --git a/sc/source/ui/inc/spelldialog.hxx b/sc/source/ui/inc/spelldialog.hxx
index d2a359e..4c53710 100644
--- a/sc/source/ui/inc/spelldialog.hxx
+++ b/sc/source/ui/inc/spelldialog.hxx
@@ -72,10 +72,10 @@ private:
     bool                IsSelectionChanged();
 
 private:
-    typedef ::std::auto_ptr< ScConversionEngineBase >   ScConvEnginePtr;
-    typedef ::std::auto_ptr< ScDocument >               ScDocumentPtr;
-    typedef ::std::auto_ptr< ScSelectionState >         ScSelectionStatePtr;
-    typedef ::std::auto_ptr< ScRangeList >              ScRangeListPtr;
+    typedef ::std::unique_ptr< ScConversionEngineBase >   ScConvEnginePtr;
+    typedef ::std::unique_ptr< ScDocument >               ScDocumentPtr;
+    typedef ::std::unique_ptr< ScSelectionState >         ScSelectionStatePtr;
+    typedef ::std::unique_ptr< ScRangeList >              ScRangeListPtr;
 
     ScConvEnginePtr     mxEngine;
     ScDocumentPtr       mxUndoDoc;
diff --git a/sc/source/ui/inc/undotab.hxx b/sc/source/ui/inc/undotab.hxx
index b9f573b..fe43d95 100644
--- a/sc/source/ui/inc/undotab.hxx
+++ b/sc/source/ui/inc/undotab.hxx
@@ -347,9 +347,7 @@ private:
 class ScUndoDocProtect : public ScSimpleUndo
 {
 public:
-    SAL_WNODEPRECATED_DECLARATIONS_PUSH
-                    ScUndoDocProtect(ScDocShell* pShell, ::std::auto_ptr<ScDocProtection> pProtectSettings);
-    SAL_WNODEPRECATED_DECLARATIONS_POP
+                    ScUndoDocProtect(ScDocShell* pShell, ::std::unique_ptr<ScDocProtection> && pProtectSettings);
     virtual         ~ScUndoDocProtect();
 
     virtual void    Undo() SAL_OVERRIDE;
@@ -360,9 +358,7 @@ public:
     virtual OUString GetComment() const SAL_OVERRIDE;
 
 private:
-    SAL_WNODEPRECATED_DECLARATIONS_PUSH
-    ::std::auto_ptr<ScDocProtection> mpProtectSettings;
-    SAL_WNODEPRECATED_DECLARATIONS_POP
+    ::std::unique_ptr<ScDocProtection> mpProtectSettings;
 
     void    DoProtect(bool bProtect);
 };
@@ -372,10 +368,8 @@ private:
 class ScUndoTabProtect : public ScSimpleUndo
 {
 public:
-    SAL_WNODEPRECATED_DECLARATIONS_PUSH
                     ScUndoTabProtect(ScDocShell* pShell, SCTAB nTab,
-                                     ::std::auto_ptr<ScTableProtection> pProtectSettings);
-    SAL_WNODEPRECATED_DECLARATIONS_POP
+                                     std::unique_ptr<ScTableProtection> && pProtectSettings);
     virtual         ~ScUndoTabProtect();
 
     virtual void    Undo() SAL_OVERRIDE;
@@ -387,9 +381,7 @@ public:
 
 private:
     SCTAB   mnTab;
-    SAL_WNODEPRECATED_DECLARATIONS_PUSH
-    ::std::auto_ptr<ScTableProtection> mpProtectSettings;
-    SAL_WNODEPRECATED_DECLARATIONS_POP
+    ::std::unique_ptr<ScTableProtection> mpProtectSettings;
 
     void    DoProtect(bool bProtect);
 };
diff --git a/sc/source/ui/miscdlgs/anyrefdg.cxx b/sc/source/ui/miscdlgs/anyrefdg.cxx
index c402daf..0d06e75 100644
--- a/sc/source/ui/miscdlgs/anyrefdg.cxx
+++ b/sc/source/ui/miscdlgs/anyrefdg.cxx
@@ -50,7 +50,6 @@ ScFormulaReferenceHelper::ScFormulaReferenceHelper(IAnyRefDialog* _pDlg,SfxBindi
  , pRefBtn (NULL)
  , m_pWindow(NULL)
  , m_pBindings(_pBindings)
- , pAccel( NULL )
  , m_nOldBorderWidth (0)
  , nRefTab(0)
  , mnOldEditWidthReq( -1 )
diff --git a/sc/source/ui/undo/undorangename.cxx b/sc/source/ui/undo/undorangename.cxx
index 790661f..6cb3d6c 100644
--- a/sc/source/ui/undo/undorangename.cxx
+++ b/sc/source/ui/undo/undorangename.cxx
@@ -13,11 +13,13 @@
 #include "docfunc.hxx"
 #include "sc.hrc"
 
+#include <o3tl/ptr_container.hxx>
 #include <sfx2/app.hxx>
 
 #include <memory>
+#include <utility>
 
-using ::std::auto_ptr;
+using ::std::unique_ptr;
 
 ScUndoAllRangeNames::ScUndoAllRangeNames(
     ScDocShell* pDocSh,
@@ -28,19 +30,15 @@ ScUndoAllRangeNames::ScUndoAllRangeNames(
     std::map<OUString, ScRangeName*>::const_iterator itr, itrEnd;
     for (itr = rOldNames.begin(), itrEnd = rOldNames.end(); itr != itrEnd; ++itr)
     {
-        SAL_WNODEPRECATED_DECLARATIONS_PUSH
-        auto_ptr<ScRangeName> p(new ScRangeName(*itr->second));
-        SAL_WNODEPRECATED_DECLARATIONS_POP
-        maOldNames.insert(itr->first, p);
+        unique_ptr<ScRangeName> p(new ScRangeName(*itr->second));
+        o3tl::ptr_container::insert(maOldNames, itr->first, std::move(p));
     }
 
     boost::ptr_map<OUString, ScRangeName>::const_iterator it, itEnd;
     for (it = rNewNames.begin(), itEnd = rNewNames.end(); it != itEnd; ++it)
     {
-        SAL_WNODEPRECATED_DECLARATIONS_PUSH
-        auto_ptr<ScRangeName> p(new ScRangeName(*it->second));
-        SAL_WNODEPRECATED_DECLARATIONS_POP
-        maNewNames.insert(it->first, p);
+        unique_ptr<ScRangeName> p(new ScRangeName(*it->second));
+        o3tl::ptr_container::insert(maNewNames, it->first, std::move(p));
     }
 }
 
diff --git a/sc/source/ui/undo/undotab.cxx b/sc/source/ui/undo/undotab.cxx
index 713305c..826876b 100644
--- a/sc/source/ui/undo/undotab.cxx
+++ b/sc/source/ui/undo/undotab.cxx
@@ -47,6 +47,7 @@
 #include "drwlayer.hxx"
 #include "scresid.hxx"
 
+#include <utility>
 #include <vector>
 #include <boost/scoped_ptr.hpp>
 
@@ -54,7 +55,7 @@ extern bool bDrawIsInUndo; // somewhere as member!
 
 using namespace com::sun::star;
 using ::com::sun::star::uno::Sequence;
-using ::std::auto_ptr;
+using ::std::unique_ptr;
 using ::std::vector;
 using ::boost::shared_ptr;
 
@@ -1182,13 +1183,11 @@ OUString ScUndoShowHideTab::GetComment() const
     return ScGlobal::GetRscString( nId );
 }
 
-SAL_WNODEPRECATED_DECLARATIONS_PUSH
-ScUndoDocProtect::ScUndoDocProtect(ScDocShell* pShell, auto_ptr<ScDocProtection> pProtectSettings) :
+ScUndoDocProtect::ScUndoDocProtect(ScDocShell* pShell, unique_ptr<ScDocProtection> && pProtectSettings) :
     ScSimpleUndo(pShell),
-    mpProtectSettings(pProtectSettings)
+    mpProtectSettings(std::move(pProtectSettings))
 {
 }
-SAL_WNODEPRECATED_DECLARATIONS_POP
 
 ScUndoDocProtect::~ScUndoDocProtect()
 {
@@ -1201,9 +1200,7 @@ void ScUndoDocProtect::DoProtect(bool bProtect)
     if (bProtect)
     {
         // set protection.
-        SAL_WNODEPRECATED_DECLARATIONS_PUSH
-        auto_ptr<ScDocProtection> pCopy(new ScDocProtection(*mpProtectSettings));
-        SAL_WNODEPRECATED_DECLARATIONS_POP
+        unique_ptr<ScDocProtection> pCopy(new ScDocProtection(*mpProtectSettings));
         pCopy->setProtected(true);
         rDoc.SetDocProtection(pCopy.get());
     }
@@ -1253,14 +1250,12 @@ OUString ScUndoDocProtect::GetComment() const
     return ScGlobal::GetRscString( nId );
 }
 
-SAL_WNODEPRECATED_DECLARATIONS_PUSH
-ScUndoTabProtect::ScUndoTabProtect(ScDocShell* pShell, SCTAB nTab, auto_ptr<ScTableProtection> pProtectSettings) :
+ScUndoTabProtect::ScUndoTabProtect(ScDocShell* pShell, SCTAB nTab, unique_ptr<ScTableProtection> && pProtectSettings) :
     ScSimpleUndo(pShell),
     mnTab(nTab),
-    mpProtectSettings(pProtectSettings)
+    mpProtectSettings(std::move(pProtectSettings))
 {
 }
-SAL_WNODEPRECATED_DECLARATIONS_POP
 
 ScUndoTabProtect::~ScUndoTabProtect()
 {
@@ -1273,9 +1268,7 @@ void ScUndoTabProtect::DoProtect(bool bProtect)
     if (bProtect)
     {
         // set protection.
-        SAL_WNODEPRECATED_DECLARATIONS_PUSH
-        auto_ptr<ScTableProtection> pCopy(new ScTableProtection(*mpProtectSettings));
-        SAL_WNODEPRECATED_DECLARATIONS_POP
+        unique_ptr<ScTableProtection> pCopy(new ScTableProtection(*mpProtectSettings));
         pCopy->setProtected(true);
         rDoc.SetTabProtection(mnTab, pCopy.get());
     }
diff --git a/sc/source/ui/unoobj/chart2uno.cxx b/sc/source/ui/unoobj/chart2uno.cxx
index 46d3fae..9283ffe 100644
--- a/sc/source/ui/unoobj/chart2uno.cxx
+++ b/sc/source/ui/unoobj/chart2uno.cxx
@@ -17,6 +17,10 @@
  *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
  */
 
+#include <sal/config.h>
+
+#include <utility>
+
 #include "chart2uno.hxx"
 #include "miscuno.hxx"
 #include "document.hxx"
@@ -66,7 +70,7 @@ using namespace ::com::sun::star;
 using namespace ::formula;
 using ::com::sun::star::uno::Sequence;
 using ::com::sun::star::uno::Reference;
-using ::std::auto_ptr;
+using ::std::unique_ptr;
 using ::std::vector;
 using ::std::list;
 using ::std::distance;
@@ -185,9 +189,7 @@ vector<ScTokenRef>* TokenTable::getColRanges(SCCOL nCol) const
     if( mnRowCount<=0 )
         return NULL;
 
-    SAL_WNODEPRECATED_DECLARATIONS_PUSH
-    auto_ptr< vector<ScTokenRef> > pTokens(new vector<ScTokenRef>);
-    SAL_WNODEPRECATED_DECLARATIONS_POP
+    unique_ptr< vector<ScTokenRef> > pTokens(new vector<ScTokenRef>);
     sal_uInt32 nLast = getIndex(nCol, mnRowCount-1);
     for (sal_uInt32 i = getIndex(nCol, 0); i <= nLast; ++i)
     {

... etc. - the rest is truncated


More information about the Libreoffice-commits mailing list