boost->std

Change-Id: If0ca026bd63a921d4f258586231455aacee23b1f
Reviewed-on: https://gerrit.libreoffice.org/18870
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
This commit is contained in:
Caolán McNamara
2015-09-25 14:11:12 +01:00
parent 14a5131658
commit e678a8d8e5
8 changed files with 26 additions and 33 deletions

View File

@@ -26,7 +26,6 @@
#include "com/sun/star/uno/Reference.hxx" #include "com/sun/star/uno/Reference.hxx"
#include <memory> #include <memory>
#include <boost/scoped_ptr.hpp>
#include <vector> #include <vector>
namespace com { namespace sun { namespace star { namespace ucb { namespace com { namespace sun { namespace star { namespace ucb {
@@ -75,7 +74,7 @@ class TemplateDir
public: public:
TemplateDir (const OUString& rsRegion, const OUString& rsUrl ) TemplateDir (const OUString& rsRegion, const OUString& rsUrl )
: msRegion(rsRegion), msUrl(rsUrl), maEntries(), : msRegion(rsRegion), msUrl(rsUrl), maEntries(),
mbSortingEnabled(false), mpEntryCompare(NULL) {} mbSortingEnabled(false), mpEntryCompare(nullptr) {}
OUString msRegion; OUString msRegion;
OUString msUrl; OUString msUrl;
@@ -86,7 +85,7 @@ public:
private: private:
bool mbSortingEnabled; bool mbSortingEnabled;
::boost::scoped_ptr<TemplateEntryCompare> mpEntryCompare; std::unique_ptr<TemplateEntryCompare> mpEntryCompare;
}; };
/** This class scans the template folders for impress templates. There are /** This class scans the template folders for impress templates. There are
@@ -183,7 +182,7 @@ private:
/** The folders that are collected by GatherFolderList(). /** The folders that are collected by GatherFolderList().
*/ */
class FolderDescriptorList; class FolderDescriptorList;
::boost::scoped_ptr<FolderDescriptorList> mpFolderDescriptors; std::unique_ptr<FolderDescriptorList> mpFolderDescriptors;
/** Set of state variables used by the methods /** Set of state variables used by the methods
InitializeFolderScanning(), GatherFolderList(), ScanFolder(), InitializeFolderScanning(), GatherFolderList(), ScanFolder(),

View File

@@ -223,7 +223,7 @@ void MasterPagesSelector::Command (const CommandEvent& rEvent)
} }
// Setup the menu. // Setup the menu.
::boost::scoped_ptr<PopupMenu> pMenu (new PopupMenu(GetContextMenuResId())); std::unique_ptr<PopupMenu> pMenu (new PopupMenu(GetContextMenuResId()));
FloatingWindow* pMenuWindow = dynamic_cast<FloatingWindow*>(pMenu->GetWindow()); FloatingWindow* pMenuWindow = dynamic_cast<FloatingWindow*>(pMenu->GetWindow());
if (pMenuWindow != NULL) if (pMenuWindow != NULL)
pMenuWindow->SetPopupModeFlags( pMenuWindow->SetPopupModeFlags(

View File

@@ -52,7 +52,6 @@
#include <unotools/moduleoptions.hxx> #include <unotools/moduleoptions.hxx>
#include <vector> #include <vector>
#include <boost/scoped_ptr.hpp>
using namespace ::com::sun::star; using namespace ::com::sun::star;
using namespace ::com::sun::star::uno; using namespace ::com::sun::star::uno;
@@ -1120,7 +1119,7 @@ namespace {
} }
private: private:
::boost::scoped_ptr<OutlinerParaObject> mpParaObject; std::unique_ptr<OutlinerParaObject> mpParaObject;
}; };
} }
@@ -1323,9 +1322,9 @@ private:
bool mbIsDisposed; bool mbIsDisposed;
VclPtr<Printer> mpPrinter; VclPtr<Printer> mpPrinter;
Size maPrinterPageSizePixel; Size maPrinterPageSizePixel;
::boost::scoped_ptr<PrintOptions> mpOptions; std::unique_ptr<PrintOptions> mpOptions;
std::vector< std::shared_ptr< ::sd::PrinterPage> > maPrinterPages; std::vector< std::shared_ptr< ::sd::PrinterPage> > maPrinterPages;
::boost::scoped_ptr<DrawView> mpPrintView; std::unique_ptr<DrawView> mpPrintView;
bool mbHasOrientationWarningBeenShown; bool mbHasOrientationWarningBeenShown;
std::vector<sal_Int32> maSlidesPerPage; std::vector<sal_Int32> maSlidesPerPage;
awt::Size maPrintSize; awt::Size maPrintSize;

View File

@@ -172,7 +172,6 @@
#include "ViewShellBase.hxx" #include "ViewShellBase.hxx"
#include <memory> #include <memory>
#include <boost/scoped_ptr.hpp>
namespace { namespace {
const char CustomAnimationPanelId[] = "CustomAnimationPanel"; const char CustomAnimationPanelId[] = "CustomAnimationPanel";
@@ -428,7 +427,7 @@ void DrawViewShell::FuTemporary(SfxRequest& rReq)
SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create(); SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create();
DBG_ASSERT(pFact, "Dialog creation failed!"); DBG_ASSERT(pFact, "Dialog creation failed!");
boost::scoped_ptr<AbstractSvxNameDialog> aNameDlg(pFact->CreateSvxNameDialog( GetActiveWindow(), aPageName, aDescr )); std::unique_ptr<AbstractSvxNameDialog> aNameDlg(pFact->CreateSvxNameDialog( GetActiveWindow(), aPageName, aDescr ));
DBG_ASSERT(aNameDlg, "Dialog creation failed!"); DBG_ASSERT(aNameDlg, "Dialog creation failed!");
aNameDlg->SetText( aTitle ); aNameDlg->SetText( aTitle );
aNameDlg->SetCheckNameHdl( LINK( this, DrawViewShell, RenameSlideHdl ), true ); aNameDlg->SetCheckNameHdl( LINK( this, DrawViewShell, RenameSlideHdl ), true );
@@ -802,7 +801,7 @@ void DrawViewShell::FuTemporary(SfxRequest& rReq)
case SID_SET_DEFAULT: case SID_SET_DEFAULT:
{ {
boost::scoped_ptr<SfxItemSet> pSet; std::unique_ptr<SfxItemSet> pSet;
if (mpDrawView->IsTextEdit()) if (mpDrawView->IsTextEdit())
{ {
@@ -877,7 +876,7 @@ void DrawViewShell::FuTemporary(SfxRequest& rReq)
{ {
std::pair<SfxItemSet*,SdrObjUserCall*> &rAttr = aAttrList[j++]; std::pair<SfxItemSet*,SdrObjUserCall*> &rAttr = aAttrList[j++];
boost::scoped_ptr<SfxItemSet> pNewSet(rAttr.first); std::unique_ptr<SfxItemSet> pNewSet(rAttr.first);
SdrObjUserCall* pUserCall = rAttr.second; SdrObjUserCall* pUserCall = rAttr.second;
if ( pNewSet && pNewSet->GetItemState( SDRATTR_TEXT_MINFRAMEHEIGHT ) == SfxItemState::SET ) if ( pNewSet && pNewSet->GetItemState( SDRATTR_TEXT_MINFRAMEHEIGHT ) == SfxItemState::SET )
@@ -1399,7 +1398,7 @@ void DrawViewShell::FuTemporary(SfxRequest& rReq)
aNewAttr.Put( SdAttrLayerThisPage() ); aNewAttr.Put( SdAttrLayerThisPage() );
SdAbstractDialogFactory* pFact = SdAbstractDialogFactory::Create(); SdAbstractDialogFactory* pFact = SdAbstractDialogFactory::Create();
boost::scoped_ptr<AbstractSdInsertLayerDlg> pDlg(pFact ? pFact->CreateSdInsertLayerDlg(NULL, aNewAttr, true, SD_RESSTR(STR_INSERTLAYER)) : 0); std::unique_ptr<AbstractSdInsertLayerDlg> pDlg(pFact ? pFact->CreateSdInsertLayerDlg(NULL, aNewAttr, true, SD_RESSTR(STR_INSERTLAYER)) : 0);
if( pDlg ) if( pDlg )
{ {
pDlg->SetHelpId( SD_MOD()->GetSlotPool()->GetSlot( SID_INSERTLAYER )->GetCommand() ); pDlg->SetHelpId( SD_MOD()->GetSlotPool()->GetSlot( SID_INSERTLAYER )->GetCommand() );
@@ -1567,7 +1566,7 @@ void DrawViewShell::FuTemporary(SfxRequest& rReq)
aNewAttr.Put( SdAttrLayerThisPage() ); aNewAttr.Put( SdAttrLayerThisPage() );
SdAbstractDialogFactory* pFact = SdAbstractDialogFactory::Create(); SdAbstractDialogFactory* pFact = SdAbstractDialogFactory::Create();
boost::scoped_ptr<AbstractSdInsertLayerDlg> pDlg(pFact ? pFact->CreateSdInsertLayerDlg(NULL, aNewAttr, bDelete, SD_RESSTR(STR_MODIFYLAYER)) : 0); std::unique_ptr<AbstractSdInsertLayerDlg> pDlg(pFact ? pFact->CreateSdInsertLayerDlg(NULL, aNewAttr, bDelete, SD_RESSTR(STR_MODIFYLAYER)) : 0);
if( pDlg ) if( pDlg )
{ {
pDlg->SetHelpId( SD_MOD()->GetSlotPool()->GetSlot( SID_MODIFYLAYER )->GetCommand() ); pDlg->SetHelpId( SD_MOD()->GetSlotPool()->GetSlot( SID_MODIFYLAYER )->GetCommand() );
@@ -1837,7 +1836,7 @@ void DrawViewShell::FuTemporary(SfxRequest& rReq)
case SID_INSERT_FLD_FILE: case SID_INSERT_FLD_FILE:
{ {
sal_uInt16 nMul = 1; sal_uInt16 nMul = 1;
boost::scoped_ptr<SvxFieldItem> pFieldItem; std::unique_ptr<SvxFieldItem> pFieldItem;
switch( nSId ) switch( nSId )
{ {
@@ -1977,12 +1976,12 @@ void DrawViewShell::FuTemporary(SfxRequest& rReq)
{ {
// Dialog... // Dialog...
SdAbstractDialogFactory* pFact = SdAbstractDialogFactory::Create(); SdAbstractDialogFactory* pFact = SdAbstractDialogFactory::Create();
boost::scoped_ptr<AbstractSdModifyFieldDlg> pDlg(pFact ? pFact->CreateSdModifyFieldDlg(GetActiveWindow(), pFldItem->GetField(), pOLV->GetAttribs() ) : 0); std::unique_ptr<AbstractSdModifyFieldDlg> pDlg(pFact ? pFact->CreateSdModifyFieldDlg(GetActiveWindow(), pFldItem->GetField(), pOLV->GetAttribs() ) : 0);
if( pDlg && pDlg->Execute() == RET_OK ) if( pDlg && pDlg->Execute() == RET_OK )
{ {
// To make a correct SetAttribs() call at the utlinerView // To make a correct SetAttribs() call at the utlinerView
// it is necessary to split the actions here // it is necessary to split the actions here
boost::scoped_ptr<SvxFieldData> pField(pDlg->GetField()); std::unique_ptr<SvxFieldData> pField(pDlg->GetField());
ESelection aSel = pOLV->GetSelection(); ESelection aSel = pOLV->GetSelection();
bool bSelectionWasModified(false); bool bSelectionWasModified(false);
@@ -2086,7 +2085,7 @@ void DrawViewShell::FuTemporary(SfxRequest& rReq)
SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create(); SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create();
OSL_ENSURE(pFact, "Dialog creation failed!"); OSL_ENSURE(pFact, "Dialog creation failed!");
boost::scoped_ptr<AbstractSvxObjectNameDialog> pDlg(pFact->CreateSvxObjectNameDialog(NULL, aName)); std::unique_ptr<AbstractSvxObjectNameDialog> pDlg(pFact->CreateSvxObjectNameDialog(NULL, aName));
OSL_ENSURE(pDlg, "Dialog creation failed!"); OSL_ENSURE(pDlg, "Dialog creation failed!");
pDlg->SetCheckNameHdl(LINK(this, DrawViewShell, NameObjectHdl)); pDlg->SetCheckNameHdl(LINK(this, DrawViewShell, NameObjectHdl));
@@ -2119,7 +2118,7 @@ void DrawViewShell::FuTemporary(SfxRequest& rReq)
SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create(); SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create();
OSL_ENSURE(pFact, "Dialog creation failed!"); OSL_ENSURE(pFact, "Dialog creation failed!");
boost::scoped_ptr<AbstractSvxObjectTitleDescDialog> pDlg(pFact->CreateSvxObjectTitleDescDialog(NULL, aTitle, aDescription)); std::unique_ptr<AbstractSvxObjectTitleDescDialog> pDlg(pFact->CreateSvxObjectTitleDescDialog(NULL, aTitle, aDescription));
OSL_ENSURE(pDlg, "Dialog creation failed!"); OSL_ENSURE(pDlg, "Dialog creation failed!");
if(RET_OK == pDlg->Execute()) if(RET_OK == pDlg->Execute())
@@ -2367,7 +2366,7 @@ void DrawViewShell::FuTemporary(SfxRequest& rReq)
SdAbstractDialogFactory* pFact = SdAbstractDialogFactory::Create(); SdAbstractDialogFactory* pFact = SdAbstractDialogFactory::Create();
if( pFact ) if( pFact )
{ {
boost::scoped_ptr<VclAbstractDialog> pDlg(pFact->CreateBreakDlg(GetActiveWindow(), mpDrawView, GetDocSh(), nCount, static_cast<sal_uLong>(nAnz) )); std::unique_ptr<VclAbstractDialog> pDlg(pFact->CreateBreakDlg(GetActiveWindow(), mpDrawView, GetDocSh(), nCount, static_cast<sal_uLong>(nAnz) ));
if( pDlg ) if( pDlg )
{ {
pDlg->Execute(); pDlg->Execute();
@@ -2881,7 +2880,7 @@ void DrawViewShell::FuTemporary(SfxRequest& rReq)
case SID_PHOTOALBUM: case SID_PHOTOALBUM:
{ {
SdAbstractDialogFactory* pFact = SdAbstractDialogFactory::Create(); SdAbstractDialogFactory* pFact = SdAbstractDialogFactory::Create();
boost::scoped_ptr<VclAbstractDialog> pDlg(pFact ? pFact->CreateSdPhotoAlbumDialog( std::unique_ptr<VclAbstractDialog> pDlg(pFact ? pFact->CreateSdPhotoAlbumDialog(
GetActiveWindow(), GetActiveWindow(),
GetDoc()) : 0); GetDoc()) : 0);

View File

@@ -64,7 +64,6 @@
#include <navigatr.hxx> #include <navigatr.hxx>
#include <memory> #include <memory>
#include <boost/scoped_ptr.hpp>
namespace sd { namespace sd {
@@ -564,7 +563,7 @@ void DrawViewShell::Command(const CommandEvent& rCEvt, ::sd::Window* pWin)
aMPos = Point( 20, 20 ); aMPos = Point( 20, 20 );
aFieldPopup.Execute( pWin, aMPos ); aFieldPopup.Execute( pWin, aMPos );
boost::scoped_ptr<SvxFieldData> pField(aFieldPopup.GetField()); std::unique_ptr<SvxFieldData> pField(aFieldPopup.GetField());
if( pField ) if( pField )
{ {
SvxFieldItem aFieldItem( *pField, EE_FEATURE_FIELD ); SvxFieldItem aFieldItem( *pField, EE_FEATURE_FIELD );
@@ -897,7 +896,7 @@ void DrawViewShell::ShowSnapLineContextMenu (
const Point& rMouseLocation) const Point& rMouseLocation)
{ {
const SdrHelpLine& rHelpLine (rPageView.GetHelpLines()[nSnapLineIndex]); const SdrHelpLine& rHelpLine (rPageView.GetHelpLines()[nSnapLineIndex]);
::boost::scoped_ptr<PopupMenu> pMenu (new PopupMenu ()); std::unique_ptr<PopupMenu> pMenu (new PopupMenu ());
if (rHelpLine.GetKind() == SDRHELPLINE_POINT) if (rHelpLine.GetKind() == SDRHELPLINE_POINT)
{ {

View File

@@ -61,7 +61,6 @@
#include <com/sun/star/gallery/GalleryItemType.hpp> #include <com/sun/star/gallery/GalleryItemType.hpp>
#include <com/sun/star/drawing/LineStyle.hpp> #include <com/sun/star/drawing/LineStyle.hpp>
#include <memory> #include <memory>
#include <boost/scoped_ptr.hpp>
using namespace com::sun::star; using namespace com::sun::star;
@@ -203,7 +202,7 @@ void DrawViewShell::AttrExec (SfxRequest &rReq)
CheckLineTo (rReq); CheckLineTo (rReq);
SfxBindings& rBindings = GetViewFrame()->GetBindings(); SfxBindings& rBindings = GetViewFrame()->GetBindings();
boost::scoped_ptr<SfxItemSet> pAttr(new SfxItemSet ( GetDoc()->GetPool() )); std::unique_ptr<SfxItemSet> pAttr(new SfxItemSet ( GetDoc()->GetPool() ));
GetView()->GetAttributes( *pAttr ); GetView()->GetAttributes( *pAttr );
const SfxItemSet* pArgs = rReq.GetArgs(); const SfxItemSet* pArgs = rReq.GetArgs();

View File

@@ -64,7 +64,6 @@
#include <svx/nbdtmgfact.hxx> #include <svx/nbdtmgfact.hxx>
#include <svx/nbdtmg.hxx> #include <svx/nbdtmg.hxx>
#include <memory> #include <memory>
#include <boost/scoped_ptr.hpp>
using namespace svx::sidebar; using namespace svx::sidebar;
using namespace ::com::sun::star; using namespace ::com::sun::star;
@@ -579,7 +578,7 @@ void DrawViewShell::GetAttrState( SfxItemSet& rSet )
SfxItemSet aNewAttr( GetPool(), EE_ITEMS_START, EE_ITEMS_END ); SfxItemSet aNewAttr( GetPool(), EE_ITEMS_START, EE_ITEMS_END );
aNewAttr.Put( aEditAttr, false ); aNewAttr.Put( aEditAttr, false );
boost::scoped_ptr<SvxNumRule> pNumRule; std::unique_ptr<SvxNumRule> pNumRule;
const SfxPoolItem* pTmpItem=NULL; const SfxPoolItem* pTmpItem=NULL;
sal_uInt16 nNumItemId = SID_ATTR_NUMBERING_RULE; sal_uInt16 nNumItemId = SID_ATTR_NUMBERING_RULE;
sal_uInt16 nActNumLvl = mpDrawView->GetSelectionLevel(); sal_uInt16 nActNumLvl = mpDrawView->GetSelectionLevel();
@@ -677,7 +676,7 @@ void DrawViewShell::GetAttrState( SfxItemSet& rSet )
nWhich = aIter.NextWhich(); nWhich = aIter.NextWhich();
} }
boost::scoped_ptr<SfxItemSet> pSet; std::unique_ptr<SfxItemSet> pSet;
if( bAttr ) if( bAttr )
{ {

View File

@@ -77,7 +77,6 @@
#include <svx/sdrhittesthelper.hxx> #include <svx/sdrhittesthelper.hxx>
#include <svx/xbtmpit.hxx> #include <svx/xbtmpit.hxx>
#include <memory> #include <memory>
#include <boost/scoped_ptr.hpp>
// - Namespaces - // - Namespaces -
@@ -268,7 +267,7 @@ bool View::InsertData( const TransferableDataHelper& rDataHelper,
TransferableDataHelper aDataHelper( rDataHelper ); TransferableDataHelper aDataHelper( rDataHelper );
SdrObject* pPickObj = NULL; SdrObject* pPickObj = NULL;
SdPage* pPage = NULL; SdPage* pPage = NULL;
boost::scoped_ptr<ImageMap> pImageMap; std::unique_ptr<ImageMap> pImageMap;
bool bReturn = false; bool bReturn = false;
bool bLink = ( ( mnAction & DND_ACTION_LINK ) != 0 ); bool bLink = ( ( mnAction & DND_ACTION_LINK ) != 0 );
bool bCopy = ( ( ( mnAction & DND_ACTION_COPY ) != 0 ) || bLink ); bool bCopy = ( ( ( mnAction & DND_ACTION_COPY ) != 0 ) || bLink );
@@ -1505,7 +1504,7 @@ bool View::InsertData( const TransferableDataHelper& rDataHelper,
bool View::PasteRTFTable( ::tools::SvRef<SotStorageStream> xStm, SdrPage* pPage, SdrInsertFlags nPasteOptions ) bool View::PasteRTFTable( ::tools::SvRef<SotStorageStream> xStm, SdrPage* pPage, SdrInsertFlags nPasteOptions )
{ {
boost::scoped_ptr<SdDrawDocument> pModel(new SdDrawDocument( DOCUMENT_TYPE_IMPRESS, mpDocSh )); std::unique_ptr<SdDrawDocument> pModel(new SdDrawDocument( DOCUMENT_TYPE_IMPRESS, mpDocSh ));
pModel->NewOrLoadCompleted(NEW_DOC); pModel->NewOrLoadCompleted(NEW_DOC);
pModel->GetItemPool().SetDefaultMetric(SFX_MAPUNIT_100TH_MM); pModel->GetItemPool().SetDefaultMetric(SFX_MAPUNIT_100TH_MM);
pModel->InsertPage(pModel->AllocPage(false)); pModel->InsertPage(pModel->AllocPage(false));