summaryrefslogtreecommitdiff
path: root/sd
diff options
context:
space:
mode:
authorTakeshi Abe <tabe@fixedpoint.jp>2014-02-25 10:59:16 +0900
committerTakeshi Abe <tabe@fixedpoint.jp>2014-02-25 11:15:06 +0900
commit523fcec55d3a1a1282d94fdc9ecd9aecedcebf56 (patch)
tree05d46a9f0504a67d42894ab61ce9e50a7d252faa /sd
parent295bc8703ff5d5133f18ae2b25dc3d88cdfffa93 (diff)
Replace deprecated std::auto_ptr with boost::scoped_ptr
Change-Id: I72b0e8b07bd7309a23d5635b7e0b7dbdc9c2c721
Diffstat (limited to 'sd')
-rw-r--r--sd/source/ui/annotations/annotationmanager.cxx8
-rw-r--r--sd/source/ui/annotations/annotationwindow.cxx4
-rw-r--r--sd/source/ui/func/fuconnct.cxx3
-rw-r--r--sd/source/ui/func/fumeasur.cxx3
-rw-r--r--sd/source/ui/func/fupage.cxx6
-rw-r--r--sd/source/ui/sidebar/MasterPageContainer.cxx3
-rw-r--r--sd/source/ui/table/tablefunction.cxx4
-rw-r--r--sd/source/ui/table/tableobjectbar.cxx4
-rw-r--r--sd/source/ui/view/drtxtob1.cxx6
-rw-r--r--sd/source/ui/view/outlnvsh.cxx7
10 files changed, 30 insertions, 18 deletions
diff --git a/sd/source/ui/annotations/annotationmanager.cxx b/sd/source/ui/annotations/annotationmanager.cxx
index 6aa7e0ac60a4..876b8f1aac40 100644
--- a/sd/source/ui/annotations/annotationmanager.cxx
+++ b/sd/source/ui/annotations/annotationmanager.cxx
@@ -82,6 +82,8 @@
#include "textapi.hxx"
#include "optsitem.hxx"
+#include <boost/scoped_ptr.hpp>
+
using namespace ::com::sun::star;
using namespace ::com::sun::star::uno;
using namespace ::com::sun::star::drawing;
@@ -454,7 +456,7 @@ void AnnotationManagerImpl::ExecuteReplyToAnnotation( SfxRequest& rReq )
TextApiObject* pTextApi = getTextApiObject( xAnnotation );
if( pTextApi )
{
- std::auto_ptr< ::Outliner > pOutliner( new ::Outliner(GetAnnotationPool(),OUTLINERMODE_TEXTOBJECT) );
+ boost::scoped_ptr< ::Outliner > pOutliner( new ::Outliner(GetAnnotationPool(),OUTLINERMODE_TEXTOBJECT) );
mpDoc->SetCalcFieldValueHdl( pOutliner.get() );
pOutliner->SetUpdateMode( sal_True );
@@ -490,7 +492,7 @@ void AnnotationManagerImpl::ExecuteReplyToAnnotation( SfxRequest& rReq )
pOutliner->QuickSetAttribs( aAnswerSet, aSel );
}
- std::auto_ptr< OutlinerParaObject > pOPO( pOutliner->CreateParaObject() );
+ boost::scoped_ptr< OutlinerParaObject > pOPO( pOutliner->CreateParaObject() );
pTextApi->SetText( *pOPO.get() );
SvtUserOptions aUserOptions;
@@ -968,7 +970,7 @@ void AnnotationManagerImpl::ExecuteAnnotationContextMenu( Reference< XAnnotation
if( bReadOnly && !pAnnotationWindow )
return;
- std::auto_ptr< PopupMenu > pMenu( new PopupMenu( SdResId( pAnnotationWindow ? RID_ANNOTATION_CONTEXTMENU : RID_ANNOTATION_TAG_CONTEXTMENU ) ) );
+ boost::scoped_ptr< PopupMenu > pMenu( new PopupMenu( SdResId( pAnnotationWindow ? RID_ANNOTATION_CONTEXTMENU : RID_ANNOTATION_TAG_CONTEXTMENU ) ) );
SvtUserOptions aUserOptions;
OUString sCurrentAuthor( aUserOptions.GetFullName() );
diff --git a/sd/source/ui/annotations/annotationwindow.cxx b/sd/source/ui/annotations/annotationwindow.cxx
index d570ed2a6229..700f316a5ada 100644
--- a/sd/source/ui/annotations/annotationwindow.cxx
+++ b/sd/source/ui/annotations/annotationwindow.cxx
@@ -86,6 +86,8 @@
#include "textapi.hxx"
#include "sdresid.hxx"
+#include <boost/scoped_ptr.hpp>
+
using namespace ::sd;
using namespace ::com::sun::star;
using namespace ::com::sun::star::uno;
@@ -548,7 +550,7 @@ void AnnotationWindow::setAnnotation( const Reference< XAnnotation >& xAnnotatio
if( pTextApi )
{
- std::auto_ptr< OutlinerParaObject > pOPO( pTextApi->CreateText() );
+ boost::scoped_ptr< OutlinerParaObject > pOPO( pTextApi->CreateText() );
Engine()->SetText( *pOPO.get() );
}
diff --git a/sd/source/ui/func/fuconnct.cxx b/sd/source/ui/func/fuconnct.cxx
index 9658221501e8..37837e045408 100644
--- a/sd/source/ui/func/fuconnct.cxx
+++ b/sd/source/ui/func/fuconnct.cxx
@@ -25,6 +25,7 @@
#include "drawdoc.hxx"
#include <svx/svxdlg.hxx>
#include <svx/dialogs.hrc>
+#include <boost/scoped_ptr.hpp>
namespace sd {
@@ -58,7 +59,7 @@ void FuConnectionDlg::DoExecute( SfxRequest& rReq )
if( !pArgs )
{
SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create();
- ::std::auto_ptr<SfxAbstractDialog> pDlg( pFact ? pFact->CreateSfxDialog( NULL, aNewAttr, mpView, RID_SVXPAGE_CONNECTION) : 0);
+ boost::scoped_ptr<SfxAbstractDialog> pDlg( pFact ? pFact->CreateSfxDialog( NULL, aNewAttr, mpView, RID_SVXPAGE_CONNECTION) : 0);
if( pDlg.get() && (pDlg->Execute() == RET_OK) )
{
diff --git a/sd/source/ui/func/fumeasur.cxx b/sd/source/ui/func/fumeasur.cxx
index 585a1a230309..3579b0014fe3 100644
--- a/sd/source/ui/func/fumeasur.cxx
+++ b/sd/source/ui/func/fumeasur.cxx
@@ -25,6 +25,7 @@
#include "drawdoc.hxx"
#include <svx/svxdlg.hxx>
#include <svx/dialogs.hrc>
+#include <boost/scoped_ptr.hpp>
namespace sd {
@@ -58,7 +59,7 @@ void FuMeasureDlg::DoExecute( SfxRequest& rReq )
if( !pArgs )
{
SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create();
- ::std::auto_ptr<SfxAbstractDialog> pDlg( pFact ? pFact->CreateSfxDialog( NULL, aNewAttr, mpView, RID_SVXPAGE_MEASURE) : 0 );
+ boost::scoped_ptr<SfxAbstractDialog> pDlg( pFact ? pFact->CreateSfxDialog( NULL, aNewAttr, mpView, RID_SVXPAGE_MEASURE) : 0 );
if( pDlg.get() && (pDlg->Execute() == RET_OK) )
{
diff --git a/sd/source/ui/func/fupage.cxx b/sd/source/ui/func/fupage.cxx
index 070d98e310fd..83caf19e1809 100644
--- a/sd/source/ui/func/fupage.cxx
+++ b/sd/source/ui/func/fupage.cxx
@@ -67,6 +67,8 @@
#include "sdundogr.hxx"
#include "helpids.h"
+#include <boost/scoped_ptr.hpp>
+
namespace sd {
class Window;
@@ -276,7 +278,7 @@ const SfxItemSet* FuPage::ExecuteDialog( Window* pParent )
}
}
- std::auto_ptr< SfxItemSet > pTempSet;
+ boost::scoped_ptr< SfxItemSet > pTempSet;
if( GetSlotID() == SID_SELECT_BACKGROUND )
{
@@ -306,7 +308,7 @@ const SfxItemSet* FuPage::ExecuteDialog( Window* pParent )
{
// create the dialog
SdAbstractDialogFactory* pFact = SdAbstractDialogFactory::Create();
- std::auto_ptr<SfxAbstractTabDialog> pDlg( pFact ? pFact->CreateSdTabPageDialog(NULL, &aMergedAttr, mpDocSh, mbDisplayBackgroundTabPage ) : 0 );
+ boost::scoped_ptr<SfxAbstractTabDialog> pDlg( pFact ? pFact->CreateSdTabPageDialog(NULL, &aMergedAttr, mpDocSh, mbDisplayBackgroundTabPage ) : 0 );
if( pDlg.get() && pDlg->Execute() == RET_OK )
pTempSet.reset( new SfxItemSet(*pDlg->GetOutputItemSet()) );
}
diff --git a/sd/source/ui/sidebar/MasterPageContainer.cxx b/sd/source/ui/sidebar/MasterPageContainer.cxx
index d6420b9b4ea5..ae4fceb589c2 100644
--- a/sd/source/ui/sidebar/MasterPageContainer.cxx
+++ b/sd/source/ui/sidebar/MasterPageContainer.cxx
@@ -52,6 +52,7 @@
#include "tools/TimerBasedTaskExecution.hxx"
#include "pres.hxx"
#include <osl/mutex.hxx>
+#include <boost/scoped_ptr.hpp>
#include <boost/weak_ptr.hpp>
using namespace ::com::sun::star;
@@ -800,7 +801,7 @@ MasterPageContainer::Token MasterPageContainer::Implementation::PutMasterPage (
{
// Update an existing MasterPageDescriptor.
aResult = (*aEntry)->maToken;
- ::std::auto_ptr<std::vector<MasterPageContainerChangeEvent::EventType> > pEventTypes(
+ boost::scoped_ptr<std::vector<MasterPageContainerChangeEvent::EventType> > pEventTypes(
(*aEntry)->Update(*rpDescriptor));
if (pEventTypes.get()!=NULL && pEventTypes->size()>0)
{
diff --git a/sd/source/ui/table/tablefunction.cxx b/sd/source/ui/table/tablefunction.cxx
index bb8482cb0351..f082b2729ff4 100644
--- a/sd/source/ui/table/tablefunction.cxx
+++ b/sd/source/ui/table/tablefunction.cxx
@@ -63,6 +63,8 @@
#include "sdresid.hxx"
#include "undo/undoobjects.hxx"
+#include <boost/scoped_ptr.hpp>
+
using namespace ::sd;
using namespace ::sdr::table;
using namespace ::com::sun::star;
@@ -127,7 +129,7 @@ void DrawViewShell::FuTable(SfxRequest& rReq)
if( (nColumns == 0) || (nRows == 0) )
{
SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create();
- ::std::auto_ptr<SvxAbstractNewTableDialog> pDlg( pFact ? pFact->CreateSvxNewTableDialog( NULL ) : 0);
+ boost::scoped_ptr<SvxAbstractNewTableDialog> pDlg( pFact ? pFact->CreateSvxNewTableDialog( NULL ) : 0);
if( !pDlg.get() || (pDlg->Execute() != RET_OK) )
break;
diff --git a/sd/source/ui/table/tableobjectbar.cxx b/sd/source/ui/table/tableobjectbar.cxx
index ff48ace15463..8c47f7be2cda 100644
--- a/sd/source/ui/table/tableobjectbar.cxx
+++ b/sd/source/ui/table/tableobjectbar.cxx
@@ -49,6 +49,8 @@
#include "tableobjectbar.hxx"
+#include <boost/scoped_ptr.hpp>
+
using namespace sd;
using namespace sd::ui::table;
@@ -158,7 +160,7 @@ void TableObjectBar::Execute( SfxRequest& rReq )
case SID_TABLE_INSERT_COL_DLG:
{
SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create();
- ::std::auto_ptr<SvxAbstractInsRowColDlg> pDlg( pFact ? pFact->CreateSvxInsRowColDlg( mpView->GetViewShell()->GetParentWindow(), nSlotId == SID_TABLE_INSERT_COL_DLG, SD_MOD()->GetSlotPool()->GetSlot(nSlotId)->GetCommand()) : 0);
+ boost::scoped_ptr<SvxAbstractInsRowColDlg> pDlg( pFact ? pFact->CreateSvxInsRowColDlg( mpView->GetViewShell()->GetParentWindow(), nSlotId == SID_TABLE_INSERT_COL_DLG, SD_MOD()->GetSlotPool()->GetSlot(nSlotId)->GetCommand()) : 0);
if( pDlg.get() && (pDlg->Execute() == 1) )
{
diff --git a/sd/source/ui/view/drtxtob1.cxx b/sd/source/ui/view/drtxtob1.cxx
index 12b1296def1a..3b7d956a2f7d 100644
--- a/sd/source/ui/view/drtxtob1.cxx
+++ b/sd/source/ui/view/drtxtob1.cxx
@@ -68,6 +68,8 @@
#include "Outliner.hxx"
#include "futext.hxx"
+#include <boost/scoped_ptr.hpp>
+
namespace sd {
/**
@@ -81,9 +83,7 @@ void TextObjectBar::Execute( SfxRequest &rReq )
sal_uInt16 nSlot = rReq.GetSlot();
OutlinerView* pOLV = mpView->GetTextEditOutlinerView();
- SAL_WNODEPRECATED_DECLARATIONS_PUSH
- std::auto_ptr< OutlineViewModelChangeGuard > aGuard;
- SAL_WNODEPRECATED_DECLARATIONS_POP
+ boost::scoped_ptr< OutlineViewModelChangeGuard > aGuard;
if (mpView->ISA(OutlineView))
{
diff --git a/sd/source/ui/view/outlnvsh.cxx b/sd/source/ui/view/outlnvsh.cxx
index 56ad2741787c..7531dfa0917c 100644
--- a/sd/source/ui/view/outlnvsh.cxx
+++ b/sd/source/ui/view/outlnvsh.cxx
@@ -21,7 +21,6 @@
#include "OutlineViewShell.hxx"
#include "ViewShellImplementation.hxx"
-#include <memory>
#include "helpids.h"
#include "app.hrc"
#include <svx/hyperdlg.hxx>
@@ -88,6 +87,8 @@
#include "DrawController.hxx"
#include "framework/FrameworkHelper.hxx"
+#include <boost/scoped_ptr.hpp>
+
using namespace ::com::sun::star;
using namespace ::com::sun::star::uno;
using namespace ::com::sun::star::lang;
@@ -462,9 +463,7 @@ void OutlineViewShell::FuSupport(SfxRequest &rReq)
sal_Bool bPreviewState = sal_False;
sal_uLong nSlot = rReq.GetSlot();
- SAL_WNODEPRECATED_DECLARATIONS_PUSH
- std::auto_ptr< OutlineViewModelChangeGuard > aGuard;
- SAL_WNODEPRECATED_DECLARATIONS_POP
+ boost::scoped_ptr< OutlineViewModelChangeGuard > aGuard;
if( pOlView && (
(nSlot == SID_TRANSLITERATE_SENTENCE_CASE) ||
(nSlot == SID_TRANSLITERATE_TITLE_CASE) ||