[Libreoffice-commits] core.git: filter/source scripting/source sc/source

Takeshi Abe tabe at fixedpoint.jp
Sun Feb 23 17:49:41 PST 2014


 filter/source/svg/svgwriter.cxx                    |    3 ++-
 sc/source/core/data/funcdesc.cxx                   |    8 ++------
 sc/source/core/data/validat.cxx                    |    6 ++----
 sc/source/core/tool/chartlis.cxx                   |    1 -
 sc/source/core/tool/rangenam.cxx                   |    9 ++-------
 sc/source/core/tool/reftokenhelper.cxx             |    5 +++--
 sc/source/filter/excel/excel.cxx                   |    3 ++-
 sc/source/filter/excel/read.cxx                    |   10 ++++------
 sc/source/filter/excel/xiescher.cxx                |    3 ++-
 sc/source/filter/xcl97/xcl97rec.cxx                |    6 ++++--
 sc/source/filter/xml/xmlbodyi.cxx                  |    6 ++----
 sc/source/filter/xml/xmlexprt.cxx                  |    2 +-
 sc/source/filter/xml/xmlsubti.cxx                  |    7 ++-----
 sc/source/ui/cctrl/checklistmenu.cxx               |    1 -
 sc/source/ui/docshell/impex.cxx                    |    4 +++-
 sc/source/ui/pagedlg/scuitphfedit.cxx              |   18 ++++++------------
 sc/source/ui/view/dbfunc3.cxx                      |    7 +++----
 sc/source/ui/view/gridwin4.cxx                     |    4 +++-
 sc/source/ui/view/output2.cxx                      |    3 ++-
 sc/source/ui/view/tabvwsh3.cxx                     |    8 +++-----
 sc/source/ui/view/tabvwshf.cxx                     |    2 +-
 scripting/source/protocolhandler/scripthandler.cxx |    4 +++-
 22 files changed, 52 insertions(+), 68 deletions(-)

New commits:
commit a53577e6ff3629c4e9219616960d89eea9463593
Author: Takeshi Abe <tabe at fixedpoint.jp>
Date:   Mon Feb 24 10:15:38 2014 +0900

    Replace deprecated std::auto_ptr with boost::scoped_ptr
    
    Change-Id: I55292f5f0049e7c77d5bb0e5ef5fa187b815d159

diff --git a/filter/source/svg/svgwriter.cxx b/filter/source/svg/svgwriter.cxx
index 6b3f04d..a124abf 100644
--- a/filter/source/svg/svgwriter.cxx
+++ b/filter/source/svg/svgwriter.cxx
@@ -29,6 +29,7 @@
 #include <xmloff/unointerfacetouniqueidentifiermapper.hxx>
 #include <sax/tools/converter.hxx>
 
+#include <boost/scoped_ptr.hpp>
 #include <boost/shared_array.hpp>
 
 
@@ -196,7 +197,7 @@ void SVGAttributeWriter::AddGradientDef( const Rectangle& rObjRect, const Gradie
                             ( rGradientId = "Gradient_" ) += OUString::number( nCurGradientId++ ) );
 
         {
-            ::std::auto_ptr< SvXMLElementExport >   apGradient;
+            boost::scoped_ptr< SvXMLElementExport >   apGradient;
             OUString                         aColorStr;
 
             if( rGradient.GetStyle() == GradientStyle_LINEAR || rGradient.GetStyle() == GradientStyle_AXIAL )
diff --git a/sc/source/core/data/funcdesc.cxx b/sc/source/core/data/funcdesc.cxx
index 9d1d701..89c1fcb 100644
--- a/sc/source/core/data/funcdesc.cxx
+++ b/sc/source/core/data/funcdesc.cxx
@@ -400,9 +400,7 @@ ScFunctionList::ScFunctionList() :
 
     for (sal_uInt16 k = 0; k < SAL_N_ELEMENTS(nDescBlock); ++k)
     {
-        SAL_WNODEPRECATED_DECLARATIONS_PUSH
-        ::std::auto_ptr<ScResourcePublisher> pBlock( new ScResourcePublisher( ScResId( nDescBlock[k] ) ) );
-        SAL_WNODEPRECATED_DECLARATIONS_POP
+        boost::scoped_ptr<ScResourcePublisher> pBlock( new ScResourcePublisher( ScResId( nDescBlock[k] ) ) );
         // Browse for all possible OpCodes. This is not the fastest method, but
         // otherwise the sub resources within the resource blocks and the
         // resource blocks themselfs would had to be ordered according to
@@ -797,9 +795,7 @@ OUString ScFunctionMgr::GetCategoryName(sal_uInt32 _nCategoryNumber )
         return OUString();
     }
 
-    SAL_WNODEPRECATED_DECLARATIONS_PUSH
-    ::std::auto_ptr<ScResourcePublisher> pCategories( new ScResourcePublisher( ScResId( RID_FUNCTION_CATEGORIES ) ) );
-    SAL_WNODEPRECATED_DECLARATIONS_POP
+    boost::scoped_ptr<ScResourcePublisher> pCategories( new ScResourcePublisher( ScResId( RID_FUNCTION_CATEGORIES ) ) );
     return SC_RESSTR(static_cast<sal_uInt16>(_nCategoryNumber));
 }
 
diff --git a/sc/source/core/data/validat.cxx b/sc/source/core/data/validat.cxx
index 68d407f..67de694e 100644
--- a/sc/source/core/data/validat.cxx
+++ b/sc/source/core/data/validat.cxx
@@ -48,7 +48,7 @@
 #include "scmatrix.hxx"
 
 #include <math.h>
-#include <memory>
+#include <boost/scoped_ptr.hpp>
 
 using namespace formula;
 
@@ -863,9 +863,7 @@ bool ScValidationData::IsListValid( ScRefCellValue& rCell, const ScAddress& rPos
         5)  A formula resulting in a cell/range reference or matrix/array.
     */
 
-    SAL_WNODEPRECATED_DECLARATIONS_PUSH
-    ::std::auto_ptr< ScTokenArray > pTokArr( CreateTokenArry( 0 ) );
-    SAL_WNODEPRECATED_DECLARATIONS_POP
+    boost::scoped_ptr< ScTokenArray > pTokArr( CreateTokenArry( 0 ) );
 
     // *** try if formula is a string list ***
 
diff --git a/sc/source/core/tool/chartlis.cxx b/sc/source/core/tool/chartlis.cxx
index d5193fa..3cc5b8f 100644
--- a/sc/source/core/tool/chartlis.cxx
+++ b/sc/source/core/tool/chartlis.cxx
@@ -28,7 +28,6 @@
 using namespace com::sun::star;
 using ::std::vector;
 using ::std::list;
-using ::std::auto_ptr;
 using ::std::unary_function;
 using ::std::for_each;
 
diff --git a/sc/source/core/tool/rangenam.cxx b/sc/source/core/tool/rangenam.cxx
index 2c82e85..fef017f 100644
--- a/sc/source/core/tool/rangenam.cxx
+++ b/sc/source/core/tool/rangenam.cxx
@@ -18,7 +18,6 @@
  */
 
 #include <string.h>
-#include <memory>
 #include <boost/scoped_ptr.hpp>
 #include <unotools/collatorwrapper.hxx>
 #include <unotools/transliterationwrapper.hxx>
@@ -156,9 +155,7 @@ void ScRangeData::CompileRangeData( const OUString& rSymbol, bool bSetError )
     if (bSetError)
         aComp.SetExtendedErrorDetection( ScCompiler::EXTENDED_ERROR_DETECTION_NAME_NO_BREAK);
     ScTokenArray* pNewCode = aComp.CompileString( rSymbol );
-    SAL_WNODEPRECATED_DECLARATIONS_PUSH
-    ::std::auto_ptr<ScTokenArray> pOldCode( pCode);     // old pCode will be deleted
-    SAL_WNODEPRECATED_DECLARATIONS_POP
+    boost::scoped_ptr<ScTokenArray> pOldCode( pCode);     // old pCode will be deleted
     pCode = pNewCode;
     if( !pCode->GetCodeError() )
     {
@@ -266,9 +263,7 @@ void ScRangeData::GetSymbol( OUString& rSymbol, const ScAddress& rPos, const For
 void ScRangeData::UpdateSymbol( OUStringBuffer& rBuffer, const ScAddress& rPos,
                                 const FormulaGrammar::Grammar eGrammar )
 {
-    SAL_WNODEPRECATED_DECLARATIONS_PUSH
-    ::std::auto_ptr<ScTokenArray> pTemp( pCode->Clone() );
-    SAL_WNODEPRECATED_DECLARATIONS_POP
+    boost::scoped_ptr<ScTokenArray> pTemp( pCode->Clone() );
     ScCompiler aComp( pDoc, rPos, *pTemp.get());
     aComp.SetGrammar(eGrammar);
     aComp.MoveRelWrap(GetMaxCol(), GetMaxRow());
diff --git a/sc/source/core/tool/reftokenhelper.cxx b/sc/source/core/tool/reftokenhelper.cxx
index a02f02b..6b13b76 100644
--- a/sc/source/core/tool/reftokenhelper.cxx
+++ b/sc/source/core/tool/reftokenhelper.cxx
@@ -27,10 +27,11 @@
 #include "formula/grammar.hxx"
 #include "formula/token.hxx"
 
+#include <boost/scoped_ptr.hpp>
+
 using namespace formula;
 
 using ::std::vector;
-using ::std::auto_ptr;
 
 void ScRefTokenHelper::compileRangeRepresentation(
     vector<ScTokenRef>& rRefTokens, const OUString& rRangeStr, ScDocument* pDoc,
@@ -54,7 +55,7 @@ void ScRefTokenHelper::compileRangeRepresentation(
 
         ScCompiler aCompiler(pDoc, ScAddress(0,0,0));
         aCompiler.SetGrammar(eGrammar);
-        auto_ptr<ScTokenArray> pArray(aCompiler.CompileString(aToken));
+        boost::scoped_ptr<ScTokenArray> pArray(aCompiler.CompileString(aToken));
 
         // There MUST be exactly one reference per range token and nothing
         // else, and it MUST be a valid reference, not some #REF!
diff --git a/sc/source/filter/excel/excel.cxx b/sc/source/filter/excel/excel.cxx
index b5e9929..dea00ad 100644
--- a/sc/source/filter/excel/excel.cxx
+++ b/sc/source/filter/excel/excel.cxx
@@ -42,6 +42,7 @@
 #include "excimp8.hxx"
 #include "exp_op.hxx"
 
+#include <boost/scoped_ptr.hpp>
 
 FltError ScFormatFilterPluginImpl::ScImportExcel( SfxMedium& rMedium, ScDocument* pDocument, const EXCIMPFORMAT eFormat )
 {
@@ -120,7 +121,7 @@ FltError ScFormatFilterPluginImpl::ScImportExcel( SfxMedium& rMedium, ScDocument
         pBookStrm->SetBufferSize( 0x8000 );     // still needed?
 
         XclImpRootData aImpData( eBiff, rMedium, xRootStrg, *pDocument, RTL_TEXTENCODING_MS_1252 );
-        ::std::auto_ptr< ImportExcel > xFilter;
+        boost::scoped_ptr< ImportExcel > xFilter;
         switch( eBiff )
         {
             case EXC_BIFF2:
diff --git a/sc/source/filter/excel/read.cxx b/sc/source/filter/excel/read.cxx
index c030be9..1b6133c 100644
--- a/sc/source/filter/excel/read.cxx
+++ b/sc/source/filter/excel/read.cxx
@@ -40,6 +40,8 @@
 #include "imp_op.hxx"
 #include "excimp8.hxx"
 
+#include <boost/scoped_ptr.hpp>
+
 FltError ImportExcel::Read( void )
 {
     XclImpPageSettings&     rPageSett       = GetPageSettings();
@@ -80,10 +82,8 @@ FltError ImportExcel::Read( void )
 
     OSL_ENSURE( &aIn != NULL, "-ImportExcel::Read(): No Stream - what happened?!" );
 
-    SAL_WNODEPRECATED_DECLARATIONS_PUSH
-    ::std::auto_ptr< ScfSimpleProgressBar > pProgress( new ScfSimpleProgressBar(
+    boost::scoped_ptr< ScfSimpleProgressBar > pProgress( new ScfSimpleProgressBar(
         aIn.GetSvStreamSize(), GetDocShell(), STR_LOAD_DOC ) );
-    SAL_WNODEPRECATED_DECLARATIONS_POP
 
     /*  #i104057# Need to track a base position for progress bar calculation,
         because sheet substreams may not be in order of sheets. */
@@ -815,10 +815,8 @@ FltError ImportExcel8::Read( void )
 
     FltError eLastErr = eERR_OK;
 
-    SAL_WNODEPRECATED_DECLARATIONS_PUSH
-    ::std::auto_ptr< ScfSimpleProgressBar > pProgress( new ScfSimpleProgressBar(
+    boost::scoped_ptr< ScfSimpleProgressBar > pProgress( new ScfSimpleProgressBar(
         aIn.GetSvStreamSize(), GetDocShell(), STR_LOAD_DOC ) );
-    SAL_WNODEPRECATED_DECLARATIONS_POP
 
     /*  #i104057# Need to track a base position for progress bar calculation,
         because sheet substreams may not be in order of sheets. */
diff --git a/sc/source/filter/excel/xiescher.cxx b/sc/source/filter/excel/xiescher.cxx
index 10d87b3..832003b 100644
--- a/sc/source/filter/excel/xiescher.cxx
+++ b/sc/source/filter/excel/xiescher.cxx
@@ -105,6 +105,7 @@
 #include "scextopt.hxx"
 
 #include "namebuff.hxx"
+#include <boost/scoped_ptr.hpp>
 #include <boost/shared_ptr.hpp>
 #include <sfx2/docfile.hxx>
 
@@ -1471,7 +1472,7 @@ void XclImpTextObj::DoPreProcessSdrObj( XclImpDffConverter& rDffConv, SdrObject&
             if( maTextData.mxString->IsRich() )
             {
                 // rich text
-                ::std::auto_ptr< EditTextObject > xEditObj(
+                boost::scoped_ptr< EditTextObject > xEditObj(
                     XclImpStringHelper::CreateTextObject( GetRoot(), *maTextData.mxString ) );
                 OutlinerParaObject* pOutlineObj = new OutlinerParaObject( *xEditObj );
                 pOutlineObj->SetOutlinerMode( OUTLINERMODE_TEXTOBJECT );
diff --git a/sc/source/filter/xcl97/xcl97rec.cxx b/sc/source/filter/xcl97/xcl97rec.cxx
index c9143cb..0477d32 100644
--- a/sc/source/filter/xcl97/xcl97rec.cxx
+++ b/sc/source/filter/xcl97/xcl97rec.cxx
@@ -78,6 +78,8 @@
 #include <oox/export/utils.hxx>
 #include <oox/export/vmlexport.hxx>
 
+#include <boost/scoped_ptr.hpp>
+
 using namespace ::com::sun::star;
 using ::com::sun::star::uno::Reference;
 using ::oox::drawingml::DrawingML;
@@ -326,7 +328,7 @@ void XclObj::ImplWriteAnchor( const XclExpRoot& /*rRoot*/, const SdrObject* pSdr
     }
     else if( pSdrObj )
     {
-        ::std::auto_ptr< XclExpDffAnchorBase > xDffAnchor( mrEscherEx.CreateDffAnchor( *pSdrObj ) );
+        boost::scoped_ptr< XclExpDffAnchorBase > xDffAnchor( mrEscherEx.CreateDffAnchor( *pSdrObj ) );
         xDffAnchor->WriteDffData( mrEscherEx );
     }
 }
@@ -379,7 +381,7 @@ void XclObj::WriteBody( XclExpStream& rStrm )
 
     // create a substream to be able to create subrecords
     SvMemoryStream aMemStrm;
-    ::std::auto_ptr< XclExpStream > pXclStrm( new XclExpStream( aMemStrm, rStrm.GetRoot() ) );
+    boost::scoped_ptr< XclExpStream > pXclStrm( new XclExpStream( aMemStrm, rStrm.GetRoot() ) );
 
     // write the ftCmo subrecord
     pXclStrm->StartRecord( EXC_ID_OBJCMO, 18 );
diff --git a/sc/source/filter/xml/xmlbodyi.cxx b/sc/source/filter/xml/xmlbodyi.cxx
index e592ed5..b9f1144 100644
--- a/sc/source/filter/xml/xmlbodyi.cxx
+++ b/sc/source/filter/xml/xmlbodyi.cxx
@@ -50,7 +50,7 @@
 #include <com/sun/star/sheet/XSpreadsheetDocument.hpp>
 #include <sal/types.h>
 
-#include <memory>
+#include <boost/scoped_ptr.hpp>
 
 
 using namespace com::sun::star;
@@ -265,9 +265,7 @@ void ScXMLBodyContext::EndElement()
         // #i37959# handle document protection after the sheet settings
         if (bProtected)
         {
-            SAL_WNODEPRECATED_DECLARATIONS_PUSH
-            ::std::auto_ptr<ScDocProtection> pProtection(new ScDocProtection);
-            SAL_WNODEPRECATED_DECLARATIONS_POP
+            boost::scoped_ptr<ScDocProtection> pProtection(new ScDocProtection);
             pProtection->setProtected(true);
 
             uno::Sequence<sal_Int8> aPass;
diff --git a/sc/source/filter/xml/xmlexprt.cxx b/sc/source/filter/xml/xmlexprt.cxx
index 4be07a0..cef13ac 100644
--- a/sc/source/filter/xml/xmlexprt.cxx
+++ b/sc/source/filter/xml/xmlexprt.cxx
@@ -3468,7 +3468,7 @@ void ScXMLExport::ExportShape(const uno::Reference < drawing::XShape >& xShape,
             // no hyperlink property
         }
 
-        std::auto_ptr< SvXMLElementExport > pDrawA;
+        boost::scoped_ptr< SvXMLElementExport > pDrawA;
         // enlose shapes with <draw:a> element only if sHlink contains something
         if ( !sHlink.isEmpty() )
         {
diff --git a/sc/source/filter/xml/xmlsubti.cxx b/sc/source/filter/xml/xmlsubti.cxx
index 3cc0583..40cea68 100644
--- a/sc/source/filter/xml/xmlsubti.cxx
+++ b/sc/source/filter/xml/xmlsubti.cxx
@@ -49,9 +49,8 @@
 #include <com/sun/star/util/XProtectable.hpp>
 #include <com/sun/star/sheet/XArrayFormulaRange.hpp>
 
-#include <memory>
+#include <boost/scoped_ptr.hpp>
 
-using ::std::auto_ptr;
 using namespace com::sun::star;
 
 
@@ -207,9 +206,7 @@ void ScMyTables::DeleteTable()
         uno::Sequence<sal_Int8> aHash;
         ::sax::Converter::decodeBase64(aHash, maProtectionData.maPassword);
 
-        SAL_WNODEPRECATED_DECLARATIONS_PUSH
-        auto_ptr<ScTableProtection> pProtect(new ScTableProtection);
-        SAL_WNODEPRECATED_DECLARATIONS_POP
+        boost::scoped_ptr<ScTableProtection> pProtect(new ScTableProtection);
         pProtect->setProtected(maProtectionData.mbProtected);
         pProtect->setPasswordHash(aHash, maProtectionData.meHash1, maProtectionData.meHash2);
         pProtect->setOption(ScTableProtection::SELECT_LOCKED_CELLS,   maProtectionData.mbSelectProtectedCells);
diff --git a/sc/source/ui/cctrl/checklistmenu.cxx b/sc/source/ui/cctrl/checklistmenu.cxx
index 9e017bc..2fd7f1d 100644
--- a/sc/source/ui/cctrl/checklistmenu.cxx
+++ b/sc/source/ui/cctrl/checklistmenu.cxx
@@ -39,7 +39,6 @@ using ::com::sun::star::accessibility::XAccessible;
 using ::com::sun::star::accessibility::XAccessibleContext;
 using ::std::vector;
 using ::boost::unordered_map;
-using ::std::auto_ptr;
 
 ScMenuFloatingWindow::MenuItemData::MenuItemData() :
     mbEnabled(true), mbSeparator(false),
diff --git a/sc/source/ui/docshell/impex.cxx b/sc/source/ui/docshell/impex.cxx
index 737ec54..3b2928a 100644
--- a/sc/source/ui/docshell/impex.cxx
+++ b/sc/source/ui/docshell/impex.cxx
@@ -54,6 +54,8 @@
 #include "globstr.hrc"
 #include <vcl/svapp.hxx>
 
+#include <boost/scoped_ptr.hpp>
+
 //========================================================================
 
 // We don't want to end up with 2GB read in one line just because of malformed
@@ -1277,7 +1279,7 @@ bool ScImportExport::ExtText2Doc( SvStream& rStrm )
 
     sal_uLong nOldPos = rStrm.Tell();
     rStrm.Seek( STREAM_SEEK_TO_END );
-    ::std::auto_ptr<ScProgress> xProgress( new ScProgress( pDocSh,
+    boost::scoped_ptr<ScProgress> xProgress( new ScProgress( pDocSh,
             ScGlobal::GetRscString( STR_LOAD_DOC ), rStrm.Tell() - nOldPos ));
     rStrm.Seek( nOldPos );
     rStrm.StartReadingUnicodeText( rStrm.GetStreamCharSet() );
diff --git a/sc/source/ui/pagedlg/scuitphfedit.cxx b/sc/source/ui/pagedlg/scuitphfedit.cxx
index 0548004..1847642 100644
--- a/sc/source/ui/pagedlg/scuitphfedit.cxx
+++ b/sc/source/ui/pagedlg/scuitphfedit.cxx
@@ -50,7 +50,7 @@
 #include "AccessibleEditObject.hxx"
 
 #include "scuitphfedit.hxx"
-#include <memory>
+#include <boost/scoped_ptr.hpp>
 
 // STATIC DATA -----------------------------------------------------------
 
@@ -307,11 +307,9 @@ void ScHFEditPage::SetSelectDefinedList()
     // default to customized
     ScHFEntryId eSelectEntry = eEntryCount;
 
-    SAL_WNODEPRECATED_DECLARATIONS_PUSH
-    ::std::auto_ptr< EditTextObject > pLeftObj;
-    ::std::auto_ptr< EditTextObject > pCenterObj;
-    ::std::auto_ptr< EditTextObject > pRightObj;
-    SAL_WNODEPRECATED_DECLARATIONS_POP
+    boost::scoped_ptr< EditTextObject > pLeftObj;
+    boost::scoped_ptr< EditTextObject > pCenterObj;
+    boost::scoped_ptr< EditTextObject > pRightObj;
 
     OUString aLeftEntry;
     OUString aCenterEntry;
@@ -508,9 +506,7 @@ bool ScHFEditPage::IsPageEntry(EditEngine*pEngine, EditTextObject* pTextObj)
             {
                 aSel.nStartPos = aSel.nEndPos;
                 aSel.nEndPos++;
-                SAL_WNODEPRECATED_DECLARATIONS_PUSH
-                ::std::auto_ptr< EditTextObject > pPageObj;
-                SAL_WNODEPRECATED_DECLARATIONS_POP
+                boost::scoped_ptr< EditTextObject > pPageObj;
                 pPageObj.reset(pEngine->CreateTextObject(aSel));
                 if(pPageObj.get() && pPageObj->IsFieldObject() )
                 {
@@ -568,9 +564,7 @@ bool ScHFEditPage::IsExtFileNameEntry(EditTextObject* pTextObj)
 void ScHFEditPage::ProcessDefinedListSel(ScHFEntryId eSel, bool bTravelling)
 {
     SvtUserOptions aUserOpt;
-    SAL_WNODEPRECATED_DECLARATIONS_PUSH
-    ::std::auto_ptr< EditTextObject > pTextObj;
-    SAL_WNODEPRECATED_DECLARATIONS_POP
+    boost::scoped_ptr< EditTextObject > pTextObj;
 
     switch(eSel)
     {
diff --git a/sc/source/ui/view/dbfunc3.cxx b/sc/source/ui/view/dbfunc3.cxx
index b923411..fe69d7f 100644
--- a/sc/source/ui/view/dbfunc3.cxx
+++ b/sc/source/ui/view/dbfunc3.cxx
@@ -67,9 +67,9 @@
 #include "markdata.hxx"
 #include "stringutil.hxx"
 
+#include <boost/scoped_ptr.hpp>
 #include <boost/unordered_set.hpp>
 #include <boost/unordered_map.hpp>
-#include <memory>
 #include <list>
 #include <vector>
 
@@ -81,7 +81,6 @@ using ::com::sun::star::uno::UNO_QUERY;
 using ::com::sun::star::beans::XPropertySet;
 using ::com::sun::star::container::XNameAccess;
 using ::com::sun::star::sheet::XDimensionsSupplier;
-using ::std::auto_ptr;
 using ::std::list;
 using ::std::vector;
 
@@ -1763,7 +1762,7 @@ bool ScDBFunc::DataPilotSort( const ScAddress& rPos, bool bAscending, sal_uInt16
 
     // Update the datapilot with the newly sorted field members.
 
-    auto_ptr<ScDPObject> pNewObj(new ScDPObject(*pDPObj));
+    boost::scoped_ptr<ScDPObject> pNewObj(new ScDPObject(*pDPObj));
     pNewObj->SetSaveData(aNewSaveData);
     ScDBDocFunc aFunc(*GetViewData()->GetDocShell());
 
@@ -2017,7 +2016,7 @@ void ScDBFunc::ShowDataPilotSourceData( ScDPObject& rDPObj, const Sequence<sheet
 
     SCTAB nNewTab = GetViewData()->GetTabNo();
 
-    auto_ptr<ScDocument> pInsDoc(new ScDocument(SCDOCMODE_CLIP));
+    boost::scoped_ptr<ScDocument> pInsDoc(new ScDocument(SCDOCMODE_CLIP));
     pInsDoc->ResetClip( pDoc, nNewTab );
     for (SCROW nRow = 0; nRow < nRowSize; ++nRow)
     {
diff --git a/sc/source/ui/view/gridwin4.cxx b/sc/source/ui/view/gridwin4.cxx
index 5a0d785..6fdddac 100644
--- a/sc/source/ui/view/gridwin4.cxx
+++ b/sc/source/ui/view/gridwin4.cxx
@@ -65,7 +65,9 @@
 // #i74769#
 #include <svx/sdrpaintwindow.hxx>
 
+#include <boost/scoped_ptr.hpp>
 
+//------------------------------------------------------------------------
 
 static void lcl_LimitRect( Rectangle& rRect, const Rectangle& rVisible )
 {
@@ -491,7 +493,7 @@ void ScGridWindow::Draw( SCCOL nX1, SCROW nY1, SCCOL nX2, SCROW nY2, ScUpdateMod
     aOutputData.SetMirrorWidth( nMirrorWidth );         // needed for RTL
     aOutputData.SetSpellCheckContext(mpSpellCheckCxt.get());
 
-    std::auto_ptr< VirtualDevice > xFmtVirtDev;
+    boost::scoped_ptr< VirtualDevice > xFmtVirtDev;
     sal_Bool bLogicText = bTextWysiwyg;                     // call DrawStrings in logic MapMode?
 
     if ( bTextWysiwyg )
diff --git a/sc/source/ui/view/output2.cxx b/sc/source/ui/view/output2.cxx
index fa9bffc..432f2fe 100644
--- a/sc/source/ui/view/output2.cxx
+++ b/sc/source/ui/view/output2.cxx
@@ -66,6 +66,7 @@
 #include <comphelper/string.hxx>
 
 #include <boost/ptr_container/ptr_vector.hpp>
+#include <boost/scoped_ptr.hpp>
 
 #include <math.h>
 
@@ -4552,7 +4553,7 @@ void ScOutputData::DrawEdit(bool bPixelToLogic)
             long nPosX = 0;
             for (SCCOL nX=0; nX<=nX2; nX++)                 // wegen Ueberhaengen
             {
-                std::auto_ptr< ScPatternAttr > pPreviewPattr;
+                boost::scoped_ptr< ScPatternAttr > pPreviewPattr;
                 if (nX==nX1) nPosX = nInitPosX;                 // positions before nX1 are calculated individually
 
                 CellInfo*   pInfo = &pThisRowInfo->pCellInfo[nX+1];
diff --git a/sc/source/ui/view/tabvwsh3.cxx b/sc/source/ui/view/tabvwsh3.cxx
index a6f201a..02ec275 100644
--- a/sc/source/ui/view/tabvwsh3.cxx
+++ b/sc/source/ui/view/tabvwsh3.cxx
@@ -66,9 +66,7 @@
 #include <comphelper/string.hxx>
 #include "scabstdlg.hxx"
 
-#include <memory>
-
-using ::std::auto_ptr;
+#include <boost/scoped_ptr.hpp>
 
 
 
@@ -1066,7 +1064,7 @@ void ScTabViewShell::Execute( SfxRequest& rReq )
                 if (pProtect && pProtect->isProtectedWithPass())
                 {
                     OUString aText( ScResId(SCSTR_PASSWORDOPT) );
-                    auto_ptr<SfxPasswordDialog> pDlg(new SfxPasswordDialog(GetDialogParent(), &aText));
+                    boost::scoped_ptr<SfxPasswordDialog> pDlg(new SfxPasswordDialog(GetDialogParent(), &aText));
                     pDlg->SetText( ScResId(SCSTR_UNPROTECTTAB) );
                     pDlg->SetMinLen( 0 );
                     pDlg->SetHelpId( GetStaticInterface()->GetSlot(FID_PROTECT_TABLE)->GetCommand() );
@@ -1092,7 +1090,7 @@ void ScTabViewShell::Execute( SfxRequest& rReq )
             {
                 // Protect a current sheet.
 
-                auto_ptr<ScTableProtectionDlg> pDlg(new ScTableProtectionDlg(GetDialogParent()));
+                boost::scoped_ptr<ScTableProtectionDlg> pDlg(new ScTableProtectionDlg(GetDialogParent()));
 
                 ScTableProtection* pProtect = pDoc->GetTabProtection(nTab);
                 if (pProtect)
diff --git a/sc/source/ui/view/tabvwshf.cxx b/sc/source/ui/view/tabvwshf.cxx
index 17b7e17..61e8267 100644
--- a/sc/source/ui/view/tabvwshf.cxx
+++ b/sc/source/ui/view/tabvwshf.cxx
@@ -765,7 +765,7 @@ void ScTabViewShell::ExecuteTable( SfxRequest& rReq )
                     SvxAbstractDialogFactory* pDlgFactory = SvxAbstractDialogFactory::Create();
                     if (pDlgFactory)
                     {
-                        std::auto_ptr<VclAbstractDialog> pDialog( pDlgFactory->CreateSvxMacroAssignDlg(
+                        boost::scoped_ptr<VclAbstractDialog> pDialog( pDlgFactory->CreateSvxMacroAssignDlg(
                             GetDialogParent(), xFrame, false, xEvents, 0 ) );
                         if ( pDialog.get() && pDialog->Execute() == RET_OK )
                         {
diff --git a/scripting/source/protocolhandler/scripthandler.cxx b/scripting/source/protocolhandler/scripthandler.cxx
index c2fd35d..5ff2b18 100644
--- a/scripting/source/protocolhandler/scripthandler.cxx
+++ b/scripting/source/protocolhandler/scripthandler.cxx
@@ -52,6 +52,8 @@
 #include "com/sun/star/uri/UriReferenceFactory.hpp"
 #include "com/sun/star/uri/XVndSunStarScriptUrl.hpp"
 
+#include <boost/scoped_ptr.hpp>
+
 using namespace ::com::sun::star;
 using namespace ::com::sun::star::uno;
 using namespace ::com::sun::star::frame;
@@ -190,7 +192,7 @@ void SAL_CALL ScriptProtocolHandler::dispatchWithNotification(
             }
 
             // attempt to protect the document against the script tampering with its Undo Context
-            ::std::auto_ptr< ::framework::DocumentUndoGuard > pUndoGuard;
+            boost::scoped_ptr< ::framework::DocumentUndoGuard > pUndoGuard;
             if ( bIsDocumentScript )
                 pUndoGuard.reset( new ::framework::DocumentUndoGuard( m_xScriptInvocation ) );
 


More information about the Libreoffice-commits mailing list