[Libreoffice-commits] core.git: sw/source

Takeshi Abe tabe at fixedpoint.jp
Fri Jan 17 15:09:52 PST 2014


 sw/source/ui/dbui/dbinsdlg.cxx              |    6 +++---
 sw/source/ui/dbui/dbmgr.cxx                 |    5 +++--
 sw/source/ui/docvw/SidebarTxtControlAcc.cxx |    3 ++-
 sw/source/ui/fldui/DropDownFieldDialog.cxx  |    4 +++-
 sw/source/ui/misc/glosdoc.cxx               |    5 +++--
 sw/source/ui/shells/tabsh.cxx               |    4 +++-
 sw/source/ui/shells/textsh2.cxx             |    5 +++--
 sw/source/ui/shells/txtcrsr.cxx             |    4 +++-
 sw/source/ui/uiview/viewling.cxx            |    5 +++--
 sw/source/ui/uno/unoatxt.cxx                |    5 +++--
 sw/source/ui/uno/unomailmerge.cxx           |    5 +++--
 11 files changed, 32 insertions(+), 19 deletions(-)

New commits:
commit 5e6d1e3332ea4cd31d2c5e739dc27bb37b34b4dc
Author: Takeshi Abe <tabe at fixedpoint.jp>
Date:   Sat Jan 18 05:54:58 2014 +0900

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

diff --git a/sw/source/ui/dbui/dbinsdlg.cxx b/sw/source/ui/dbui/dbinsdlg.cxx
index 0d53502..7c4901d 100644
--- a/sw/source/ui/dbui/dbinsdlg.cxx
+++ b/sw/source/ui/dbui/dbinsdlg.cxx
@@ -19,8 +19,6 @@
 
 #include "dbinsdlg.hxx"
 
-#include <memory>
-
 #include <float.h>
 
 #include <hintids.hxx>
@@ -92,6 +90,8 @@
 #include <unomid.h>
 #include <IDocumentMarkAccess.hxx>
 
+#include <boost/scoped_ptr.hpp>
+
 namespace swui
 {
     SwAbstractDialogFactory * GetFactory();
@@ -968,7 +968,7 @@ void SwInsertDBColAutoPilot::DataToDoc( const Sequence<Any>& rSelection,
     if( rSh.HasSelection() )
         rSh.DelRight();
 
-    ::std::auto_ptr<SwWait> pWait;
+    boost::scoped_ptr<SwWait> pWait;
 
     Reference< XColumnsSupplier > xColsSupp( xResultSet, UNO_QUERY );
     Reference <XNameAccess> xCols = xColsSupp->getColumns();
diff --git a/sw/source/ui/dbui/dbmgr.cxx b/sw/source/ui/dbui/dbmgr.cxx
index 057b691..3d4c9ed 100644
--- a/sw/source/ui/dbui/dbmgr.cxx
+++ b/sw/source/ui/dbui/dbmgr.cxx
@@ -120,12 +120,13 @@
 #include <swabstdlg.hxx>
 #include <fmthdft.hxx>
 #include <envelp.hrc>
-#include <memory>
 #include <vector>
 #include <unomid.h>
 #include <section.hxx>
 #include <rootfrm.hxx>
 
+#include <boost/scoped_ptr.hpp>
+
 using namespace ::osl;
 using namespace ::svx;
 using namespace ::com::sun::star;
@@ -904,7 +905,7 @@ sal_Bool SwNewDBMgr::MergeMailFiles(SwWrtShell* pSourceShell,
             SfxObjectShellLock xTargetDocShell;
 
             SwView* pTargetView = 0;
-            std::auto_ptr< utl::TempFile > aTempFile;
+            boost::scoped_ptr< utl::TempFile > aTempFile;
             OUString sModifiedStartingPageDesc;
             OUString sStartingPageDesc;
             sal_uInt16 nStartingPageNo = 0;
diff --git a/sw/source/ui/docvw/SidebarTxtControlAcc.cxx b/sw/source/ui/docvw/SidebarTxtControlAcc.cxx
index 7fc6e3b..f7a74cd 100644
--- a/sw/source/ui/docvw/SidebarTxtControlAcc.cxx
+++ b/sw/source/ui/docvw/SidebarTxtControlAcc.cxx
@@ -30,6 +30,7 @@
 #include <svx/AccessibleTextHelper.hxx>
 #include <editeng/outliner.hxx>
 
+#include <boost/scoped_ptr.hpp>
 
 namespace sw { namespace sidebarwindows {
 
@@ -114,7 +115,7 @@ IMPL_LINK(SidebarTextEditSource, NotifyHdl, EENotify*, pNotify)
 {
     if ( pNotify )
     {
-        ::std::auto_ptr< SfxHint > aHint( SvxEditSourceHelper::EENotification2Hint( pNotify ) );
+        boost::scoped_ptr< SfxHint > aHint( SvxEditSourceHelper::EENotification2Hint( pNotify ) );
 
         if( aHint.get() )
         {
diff --git a/sw/source/ui/fldui/DropDownFieldDialog.cxx b/sw/source/ui/fldui/DropDownFieldDialog.cxx
index ea83cf7..ebb6ae1 100644
--- a/sw/source/ui/fldui/DropDownFieldDialog.cxx
+++ b/sw/source/ui/fldui/DropDownFieldDialog.cxx
@@ -25,6 +25,8 @@
 #include <flddropdown.hxx>
 #include <fldui.hrc>
 
+#include <boost/scoped_ptr.hpp>
+
 using namespace ::com::sun::star;
 
 
@@ -81,7 +83,7 @@ void sw::DropDownFieldDialog::Apply()
         {
             rSh.StartAllAction();
 
-            ::std::auto_ptr<SwDropDownField> const pCopy(
+            boost::scoped_ptr<SwDropDownField> const pCopy(
                 static_cast<SwDropDownField *>( pDropField->CopyField() ) );
 
             pCopy->SetPar1(sSelect);
diff --git a/sw/source/ui/misc/glosdoc.cxx b/sw/source/ui/misc/glosdoc.cxx
index a56556b..c12b1d0 100644
--- a/sw/source/ui/misc/glosdoc.cxx
+++ b/sw/source/ui/misc/glosdoc.cxx
@@ -19,7 +19,6 @@
 
 
 #include <algorithm>
-#include <memory>
 
 #include <com/sun/star/container/XNamed.hpp>
 
@@ -45,6 +44,8 @@
 #include <swerror.h>
 #include <globals.hrc>
 
+#include <boost/scoped_ptr.hpp>
+
 using namespace ::com::sun::star;
 using namespace ::com::sun::star::uno;
 
@@ -641,7 +642,7 @@ Reference< text::XAutoTextEntry > SwGlossaries::GetAutoTextEntry(
 {
     //standard must be created
     sal_Bool bCreate = ( rCompleteGroupName == GetDefName() );
-    ::std::auto_ptr< SwTextBlocks > pGlosGroup( GetGroupDoc( rCompleteGroupName, bCreate ) );
+    boost::scoped_ptr< SwTextBlocks > pGlosGroup( GetGroupDoc( rCompleteGroupName, bCreate ) );
 
     if ( pGlosGroup.get() && !pGlosGroup->GetError() )
     {
diff --git a/sw/source/ui/shells/tabsh.cxx b/sw/source/ui/shells/tabsh.cxx
index 9df5372..4152393 100644
--- a/sw/source/ui/shells/tabsh.cxx
+++ b/sw/source/ui/shells/tabsh.cxx
@@ -84,6 +84,8 @@
 #include "swabstdlg.hxx"
 #include <table.hrc>
 
+#include <boost/scoped_ptr.hpp>
+
 using ::editeng::SvxBorderLine;
 using namespace ::com::sun::star;
 
@@ -879,7 +881,7 @@ void SwTableShell::Execute(SfxRequest &rReq)
             if ( FN_TABLE_INSERT_ROW_DLG != nSlot || !rSh.IsInRepeatedHeadline())
             {
                 SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create();
-                ::std::auto_ptr<SvxAbstractInsRowColDlg> pDlg( pFact ? pFact->CreateSvxInsRowColDlg( GetView().GetWindow(), nSlot == FN_TABLE_INSERT_COL_DLG, pSlot->GetCommand() ) : 0);
+                boost::scoped_ptr<SvxAbstractInsRowColDlg> pDlg( pFact ? pFact->CreateSvxInsRowColDlg( GetView().GetWindow(), nSlot == FN_TABLE_INSERT_COL_DLG, pSlot->GetCommand() ) : 0);
 
                 if( pDlg.get() && (pDlg->Execute() == 1) )
                 {
diff --git a/sw/source/ui/shells/textsh2.cxx b/sw/source/ui/shells/textsh2.cxx
index 8bda156..65dd2e0 100644
--- a/sw/source/ui/shells/textsh2.cxx
+++ b/sw/source/ui/shells/textsh2.cxx
@@ -47,7 +47,6 @@
 #include "dbmgr.hxx"
 #include <comphelper/uno3.hxx>
 #include <svx/dataaccessdescriptor.hxx>
-#include <memory>
 
 #include <vcl/svapp.hxx>
 
@@ -63,6 +62,8 @@
 
 #include <unomid.h>
 
+#include <boost/scoped_ptr.hpp>
+
 using namespace ::svx;
 using namespace ::com::sun::star;
 using namespace ::com::sun::star::uno;
@@ -263,7 +264,7 @@ IMPL_STATIC_LINK( SwBaseShell, InsertDBTextHdl, DBTextStruct_Impl*, pDBStruct )
             SwDBData aDBData = pDBStruct->aDBData;
             SwAbstractDialogFactory* pFact = SwAbstractDialogFactory::Create();
             OSL_ENSURE(pFact, "SwAbstractDialogFactory fail!");
-            ::std::auto_ptr<AbstractSwInsertDBColAutoPilot>pDlg (pFact->CreateSwInsertDBColAutoPilot(pThis->GetView(),
+            boost::scoped_ptr<AbstractSwInsertDBColAutoPilot>pDlg (pFact->CreateSwInsertDBColAutoPilot(pThis->GetView(),
                                                                                                 xSource,
                                                                                                 xColSupp,
                                                                                                 aDBData));
diff --git a/sw/source/ui/shells/txtcrsr.cxx b/sw/source/ui/shells/txtcrsr.cxx
index d686012..926424f 100644
--- a/sw/source/ui/shells/txtcrsr.cxx
+++ b/sw/source/ui/shells/txtcrsr.cxx
@@ -40,6 +40,8 @@
 #include <svx/fmshell.hxx>
 #include <svx/sdrobjectfilter.hxx>
 
+#include <boost/scoped_ptr.hpp>
+
 using namespace ::com::sun::star;
 
 void SwTextShell::ExecBasicMove(SfxRequest &rReq)
@@ -241,7 +243,7 @@ void SwTextShell::ExecMoveMisc(SfxRequest &rReq)
                 if ( !pFormShell || !pDrawView || !pWindow )
                     break;
 
-                ::std::auto_ptr< ::svx::ISdrObjectFilter > pFilter( pFormShell->CreateFocusableControlFilter(
+                boost::scoped_ptr< ::svx::ISdrObjectFilter > pFilter( pFormShell->CreateFocusableControlFilter(
                     *pDrawView, *pWindow ) );
                 if ( !pFilter.get() )
                     break;
diff --git a/sw/source/ui/uiview/viewling.cxx b/sw/source/ui/uiview/viewling.cxx
index 5df515f..a6129ed 100644
--- a/sw/source/ui/uiview/viewling.cxx
+++ b/sw/source/ui/uiview/viewling.cxx
@@ -83,9 +83,10 @@
 #include <IMark.hxx>
 #include <xmloff/odffields.hxx>
 
-#include <memory>
 #include <editeng/editerr.hxx>
 
+#include <boost/scoped_ptr.hpp>
+
 using namespace sw::mark;
 using namespace ::com::sun::star;
 using namespace ::com::sun::star::beans;
@@ -684,7 +685,7 @@ sal_Bool SwView::ExecSpellPopup(const Point& rPt)
 
                 bRet = sal_True;
                 m_pWrtShell->SttSelect();
-                std::auto_ptr< SwSpellPopup > pPopup;
+                boost::scoped_ptr< SwSpellPopup > pPopup;
                 if (bUseGrammarContext)
                 {
                     sal_Int32 nPos = aPoint.nContent.GetIndex();
diff --git a/sw/source/ui/uno/unoatxt.cxx b/sw/source/ui/uno/unoatxt.cxx
index 4099eb9..eaea948 100644
--- a/sw/source/ui/uno/unoatxt.cxx
+++ b/sw/source/ui/uno/unoatxt.cxx
@@ -48,7 +48,8 @@
 #include <comphelper/servicehelper.hxx>
 #include <comphelper/string.hxx>
 #include <cppuhelper/supportsservice.hxx>
-#include <memory>
+
+#include <boost/scoped_ptr.hpp>
 
 
 SV_IMPL_REF ( SwDocShell )
@@ -977,7 +978,7 @@ void SwXAutoTextEntry::applyTo(const uno::Reference< text::XTextRange > & xTextR
         InsertPaM = *pCursor->GetPaM();
     }
 
-    ::std::auto_ptr<SwTextBlocks> pBlock(pGlossaries->GetGroupDoc(sGroupName));
+    boost::scoped_ptr<SwTextBlocks> pBlock(pGlossaries->GetGroupDoc(sGroupName));
     const bool bResult = pBlock.get() && !pBlock->GetError()
                     && pDoc->InsertGlossary( *pBlock, sEntryName, InsertPaM);
 
diff --git a/sw/source/ui/uno/unomailmerge.cxx b/sw/source/ui/uno/unomailmerge.cxx
index 717a095..b6c93a0 100644
--- a/sw/source/ui/uno/unomailmerge.cxx
+++ b/sw/source/ui/uno/unomailmerge.cxx
@@ -67,10 +67,11 @@
 #include <shellio.hxx>
 #include <mmconfigitem.hxx>
 #include <mailmergehelper.hxx>
-#include <memory>
 
 #include <unomid.h>
 
+#include <boost/scoped_ptr.hpp>
+
 using namespace ::com::sun::star;
 using namespace ::com::sun::star::frame;
 using namespace ::com::sun::star::uno;
@@ -657,7 +658,7 @@ uno::Any SAL_CALL SwXMailMerge::execute(
 
     SwMergeDescriptor aMergeDesc( nMergeType, rSh, aDescriptor );
 
-    std::auto_ptr< SwMailMergeConfigItem > pMMConfigItem;
+    boost::scoped_ptr< SwMailMergeConfigItem > pMMConfigItem;
     uno::Reference< mail::XMailService > xInService;
     if (MailMergeType::PRINTER == nCurOutputType)
     {


More information about the Libreoffice-commits mailing list