sd/source/ui/annotations/annotationmanager.cxx | 8 +++++--- sd/source/ui/annotations/annotationwindow.cxx | 4 +++- sd/source/ui/func/fuconnct.cxx | 3 ++- sd/source/ui/func/fumeasur.cxx | 3 ++- sd/source/ui/func/fupage.cxx | 6 ++++-- sd/source/ui/sidebar/MasterPageContainer.cxx | 3 ++- sd/source/ui/table/tablefunction.cxx | 4 +++- sd/source/ui/table/tableobjectbar.cxx | 4 +++- sd/source/ui/view/drtxtob1.cxx | 6 +++--- sd/source/ui/view/outlnvsh.cxx | 7 +++---- sfx2/source/appl/macroloader.cxx | 4 +++- sfx2/source/control/thumbnailview.cxx | 4 +++- sfx2/source/doc/objmisc.cxx | 4 +++- 13 files changed, 39 insertions(+), 21 deletions(-)
New commits: commit 523fcec55d3a1a1282d94fdc9ecd9aecedcebf56 Author: Takeshi Abe <t...@fixedpoint.jp> Date: Tue Feb 25 10:59:16 2014 +0900 Replace deprecated std::auto_ptr with boost::scoped_ptr Change-Id: I72b0e8b07bd7309a23d5635b7e0b7dbdc9c2c721 diff --git a/sd/source/ui/annotations/annotationmanager.cxx b/sd/source/ui/annotations/annotationmanager.cxx index 6aa7e0a..876b8f1 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 d570ed2..700f316 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 9658221..37837e0 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 585a1a2..3579b00 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 070d98e..83caf19 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 d6420b9..ae4fceb 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 bb8482c..f082b27 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 ff48ace..8c47f7b 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 12b1296..3b7d956 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 56ad274..7531dfa 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) || diff --git a/sfx2/source/appl/macroloader.cxx b/sfx2/source/appl/macroloader.cxx index 3339835..cdef54c 100644 --- a/sfx2/source/appl/macroloader.cxx +++ b/sfx2/source/appl/macroloader.cxx @@ -38,6 +38,8 @@ #include <tools/urlobj.hxx> #include <vcl/svapp.hxx> +#include <boost/scoped_ptr.hpp> + using namespace ::com::sun::star; using namespace ::com::sun::star::frame; using namespace ::com::sun::star::lang; @@ -292,7 +294,7 @@ ErrCode SfxMacroLoader::loadMacro( const OUString& rURL, com::sun::star::uno::An { // 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 ( bIsDocBasic ) pUndoGuard.reset( new ::framework::DocumentUndoGuard( pDoc->GetModel() ) ); diff --git a/sfx2/source/control/thumbnailview.cxx b/sfx2/source/control/thumbnailview.cxx index 12a458f..2b71d7a 100644 --- a/sfx2/source/control/thumbnailview.cxx +++ b/sfx2/source/control/thumbnailview.cxx @@ -38,6 +38,8 @@ #include <com/sun/star/accessibility/AccessibleEventId.hpp> #include <com/sun/star/accessibility/AccessibleStateType.hpp> +#include <boost/scoped_ptr.hpp> + using namespace basegfx; using namespace basegfx::tools; using namespace drawinglayer::attribute; @@ -1382,7 +1384,7 @@ BitmapEx ThumbnailView::readThumbnail(const OUString &msURL) BitmapEx aThumbnail; if (xIStream.is()) { - ::std::auto_ptr<SvStream> pStream ( + boost::scoped_ptr<SvStream> pStream ( ::utl::UcbStreamHelper::CreateStream (xIStream)); ::vcl::PNGReader aReader (*pStream); aThumbnail = aReader.Read (); diff --git a/sfx2/source/doc/objmisc.cxx b/sfx2/source/doc/objmisc.cxx index 255260c..09d40c9 100644 --- a/sfx2/source/doc/objmisc.cxx +++ b/sfx2/source/doc/objmisc.cxx @@ -131,6 +131,8 @@ using namespace ::com::sun::star::container; #include "appbaslib.hxx" #include <openflag.hxx> +#include <boost/scoped_ptr.hpp> + // class SfxHeaderAttributes_Impl ---------------------------------------- class SfxHeaderAttributes_Impl : public SvKeyValueIterator @@ -1561,7 +1563,7 @@ ErrCode SfxObjectShell::CallXScript( const Reference< XInterface >& _rxScriptCon if ( bCaughtException && bRaiseError ) { - ::std::auto_ptr< VclAbstractDialog > pScriptErrDlg; + boost::scoped_ptr< VclAbstractDialog > pScriptErrDlg; SfxAbstractDialogFactory* pFact = SfxAbstractDialogFactory::Create(); if ( pFact ) pScriptErrDlg.reset( pFact->CreateScriptErrorDialog( NULL, aException ) ); _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits