[Libreoffice-commits] core.git: sw/source toolkit/source uui/source vcl/source xmloff/source

Takeshi Abe tabe at fixedpoint.jp
Wed Feb 26 00:37:24 PST 2014


 sw/source/core/txtnode/thints.cxx           |    7 ++++---
 sw/source/core/undo/rolbck.cxx              |    3 ++-
 sw/source/core/unocore/unoparagraph.cxx     |    4 ++--
 toolkit/source/controls/unocontrolmodel.cxx |    4 ++--
 uui/source/iahndl-errorhandler.cxx          |    7 +++----
 uui/source/iahndl-filter.cxx                |    5 +++--
 vcl/source/edit/vclmedit.cxx                |    5 ++---
 xmloff/source/draw/shapeexport.cxx          |    5 ++---
 8 files changed, 20 insertions(+), 20 deletions(-)

New commits:
commit d5c59404bec65c8a9d9e05c1fcc24e068d170924
Author: Takeshi Abe <tabe at fixedpoint.jp>
Date:   Wed Feb 26 17:20:31 2014 +0900

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

diff --git a/sw/source/core/txtnode/thints.cxx b/sw/source/core/txtnode/thints.cxx
index 6a8da0e..164daf8 100644
--- a/sw/source/core/txtnode/thints.cxx
+++ b/sw/source/core/txtnode/thints.cxx
@@ -70,6 +70,7 @@
 #include <svl/smplhint.hxx>
 #include <algorithm>
 #include <map>
+#include <boost/scoped_ptr.hpp>
 
 #ifdef DBG_UTIL
 #define CHECK           Check(true);
@@ -1004,7 +1005,7 @@ SwTxtAttr* MakeTxtAttr(
         // If the attribute is an auto-style which refers to a pool that is
         // different from rDoc's pool, we have to correct this:
         const StylePool::SfxItemSet_Pointer_t pAutoStyle = static_cast<const SwFmtAutoFmt&>(rAttr).GetStyleHandle();
-        ::std::auto_ptr<const SfxItemSet> pNewSet(
+        boost::scoped_ptr<const SfxItemSet> pNewSet(
                 pAutoStyle->SfxItemSet::Clone( sal_True, &rDoc.GetAttrPool() ));
         SwTxtAttr* pNew = MakeTxtAttr( rDoc, *pNewSet, nStt, nEnd );
         return pNew;
@@ -2138,7 +2139,7 @@ bool SwTxtNode::GetAttr( SfxItemSet& rSet, sal_Int32 nStt, sal_Int32 nEnd,
         else                            // es ist ein Bereich definiert
         {
             // #i75299#
-            ::std::auto_ptr< std::vector< SwPoolItemEndPair > > pAttrArr;
+            boost::scoped_ptr< std::vector< SwPoolItemEndPair > > pAttrArr;
 
             const sal_uInt16 coArrSz = static_cast<sal_uInt16>(RES_TXTATR_WITHEND_END) -
                                    static_cast<sal_uInt16>(RES_CHRATR_BEGIN);
@@ -2174,7 +2175,7 @@ bool SwTxtNode::GetAttr( SfxItemSet& rSet, sal_Int32 nStt, sal_Int32 nEnd,
                 if( bChkInvalid )
                 {
                     // uneindeutig ?
-                    ::std::auto_ptr< SfxItemIter > pItemIter;
+                    boost::scoped_ptr< SfxItemIter > pItemIter;
                     const SfxPoolItem* pItem = 0;
 
                     if ( RES_TXTATR_AUTOFMT == pHt->Which() )
diff --git a/sw/source/core/undo/rolbck.cxx b/sw/source/core/undo/rolbck.cxx
index 0be55af..d53eec6 100644
--- a/sw/source/core/undo/rolbck.cxx
+++ b/sw/source/core/undo/rolbck.cxx
@@ -54,6 +54,7 @@
 #include <comcore.hrc>
 #include <undo.hrc>
 #include <bookmrk.hxx>
+#include <boost/scoped_ptr.hpp>
 
 OUString SwHistoryHint::GetDescription() const
 {
@@ -599,7 +600,7 @@ void SwHistoryBookmark::SetInDoc( SwDoc* pDoc, bool )
 
     SwNodes& rNds = pDoc->GetNodes();
     IDocumentMarkAccess* pMarkAccess = pDoc->getIDocumentMarkAccess();
-    ::std::auto_ptr<SwPaM> pPam;
+    boost::scoped_ptr<SwPaM> pPam;
     ::sw::mark::IMark* pMark = NULL;
 
     if(m_bSavePos)
diff --git a/sw/source/core/unocore/unoparagraph.cxx b/sw/source/core/unocore/unoparagraph.cxx
index db571cb..212aef3 100644
--- a/sw/source/core/unocore/unoparagraph.cxx
+++ b/sw/source/core/unocore/unoparagraph.cxx
@@ -46,7 +46,7 @@
 #include <com/sun/star/text/WrapTextMode.hpp>
 #include <com/sun/star/text/TextContentAnchorType.hpp>
 #include <comphelper/servicehelper.hxx>
-
+#include <boost/scoped_ptr.hpp>
 
 using namespace ::com::sun::star;
 
@@ -1025,7 +1025,7 @@ throw (beans::UnknownPropertyException, uno::RuntimeException)
             // to paragraph boundaries
             SwPosition aStart( *aCursor.Start() );
             SwPosition aEnd  ( *aCursor.End()   );
-            ::std::auto_ptr<SwUnoCrsr> pTemp(
+            boost::scoped_ptr<SwUnoCrsr> pTemp(
                 aCursor.GetDoc()->CreateUnoCrsr(aStart, false) );
             if(!SwUnoCursorHelper::IsStartOfPara(*pTemp))
             {
diff --git a/toolkit/source/controls/unocontrolmodel.cxx b/toolkit/source/controls/unocontrolmodel.cxx
index f1dfb72..3af23cb 100644
--- a/toolkit/source/controls/unocontrolmodel.cxx
+++ b/toolkit/source/controls/unocontrolmodel.cxx
@@ -49,8 +49,8 @@
 #include <vcl/svapp.hxx>
 #include <uno/data.h>
 
-#include <memory>
 #include <set>
+#include <boost/scoped_ptr.hpp>
 
 using namespace ::com::sun::star;
 using namespace ::com::sun::star::uno;
@@ -1326,7 +1326,7 @@ void UnoControlModel::setPropertyValues( const ::com::sun::star::uno::Sequence<
     {
         // if somebody sets properties which are single aspects of a font descriptor,
         // remove them, and build a font descriptor instead
-        ::std::auto_ptr< awt::FontDescriptor > pFD;
+        boost::scoped_ptr< awt::FontDescriptor > pFD;
         for ( sal_uInt16 n = 0; n < nProps; ++n )
         {
             if ( ( pHandles[n] >= BASEPROPERTY_FONTDESCRIPTORPART_START ) && ( pHandles[n] <= BASEPROPERTY_FONTDESCRIPTORPART_END ) )
diff --git a/uui/source/iahndl-errorhandler.cxx b/uui/source/iahndl-errorhandler.cxx
index 6d65d66..80b2952 100644
--- a/uui/source/iahndl-errorhandler.cxx
+++ b/uui/source/iahndl-errorhandler.cxx
@@ -17,8 +17,6 @@
  *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
  */
 
-#include <memory>
-
 #include "osl/mutex.hxx"
 #include "vcl/svapp.hxx"
 #include "vcl/msgbox.hxx"
@@ -35,6 +33,7 @@
 #include "getcontinuations.hxx"
 
 #include "iahndl.hxx"
+#include <boost/scoped_ptr.hpp>
 
 using namespace com::sun::star;
 
@@ -57,7 +56,7 @@ executeErrorDialog(
             //TODO! must be internationalized
     aText.append(rMessage);
 
-    std::auto_ptr< MessBox > xBox;
+    boost::scoped_ptr< MessBox > xBox;
     try
     {
         switch (eClassification)
@@ -170,7 +169,7 @@ UUIInteractionHelper::handleErrorHandlerRequest(
             SOURCE_UUI;
 
         SolarMutexGuard aGuard;
-        std::auto_ptr< ResMgr > xManager;
+        boost::scoped_ptr< ResMgr > xManager;
         xManager.reset(ResMgr::CreateResMgr(aManager[eSource]));
         if (!xManager.get())
             return;
diff --git a/uui/source/iahndl-filter.cxx b/uui/source/iahndl-filter.cxx
index d67717a..8db6255 100644
--- a/uui/source/iahndl-filter.cxx
+++ b/uui/source/iahndl-filter.cxx
@@ -39,6 +39,7 @@
 #include "fltdlg.hxx"
 
 #include "iahndl.hxx"
+#include <boost/scoped_ptr.hpp>
 
 using namespace com::sun::star;
 
@@ -56,9 +57,9 @@ executeFilterDialog(
     {
         SolarMutexGuard aGuard;
 
-        std::auto_ptr< ResMgr > xManager(ResMgr::CreateResMgr("uui"));
+        boost::scoped_ptr< ResMgr > xManager(ResMgr::CreateResMgr("uui"));
 
-        std::auto_ptr< uui::FilterDialog > xDialog(
+        boost::scoped_ptr< uui::FilterDialog > xDialog(
             new uui::FilterDialog(pParent, xManager.get()));
 
         xDialog->SetURL(rURL);
diff --git a/vcl/source/edit/vclmedit.cxx b/vcl/source/edit/vclmedit.cxx
index ea52379..e3448fa 100644
--- a/vcl/source/edit/vclmedit.cxx
+++ b/vcl/source/edit/vclmedit.cxx
@@ -17,8 +17,6 @@
  *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
  */
 
-#include <memory>
-
 #include <tools/rc.h>
 #include <vcl/builder.hxx>
 #include <vcl/decoview.hxx>
@@ -34,6 +32,7 @@
 #include <svids.hrc>
 #include <vcl/scrbar.hxx>
 #include <vcl/settings.hxx>
+#include <boost/scoped_ptr.hpp>
 
 
 class TextWindow : public Window
@@ -981,7 +980,7 @@ VclMultiLineEdit::VclMultiLineEdit( Window* pParent, const ResId& rResId )
 VclMultiLineEdit::~VclMultiLineEdit()
 {
     {
-        ::std::auto_ptr< ImpVclMEdit > pDelete( pImpVclMEdit );
+        boost::scoped_ptr< ImpVclMEdit > pDelete( pImpVclMEdit );
         pImpVclMEdit = NULL;
     }
     delete pUpdateDataTimer;
diff --git a/xmloff/source/draw/shapeexport.cxx b/xmloff/source/draw/shapeexport.cxx
index 53c8e33..dab81a0 100644
--- a/xmloff/source/draw/shapeexport.cxx
+++ b/xmloff/source/draw/shapeexport.cxx
@@ -17,8 +17,6 @@
  *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
  */
 
-#include <memory>
-
 #include <basegfx/matrix/b2dhommatrix.hxx>
 #include <basegfx/matrix/b2dhommatrixtools.hxx>
 #include <basegfx/matrix/b3dhommatrix.hxx>
@@ -112,6 +110,7 @@
 #include "xexptran.hxx"
 #include "XMLBase64Export.hxx"
 #include "XMLImageMapExport.hxx"
+#include <boost/scoped_ptr.hpp>
 
 using namespace ::com::sun::star;
 using namespace ::xmloff::EnhancedCustomShapeToken;
@@ -562,7 +561,7 @@ void XMLShapeExport::exportShape(const uno::Reference< drawing::XShape >& xShape
     sal_Int32 nZIndex = 0;
     uno::Reference< beans::XPropertySet > xSet( xShape, uno::UNO_QUERY );
 
-    ::std::auto_ptr< SvXMLElementExport >  mpHyperlinkElement;
+    boost::scoped_ptr< SvXMLElementExport >  mpHyperlinkElement;
 
     // export hyperlinks with <a><shape/></a>. Currently only in draw since draw
     // does not support document events


More information about the Libreoffice-commits mailing list