diff options
author | Caolán McNamara <caolanm@redhat.com> | 2015-09-15 15:35:44 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2015-09-16 15:34:23 +0100 |
commit | 31ebd9f475f94fb4f05bbeaa8077122a2635d528 (patch) | |
tree | 0f3eb9182102e613ee08706750e2b72fd1db239e | |
parent | 21b2cb540aaa308ea1911af34dc4862a24dcb545 (diff) |
boost->std
Change-Id: Ic18be8b86727dd1179a7e39c70493d088ed00557
92 files changed, 259 insertions, 274 deletions
diff --git a/svtools/inc/table/defaultinputhandler.hxx b/svtools/inc/table/defaultinputhandler.hxx index af4f668e4fc5..b9b96bbea0a3 100644 --- a/svtools/inc/table/defaultinputhandler.hxx +++ b/svtools/inc/table/defaultinputhandler.hxx @@ -23,7 +23,7 @@ #include <svtools/table/tableinputhandler.hxx> #include <svtools/table/tabletypes.hxx> -#include <boost/scoped_ptr.hpp> +#include <memory> namespace svt { namespace table @@ -38,7 +38,7 @@ namespace svt { namespace table class DefaultInputHandler : public ITableInputHandler { private: - ::boost::scoped_ptr< DefaultInputHandler_Impl > m_pImpl; + ::std::unique_ptr< DefaultInputHandler_Impl > m_pImpl; public: DefaultInputHandler(); diff --git a/svtools/inc/table/gridtablerenderer.hxx b/svtools/inc/table/gridtablerenderer.hxx index e3f14cd341da..1fb1ce4d0308 100644 --- a/svtools/inc/table/gridtablerenderer.hxx +++ b/svtools/inc/table/gridtablerenderer.hxx @@ -22,7 +22,7 @@ #include <svtools/table/tablemodel.hxx> -#include <boost/scoped_ptr.hpp> +#include <memory> namespace svt { namespace table @@ -42,7 +42,7 @@ namespace svt { namespace table class GridTableRenderer : public ITableRenderer { private: - ::boost::scoped_ptr< GridTableRenderer_Impl > m_pImpl; + ::std::unique_ptr< GridTableRenderer_Impl > m_pImpl; public: /** creates a table renderer associated with the given model diff --git a/svtools/source/contnr/fileview.cxx b/svtools/source/contnr/fileview.cxx index 2f4ef7bcf5f2..e2b8d5b1188c 100644 --- a/svtools/source/contnr/fileview.cxx +++ b/svtools/source/contnr/fileview.cxx @@ -72,8 +72,8 @@ #include <unotools/intlwrapper.hxx> #include <unotools/syslocale.hxx> #include <svl/urlfilter.hxx> -#include <boost/scoped_ptr.hpp> #include <o3tl/typed_flags_set.hxx> +#include <memory> using namespace ::com::sun::star::lang; using namespace ::com::sun::star::sdbc; @@ -1600,7 +1600,7 @@ FileViewResult SvtFileView_Impl::GetFolderContent_Impl( m_aCurrentAsyncActionHandler = Link<void*,void>(); // minimum time to wait - boost::scoped_ptr< TimeValue > pTimeout( new TimeValue ); + std::unique_ptr< TimeValue > pTimeout( new TimeValue ); sal_Int32 nMinTimeout = pAsyncDescriptor->nMinTimeout; OSL_ENSURE( nMinTimeout > 0, "SvtFileView_Impl::GetFolderContent_Impl: invalid minimum timeout!" ); if ( nMinTimeout <= 0 ) diff --git a/svtools/source/contnr/imivctl1.cxx b/svtools/source/contnr/imivctl1.cxx index fa7b37d90c8a..d04a3e60e87b 100644 --- a/svtools/source/contnr/imivctl1.cxx +++ b/svtools/source/contnr/imivctl1.cxx @@ -36,7 +36,7 @@ #include <svtools/svmedit.hxx> #include <algorithm> -#include <boost/scoped_ptr.hpp> +#include <memory> #include <vcl/idle.hxx> #define IMPICNVIEW_ACC_RETURN 1 @@ -302,7 +302,7 @@ void SvxIconChoiceCtrl_Impl::InsertEntry( SvxIconChoiceCtrlEntry* pEntry, size_t void SvxIconChoiceCtrl_Impl::CreateAutoMnemonics( MnemonicGenerator* _pGenerator ) { - boost::scoped_ptr< MnemonicGenerator > pAutoDeleteOwnGenerator; + std::unique_ptr< MnemonicGenerator > pAutoDeleteOwnGenerator; if ( !_pGenerator ) { _pGenerator = new MnemonicGenerator; @@ -661,7 +661,7 @@ void SvxIconChoiceCtrl_Impl::Paint(vcl::RenderContext& rRenderContext, const Rec rRenderContext.SetClipRegion(vcl::Region(rRect)); SvxIconChoiceCtrlEntryList_impl* pNewZOrderList = new SvxIconChoiceCtrlEntryList_impl(); - boost::scoped_ptr<SvxIconChoiceCtrlEntryList_impl> pPaintedEntries(new SvxIconChoiceCtrlEntryList_impl()); + std::unique_ptr<SvxIconChoiceCtrlEntryList_impl> pPaintedEntries(new SvxIconChoiceCtrlEntryList_impl()); size_t nPos = 0; while(nCount) diff --git a/svtools/source/control/calendar.cxx b/svtools/source/control/calendar.cxx index 414ed855750f..8f080bc440e7 100644 --- a/svtools/source/control/calendar.cxx +++ b/svtools/source/control/calendar.cxx @@ -36,7 +36,7 @@ #include <svtools/svtools.hrc> #include <svtools/svtresid.hxx> #include <svtools/calendar.hxx> -#include <boost/scoped_ptr.hpp> +#include <memory> #define DAY_OFFX 4 #define DAY_OFFY 2 @@ -1056,7 +1056,7 @@ void Calendar::ImplUpdateSelection( IntDateSet* pOld ) void Calendar::ImplMouseSelect( const Date& rDate, sal_uInt16 nHitTest, bool bMove, bool bExpand, bool bExtended ) { - boost::scoped_ptr<IntDateSet> pOldSel(new IntDateSet( *mpSelectTable )); + std::unique_ptr<IntDateSet> pOldSel(new IntDateSet( *mpSelectTable )); Date aOldDate = maCurDate; Date aTempDate = rDate; @@ -1307,7 +1307,7 @@ void Calendar::ImplEndTracking( bool bCancel ) if ( !bSpinDown ) { - boost::scoped_ptr<IntDateSet> pOldSel(new IntDateSet( *mpSelectTable )); + std::unique_ptr<IntDateSet> pOldSel(new IntDateSet( *mpSelectTable )); Date aOldDate = maCurDate; maCurDate = maOldCurDate; *mpSelectTable = *mpOldSelectTable; @@ -1519,7 +1519,7 @@ void Calendar::KeyInput( const KeyEvent& rKEvt ) { if ( bMultiSel && bExpand ) { - boost::scoped_ptr<IntDateSet> pOldSel(new IntDateSet( *mpSelectTable )); + std::unique_ptr<IntDateSet> pOldSel(new IntDateSet( *mpSelectTable )); Date aOldAnchorDate = maAnchorDate; mbSelLeft = aNewDate < maAnchorDate; if ( !bExtended ) @@ -1707,7 +1707,7 @@ void Calendar::SelectDate( const Date& rDate, bool bSelect ) if ( !rDate.IsValidAndGregorian() ) return; - boost::scoped_ptr<IntDateSet> pOldSel; + std::unique_ptr<IntDateSet> pOldSel; if ( !mbInSelChange ) pOldSel.reset(new IntDateSet( *mpSelectTable )); @@ -1720,7 +1720,7 @@ void Calendar::SelectDate( const Date& rDate, bool bSelect ) void Calendar::SetNoSelection() { - boost::scoped_ptr<IntDateSet> pOldSel; + std::unique_ptr<IntDateSet> pOldSel; if ( !mbInSelChange ) pOldSel.reset(new IntDateSet( *mpSelectTable )); diff --git a/svtools/source/control/ruler.cxx b/svtools/source/control/ruler.cxx index 7ad59d401ef9..c428286b1414 100644 --- a/svtools/source/control/ruler.cxx +++ b/svtools/source/control/ruler.cxx @@ -29,8 +29,7 @@ #include <svtools/svtools.hrc> #include <svtools/colorcfg.hxx> -#include <boost/scoped_ptr.hpp> - +#include <memory> #include <vector> using namespace std; @@ -2024,7 +2023,7 @@ void Ruler::MouseButtonDown( const MouseEvent& rMEvt ) } else { - boost::scoped_ptr<RulerSelection> pHitTest(new RulerSelection); + std::unique_ptr<RulerSelection> pHitTest(new RulerSelection); bool bHitTestResult = ImplHitTest(aMousePos, pHitTest.get()); if ( nMouseClicks == 1 ) diff --git a/svtools/source/filter/SvFilterOptionsDialog.cxx b/svtools/source/filter/SvFilterOptionsDialog.cxx index 8c054a52ad79..ffd58182b890 100644 --- a/svtools/source/filter/SvFilterOptionsDialog.cxx +++ b/svtools/source/filter/SvFilterOptionsDialog.cxx @@ -46,7 +46,7 @@ #include <comphelper/processfactory.hxx> #include <cppuhelper/implbase.hxx> #include <cppuhelper/supportsservice.hxx> -#include <boost/scoped_ptr.hpp> +#include <memory> using namespace ::com::sun::star; @@ -250,7 +250,7 @@ sal_Int16 SvFilterOptionsDialog::execute() FltCallDialogParameter aFltCallDlgPara( Application::GetDefDialogParent(), NULL, meFieldUnit ); aFltCallDlgPara.aFilterData = maFilterDataSequence; - boost::scoped_ptr<ResMgr> pResMgr(ResMgr::CreateResMgr( "svt", Application::GetSettings().GetUILanguageTag() )); + std::unique_ptr<ResMgr> pResMgr(ResMgr::CreateResMgr( "svt", Application::GetSettings().GetUILanguageTag() )); aFltCallDlgPara.pResMgr = pResMgr.get(); aFltCallDlgPara.aFilterExt = aGraphicFilter.GetExportFormatShortName( nFormat ); diff --git a/svtools/source/graphic/descriptor.cxx b/svtools/source/graphic/descriptor.cxx index f0020618878c..6db1ffa47839 100644 --- a/svtools/source/graphic/descriptor.cxx +++ b/svtools/source/graphic/descriptor.cxx @@ -33,7 +33,7 @@ #include <vcl/graph.hxx> #include <vcl/svapp.hxx> -#include <boost/scoped_ptr.hpp> +#include <memory> #define UNOGRAPHIC_GRAPHICTYPE 1 #define UNOGRAPHIC_MIMETYPE 2 @@ -75,7 +75,7 @@ void GraphicDescriptor::init( const ::Graphic& rGraphic ) void GraphicDescriptor::init( const OUString& rURL ) { - boost::scoped_ptr<SvStream> pIStm(::utl::UcbStreamHelper::CreateStream( rURL, StreamMode::READ )); + std::unique_ptr<SvStream> pIStm(::utl::UcbStreamHelper::CreateStream( rURL, StreamMode::READ )); if( pIStm ) implCreate( *pIStm, &rURL ); @@ -83,7 +83,7 @@ void GraphicDescriptor::init( const OUString& rURL ) void GraphicDescriptor::init( const uno::Reference< io::XInputStream >& rxIStm, const OUString& rURL ) { - boost::scoped_ptr<SvStream> pIStm(::utl::UcbStreamHelper::CreateStream( rxIStm )); + std::unique_ptr<SvStream> pIStm(::utl::UcbStreamHelper::CreateStream( rxIStm )); if( pIStm ) implCreate( *pIStm, &rURL ); diff --git a/svtools/source/graphic/grfcache.cxx b/svtools/source/graphic/grfcache.cxx index 2e29e31240a7..1aa1ecbffe75 100644 --- a/svtools/source/graphic/grfcache.cxx +++ b/svtools/source/graphic/grfcache.cxx @@ -30,7 +30,7 @@ #include <rtl/strbuf.hxx> #include "grfcache.hxx" #include <rtl/crc.h> -#include <boost/scoped_ptr.hpp> +#include <memory> #define MAX_BMP_EXTENT 4096 @@ -865,7 +865,7 @@ void GraphicCache::AddGraphicObject( if( !bInserted ) { GraphicCacheEntryList::iterator it = maGraphicCache.begin(); - boost::scoped_ptr< GraphicID > apID; + std::unique_ptr< GraphicID > apID; if( !pID ) { diff --git a/svtools/source/graphic/grfmgr.cxx b/svtools/source/graphic/grfmgr.cxx index 54e54f569991..e6fbd3f3024d 100644 --- a/svtools/source/graphic/grfmgr.cxx +++ b/svtools/source/graphic/grfmgr.cxx @@ -37,7 +37,7 @@ #include <com/sun/star/container/XNameContainer.hpp> #include <com/sun/star/beans/XPropertySet.hpp> -#include <boost/scoped_ptr.hpp> +#include <memory> using com::sun::star::uno::Reference; using com::sun::star::uno::XInterface; @@ -238,7 +238,7 @@ void GraphicObject::ImplAutoSwapIn() if( osl::FileBase::getFileURLFromSystemPath( GetLink(), aURLStr ) == osl::FileBase::E_None ) { - boost::scoped_ptr<SvStream> pIStm(::utl::UcbStreamHelper::CreateStream( aURLStr, StreamMode::READ )); + std::unique_ptr<SvStream> pIStm(::utl::UcbStreamHelper::CreateStream( aURLStr, StreamMode::READ )); if( pIStm ) { @@ -1141,7 +1141,7 @@ GraphicObject GraphicObject::CreateGraphicObjectFromURL( const OUString &rURL ) Graphic aGraphic; if ( !aURL.isEmpty() ) { - boost::scoped_ptr<SvStream> pStream(utl::UcbStreamHelper::CreateStream( aURL, StreamMode::READ )); + std::unique_ptr<SvStream> pStream(utl::UcbStreamHelper::CreateStream( aURL, StreamMode::READ )); if( pStream ) GraphicConverter::Import( *pStream, aGraphic ); } diff --git a/svtools/source/graphic/provider.cxx b/svtools/source/graphic/provider.cxx index afca9bc366a0..d5b0a1d1173e 100644 --- a/svtools/source/graphic/provider.cxx +++ b/svtools/source/graphic/provider.cxx @@ -45,7 +45,7 @@ #include <svtools/grfmgr.hxx> #include "provider.hxx" #include <vcl/dibtools.hxx> -#include <boost/scoped_ptr.hpp> +#include <memory> using namespace com::sun::star; @@ -239,7 +239,7 @@ uno::Reference< ::graphic::XGraphic > GraphicProvider::implLoadResource( const O OString aResMgrName(OUStringToOString( rResourceURL.getToken(0, '/', nIndex), RTL_TEXTENCODING_ASCII_US)); - boost::scoped_ptr<ResMgr> pResMgr(ResMgr::CreateResMgr( aResMgrName.getStr(), Application::GetSettings().GetUILanguageTag() )); + std::unique_ptr<ResMgr> pResMgr(ResMgr::CreateResMgr( aResMgrName.getStr(), Application::GetSettings().GetUILanguageTag() )); if( pResMgr ) { @@ -384,7 +384,7 @@ uno::Reference< ::graphic::XGraphic > SAL_CALL GraphicProvider::queryGraphic( co { uno::Reference< ::graphic::XGraphic > xRet; OUString aPath; - boost::scoped_ptr<SvStream> pIStm; + std::unique_ptr<SvStream> pIStm; uno::Reference< io::XInputStream > xIStm; uno::Reference< awt::XBitmap >xBtm; @@ -727,7 +727,7 @@ void SAL_CALL GraphicProvider::storeGraphic( const uno::Reference< ::graphic::XG { SolarMutexGuard g; - boost::scoped_ptr<SvStream> pOStm; + std::unique_ptr<SvStream> pOStm; OUString aPath; sal_Int32 i; diff --git a/svtools/source/misc/ehdl.cxx b/svtools/source/misc/ehdl.cxx index 397ba4013b5c..5cd02f85ca71 100644 --- a/svtools/source/misc/ehdl.cxx +++ b/svtools/source/misc/ehdl.cxx @@ -28,7 +28,7 @@ #include <svtools/svtresid.hxx> #include <svtools/svtools.hrc> #include <svtools/sfxecode.hxx> -#include <boost/scoped_ptr.hpp> +#include <memory> static sal_uInt16 aWndFunc( @@ -275,7 +275,7 @@ bool SfxErrorHandler::GetClassString(sal_uLong lClassId, OUString &rStr) const { bool bRet = false; - boost::scoped_ptr<ResMgr> pResMgr(ResMgr::CreateResMgr("ofa", Application::GetSettings().GetUILanguageTag() )); + std::unique_ptr<ResMgr> pResMgr(ResMgr::CreateResMgr("ofa", Application::GetSettings().GetUILanguageTag() )); if( pResMgr ) { ResId aId(RID_ERRHDL, *pResMgr ); @@ -302,7 +302,7 @@ bool SfxErrorHandler::GetMessageString( { bool bRet = false; - boost::scoped_ptr<ResId> pResId(new ResId(nId, *pMgr)); + std::unique_ptr<ResId> pResId(new ResId(nId, *pMgr)); ErrorResource_Impl aEr(*pResId, (sal_uInt16)lErrId); if(aEr) diff --git a/svtools/source/misc/embedhlp.cxx b/svtools/source/misc/embedhlp.cxx index b25c98848090..98137214b5e4 100644 --- a/svtools/source/misc/embedhlp.cxx +++ b/svtools/source/misc/embedhlp.cxx @@ -50,7 +50,7 @@ #include <cppuhelper/implbase.hxx> #include <vcl/svapp.hxx> #include <osl/mutex.hxx> -#include <boost/scoped_ptr.hpp> +#include <memory> using namespace com::sun::star; @@ -434,7 +434,7 @@ void EmbeddedObjectRef::GetReplacement( bool bUpdate ) return; } - boost::scoped_ptr<SvStream> pGraphicStream(GetGraphicStream( bUpdate )); + std::unique_ptr<SvStream> pGraphicStream(GetGraphicStream( bUpdate )); if ( pGraphicStream ) { GraphicFilter& rGF = GraphicFilter::GetGraphicFilter(); @@ -532,7 +532,7 @@ void EmbeddedObjectRef::SetGraphicStream( const uno::Reference< io::XInputStream mpImpl->aMediaType = rMediaType; mpImpl->mnGraphicVersion++; - boost::scoped_ptr<SvStream> pGraphicStream(::utl::UcbStreamHelper::CreateStream( xInGrStream )); + std::unique_ptr<SvStream> pGraphicStream(::utl::UcbStreamHelper::CreateStream( xInGrStream )); if ( pGraphicStream ) { diff --git a/svtools/source/misc/imap.cxx b/svtools/source/misc/imap.cxx index 2b7ff4bc8f64..63aa45bd68b1 100644 --- a/svtools/source/misc/imap.cxx +++ b/svtools/source/misc/imap.cxx @@ -33,7 +33,7 @@ #include <string.h> #include <math.h> -#include <boost/scoped_ptr.hpp> +#include <memory> #define SCALEPOINT(aPT,aFracX,aFracY) (aPT).X()=((aPT).X()*(aFracX).GetNumerator())/(aFracX).GetDenominator(); \ @@ -81,7 +81,7 @@ void IMapObject::Write( SvStream& rOStm, const OUString& rBaseURL ) const rOStm.WriteBool( bActive ); write_uInt16_lenPrefixed_uInt8s_FromOUString(rOStm, aTarget, eEncoding); - boost::scoped_ptr<IMapCompat> pCompat(new IMapCompat( rOStm, StreamMode::WRITE )); + std::unique_ptr<IMapCompat> pCompat(new IMapCompat( rOStm, StreamMode::WRITE )); WriteIMapObject( rOStm ); aEventList.Write( rOStm ); // V4 @@ -110,7 +110,7 @@ void IMapObject::Read( SvStream& rIStm, const OUString& rBaseURL ) // make URL absolute aURL = URIHelper::SmartRel2Abs( INetURLObject(rBaseURL), aURL, URIHelper::GetMaybeFileHdl(), true, false, INetURLObject::WAS_ENCODED, INetURLObject::DECODE_UNAMBIGUOUS ); - boost::scoped_ptr<IMapCompat> pCompat(new IMapCompat( rIStm, StreamMode::READ )); + std::unique_ptr<IMapCompat> pCompat(new IMapCompat( rIStm, StreamMode::READ )); ReadIMapObject( rIStm ); diff --git a/svtools/source/misc/transfer.cxx b/svtools/source/misc/transfer.cxx index 617024251dcc..8145532dba84 100644 --- a/svtools/source/misc/transfer.cxx +++ b/svtools/source/misc/transfer.cxx @@ -59,7 +59,7 @@ #include <vcl/dibtools.hxx> #include <vcl/pngread.hxx> #include <vcl/pngwrite.hxx> -#include <boost/scoped_ptr.hpp> +#include <memory> // - Namespaces - @@ -333,7 +333,7 @@ Any SAL_CALL TransferableHelper::getTransferData2( const DataFlavor& rFlavor, co if( maAny >>= aSeq ) { - boost::scoped_ptr<SvMemoryStream> pSrcStm(new SvMemoryStream( aSeq.getArray(), aSeq.getLength(), StreamMode::WRITE | StreamMode::TRUNC )); + std::unique_ptr<SvMemoryStream> pSrcStm(new SvMemoryStream( aSeq.getArray(), aSeq.getLength(), StreamMode::WRITE | StreamMode::TRUNC )); GDIMetaFile aMtf; ReadGDIMetaFile( *pSrcStm, aMtf ); @@ -363,7 +363,7 @@ Any SAL_CALL TransferableHelper::getTransferData2( const DataFlavor& rFlavor, co if( maAny >>= aSeq ) { - boost::scoped_ptr<SvMemoryStream> pSrcStm(new SvMemoryStream( aSeq.getArray(), aSeq.getLength(), StreamMode::WRITE | StreamMode::TRUNC )); + std::unique_ptr<SvMemoryStream> pSrcStm(new SvMemoryStream( aSeq.getArray(), aSeq.getLength(), StreamMode::WRITE | StreamMode::TRUNC )); GDIMetaFile aMtf; ReadGDIMetaFile( *pSrcStm, aMtf ); @@ -1988,7 +1988,7 @@ bool TransferableDataHelper::GetINetBookmark( const ::com::sun::star::datatransf if( ( aDesc.getLength() > 4 ) && aDesc.copy(aDesc.getLength() - 4).equalsIgnoreAsciiCase(".URL") ) { - boost::scoped_ptr<SvStream> pStream(::utl::UcbStreamHelper::CreateStream( INetURLObject( OStringToOUString(aDesc, eTextEncoding) ).GetMainURL( INetURLObject::NO_DECODE ), + std::unique_ptr<SvStream> pStream(::utl::UcbStreamHelper::CreateStream( INetURLObject( OStringToOUString(aDesc, eTextEncoding) ).GetMainURL( INetURLObject::NO_DECODE ), STREAM_STD_READ )); if( !pStream || pStream->GetError() ) diff --git a/svtools/source/table/cellvalueconversion.cxx b/svtools/source/table/cellvalueconversion.cxx index d634b5cfc10f..32315c221c6c 100644 --- a/svtools/source/table/cellvalueconversion.cxx +++ b/svtools/source/table/cellvalueconversion.cxx @@ -35,7 +35,7 @@ #include <unotools/syslocale.hxx> #include <comphelper/processfactory.hxx> -#include <boost/shared_ptr.hpp> +#include <memory> #include <unordered_map> namespace svt @@ -96,7 +96,7 @@ namespace svt virtual ::sal_Int32 getFormatKey() const = 0; }; - typedef ::boost::shared_ptr< IValueNormalization > PValueNormalization; + typedef std::shared_ptr< IValueNormalization > PValueNormalization; typedef std::unordered_map< OUString, PValueNormalization, OUStringHash > NormalizerCache; diff --git a/svtools/source/table/cellvalueconversion.hxx b/svtools/source/table/cellvalueconversion.hxx index 23091bd0391f..59b91affeacc 100644 --- a/svtools/source/table/cellvalueconversion.hxx +++ b/svtools/source/table/cellvalueconversion.hxx @@ -23,7 +23,7 @@ #include <com/sun/star/uno/Any.hxx> #include <com/sun/star/uno/XComponentContext.hpp> -#include <boost/scoped_ptr.hpp> +#include <memory> namespace svt @@ -43,7 +43,7 @@ namespace svt OUString convertToString( const ::com::sun::star::uno::Any& i_cellValue ); private: - ::boost::scoped_ptr< CellValueConversion_Data > m_pData; + ::std::unique_ptr< CellValueConversion_Data > m_pData; }; diff --git a/svtools/source/toolpanel/paneltabbar.cxx b/svtools/source/toolpanel/paneltabbar.cxx index 583ebed423cd..4d916d10a30d 100644 --- a/svtools/source/toolpanel/paneltabbar.cxx +++ b/svtools/source/toolpanel/paneltabbar.cxx @@ -33,7 +33,7 @@ #include <vcl/settings.hxx> #include <tools/diagnose_ex.h> -#include <boost/optional.hpp> +#include <memory> #include <vector> // space around an item @@ -97,7 +97,7 @@ namespace svt protected: ~ITabBarRenderer() {} }; - typedef ::boost::shared_ptr< ITabBarRenderer > PTabBarRenderer; + typedef std::shared_ptr< ITabBarRenderer > PTabBarRenderer; //= VCLItemRenderer - declaration diff --git a/svtools/source/uno/wizard/wizardshell.cxx b/svtools/source/uno/wizard/wizardshell.cxx index b3504d9d5f55..c8388b91d5a2 100644 --- a/svtools/source/uno/wizard/wizardshell.cxx +++ b/svtools/source/uno/wizard/wizardshell.cxx @@ -186,7 +186,7 @@ namespace svt { namespace uno { ENSURE_OR_RETURN( m_xController.is(), "WizardShell::createPage: no WizardController!", NULL ); - ::boost::shared_ptr< WizardPageController > pController( new WizardPageController( *this, m_xController, impl_stateToPageId( i_nState ) ) ); + std::shared_ptr< WizardPageController > pController( new WizardPageController( *this, m_xController, impl_stateToPageId( i_nState ) ) ); VclPtr<TabPage> pPage = pController->getTabPage(); OSL_ENSURE( pPage, "WizardShell::createPage: illegal tab page!" ); if ( !pPage ) diff --git a/svtools/source/uno/wizard/wizardshell.hxx b/svtools/source/uno/wizard/wizardshell.hxx index 68650dd067cf..fcdc7d1ddcd6 100644 --- a/svtools/source/uno/wizard/wizardshell.hxx +++ b/svtools/source/uno/wizard/wizardshell.hxx @@ -22,11 +22,9 @@ #include <com/sun/star/ui/dialogs/XWizardController.hpp> #include <com/sun/star/ui/dialogs/XWizard.hpp> - #include <svtools/roadmapwizard.hxx> - -#include <boost/shared_ptr.hpp> #include <map> +#include <memory> namespace svt { namespace uno @@ -34,7 +32,7 @@ namespace svt { namespace uno class WizardPageController; - typedef ::boost::shared_ptr< WizardPageController > PWizardPageController; + typedef std::shared_ptr< WizardPageController > PWizardPageController; //= WizardShell diff --git a/svx/source/core/extedit.cxx b/svx/source/core/extedit.cxx index c705784f2f62..cbc1fac13e51 100644 --- a/svx/source/core/extedit.cxx +++ b/svx/source/core/extedit.cxx @@ -30,7 +30,7 @@ #include <unotools/ucbstreamhelper.hxx> #include <comphelper/processfactory.hxx> #include <boost/bind.hpp> -#include <boost/scoped_ptr.hpp> +#include <memory> #include <com/sun/star/system/SystemShellExecute.hpp> #include <com/sun/star/system/SystemShellExecuteFlags.hpp> @@ -51,7 +51,7 @@ void ExternalToolEdit::HandleCloseEvent(ExternalToolEdit* pData) Graphic newGraphic; //import the temp file image stream into the newGraphic - boost::scoped_ptr<SvStream> pStream(utl::UcbStreamHelper::CreateStream(pData->m_aFileName, StreamMode::READ)); + std::unique_ptr<SvStream> pStream(utl::UcbStreamHelper::CreateStream(pData->m_aFileName, StreamMode::READ)); if(pStream) { GraphicConverter::Import(*pStream, newGraphic); diff --git a/svx/source/dialog/_bmpmask.cxx b/svx/source/dialog/_bmpmask.cxx index bbe0d9647a5f..739c1c7dba3a 100644 --- a/svx/source/dialog/_bmpmask.cxx +++ b/svx/source/dialog/_bmpmask.cxx @@ -31,7 +31,6 @@ #include <bmpmask.hrc> #include <svx/svxids.hrc> #include <memory> -#include <boost/scoped_ptr.hpp> #include "helpid.hrc" #define BMP_RESID(nId) ResId(nId, DIALOG_MGR()) @@ -148,7 +147,7 @@ void MaskSet::KeyInput( const KeyEvent& rKEvt ) void MaskSet::onEditColor() { - boost::scoped_ptr<SvColorDialog> pColorDlg(new SvColorDialog( GetParent() )); + std::unique_ptr<SvColorDialog> pColorDlg(new SvColorDialog( GetParent() )); pColorDlg->SetColor(GetItemColor(1)); diff --git a/svx/source/dialog/connctrl.cxx b/svx/source/dialog/connctrl.cxx index 64ad48637d4d..1775f97ca6ba 100644 --- a/svx/source/dialog/connctrl.cxx +++ b/svx/source/dialog/connctrl.cxx @@ -34,7 +34,7 @@ #include <vcl/builderfactory.hxx> #include <vcl/settings.hxx> -#include <boost/scoped_ptr.hpp> +#include <memory> SvxXConnectionPreview::SvxXConnectionPreview( vcl::Window* pParent, WinBits nStyle) : Control(pParent, nStyle) @@ -269,7 +269,7 @@ void SvxXConnectionPreview::MouseButtonDown( const MouseEvent& rMEvt ) MapMode aMapMode = GetMapMode(); Fraction aXFrac = aMapMode.GetScaleX(); Fraction aYFrac = aMapMode.GetScaleY(); - boost::scoped_ptr<Fraction> pMultFrac; + std::unique_ptr<Fraction> pMultFrac; if( bZoomIn ) { diff --git a/svx/source/dialog/databaseregistrationui.cxx b/svx/source/dialog/databaseregistrationui.cxx index c57588219a2e..3fbe9d3249e1 100644 --- a/svx/source/dialog/databaseregistrationui.cxx +++ b/svx/source/dialog/databaseregistrationui.cxx @@ -25,7 +25,7 @@ #include <sfx2/app.hxx> #include <svl/itemset.hxx> #include <vcl/msgbox.hxx> -#include <boost/scoped_ptr.hpp> +#include <memory> namespace svx { @@ -36,7 +36,7 @@ namespace svx SfxItemSet aRegistrationItems( SfxGetpApp()->GetPool(), SID_SB_DB_REGISTER, SID_SB_DB_REGISTER, 0 ); SvxAbstractDialogFactory* pDialogFactory = SvxAbstractDialogFactory::Create(); - boost::scoped_ptr< SfxAbstractDialog > pDialog; + std::unique_ptr< SfxAbstractDialog > pDialog; if ( pDialogFactory ) pDialog.reset( pDialogFactory->CreateSfxDialog( _parentWindow, aRegistrationItems, NULL, RID_SFXPAGE_DBREGISTER ) ); if ( pDialog.get() ) diff --git a/svx/source/dialog/grfflt.cxx b/svx/source/dialog/grfflt.cxx index 2842ae87286a..88489955c4f2 100644 --- a/svx/source/dialog/grfflt.cxx +++ b/svx/source/dialog/grfflt.cxx @@ -27,7 +27,7 @@ #include <svx/grfflt.hxx> #include <svx/dialogs.hrc> #include <svx/svxdlg.hxx> -#include <boost/scoped_ptr.hpp> +#include <memory> // - SvxGraphicFilter - @@ -77,7 +77,7 @@ sal_uIntPtr SvxGraphicFilter::ExecuteGrfFilterSlot( SfxRequest& rReq, GraphicObj SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create(); if(pFact) { - boost::scoped_ptr<AbstractGraphicFilterDialog> aDlg(pFact->CreateGraphicFilterSmooth(pWindow, rGraphic, 0.7)); + std::unique_ptr<AbstractGraphicFilterDialog> aDlg(pFact->CreateGraphicFilterSmooth(pWindow, rGraphic, 0.7)); DBG_ASSERT(aDlg, "Dialog creation failed!"); if( aDlg->Execute() == RET_OK ) aGraphic = aDlg->GetFilteredGraphic( rGraphic, 1.0, 1.0 ); @@ -165,7 +165,7 @@ sal_uIntPtr SvxGraphicFilter::ExecuteGrfFilterSlot( SfxRequest& rReq, GraphicObj SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create(); if(pFact) { - boost::scoped_ptr<AbstractGraphicFilterDialog> aDlg(pFact->CreateGraphicFilterMosaic(pWindow, rGraphic, 4, 4, false)); + std::unique_ptr<AbstractGraphicFilterDialog> aDlg(pFact->CreateGraphicFilterMosaic(pWindow, rGraphic, 4, 4, false)); DBG_ASSERT(aDlg, "Dialog creation failed!"); if( aDlg->Execute() == RET_OK ) aGraphic = aDlg->GetFilteredGraphic( rGraphic, 1.0, 1.0 ); @@ -178,7 +178,7 @@ sal_uIntPtr SvxGraphicFilter::ExecuteGrfFilterSlot( SfxRequest& rReq, GraphicObj SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create(); if(pFact) { - boost::scoped_ptr<AbstractGraphicFilterDialog> aDlg(pFact->CreateGraphicFilterEmboss(pWindow, rGraphic, RP_MM)); + std::unique_ptr<AbstractGraphicFilterDialog> aDlg(pFact->CreateGraphicFilterEmboss(pWindow, rGraphic, RP_MM)); DBG_ASSERT(aDlg, "Dialog creation failed!"); if( aDlg->Execute() == RET_OK ) aGraphic = aDlg->GetFilteredGraphic( rGraphic, 1.0, 1.0 ); @@ -191,7 +191,7 @@ sal_uIntPtr SvxGraphicFilter::ExecuteGrfFilterSlot( SfxRequest& rReq, GraphicObj SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create(); if(pFact) { - boost::scoped_ptr<AbstractGraphicFilterDialog> aDlg(pFact->CreateGraphicFilterPoster(pWindow, rGraphic, 16)); + std::unique_ptr<AbstractGraphicFilterDialog> aDlg(pFact->CreateGraphicFilterPoster(pWindow, rGraphic, 16)); DBG_ASSERT(aDlg, "Dialog creation failed!"); if( aDlg->Execute() == RET_OK ) aGraphic = aDlg->GetFilteredGraphic( rGraphic, 1.0, 1.0 ); @@ -229,7 +229,7 @@ sal_uIntPtr SvxGraphicFilter::ExecuteGrfFilterSlot( SfxRequest& rReq, GraphicObj SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create(); if(pFact) { - boost::scoped_ptr<AbstractGraphicFilterDialog> aDlg(pFact->CreateGraphicFilterSepia(pWindow, rGraphic, 10)); + std::unique_ptr<AbstractGraphicFilterDialog> aDlg(pFact->CreateGraphicFilterSepia(pWindow, rGraphic, 10)); DBG_ASSERT(aDlg, "Dialog creation failed!"); if( aDlg->Execute() == RET_OK ) aGraphic = aDlg->GetFilteredGraphic( rGraphic, 1.0, 1.0 ); @@ -242,7 +242,7 @@ sal_uIntPtr SvxGraphicFilter::ExecuteGrfFilterSlot( SfxRequest& rReq, GraphicObj SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create(); if(pFact) { - boost::scoped_ptr<AbstractGraphicFilterDialog> aDlg(pFact->CreateGraphicFilterSolarize(pWindow, rGraphic, 128, false)); + std::unique_ptr<AbstractGraphicFilterDialog> aDlg(pFact->CreateGraphicFilterSolarize(pWindow, rGraphic, 128, false)); DBG_ASSERT(aDlg, "Dialog creation failed!"); if( aDlg->Execute() == RET_OK ) aGraphic = aDlg->GetFilteredGraphic( rGraphic, 1.0, 1.0 ); diff --git a/svx/source/dialog/hdft.cxx b/svx/source/dialog/hdft.cxx index 427eb4c0316e..f66382d9478c 100644 --- a/svx/source/dialog/hdft.cxx +++ b/svx/source/dialog/hdft.cxx @@ -44,7 +44,7 @@ #include <editeng/boxitem.hxx> #include <svx/svxdlg.hxx> -#include <boost/scoped_ptr.hpp> +#include <memory> //UUUU #include <svx/xdef.hxx> @@ -95,7 +95,7 @@ namespace svx { SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create(); if(pFact) { - boost::scoped_ptr<SfxAbstractTabDialog> pDlg(pFact->CreateSvxBorderBackgroundDlg( pParent, *pBBSet, bEnableBackgroundSelector )); + std::unique_ptr<SfxAbstractTabDialog> pDlg(pFact->CreateSvxBorderBackgroundDlg( pParent, *pBBSet, bEnableBackgroundSelector )); DBG_ASSERT(pDlg, "Dialog creation failed!"); if ( pDlg->Execute() == RET_OK && pDlg->GetOutputItemSet() ) { @@ -285,7 +285,7 @@ bool SvxHFPage::FillItemSet( SfxItemSet* rSet ) aSet.Put( SfxBoolItem( nWSharedFirst, m_pCntSharedFirstBox->IsChecked() ) ); if(m_pDynSpacingCB->IsVisible() && SFX_WHICH_MAX > nWDynSpacing) { - boost::scoped_ptr<SfxBoolItem> pBoolItem(static_cast<SfxBoolItem*>(pPool->GetDefaultItem(nWDynSpacing).Clone())); + std::unique_ptr<SfxBoolItem> pBoolItem(static_cast<SfxBoolItem*>(pPool->GetDefaultItem(nWDynSpacing).Clone())); pBoolItem->SetValue(m_pDynSpacingCB->IsChecked()); aSet.Put(*pBoolItem); } diff --git a/svx/source/dialog/imapdlg.cxx b/svx/source/dialog/imapdlg.cxx index 3442f0d7b941..68beba59c96b 100644 --- a/svx/source/dialog/imapdlg.cxx +++ b/svx/source/dialog/imapdlg.cxx @@ -54,7 +54,7 @@ #include <vcl/settings.hxx> #include <vcl/builderfactory.hxx> #include "dlgunit.hxx" -#include <boost/scoped_ptr.hpp> +#include <memory> #define SELF_TARGET "_self" #define IMAP_ALL_FILTER OUString("<Alle>") @@ -471,7 +471,7 @@ void SvxIMapDlg::DoOpen() { INetURLObject aURL( aDlg.GetPath() ); DBG_ASSERT( aURL.GetProtocol() != INetProtocol::NotValid, "invalid URL" ); - boost::scoped_ptr<SvStream> pIStm(::utl::UcbStreamHelper::CreateStream( aURL.GetMainURL( INetURLObject::NO_DECODE ), StreamMode::READ )); + std::unique_ptr<SvStream> pIStm(::utl::UcbStreamHelper::CreateStream( aURL.GetMainURL( INetURLObject::NO_DECODE ), StreamMode::READ )); if( pIStm ) { @@ -546,7 +546,7 @@ bool SvxIMapDlg::DoSave() if( aURL.getExtension().isEmpty() ) aURL.setExtension( aExt ); - boost::scoped_ptr<SvStream> pOStm(::utl::UcbStreamHelper::CreateStream( aURL.GetMainURL( INetURLObject::NO_DECODE ), StreamMode::WRITE | StreamMode::TRUNC )); + std::unique_ptr<SvStream> pOStm(::utl::UcbStreamHelper::CreateStream( aURL.GetMainURL( INetURLObject::NO_DECODE ), StreamMode::WRITE | StreamMode::TRUNC )); if( pOStm ) { pIMapWnd->GetImageMap().Write( *pOStm, nFormat, "" ); diff --git a/svx/source/dialog/imapwnd.cxx b/svx/source/dialog/imapwnd.cxx index 5525ebe2543e..4ce3c790ff68 100644 --- a/svx/source/dialog/imapwnd.cxx +++ b/svx/source/dialog/imapwnd.cxx @@ -48,7 +48,7 @@ #include <svx/svxdlg.hxx> #include <basegfx/point/b2dpoint.hxx> #include <basegfx/polygon/b2dpolygon.hxx> -#include <boost/scoped_ptr.hpp> +#include <memory> using namespace com::sun::star; using ::com::sun::star::frame::XFrame; @@ -660,7 +660,7 @@ void IMapWindow::DoMacroAssign() aSet.Put( aMacroItem, SID_ATTR_MACROITEM ); SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create(); - boost::scoped_ptr<SfxAbstractDialog> pMacroDlg(pFact->CreateSfxDialog( this, aSet, mxDocumentFrame, SID_EVENTCONFIG )); + std::unique_ptr<SfxAbstractDialog> pMacroDlg(pFact->CreateSfxDialog( this, aSet, mxDocumentFrame, SID_EVENTCONFIG )); if ( pMacroDlg && pMacroDlg->Execute() == RET_OK ) { @@ -682,7 +682,7 @@ void IMapWindow::DoPropertyDialog() SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create(); if(pFact) { - boost::scoped_ptr<AbstractURLDlg> aDlg(pFact->CreateURLDialog( this, pIMapObj->GetURL(), pIMapObj->GetAltText(), pIMapObj->GetDesc(), + std::unique_ptr<AbstractURLDlg> aDlg(pFact->CreateURLDialog( this, pIMapObj->GetURL(), pIMapObj->GetAltText(), pIMapObj->GetDesc(), pIMapObj->GetTarget(), pIMapObj->GetName(), aTargetList )); DBG_ASSERT(aDlg, "Dialog creation failed!"); if ( aDlg->Execute() == RET_OK ) diff --git a/svx/source/dialog/imapwnd.hxx b/svx/source/dialog/imapwnd.hxx index 63bef585e09a..fd584a03ab8f 100644 --- a/svx/source/dialog/imapwnd.hxx +++ b/svx/source/dialog/imapwnd.hxx @@ -59,11 +59,11 @@ const sal_uInt32 IMapInventor = sal_uInt32('I') * 0x00000001+ sal_uInt32('P') * 0x01000000; -typedef boost::shared_ptr< IMapObject > IMapObjectPtr; +typedef std::shared_ptr< IMapObject > IMapObjectPtr; class IMapUserData : public SdrObjUserData { - // #i98386# use boost::shared_ptr here due to cloning possibilities + // #i98386# use std::shared_ptr here due to cloning possibilities IMapObjectPtr mpObj; public: diff --git a/svx/source/dialog/measctrl.cxx b/svx/source/dialog/measctrl.cxx index 3c551c2c2b0f..a341d7224896 100644 --- a/svx/source/dialog/measctrl.cxx +++ b/svx/source/dialog/measctrl.cxx @@ -25,7 +25,7 @@ #include "svx/dlgutil.hxx" #include <vcl/builderfactory.hxx> #include <vcl/settings.hxx> -#include <boost/scoped_ptr.hpp> +#include <memory> SvxXMeasurePreview::SvxXMeasurePreview(vcl::Window* pParent, WinBits nStyle) : Control(pParent, nStyle) @@ -118,7 +118,7 @@ void SvxXMeasurePreview::MouseButtonDown(const MouseEvent& rMEvt) MapMode aMapMode = GetMapMode(); Fraction aXFrac = aMapMode.GetScaleX(); Fraction aYFrac = aMapMode.GetScaleY(); - boost::scoped_ptr<Fraction> pMultFrac; + std::unique_ptr<Fraction> pMultFrac; if (bZoomIn) { diff --git a/svx/source/dialog/srchdlg.cxx b/svx/source/dialog/srchdlg.cxx index 3dd2321726be..a904015c7576 100644 --- a/svx/source/dialog/srchdlg.cxx +++ b/svx/source/dialog/srchdlg.cxx @@ -69,7 +69,6 @@ #include <svx/svxdlg.hxx> #include <vcl/toolbox.hxx> #include <memory> -#include <boost/scoped_ptr.hpp> using namespace com::sun::star::i18n; using namespace com::sun::star::uno; @@ -1335,7 +1334,7 @@ IMPL_LINK_TYPED( SvxSearchDialog, CommandHdl_Impl, Button *, pBtn, void ) SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create(); if(pFact) { - boost::scoped_ptr<AbstractSvxSearchSimilarityDialog> pDlg(pFact->CreateSvxSearchSimilarityDialog( this, + std::unique_ptr<AbstractSvxSearchSimilarityDialog> pDlg(pFact->CreateSvxSearchSimilarityDialog( this, pSearchItem->IsLEVRelaxed(), pSearchItem->GetLEVOther(), pSearchItem->GetLEVShorter(), @@ -1358,7 +1357,7 @@ IMPL_LINK_TYPED( SvxSearchDialog, CommandHdl_Impl, Button *, pBtn, void ) SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create(); if(pFact) { - boost::scoped_ptr<AbstractSvxJSearchOptionsDialog> aDlg(pFact->CreateSvxJSearchOptionsDialog( this, aSet, + std::unique_ptr<AbstractSvxJSearchOptionsDialog> aDlg(pFact->CreateSvxJSearchOptionsDialog( this, aSet, pSearchItem->GetTransliterationFlags() )); DBG_ASSERT(aDlg, "Dialog creation failed!"); int nRet = aDlg->Execute(); @@ -1935,7 +1934,7 @@ IMPL_LINK_NOARG_TYPED(SvxSearchDialog, FormatHdl_Impl, Button*, void) SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create(); if(pFact) { - boost::scoped_ptr<SfxAbstractTabDialog> pDlg(pFact->CreateTabItemDialog(this, aSet)); + std::unique_ptr<SfxAbstractTabDialog> pDlg(pFact->CreateTabItemDialog(this, aSet)); DBG_ASSERT(pDlg, "Dialog creation failed!"); aTxt = pDlg->GetText() + aTxt; pDlg->SetText( aTxt ); @@ -2019,7 +2018,7 @@ IMPL_LINK_NOARG_TYPED(SvxSearchDialog, AttributeHdl_Impl, Button*, void) SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create(); if(pFact) { - boost::scoped_ptr<VclAbstractDialog> pDlg(pFact->CreateSvxSearchAttributeDialog( this, *pSearchList, pImpl->pRanges )); + std::unique_ptr<VclAbstractDialog> pDlg(pFact->CreateSvxSearchAttributeDialog( this, *pSearchList, pImpl->pRanges )); DBG_ASSERT(pDlg, "Dialog creation failed!"); pDlg->Execute(); } diff --git a/svx/source/fmcomp/fmgridcl.cxx b/svx/source/fmcomp/fmgridcl.cxx index 7fba848455e5..946ea5d5641d 100644 --- a/svx/source/fmcomp/fmgridcl.cxx +++ b/svx/source/fmcomp/fmgridcl.cxx @@ -71,7 +71,7 @@ #include <vcl/settings.hxx> #include <math.h> -#include <boost/scoped_ptr.hpp> +#include <memory> using namespace ::com::sun::star::uno; using namespace ::com::sun::star::view; @@ -866,7 +866,7 @@ void FmGridHeader::PostExecuteColumnContextMenu(sal_uInt16 nColId, const PopupMe SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create(); if(pFact) { - boost::scoped_ptr<AbstractFmShowColsDialog> pDlg(pFact->CreateFmShowColsDialog(NULL)); + std::unique_ptr<AbstractFmShowColsDialog> pDlg(pFact->CreateFmShowColsDialog(NULL)); DBG_ASSERT(pDlg, "Dialog creation failed!"); pDlg->SetColumns(xCols); pDlg->Execute(); diff --git a/svx/source/fmcomp/gridctrl.cxx b/svx/source/fmcomp/gridctrl.cxx index 9900c4205089..f7a190fd47ee 100644 --- a/svx/source/fmcomp/gridctrl.cxx +++ b/svx/source/fmcomp/gridctrl.cxx @@ -57,11 +57,10 @@ #include <comphelper/property.hxx> #include <cppuhelper/implbase.hxx> -#include <boost/scoped_ptr.hpp> - #include <algorithm> #include <cstdlib> #include <map> +#include <memory> using namespace ::dbtools; using namespace ::dbtools::DBTypeConversion; @@ -3568,7 +3567,7 @@ void DbGridControl::FieldValueChanged(sal_uInt16 _nId, const PropertyChangeEvent DbGridColumn* pColumn = ( Location < m_aColumns.size() ) ? m_aColumns[ Location ] : NULL; if (pColumn) { - boost::scoped_ptr<vcl::SolarMutexTryAndBuyGuard> pGuard; + std::unique_ptr<vcl::SolarMutexTryAndBuyGuard> pGuard; while (!m_bWantDestruction && (!pGuard || !pGuard->isAcquired())) pGuard.reset(new vcl::SolarMutexTryAndBuyGuard); diff --git a/svx/source/form/fmscriptingenv.cxx b/svx/source/form/fmscriptingenv.cxx index fbc8b845b4b4..8541ac6c4173 100644 --- a/svx/source/form/fmscriptingenv.cxx +++ b/svx/source/form/fmscriptingenv.cxx @@ -40,12 +40,12 @@ #include <basic/basmgr.hxx> #include <boost/noncopyable.hpp> -#include <boost/shared_ptr.hpp> #include <boost/assign/list_of.hpp> -#include <utility> -using std::pair; +#include <memory> #include <set> +#include <utility> +using std::pair; namespace svxform { @@ -858,7 +858,7 @@ namespace svxform virtual ~IScript() { } }; - typedef ::boost::shared_ptr< IScript > PScript; + typedef std::shared_ptr< IScript > PScript; class NewStyleUNOScript : public IScript { diff --git a/svx/source/form/fmshell.cxx b/svx/source/form/fmshell.cxx index 2dfc518f077c..c73236bfee0b 100644 --- a/svx/source/form/fmshell.cxx +++ b/svx/source/form/fmshell.cxx @@ -88,7 +88,7 @@ #include <comphelper/property.hxx> #include <com/sun/star/beans/PropertyValue.hpp> -#include <boost/scoped_ptr.hpp> +#include <memory> // wird fuer Invalidate verwendet -> mitpflegen // aufsteigend sortieren !!!!!! @@ -753,7 +753,7 @@ void FmFormShell::Execute(SfxRequest &rReq) DBG_ASSERT( pFact, "no dialog factory!" ); if ( pFact ) { - boost::scoped_ptr< AbstractFmInputRecordNoDialog > dlg( pFact->CreateFmInputRecordNoDialog( NULL ) ); + std::unique_ptr< AbstractFmInputRecordNoDialog > dlg( pFact->CreateFmInputRecordNoDialog( NULL ) ); DBG_ASSERT( dlg.get(), "Dialog creation failed!" ); dlg->SetValue( rController->getCursor()->getRow() ); if ( dlg->Execute() == RET_OK ) diff --git a/svx/source/form/fmshimp.cxx b/svx/source/form/fmshimp.cxx index 26eb92760b0d..1e664d27004f 100644 --- a/svx/source/form/fmshimp.cxx +++ b/svx/source/form/fmshimp.cxx @@ -99,8 +99,8 @@ #include <algorithm> #include <functional> #include <map> +#include <memory> #include <vector> -#include <boost/scoped_ptr.hpp> // wird fuer Invalidate verwendet -> mitpflegen static const sal_uInt16 DatabaseSlotMap[] = @@ -285,7 +285,7 @@ namespace { SdrObject* pCurrent = _rMarkList.GetMark( i )->GetMarkedSdrObj(); - boost::scoped_ptr<SdrObjListIter> pGroupIterator; + std::unique_ptr<SdrObjListIter> pGroupIterator; if ( pCurrent->IsGroupObject() ) { pGroupIterator.reset(new SdrObjListIter( *pCurrent->GetSubList() )); @@ -1568,7 +1568,7 @@ void FmXFormShell::ExecuteSearch() // ausgeraeumt sind, sollte hier ein SM_USETHREAD rein, denn die Suche in einem eigenen Thread ist doch etwas fluessiger // sollte allerdings irgendwie von dem unterliegenden Cursor abhaengig gemacht werden, DAO zum Beispiel ist nicht thread-sicher SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create(); - boost::scoped_ptr<AbstractFmSearchDialog> pDialog; + std::unique_ptr<AbstractFmSearchDialog> pDialog; if ( pFact ) pDialog.reset(pFact->CreateFmSearchDialog( &m_pShell->GetViewShell()->GetViewFrame()->GetWindow(), strInitialText, aContextNames, nInitialContext, LINK( this, FmXFormShell, OnSearchContextRequest ) )); DBG_ASSERT( pDialog, "FmXFormShell::ExecuteSearch: could not create the search dialog!" ); @@ -4068,7 +4068,7 @@ void ControlConversionMenuController::StateChanged(sal_uInt16 nSID, SfxItemState { // We can't simply re-insert the item because we have a clear order for all the our items. // So first we have to determine the position of the item to insert. - boost::scoped_ptr<PopupMenu> pSource(FmXFormShell::GetConversionMenu()); + std::unique_ptr<PopupMenu> pSource(FmXFormShell::GetConversionMenu()); sal_uInt16 nSourcePos = pSource->GetItemPos(nSID); DBG_ASSERT(nSourcePos != MENU_ITEM_NOTFOUND, "ControlConversionMenuController::StateChanged : FmXFormShell supplied an invalid menu !"); sal_uInt16 nPrevInSource = nSourcePos; diff --git a/svx/source/form/fmtextcontrolshell.cxx b/svx/source/form/fmtextcontrolshell.cxx index affd7bfc8708..f3f24a5c3e77 100644 --- a/svx/source/form/fmtextcontrolshell.cxx +++ b/svx/source/form/fmtextcontrolshell.cxx @@ -63,7 +63,7 @@ #include <vcl/outdev.hxx> #include <osl/mutex.hxx> -#include <boost/scoped_ptr.hpp> +#include <memory> namespace svx @@ -644,10 +644,10 @@ namespace svx SfxItemPool* pPool = EditEngine::CreatePool(); pPool->FreezeIdRanges(); - boost::scoped_ptr< SfxItemSet > xPureItems( new SfxItemSet( *pPool ) ); + std::unique_ptr< SfxItemSet > xPureItems( new SfxItemSet( *pPool ) ); // put the current states of the items into the set - boost::scoped_ptr<SfxAllItemSet> xCurrentItems( new SfxAllItemSet( *xPureItems ) ); + std::unique_ptr<SfxAllItemSet> xCurrentItems( new SfxAllItemSet( *xPureItems ) ); transferFeatureStatesToItemSet( m_aControlFeatures, *xCurrentItems ); // additional items, which we are not responsible for at the SfxShell level, diff --git a/svx/source/gallery2/galbrws1.cxx b/svx/source/gallery2/galbrws1.cxx index f96dd5834ea6..5999300977fb 100644 --- a/svx/source/gallery2/galbrws1.cxx +++ b/svx/source/gallery2/galbrws1.cxx @@ -38,7 +38,7 @@ #include <svx/dialmgr.hxx> #include <svx/svxdlg.hxx> -#include <boost/scoped_ptr.hpp> +#include <memory> // - Namespaces - @@ -358,7 +358,7 @@ void GalleryBrowser1::ImplExecute( sal_uInt16 nId ) SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create(); if(pFact) { - boost::scoped_ptr<VclAbstractRefreshableDialog> aActualizeProgress(pFact->CreateActualizeProgressDialog( this, pTheme )); + std::unique_ptr<VclAbstractRefreshableDialog> aActualizeProgress(pFact->CreateActualizeProgressDialog( this, pTheme )); DBG_ASSERT(aActualizeProgress, "Dialog creation failed!"); aActualizeProgress->Update(); @@ -382,7 +382,7 @@ void GalleryBrowser1::ImplExecute( sal_uInt16 nId ) SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create(); DBG_ASSERT(pFact, "Dialog creation failed!"); - boost::scoped_ptr<AbstractTitleDialog> aDlg(pFact->CreateTitleDialog( this, aOldName )); + std::unique_ptr<AbstractTitleDialog> aDlg(pFact->CreateTitleDialog( this, aOldName )); DBG_ASSERT(aDlg, "Dialog creation failed!"); if( aDlg->Execute() == RET_OK ) @@ -418,7 +418,7 @@ void GalleryBrowser1::ImplExecute( sal_uInt16 nId ) SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create(); if(pFact) { - boost::scoped_ptr<AbstractGalleryIdDialog> aDlg(pFact->CreateGalleryIdDialog( this, pTheme )); + std::unique_ptr<AbstractGalleryIdDialog> aDlg(pFact->CreateGalleryIdDialog( this, pTheme )); DBG_ASSERT(aDlg, "Dialog creation failed!"); if( aDlg->Execute() == RET_OK ) diff --git a/svx/source/gallery2/galbrws2.cxx b/svx/source/gallery2/galbrws2.cxx index f54a93443707..be60b09ac2e2 100644 --- a/svx/source/gallery2/galbrws2.cxx +++ b/svx/source/gallery2/galbrws2.cxx @@ -57,7 +57,7 @@ #include <com/sun/star/graphic/XGraphic.hpp> #include <com/sun/star/style/GraphicLocation.hpp> #include <map> -#include <boost/scoped_ptr.hpp> +#include <memory> #include <cppuhelper/implbase.hxx> #undef GALLERY_USE_CLIPBOARD @@ -1177,7 +1177,7 @@ void GalleryBrowser2::Execute( sal_uInt16 nId ) SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create(); if(pFact) { - boost::scoped_ptr<AbstractTitleDialog> aDlg(pFact->CreateTitleDialog( this, aOldTitle )); + std::unique_ptr<AbstractTitleDialog> aDlg(pFact->CreateTitleDialog( this, aOldTitle )); DBG_ASSERT(aDlg, "Dialog creation failed!"); if( aDlg->Execute() == RET_OK ) { diff --git a/svx/source/gallery2/galini.cxx b/svx/source/gallery2/galini.cxx index 0fbe1ba8625d..e0d1a786206c 100644 --- a/svx/source/gallery2/galini.cxx +++ b/svx/source/gallery2/galini.cxx @@ -23,11 +23,11 @@ #include <unotools/syslocale.hxx> #include <vcl/svapp.hxx> #include <vcl/settings.hxx> -#include <boost/scoped_ptr.hpp> +#include <memory> OUString GalleryThemeEntry::ReadStrFromIni(const OUString &aKeyName ) { - boost::scoped_ptr<SvStream> pStrm(::utl::UcbStreamHelper::CreateStream( + std::unique_ptr<SvStream> pStrm(::utl::UcbStreamHelper::CreateStream( GetStrURL().GetMainURL( INetURLObject::NO_DECODE ), StreamMode::READ )); diff --git a/svx/source/gallery2/gallery1.cxx b/svx/source/gallery2/gallery1.cxx index 157da5004a3a..3feb54844336 100644 --- a/svx/source/gallery2/gallery1.cxx +++ b/svx/source/gallery2/gallery1.cxx @@ -43,7 +43,7 @@ #include "svx/gallery1.hxx" #include <com/sun/star/sdbc/XResultSet.hpp> #include <com/sun/star/ucb/XContentAccess.hpp> -#include <boost/scoped_ptr.hpp> +#include <memory> // - Namespaces - @@ -260,7 +260,7 @@ void Gallery::ImplLoadSubDirs( const INetURLObject& rBaseURL, bool& rbDirIsReadO OUString aTestFile( "cdefghij.klm" ); aTestURL.Append( aTestFile ); - boost::scoped_ptr<SvStream> pTestStm(::utl::UcbStreamHelper::CreateStream( aTestURL.GetMainURL( INetURLObject::NO_DECODE ), StreamMode::WRITE )); + std::unique_ptr<SvStream> pTestStm(::utl::UcbStreamHelper::CreateStream( aTestURL.GetMainURL( INetURLObject::NO_DECODE ), StreamMode::WRITE )); if( pTestStm ) { @@ -620,7 +620,7 @@ GalleryTheme* Gallery::ImplGetCachedTheme(const GalleryThemeEntry* pThemeEntry) if( FileExists( aURL ) ) { - boost::scoped_ptr<SvStream> pIStm(::utl::UcbStreamHelper::CreateStream( aURL.GetMainURL( INetURLObject::NO_DECODE ), StreamMode::READ )); + std::unique_ptr<SvStream> pIStm(::utl::UcbStreamHelper::CreateStream( aURL.GetMainURL( INetURLObject::NO_DECODE ), StreamMode::READ )); if( pIStm ) { diff --git a/svx/source/gallery2/galmisc.cxx b/svx/source/gallery2/galmisc.cxx index a602f8afe24b..37f23a0747b5 100644 --- a/svx/source/gallery2/galmisc.cxx +++ b/svx/source/gallery2/galmisc.cxx @@ -49,7 +49,7 @@ #include <com/sun/star/ucb/XContentAccess.hpp> #include <com/sun/star/ucb/TransferInfo.hpp> #include <com/sun/star/ucb/NameClash.hpp> -#include <boost/scoped_ptr.hpp> +#include <memory> using namespace ::com::sun::star; @@ -96,7 +96,7 @@ GalleryGraphicImportRet GalleryGraphicImport( const INetURLObject& rURL, Graphic if( pIStm ) { GraphicFilter& rGraphicFilter = GraphicFilter::GetGraphicFilter(); - boost::scoped_ptr<GalleryProgress> pProgress(bShowProgress ? new GalleryProgress( &rGraphicFilter ) : NULL); + std::unique_ptr<GalleryProgress> pProgress(bShowProgress ? new GalleryProgress( &rGraphicFilter ) : NULL); sal_uInt16 nFormat; if( !rGraphicFilter.ImportGraphic( rGraphic, rURL.GetMainURL( INetURLObject::NO_DECODE ), *pIStm, GRFILTER_FORMAT_DONTKNOW, &nFormat ) ) diff --git a/svx/source/gallery2/galobj.cxx b/svx/source/gallery2/galobj.cxx index 8a62689517e4..7d7770bc2923 100644 --- a/svx/source/gallery2/galobj.cxx +++ b/svx/source/gallery2/galobj.cxx @@ -39,7 +39,7 @@ #include <vcl/settings.hxx> #include <vcl/dibtools.hxx> #include "gallerydrawmodel.hxx" -#include <boost/scoped_ptr.hpp> +#include <memory> using namespace ::com::sun::star; @@ -229,7 +229,7 @@ const OUString SgaObject::GetTitle() const !aResourceName.isEmpty() && ( nResId > 0 ) && ( nResId < 0x10000 ) ) { OString aMgrName(OUStringToOString(aResourceName, RTL_TEXTENCODING_UTF8)); - boost::scoped_ptr<ResMgr> pResMgr(ResMgr::CreateResMgr( aMgrName.getStr(), + std::unique_ptr<ResMgr> pResMgr(ResMgr::CreateResMgr( aMgrName.getStr(), Application::GetSettings().GetUILanguageTag() )); if ( pResMgr ) { diff --git a/svx/source/gallery2/galtheme.cxx b/svx/source/gallery2/galtheme.cxx index e1ad48142975..315449fc1f1f 100644 --- a/svx/source/gallery2/galtheme.cxx +++ b/svx/source/gallery2/galtheme.cxx @@ -56,7 +56,6 @@ #include <vcl/lstbox.hxx> #include "gallerydrawmodel.hxx" #include <memory> -#include <boost/scoped_ptr.hpp> using namespace ::com::sun::star; @@ -110,7 +109,7 @@ void GalleryTheme::ImplCreateSvDrawStorage() bool GalleryTheme::ImplWriteSgaObject( const SgaObject& rObj, size_t nPos, GalleryObject* pExistentEntry ) { - boost::scoped_ptr<SvStream> pOStm(::utl::UcbStreamHelper::CreateStream( GetSdgURL().GetMainURL( INetURLObject::NO_DECODE ), StreamMode::WRITE )); + std::unique_ptr<SvStream> pOStm(::utl::UcbStreamHelper::CreateStream( GetSdgURL().GetMainURL( INetURLObject::NO_DECODE ), StreamMode::WRITE )); bool bRet = false; if( pOStm ) @@ -154,7 +153,7 @@ SgaObject* GalleryTheme::ImplReadSgaObject( GalleryObject* pEntry ) if( pEntry ) { - boost::scoped_ptr<SvStream> pIStm(::utl::UcbStreamHelper::CreateStream( GetSdgURL().GetMainURL( INetURLObject::NO_DECODE ), StreamMode::READ )); + std::unique_ptr<SvStream> pIStm(::utl::UcbStreamHelper::CreateStream( GetSdgURL().GetMainURL( INetURLObject::NO_DECODE ), StreamMode::READ )); if( pIStm ) { @@ -206,9 +205,9 @@ void GalleryTheme::ImplWrite() if( FileExists( aPathURL ) || CreateDir( aPathURL ) ) { #ifdef UNX - boost::scoped_ptr<SvStream> pOStm(::utl::UcbStreamHelper::CreateStream( GetThmURL().GetMainURL( INetURLObject::NO_DECODE ), StreamMode::WRITE | StreamMode::COPY_ON_SYMLINK | StreamMode::TRUNC )); + std::unique_ptr<SvStream> pOStm(::utl::UcbStreamHelper::CreateStream( GetThmURL().GetMainURL( INetURLObject::NO_DECODE ), StreamMode::WRITE | StreamMode::COPY_ON_SYMLINK | StreamMode::TRUNC )); #else - boost::scoped_ptr<SvStream> pOStm(::utl::UcbStreamHelper::CreateStream( GetThmURL().GetMainURL( INetURLObject::NO_DECODE ), StreamMode::WRITE | StreamMode::TRUNC )); + std::unique_ptr<SvStream> pOStm(::utl::UcbStreamHelper::CreateStream( GetThmURL().GetMainURL( INetURLObject::NO_DECODE ), StreamMode::WRITE | StreamMode::TRUNC )); #endif if( pOStm ) @@ -257,7 +256,7 @@ INetURLObject GalleryTheme::ImplCreateUniqueURL( SgaObjKind eObjKind, ConvertDat // read next possible number if( FileExists( aInfoFileURL ) ) { - boost::scoped_ptr<SvStream> pIStm(::utl::UcbStreamHelper::CreateStream( aInfoFileURL.GetMainURL( INetURLObject::NO_DECODE ), StreamMode::READ )); + std::unique_ptr<SvStream> pIStm(::utl::UcbStreamHelper::CreateStream( aInfoFileURL.GetMainURL( INetURLObject::NO_DECODE ), StreamMode::READ )); if( pIStm ) { @@ -322,7 +321,7 @@ INetURLObject GalleryTheme::ImplCreateUniqueURL( SgaObjKind eObjKind, ConvertDat while( bExists ); // write updated number - boost::scoped_ptr<SvStream> pOStm(::utl::UcbStreamHelper::CreateStream( aInfoFileURL.GetMainURL( INetURLObject::NO_DECODE ), StreamMode::WRITE )); + std::unique_ptr<SvStream> pOStm(::utl::UcbStreamHelper::CreateStream( aInfoFileURL.GetMainURL( INetURLObject::NO_DECODE ), StreamMode::WRITE )); if( pOStm ) { @@ -389,7 +388,7 @@ bool GalleryTheme::InsertObject( const SgaObject& rObj, sal_uIntPtr nInsertPos ) // update title of new object if necessary if (rObj.GetTitle().isEmpty()) { - boost::scoped_ptr<SgaObject> pOldObj(ImplReadSgaObject(pFoundEntry)); + std::unique_ptr<SgaObject> pOldObj(ImplReadSgaObject(pFoundEntry)); if (pOldObj) { @@ -555,7 +554,7 @@ void GalleryTheme::Actualize( const Link<>& rActualizeLink, GalleryProgress* pPr if ( GalleryGraphicImport( aURL, aGraphic, aFormat ) != GalleryGraphicImportRet::IMPORT_NONE ) { - boost::scoped_ptr<SgaObject> pNewObj; + std::unique_ptr<SgaObject> pNewObj; if ( SGA_OBJ_INET == pEntry->eObjKind ) pNewObj.reset(static_cast<SgaObject*>(new SgaObjectINet( aGraphic, aURL, aFormat ))); @@ -617,15 +616,15 @@ void GalleryTheme::Actualize( const Link<>& rActualizeLink, GalleryProgress* pPr DBG_ASSERT( aInURL.GetProtocol() != INetProtocol::NotValid, "invalid URL" ); DBG_ASSERT( aTmpURL.GetProtocol() != INetProtocol::NotValid, "invalid URL" ); - boost::scoped_ptr<SvStream> pIStm(::utl::UcbStreamHelper::CreateStream( aInURL.GetMainURL( INetURLObject::NO_DECODE ), StreamMode::READ )); - boost::scoped_ptr<SvStream> pTmpStm(::utl::UcbStreamHelper::CreateStream( aTmpURL.GetMainURL( INetURLObject::NO_DECODE ), StreamMode::WRITE | StreamMode::TRUNC )); + std::unique_ptr<SvStream> pIStm(::utl::UcbStreamHelper::CreateStream( aInURL.GetMainURL( INetURLObject::NO_DECODE ), StreamMode::READ )); + std::unique_ptr<SvStream> pTmpStm(::utl::UcbStreamHelper::CreateStream( aTmpURL.GetMainURL( INetURLObject::NO_DECODE ), StreamMode::WRITE | StreamMode::TRUNC )); if( pIStm && pTmpStm ) { for ( size_t i = 0, n = aObjectList.size(); i < n; ++i ) { pEntry = aObjectList[ i ]; - boost::scoped_ptr<SgaObject> pObj; + std::unique_ptr<SgaObject> pObj; switch( pEntry->eObjKind ) { @@ -697,7 +696,7 @@ GalleryThemeEntry* GalleryTheme::CreateThemeEntry( const INetURLObject& rURL, bo if( FileExists( rURL ) ) { - boost::scoped_ptr<SvStream> pIStm(::utl::UcbStreamHelper::CreateStream( rURL.GetMainURL( INetURLObject::NO_DECODE ), StreamMode::READ )); + std::unique_ptr<SvStream> pIStm(::utl::UcbStreamHelper::CreateStream( rURL.GetMainURL( INetURLObject::NO_DECODE ), StreamMode::READ )); if( pIStm ) { @@ -736,7 +735,7 @@ GalleryThemeEntry* GalleryTheme::CreateThemeEntry( const INetURLObject& rURL, bo if( nId1 == COMPAT_FORMAT( 'G', 'A', 'L', 'R' ) && nId2 == COMPAT_FORMAT( 'E', 'S', 'R', 'V' ) ) { - boost::scoped_ptr<VersionCompat> pCompat(new VersionCompat( *pIStm, StreamMode::READ )); + std::unique_ptr<VersionCompat> pCompat(new VersionCompat( *pIStm, StreamMode::READ )); pIStm->ReadUInt32( nThemeId ); @@ -892,7 +891,7 @@ bool GalleryTheme::InsertGraphic( const Graphic& rGraphic, sal_uIntPtr nInsertPo } const INetURLObject aURL( ImplCreateUniqueURL( SGA_OBJ_BMP, nExportFormat ) ); - boost::scoped_ptr<SvStream> pOStm(::utl::UcbStreamHelper::CreateStream( aURL.GetMainURL( INetURLObject::NO_DECODE ), StreamMode::WRITE | StreamMode::TRUNC )); + std::unique_ptr<SvStream> pOStm(::utl::UcbStreamHelper::CreateStream( aURL.GetMainURL( INetURLObject::NO_DECODE ), StreamMode::WRITE | StreamMode::TRUNC )); if( pOStm ) { @@ -1104,7 +1103,7 @@ bool GalleryTheme::InsertURL( const INetURLObject& rURL, sal_uIntPtr nInsertPos { Graphic aGraphic; OUString aFormat; - boost::scoped_ptr<SgaObject> pNewObj; + std::unique_ptr<SgaObject> pNewObj; const GalleryGraphicImportRet nImportRet = GalleryGraphicImport( rURL, aGraphic, aFormat ); bool bRet = false; @@ -1183,7 +1182,7 @@ bool GalleryTheme::InsertTransferable( const uno::Reference< datatransfer::XTran if( rxTransferable.is() ) { TransferableDataHelper aDataHelper( rxTransferable ); - boost::scoped_ptr<Graphic> pGraphic; + std::unique_ptr<Graphic> pGraphic; if( aDataHelper.HasFormat( SotClipboardFormatId::DRAWING ) ) { @@ -1356,7 +1355,7 @@ SvStream& GalleryTheme::WriteData( SvStream& rOStm ) const rOStm.WriteUInt32( COMPAT_FORMAT( 'G', 'A', 'L', 'R' ) ).WriteUInt32( COMPAT_FORMAT( 'E', 'S', 'R', 'V' ) ); const long nReservePos = rOStm.Tell(); - boost::scoped_ptr<VersionCompat> pCompat(new VersionCompat( rOStm, StreamMode::WRITE, 2 )); + std::unique_ptr<VersionCompat> pCompat(new VersionCompat( rOStm, StreamMode::WRITE, 2 )); rOStm.WriteUInt32( GetId() ).WriteBool( IsThemeNameFromResource() ); // From version 2 and up @@ -1486,7 +1485,7 @@ SvStream& GalleryTheme::ReadData( SvStream& rIStm ) nId1 == COMPAT_FORMAT( 'G', 'A', 'L', 'R' ) && nId2 == COMPAT_FORMAT( 'E', 'S', 'R', 'V' ) ) { - boost::scoped_ptr<VersionCompat> pCompat(new VersionCompat( rIStm, StreamMode::READ )); + std::unique_ptr<VersionCompat> pCompat(new VersionCompat( rIStm, StreamMode::READ )); sal_uInt32 nTemp32; bool bThemeNameFromResource = false; diff --git a/svx/source/sdr/contact/objectcontactofobjlistpainter.cxx b/svx/source/sdr/contact/objectcontactofobjlistpainter.cxx index 63cfbd507041..1e35fd3ff23c 100644 --- a/svx/source/sdr/contact/objectcontactofobjlistpainter.cxx +++ b/svx/source/sdr/contact/objectcontactofobjlistpainter.cxx @@ -27,7 +27,7 @@ #include <basegfx/matrix/b2dhommatrix.hxx> #include <drawinglayer/processor2d/processor2dtools.hxx> #include <svx/unoapi.hxx> -#include <boost/scoped_ptr.hpp> +#include <memory> namespace sdr { namespace contact { @@ -116,7 +116,7 @@ void ObjectContactOfObjListPainter::ProcessDisplay(DisplayInfo& rDisplayInfo) // if there is something to show, use a vclProcessor to render it if(xPrimitiveSequence.hasElements()) { - boost::scoped_ptr<drawinglayer::processor2d::BaseProcessor2D> pProcessor2D(drawinglayer::processor2d::createProcessor2DFromOutputDevice( + std::unique_ptr<drawinglayer::processor2d::BaseProcessor2D> pProcessor2D(drawinglayer::processor2d::createProcessor2DFromOutputDevice( *pTargetDevice, getViewInformation2D())); diff --git a/svx/source/sdr/contact/objectcontactofpageview.cxx b/svx/source/sdr/contact/objectcontactofpageview.cxx index 555b06b5d391..05c6ab4ce0f0 100644 --- a/svx/source/sdr/contact/objectcontactofpageview.cxx +++ b/svx/source/sdr/contact/objectcontactofpageview.cxx @@ -37,7 +37,7 @@ #include <svx/unoapi.hxx> #include "eventhandler.hxx" -#include <boost/scoped_ptr.hpp> +#include <memory> using namespace com::sun::star; @@ -292,7 +292,7 @@ namespace sdr pOutDev->SetLayoutMode(TEXT_LAYOUT_DEFAULT); // reset, default is no BiDi/RTL // create renderer - boost::scoped_ptr<drawinglayer::processor2d::BaseProcessor2D> pProcessor2D( + std::unique_ptr<drawinglayer::processor2d::BaseProcessor2D> pProcessor2D( drawinglayer::processor2d::createProcessor2DFromOutputDevice( rTargetOutDev, getViewInformation2D())); diff --git a/svx/source/sdr/contact/viewcontactofe3dcube.cxx b/svx/source/sdr/contact/viewcontactofe3dcube.cxx index a12bcf86ea20..6ace072269fc 100644 --- a/svx/source/sdr/contact/viewcontactofe3dcube.cxx +++ b/svx/source/sdr/contact/viewcontactofe3dcube.cxx @@ -24,7 +24,7 @@ #include <svx/sdr/primitive2d/sdrattributecreator.hxx> #include <sdr/primitive3d/sdrattributecreator3d.hxx> #include <basegfx/range/b3drange.hxx> -#include <boost/scoped_ptr.hpp> +#include <memory> namespace sdr @@ -71,7 +71,7 @@ namespace sdr aWorldTransform.translate(aCubeRange.getMinX(), aCubeRange.getMinY(), aCubeRange.getMinZ()); // get 3D Object Attributes - boost::scoped_ptr<drawinglayer::attribute::Sdr3DObjectAttribute> pSdr3DObjectAttribute(drawinglayer::primitive2d::createNewSdr3DObjectAttribute(rItemSet)); + std::unique_ptr<drawinglayer::attribute::Sdr3DObjectAttribute> pSdr3DObjectAttribute(drawinglayer::primitive2d::createNewSdr3DObjectAttribute(rItemSet)); // calculate texture size to get a perfect mapping for // the front/back sides diff --git a/svx/source/sdr/contact/viewcontactofe3dextrude.cxx b/svx/source/sdr/contact/viewcontactofe3dextrude.cxx index cf4132e30f82..51d6e6d79b9e 100644 --- a/svx/source/sdr/contact/viewcontactofe3dextrude.cxx +++ b/svx/source/sdr/contact/viewcontactofe3dextrude.cxx @@ -24,7 +24,7 @@ #include <svx/sdr/primitive2d/sdrattributecreator.hxx> #include <sdr/primitive3d/sdrattributecreator3d.hxx> #include <basegfx/polygon/b2dpolypolygontools.hxx> -#include <boost/scoped_ptr.hpp> +#include <memory> namespace sdr @@ -51,7 +51,7 @@ namespace sdr const basegfx::B2DPolyPolygon aPolyPolygon(GetE3dExtrudeObj().GetExtrudePolygon()); // get 3D Object Attributes - boost::scoped_ptr<drawinglayer::attribute::Sdr3DObjectAttribute> pSdr3DObjectAttribute(drawinglayer::primitive2d::createNewSdr3DObjectAttribute(rItemSet)); + std::unique_ptr<drawinglayer::attribute::Sdr3DObjectAttribute> pSdr3DObjectAttribute(drawinglayer::primitive2d::createNewSdr3DObjectAttribute(rItemSet)); // calculate texture size; use size of top/bottom cap to get a perfect mapping // for the caps. The in-between geometry will get a stretched size with a diff --git a/svx/source/sdr/contact/viewcontactofe3dlathe.cxx b/svx/source/sdr/contact/viewcontactofe3dlathe.cxx index 1f227745e4e0..4554ffc1f546 100644 --- a/svx/source/sdr/contact/viewcontactofe3dlathe.cxx +++ b/svx/source/sdr/contact/viewcontactofe3dlathe.cxx @@ -24,7 +24,7 @@ #include <svx/sdr/primitive2d/sdrattributecreator.hxx> #include <sdr/primitive3d/sdrattributecreator3d.hxx> #include <basegfx/polygon/b2dpolygontools.hxx> -#include <boost/scoped_ptr.hpp> +#include <memory> namespace sdr @@ -51,7 +51,7 @@ namespace sdr const basegfx::B2DPolyPolygon aPolyPolygon(GetE3dLatheObj().GetPolyPoly2D()); // get 3D Object Attributes - boost::scoped_ptr<drawinglayer::attribute::Sdr3DObjectAttribute> pSdr3DObjectAttribute(drawinglayer::primitive2d::createNewSdr3DObjectAttribute(rItemSet)); + std::unique_ptr<drawinglayer::attribute::Sdr3DObjectAttribute> pSdr3DObjectAttribute(drawinglayer::primitive2d::createNewSdr3DObjectAttribute(rItemSet)); // calculate texture size. Use the polygon length of the longest polygon for // height and the rotated radius for width (using polygon center) to get a good diff --git a/svx/source/sdr/contact/viewcontactofe3dpolygon.cxx b/svx/source/sdr/contact/viewcontactofe3dpolygon.cxx index 88fd9a64c35d..c9710dd74bae 100644 --- a/svx/source/sdr/contact/viewcontactofe3dpolygon.cxx +++ b/svx/source/sdr/contact/viewcontactofe3dpolygon.cxx @@ -25,7 +25,7 @@ #include <sdr/primitive3d/sdrattributecreator3d.hxx> #include <basegfx/polygon/b3dpolygon.hxx> #include <basegfx/polygon/b3dpolypolygontools.hxx> -#include <boost/scoped_ptr.hpp> +#include <memory> namespace sdr @@ -99,7 +99,7 @@ namespace sdr } // get 3D Object Attributes - boost::scoped_ptr<drawinglayer::attribute::Sdr3DObjectAttribute> pSdr3DObjectAttribute(drawinglayer::primitive2d::createNewSdr3DObjectAttribute(rItemSet)); + std::unique_ptr<drawinglayer::attribute::Sdr3DObjectAttribute> pSdr3DObjectAttribute(drawinglayer::primitive2d::createNewSdr3DObjectAttribute(rItemSet)); // calculate texture size basegfx::B2DVector aTextureSize(1.0, 1.0); diff --git a/svx/source/sdr/contact/viewcontactofe3dsphere.cxx b/svx/source/sdr/contact/viewcontactofe3dsphere.cxx index 96c286bbcc86..b5f127195bd1 100644 --- a/svx/source/sdr/contact/viewcontactofe3dsphere.cxx +++ b/svx/source/sdr/contact/viewcontactofe3dsphere.cxx @@ -23,7 +23,7 @@ #include <drawinglayer/primitive3d/sdrsphereprimitive3d.hxx> #include <svx/sdr/primitive2d/sdrattributecreator.hxx> #include <sdr/primitive3d/sdrattributecreator3d.hxx> -#include <boost/scoped_ptr.hpp> +#include <memory> namespace sdr @@ -57,7 +57,7 @@ namespace sdr aWorldTransform.translate(aSpherePosition.getX(), aSpherePosition.getY(), aSpherePosition.getZ()); // get 3D Object Attributes - boost::scoped_ptr<drawinglayer::attribute::Sdr3DObjectAttribute> pSdr3DObjectAttribute(drawinglayer::primitive2d::createNewSdr3DObjectAttribute(rItemSet)); + std::unique_ptr<drawinglayer::attribute::Sdr3DObjectAttribute> pSdr3DObjectAttribute(drawinglayer::primitive2d::createNewSdr3DObjectAttribute(rItemSet)); // get segment count const sal_uInt32 nHorizontalSegments(GetE3dSphereObj().GetHorizontalSegments()); diff --git a/svx/source/sdr/overlay/overlaymanager.cxx b/svx/source/sdr/overlay/overlaymanager.cxx index 6fa4e026ed6d..d32e4d679789 100644 --- a/svx/source/sdr/overlay/overlaymanager.cxx +++ b/svx/source/sdr/overlay/overlaymanager.cxx @@ -26,7 +26,7 @@ #include <svx/sdr/overlay/overlayobject.hxx> #include <basegfx/matrix/b2dhommatrix.hxx> #include <drawinglayer/processor2d/processor2dtools.hxx> -#include <boost/scoped_ptr.hpp> +#include <memory> using namespace com::sun::star; @@ -47,7 +47,7 @@ namespace sdr const bool bIsAntiAliasing(getDrawinglayerOpt().IsAntiAliasing()); // create processor - boost::scoped_ptr<drawinglayer::processor2d::BaseProcessor2D> pProcessor(drawinglayer::processor2d::createProcessor2DFromOutputDevice( + std::unique_ptr<drawinglayer::processor2d::BaseProcessor2D> pProcessor(drawinglayer::processor2d::createProcessor2DFromOutputDevice( rDestinationDevice, getCurrentViewInformation2D())); diff --git a/svx/source/sdr/properties/e3dsceneproperties.cxx b/svx/source/sdr/properties/e3dsceneproperties.cxx index f8c292865837..25c9ff66e143 100644 --- a/svx/source/sdr/properties/e3dsceneproperties.cxx +++ b/svx/source/sdr/properties/e3dsceneproperties.cxx @@ -23,7 +23,7 @@ #include <svx/svddef.hxx> #include <svx/scene3d.hxx> #include <svx/svditer.hxx> -#include <boost/scoped_ptr.hpp> +#include <memory> namespace sdr @@ -121,7 +121,7 @@ namespace sdr { // Generate filtered ItemSet which contains all but the SDRATTR_3DSCENE items. // #i50808# Leak fix, Clone produces a new instance and we get ownership here - boost::scoped_ptr<SfxItemSet> pNewSet(rSet.Clone(true)); + std::unique_ptr<SfxItemSet> pNewSet(rSet.Clone(true)); DBG_ASSERT(pNewSet, "E3dSceneProperties::SetMergedItemSet(): Could not clone ItemSet (!)"); for(sal_uInt16 b(SDRATTR_3DSCENE_FIRST); b <= SDRATTR_3DSCENE_LAST; b++) diff --git a/svx/source/sdr/properties/itemsettools.cxx b/svx/source/sdr/properties/itemsettools.cxx index b7b4940fbfdf..77ca0bda361e 100644 --- a/svx/source/sdr/properties/itemsettools.cxx +++ b/svx/source/sdr/properties/itemsettools.cxx @@ -26,7 +26,7 @@ #include <svx/svditer.hxx> #include <vcl/region.hxx> #include <vcl/outdev.hxx> -#include <boost/scoped_ptr.hpp> +#include <memory> // class to remember broadcast start positions @@ -115,7 +115,7 @@ namespace sdr { if(pItem->HasMetrics()) { - boost::scoped_ptr<SfxPoolItem> pNewItem(pItem->Clone()); + std::unique_ptr<SfxPoolItem> pNewItem(pItem->Clone()); pNewItem->ScaleMetrics(nMul, nDiv); rSet.Put(*pNewItem); } diff --git a/svx/source/svdraw/svdedtv2.cxx b/svx/source/svdraw/svdedtv2.cxx index 770c610ccec0..3f327a01b55d 100644 --- a/svx/source/svdraw/svdedtv2.cxx +++ b/svx/source/svdraw/svdedtv2.cxx @@ -42,7 +42,7 @@ #include <svx/dialogs.hrc> #include <svx/svdoashp.hxx> #include <basegfx/polygon/b2dpolypolygoncutter.hxx> -#include <boost/scoped_ptr.hpp> +#include <memory> #include <vector> using ::std::vector; using namespace com::sun::star; @@ -770,7 +770,7 @@ void SdrEditView::DistributeMarkedObjects() SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create(); if(pFact) { - boost::scoped_ptr<AbstractSvxDistributeDialog> pDlg(pFact->CreateSvxDistributeDialog(NULL, aNewAttr)); + std::unique_ptr<AbstractSvxDistributeDialog> pDlg(pFact->CreateSvxDistributeDialog(NULL, aNewAttr)); DBG_ASSERT(pDlg, "Dialog creation failed!"); sal_uInt16 nResult = pDlg->Execute(); diff --git a/svx/source/svdraw/svdedxv.cxx b/svx/source/svdraw/svdedxv.cxx index 29b1b9b40c05..ea6ae00180fa 100644 --- a/svx/source/svdraw/svdedxv.cxx +++ b/svx/source/svdraw/svdedxv.cxx @@ -61,8 +61,6 @@ #include <svx/sdr/table/tablecontroller.hxx> #include <drawinglayer/processor2d/processor2dtools.hxx> -#include <boost/scoped_ptr.hpp> - #include <memory> @@ -358,7 +356,7 @@ void SdrObjEditView::ImpPaintOutlinerView(OutlinerView& rOutlView, const Rectang { // completely reworked to use primitives; this ensures same look and functionality const drawinglayer::geometry::ViewInformation2D aViewInformation2D; - boost::scoped_ptr<drawinglayer::processor2d::BaseProcessor2D> xProcessor(drawinglayer::processor2d::createProcessor2DFromOutputDevice( + std::unique_ptr<drawinglayer::processor2d::BaseProcessor2D> xProcessor(drawinglayer::processor2d::createProcessor2DFromOutputDevice( rTargetDevice, aViewInformation2D)); diff --git a/svx/source/svdraw/svdhdl.cxx b/svx/source/svdraw/svdhdl.cxx index f63d75952d85..6e1cdf81dbcb 100644 --- a/svx/source/svdraw/svdhdl.cxx +++ b/svx/source/svdraw/svdhdl.cxx @@ -66,7 +66,6 @@ #include <drawinglayer/primitive2d/unifiedtransparenceprimitive2d.hxx> #include <drawinglayer/primitive2d/polygonprimitive2d.hxx> #include <memory> -#include <boost/scoped_ptr.hpp> // #i15222# @@ -1045,7 +1044,7 @@ Bitmap SdrHdlColor::CreateColorDropper(Color aCol) aRetval.Erase(aCol); // get write access - boost::scoped_ptr<BitmapWriteAccess> pWrite(aRetval.AcquireWriteAccess()); + std::unique_ptr<BitmapWriteAccess> pWrite(aRetval.AcquireWriteAccess()); DBG_ASSERT(pWrite, "Got NO write access to a new Bitmap!"); if(pWrite) diff --git a/svx/source/svdraw/svdobj.cxx b/svx/source/svdraw/svdobj.cxx index 6b8c00d23a42..7a80781519f6 100644 --- a/svx/source/svdraw/svdobj.cxx +++ b/svx/source/svdraw/svdobj.cxx @@ -135,9 +135,9 @@ #include <svdobjplusdata.hxx> #include <svdobjuserdatalist.hxx> -#include <boost/scoped_ptr.hpp> #include <boost/optional.hpp> #include <libxml/xmlwriter.h> +#include <memory> using namespace ::com::sun::star; @@ -3163,7 +3163,7 @@ SdrObjFactory::SdrObjFactory(sal_uInt32 nInvent, sal_uInt16 nIdent, SdrPage* pNe SdrObject* SdrObjFactory::CreateObjectFromFactory( sal_uInt32 nInventor, sal_uInt16 nIdentifier, SdrPage* pPage, SdrModel* pModel ) { - boost::scoped_ptr<SdrObjFactory> pFact(new SdrObjFactory(nInventor, nIdentifier, pPage, pModel)); + std::unique_ptr<SdrObjFactory> pFact(new SdrObjFactory(nInventor, nIdentifier, pPage, pModel)); SdrLinkList& rLL = ImpGetUserMakeObjHdl(); unsigned n = rLL.GetLinkCount(); diff --git a/svx/source/svdraw/svdograf.cxx b/svx/source/svdraw/svdograf.cxx index 17bc54438c6b..b80011e81576 100644 --- a/svx/source/svdraw/svdograf.cxx +++ b/svx/source/svdraw/svdograf.cxx @@ -61,7 +61,7 @@ #include <osl/thread.hxx> #include <drawinglayer/processor2d/objectinfoextractor2d.hxx> #include <drawinglayer/primitive2d/objectinfoprimitive2d.hxx> -#include <boost/scoped_ptr.hpp> +#include <memory> using namespace ::com::sun::star; using namespace ::com::sun::star::uno; @@ -1315,7 +1315,7 @@ IMPL_LINK_TYPED( SdrGrafObj, ImpSwapHdl, const GraphicObject*, pO, SvStream* ) uno::Reference<io::XInputStream> const xStream( pModel->GetDocumentStream(aUserData, proxy)); - ::boost::scoped_ptr<SvStream> const pStream( (xStream.is()) + std::unique_ptr<SvStream> const pStream( (xStream.is()) ? ::utl::UcbStreamHelper::CreateStream(xStream) : 0 ); @@ -1323,7 +1323,7 @@ IMPL_LINK_TYPED( SdrGrafObj, ImpSwapHdl, const GraphicObject*, pO, SvStream* ) { Graphic aGraphic; - boost::scoped_ptr<com::sun::star::uno::Sequence< com::sun::star::beans::PropertyValue > > pFilterData; + std::unique_ptr<com::sun::star::uno::Sequence< com::sun::star::beans::PropertyValue > > pFilterData; if(mbInsidePaint && !GetViewContact().HasViewObjectContacts(true)) { diff --git a/svx/source/svdraw/svdomedia.cxx b/svx/source/svdraw/svdomedia.cxx index 074d2faaaae5..9735c4868041 100644 --- a/svx/source/svdraw/svdomedia.cxx +++ b/svx/source/svdraw/svdomedia.cxx @@ -72,7 +72,7 @@ struct MediaTempFile struct SdrMediaObj::Impl { ::avmedia::MediaItem m_MediaProperties; - ::boost::shared_ptr< MediaTempFile > m_pTempFile; + std::shared_ptr< MediaTempFile > m_pTempFile; uno::Reference< graphic::XGraphic > m_xCachedSnapshot; OUString m_LastFailedPkgURL; }; diff --git a/svx/source/svdraw/svdotxln.cxx b/svx/source/svdraw/svdotxln.cxx index dccb9cd7cb80..a004ad0aa66f 100644 --- a/svx/source/svdraw/svdotxln.cxx +++ b/svx/source/svdraw/svdotxln.cxx @@ -33,7 +33,7 @@ #include <tools/urlobj.hxx> #include <svl/urihelper.hxx> #include <tools/tenccvt.hxx> -#include <boost/scoped_ptr.hpp> +#include <memory> class ImpSdrObjTextLink: public ::sfx2::SvBaseLink { @@ -220,7 +220,7 @@ bool SdrTextObj::LoadText(const OUString& rFileName, const OUString& /*rFilterNa DBG_ASSERT( aFileURL.GetProtocol() != INetProtocol::NotValid, "invalid URL" ); - boost::scoped_ptr<SvStream> pIStm(::utl::UcbStreamHelper::CreateStream( aFileURL.GetMainURL( INetURLObject::NO_DECODE ), StreamMode::READ )); + std::unique_ptr<SvStream> pIStm(::utl::UcbStreamHelper::CreateStream( aFileURL.GetMainURL( INetURLObject::NO_DECODE ), StreamMode::READ )); if( pIStm ) { diff --git a/svx/source/svdraw/svdtext.cxx b/svx/source/svdraw/svdtext.cxx index 5563bf333134..b9d53d9db968 100644 --- a/svx/source/svdraw/svdtext.cxx +++ b/svx/source/svdraw/svdtext.cxx @@ -25,7 +25,7 @@ #include "editeng/fhgtitem.hxx" #include <editeng/eeitem.hxx> #include <svl/itemset.hxx> -#include <boost/scoped_ptr.hpp> +#include <memory> SdrText::SdrText( SdrTextObj& rObject, OutlinerParaObject* pOutlinerParaObject /* = 0 */ ) : mpOutlinerParaObject( pOutlinerParaObject ) @@ -173,7 +173,7 @@ void SdrText::ForceOutlinerParaObject( sal_uInt16 nOutlMode ) { if( mpModel && !mpOutlinerParaObject ) { - boost::scoped_ptr<Outliner> pOutliner(SdrMakeOutliner(nOutlMode, *mpModel)); + std::unique_ptr<Outliner> pOutliner(SdrMakeOutliner(nOutlMode, *mpModel)); if( pOutliner ) { Outliner& aDrawOutliner = mpModel->GetDrawOutliner(); diff --git a/svx/source/table/tablertfimporter.cxx b/svx/source/table/tablertfimporter.cxx index 3a4d6dc6ebeb..3974b367dc89 100644 --- a/svx/source/table/tablertfimporter.cxx +++ b/svx/source/table/tablertfimporter.cxx @@ -18,9 +18,8 @@ */ +#include <memory> #include <vector> -#include <boost/scoped_ptr.hpp> -#include <boost/shared_ptr.hpp> #include <com/sun/star/table/XTable.hpp> @@ -58,7 +57,7 @@ struct RTFCellDefault explicit RTFCellDefault( SfxItemPool* pPool ) : maItemSet( *pPool ), mnCol(0), mnTwips(0 ), mnColSpan(1) {} }; -typedef std::vector< boost::shared_ptr< RTFCellDefault > > RTFCellDefaultVector; +typedef std::vector< std::shared_ptr< RTFCellDefault > > RTFCellDefaultVector; struct RTFCellInfo { @@ -70,10 +69,10 @@ struct RTFCellInfo explicit RTFCellInfo( SfxItemPool& rPool ) : maItemSet( rPool ), mnStartPara(0), mnParaCount(0), mnColSpan(0) {} }; -typedef boost::shared_ptr< RTFCellInfo > RTFCellInfoPtr; +typedef std::shared_ptr< RTFCellInfo > RTFCellInfoPtr; typedef std::vector< RTFCellInfoPtr > RTFColumnVector; -typedef boost::shared_ptr< RTFColumnVector > RTFColumnVectorPtr; +typedef std::shared_ptr< RTFColumnVector > RTFColumnVectorPtr; class SdrTableRTFParser { @@ -274,7 +273,7 @@ void SdrTableRTFParser::FillTable() if( xCellInfo->maItemSet.GetItemState(SDRATTR_TABLE_BORDER,false,&pPoolItem)==SfxItemState::SET) xCell->SetMergedItem( *pPoolItem ); - boost::scoped_ptr<OutlinerParaObject> pTextObject(mpOutliner->CreateParaObject( xCellInfo->mnStartPara, xCellInfo->mnParaCount )); + std::unique_ptr<OutlinerParaObject> pTextObject(mpOutliner->CreateParaObject( xCellInfo->mnStartPara, xCellInfo->mnParaCount )); if( pTextObject ) { SdrOutliner& rOutliner=mrTableObj.ImpGetDrawOutliner(); @@ -361,7 +360,7 @@ void SdrTableRTFParser::ProcToken( ImportInfo* pInfo ) { mbNewDef = true; mpInsDefault->mnCol = mnColCnt; - maDefaultList.push_back( boost::shared_ptr< RTFCellDefault >( mpInsDefault ) ); + maDefaultList.push_back( std::shared_ptr< RTFCellDefault >( mpInsDefault ) ); if( (sal_Int32)maColumnEdges.size() <= mnColCnt ) maColumnEdges.resize( mnColCnt + 1 ); diff --git a/svx/source/tbxctrls/fillctrl.cxx b/svx/source/tbxctrls/fillctrl.cxx index 92b89a3f3ff9..650ef07ff3fd 100644 --- a/svx/source/tbxctrls/fillctrl.cxx +++ b/svx/source/tbxctrls/fillctrl.cxx @@ -38,7 +38,7 @@ #include <svx/itemwin.hxx> #include <svx/dialmgr.hxx> #include "helpid.hrc" -#include <boost/scoped_ptr.hpp> +#include <memory> using namespace ::com::sun::star; using namespace ::com::sun::star::uno; @@ -376,7 +376,7 @@ void SvxFillToolBoxControl::Update() } aTmpStr = TMP_STR_BEGIN + aString + TMP_STR_END; - boost::scoped_ptr<XGradientEntry> pEntry(new XGradientEntry(mpFillGradientItem->GetGradientValue(), aTmpStr)); + std::unique_ptr<XGradientEntry> pEntry(new XGradientEntry(mpFillGradientItem->GetGradientValue(), aTmpStr)); XGradientList aGradientList( "", ""/*TODO?*/ ); aGradientList.Insert( pEntry.get() ); aGradientList.SetDirty( false ); @@ -501,7 +501,7 @@ void SvxFillToolBoxControl::Update() } aTmpStr = TMP_STR_BEGIN + aString + TMP_STR_END; - boost::scoped_ptr<XBitmapEntry> pEntry(new XBitmapEntry(mpBitmapItem->GetGraphicObject(), aTmpStr)); + std::unique_ptr<XBitmapEntry> pEntry(new XBitmapEntry(mpBitmapItem->GetGraphicObject(), aTmpStr)); XBitmapListRef xBitmapList = XPropertyList::AsBitmapList( XPropertyList::CreatePropertyList( diff --git a/svx/source/tbxctrls/fontworkgallery.cxx b/svx/source/tbxctrls/fontworkgallery.cxx index a7f61727aee3..a2991006b7ae 100644 --- a/svx/source/tbxctrls/fontworkgallery.cxx +++ b/svx/source/tbxctrls/fontworkgallery.cxx @@ -51,7 +51,7 @@ #include "coreservices.hxx" #include <algorithm> -#include <boost/scoped_ptr.hpp> +#include <memory> #include "helpid.hrc" @@ -201,7 +201,7 @@ void FontWorkGalleryDialog::insertSelectedFontwork() if( nItemId > 0 ) { - boost::scoped_ptr<FmFormModel> pModel(new FmFormModel()); + std::unique_ptr<FmFormModel> pModel(new FmFormModel()); pModel->GetItemPool().FreezeIdRanges(); if( GalleryExplorer::GetSdrObj( mnThemeId, nItemId-1, pModel.get() ) ) diff --git a/svx/source/tbxctrls/linectrl.cxx b/svx/source/tbxctrls/linectrl.cxx index b6a757476c08..bbaec33c5a38 100644 --- a/svx/source/tbxctrls/linectrl.cxx +++ b/svx/source/tbxctrls/linectrl.cxx @@ -34,7 +34,7 @@ #include <svx/itemwin.hxx> #include <svx/dialmgr.hxx> #include <svx/unoapi.hxx> -#include <boost/scoped_ptr.hpp> +#include <memory> using namespace ::com::sun::star::uno; using namespace ::com::sun::star::beans; @@ -333,8 +333,8 @@ void SvxLineEndWindow::dispose() IMPL_LINK_NOARG_TYPED(SvxLineEndWindow, SelectHdl, ValueSet*, void) { - boost::scoped_ptr<XLineEndItem> pLineEndItem; - boost::scoped_ptr<XLineStartItem> pLineStartItem; + std::unique_ptr<XLineEndItem> pLineEndItem; + std::unique_ptr<XLineStartItem> pLineStartItem; sal_uInt16 nId = aLineEndSet->GetSelectItemId(); if( nId == 1 ) diff --git a/svx/source/tbxctrls/tbunocontroller.cxx b/svx/source/tbxctrls/tbunocontroller.cxx index 2cca8bd290d9..42bb4ce66e60 100644 --- a/svx/source/tbxctrls/tbunocontroller.cxx +++ b/svx/source/tbxctrls/tbunocontroller.cxx @@ -36,7 +36,7 @@ #include <cppuhelper/queryinterface.hxx> #include <cppuhelper/supportsservice.hxx> -#include <boost/scoped_ptr.hpp> +#include <memory> using namespace ::com::sun::star; @@ -195,7 +195,7 @@ void SvxFontSizeBox_Impl::UpdateFont( const ::com::sun::star::awt::FontDescripto // Sizes-Liste auff"ullen sal_Int64 nOldVal = GetValue(); // alten Wert merken const FontList* _pFontList = NULL; - boost::scoped_ptr<FontList> aHold( new FontList( this )); + std::unique_ptr<FontList> aHold( new FontList( this )); _pFontList = aHold.get(); if ( !rCurrentFont.Name.isEmpty() ) diff --git a/svx/source/unodraw/UnoGraphicExporter.cxx b/svx/source/unodraw/UnoGraphicExporter.cxx index f77c801f626e..f5cff76460b1 100644 --- a/svx/source/unodraw/UnoGraphicExporter.cxx +++ b/svx/source/unodraw/UnoGraphicExporter.cxx @@ -66,10 +66,8 @@ #include <editeng/eeitem.hxx> #include <svx/svdoutl.hxx> #include <editeng/flditem.hxx> - -#include <boost/scoped_ptr.hpp> - #include <UnoGraphicExporter.hxx> +#include <memory> #define MAX_EXT_PIX 2048 @@ -437,7 +435,7 @@ VclPtr<VirtualDevice> GraphicExporter::CreatePageVDev( SdrPage* pPage, sal_uIntP if(bSuccess) { - boost::scoped_ptr<SdrView> pView(new SdrView(mpDoc, pVDev)); + std::unique_ptr<SdrView> pView(new SdrView(mpDoc, pVDev)); pView->SetPageVisible( false ); pView->SetBordVisible( false ); pView->SetGridVisible( false ); @@ -699,7 +697,7 @@ bool GraphicExporter::GetGraphic( ExportSettings& rSettings, Graphic& aGraphic, } } - boost::scoped_ptr< SdrView > pLocalView; + std::unique_ptr< SdrView > pLocalView; if( PTR_CAST( FmFormModel, mpDoc ) ) { pLocalView.reset( new FmFormView( PTR_CAST( FmFormModel, mpDoc ), aVDev ) ); @@ -732,7 +730,7 @@ bool GraphicExporter::GetGraphic( ExportSettings& rSettings, Graphic& aGraphic, Size aNewSize; // create a view - boost::scoped_ptr< SdrView > pView; + std::unique_ptr< SdrView > pView; if( PTR_CAST( FmFormModel, mpDoc ) ) { pView.reset(new FmFormView( PTR_CAST( FmFormModel, mpDoc ), aVDev )); @@ -861,7 +859,7 @@ bool GraphicExporter::GetGraphic( ExportSettings& rSettings, Graphic& aGraphic, Rectangle aScrollRectangle; Rectangle aPaintRectangle; - const boost::scoped_ptr< GDIMetaFile > pMtf( + const std::unique_ptr< GDIMetaFile > pMtf( static_cast<SdrTextObj*>(pObj)->GetTextScrollMetaFileAndRectangle( aScrollRectangle, aPaintRectangle ) ); diff --git a/svx/source/unodraw/UnoNameItemTable.cxx b/svx/source/unodraw/UnoNameItemTable.cxx index 224cc0f4eb01..7ef71b97a4bc 100644 --- a/svx/source/unodraw/UnoNameItemTable.cxx +++ b/svx/source/unodraw/UnoNameItemTable.cxx @@ -30,7 +30,7 @@ #include <vcl/svapp.hxx> #include "svx/unoapi.hxx" -#include <boost/scoped_ptr.hpp> +#include <memory> using namespace ::com::sun::star; using namespace ::cppu; @@ -87,7 +87,7 @@ void SAL_CALL SvxUnoNameItemTable::ImplInsertByName( const OUString& aName, cons SfxItemSet* mpInSet = new SfxItemSet( *mpModelPool, mnWhich, mnWhich ); maItemSetVector.push_back( mpInSet ); - boost::scoped_ptr<NameOrIndex> pNewItem(createItem()); + std::unique_ptr<NameOrIndex> pNewItem(createItem()); pNewItem->SetName( aName ); pNewItem->PutValue( aElement, mnMemberId ); mpInSet->Put( *pNewItem, mnWhich ); diff --git a/svx/source/unodraw/unopool.cxx b/svx/source/unodraw/unopool.cxx index dccdbaded4b8..949df3e5731c 100644 --- a/svx/source/unodraw/unopool.cxx +++ b/svx/source/unodraw/unopool.cxx @@ -38,7 +38,7 @@ #include <editeng/editeng.hxx> #include "svx/unoapi.hxx" -#include <boost/scoped_ptr.hpp> +#include <memory> using namespace ::com::sun::star; using namespace ::cppu; @@ -185,7 +185,7 @@ void SvxUnoDrawPool::putAny( SfxItemPool* pPool, const comphelper::PropertyMapEn default: { - boost::scoped_ptr<SfxPoolItem> pNewItem( pPool->GetDefaultItem( nWhich ).Clone() ); + std::unique_ptr<SfxPoolItem> pNewItem( pPool->GetDefaultItem( nWhich ).Clone() ); sal_uInt8 nMemberId = pEntry->mnMemberId & (~SFX_METRIC_ITEM); if( pPool->GetMetric(nWhich) == SFX_MAPUNIT_100TH_MM ) nMemberId &= (~CONVERT_TWIPS); diff --git a/svx/source/unodraw/unoshap2.cxx b/svx/source/unodraw/unoshap2.cxx index 63b29ea8205e..ae70d179d479 100644 --- a/svx/source/unodraw/unoshap2.cxx +++ b/svx/source/unodraw/unoshap2.cxx @@ -34,7 +34,6 @@ #include <vcl/fltcall.hxx> #include <vcl/graphicfilter.hxx> -#include <boost/scoped_ptr.hpp> #include <svx/svdpool.hxx> #include <editeng/unoprnms.hxx> @@ -58,6 +57,8 @@ #include <comphelper/servicehelper.hxx> #include <vcl/wmf.hxx> +#include <memory> + using namespace ::osl; using namespace ::cppu; using namespace ::com::sun::star; @@ -1866,7 +1867,7 @@ void SAL_CALL SvxCustomShape::setPropertyValue( const OUString& aPropertyName, c bool bNeedsMirrorX = static_cast<SdrObjCustomShape*>(pObject)->IsMirroredX() != bMirroredX; bool bNeedsMirrorY = static_cast<SdrObjCustomShape*>(pObject)->IsMirroredY() != bMirroredY; - boost::scoped_ptr< SdrGluePointList > pListCopy; + std::unique_ptr< SdrGluePointList > pListCopy; if( bNeedsMirrorX || bNeedsMirrorY ) { const SdrGluePointList* pList = pObject->GetGluePointList(); diff --git a/svx/source/unodraw/unoshape.cxx b/svx/source/unodraw/unoshape.cxx index 667d687432f8..225e4203a087 100644 --- a/svx/source/unodraw/unoshape.cxx +++ b/svx/source/unodraw/unoshape.cxx @@ -87,14 +87,14 @@ #include "shapeimpl.hxx" #include <sal/log.hxx> -#include <vector> - #include "svx/lathe3d.hxx" #include "svx/extrud3d.hxx" -#include <boost/scoped_ptr.hpp> #include <vcl/wmf.hxx> +#include <memory> +#include <vector> + using namespace ::osl; using namespace ::cppu; using namespace ::com::sun::star; @@ -675,7 +675,7 @@ uno::Any SvxShape::GetBitmap( bool bMetaFile /* = false */ ) const SdrModel* pModel = mpObj->GetModel(); SdrPage* pPage = mpObj->GetPage(); - boost::scoped_ptr<E3dView> pView(new E3dView( pModel, pVDev.get() )); + std::unique_ptr<E3dView> pView(new E3dView( pModel, pVDev.get() )); pView->hideMarkHandles(); SdrPageView* pPageView = pView->ShowSdrPage(pPage); diff --git a/svx/source/unogallery/unogalitem.cxx b/svx/source/unogallery/unogalitem.cxx index 8e55ea4cee0d..76819413ca94 100644 --- a/svx/source/unogallery/unogalitem.cxx +++ b/svx/source/unogallery/unogalitem.cxx @@ -35,7 +35,7 @@ #include <com/sun/star/beans/PropertyState.hpp> #include <com/sun/star/beans/PropertyAttribute.hpp> #include <com/sun/star/gallery/GalleryItemType.hpp> -#include <boost/scoped_ptr.hpp> +#include <memory> #define UNOGALLERY_GALLERYITEMTYPE 1 #define UNOGALLERY_URL 2 @@ -273,7 +273,7 @@ void GalleryItem::_setPropertyValues( const comphelper::PropertyMapEntry** ppEnt if( pGalTheme ) { - boost::scoped_ptr<SgaObject> pObj(pGalTheme->ImplReadSgaObject( const_cast< GalleryObject* >( implGetObject() ) )); + std::unique_ptr<SgaObject> pObj(pGalTheme->ImplReadSgaObject( const_cast< GalleryObject* >( implGetObject() ) )); if( pObj ) { diff --git a/svx/source/xml/xmleohlp.cxx b/svx/source/xml/xmleohlp.cxx index b3a726da01b3..32f650027d35 100644 --- a/svx/source/xml/xmleohlp.cxx +++ b/svx/source/xml/xmleohlp.cxx @@ -44,9 +44,9 @@ #include <comphelper/classids.hxx> #include <cppuhelper/implbase.hxx> -#include <map> #include "svx/xmleohlp.hxx" -#include <boost/scoped_ptr.hpp> +#include <map> +#include <memory> using namespace ::osl; using namespace ::cppu; @@ -405,7 +405,7 @@ bool SvXMLEmbeddedObjectHelper::ImplReadObject( pTemp->Seek( 0 ); uno::Reference < io::XStream > xStm = xDocStor->openStreamElement( rObjName, embed::ElementModes::READWRITE | embed::ElementModes::TRUNCATE ); - boost::scoped_ptr<SvStream> pStream(::utl::UcbStreamHelper::CreateStream( xStm )); + std::unique_ptr<SvStream> pStream(::utl::UcbStreamHelper::CreateStream( xStm )); pTemp->ReadStream( *pStream ); pStream.reset(); diff --git a/svx/source/xml/xmlgrhlp.cxx b/svx/source/xml/xmlgrhlp.cxx index 9268b9d61ac5..e3fc0806f4d1 100644 --- a/svx/source/xml/xmlgrhlp.cxx +++ b/svx/source/xml/xmlgrhlp.cxx @@ -47,7 +47,7 @@ #include "svx/xmleohlp.hxx" #include <algorithm> -#include <boost/scoped_ptr.hpp> +#include <memory> using namespace com::sun::star; using namespace com::sun::star::uno; @@ -313,7 +313,7 @@ const GraphicObject& SvXMLGraphicOutputStream::GetGraphicObject() if( sFirstBytes[0] == 0x1f && sFirstBytes[1] == 0x8b ) { - boost::scoped_ptr<SvMemoryStream> pDest(new SvMemoryStream); + std::unique_ptr<SvMemoryStream> pDest(new SvMemoryStream); ZCodec aZCodec( 0x8000, 0x8000 ); aZCodec.BeginCompression(ZCODEC_DEFAULT_COMPRESSION, false, true); mpOStm->Seek( 0 ); @@ -501,7 +501,7 @@ Graphic SvXMLGraphicHelper::ImplReadGraphic( const OUString& rPictureStorageName SvxGraphicHelperStream_Impl aStream( ImplGetGraphicStream( rPictureStorageName, rPictureStreamName, false ) ); if( aStream.xStream.is() ) { - boost::scoped_ptr<SvStream> pStream(utl::UcbStreamHelper::CreateStream( aStream.xStream )); + std::unique_ptr<SvStream> pStream(utl::UcbStreamHelper::CreateStream( aStream.xStream )); GraphicFilter::GetGraphicFilter().ImportGraphic( aGraphic, "", *pStream ); } @@ -538,7 +538,7 @@ bool SvXMLGraphicHelper::ImplWriteGraphic( const OUString& rPictureStorageName, aAny <<= bCompressed; xProps->setPropertyValue( "Compressed", aAny ); - boost::scoped_ptr<SvStream> pStream(utl::UcbStreamHelper::CreateStream( aStream.xStream )); + std::unique_ptr<SvStream> pStream(utl::UcbStreamHelper::CreateStream( aStream.xStream )); if( bUseGfxLink && aGfxLink.GetDataSize() && aGfxLink.GetData() ) pStream->Write( aGfxLink.GetData(), aGfxLink.GetDataSize() ); else diff --git a/svx/source/xml/xmlxtexp.cxx b/svx/source/xml/xmlxtexp.cxx index 3e301f26ab91..e68c61b0cd43 100644 --- a/svx/source/xml/xmlxtexp.cxx +++ b/svx/source/xml/xmlxtexp.cxx @@ -49,7 +49,7 @@ #include "xmlxtexp.hxx" #include <comphelper/storagehelper.hxx> -#include <boost/scoped_ptr.hpp> +#include <memory> using namespace com::sun::star; using namespace com::sun::star::container; @@ -355,7 +355,7 @@ bool SvxXMLXTableExportComponent::exportTable() throw() char const* pEleName; Type aExportType = mxTable->getElementType(); - boost::scoped_ptr<SvxXMLTableEntryExporter> pExporter; + std::unique_ptr<SvxXMLTableEntryExporter> pExporter; if( aExportType == cppu::UnoType<sal_Int32>::get() ) { diff --git a/svx/source/xoutdev/xexch.cxx b/svx/source/xoutdev/xexch.cxx index 38897751a704..69c0016f9883 100644 --- a/svx/source/xoutdev/xexch.cxx +++ b/svx/source/xoutdev/xexch.cxx @@ -26,7 +26,7 @@ #include <svl/itemset.hxx> #include <svx/xdef.hxx> #include "svx/xexch.hxx" -#include <boost/scoped_ptr.hpp> +#include <memory> /// default CTOR, for Assign() @@ -107,7 +107,7 @@ SvStream& ReadXFillExchangeData( SvStream& rIStm, XFillExchangeData& rData ) if( nWhich ) { - boost::scoped_ptr<SfxPoolItem> pNewItem(rData.pPool->GetDefaultItem( nWhich ).Create( rIStm, nItemVersion )); + std::unique_ptr<SfxPoolItem> pNewItem(rData.pPool->GetDefaultItem( nWhich ).Create( rIStm, nItemVersion )); if( pNewItem ) { diff --git a/svx/source/xoutdev/xtabdash.cxx b/svx/source/xoutdev/xtabdash.cxx index 97635e33420b..32ffa31aa323 100644 --- a/svx/source/xoutdev/xtabdash.cxx +++ b/svx/source/xoutdev/xtabdash.cxx @@ -31,7 +31,7 @@ #include <drawinglayer/attribute/strokeattribute.hxx> #include <drawinglayer/primitive2d/polygonprimitive2d.hxx> #include <drawinglayer/processor2d/processor2dtools.hxx> -#include <boost/scoped_ptr.hpp> +#include <memory> using namespace com::sun::star; @@ -159,7 +159,7 @@ Bitmap XDashList::ImpCreateBitmapForXDash(const XDash* pDash) } // create processor and draw primitives - boost::scoped_ptr<drawinglayer::processor2d::BaseProcessor2D> pProcessor2D(drawinglayer::processor2d::createPixelProcessor2DFromOutputDevice( + std::unique_ptr<drawinglayer::processor2d::BaseProcessor2D> pProcessor2D(drawinglayer::processor2d::createPixelProcessor2DFromOutputDevice( *pVirtualDevice.get(), aNewViewInformation2D)); diff --git a/svx/source/xoutdev/xtabgrdt.cxx b/svx/source/xoutdev/xtabgrdt.cxx index 753cf3f1ada2..213236c965ae 100644 --- a/svx/source/xoutdev/xtabgrdt.cxx +++ b/svx/source/xoutdev/xtabgrdt.cxx @@ -32,7 +32,7 @@ #include <drawinglayer/primitive2d/polygonprimitive2d.hxx> #include <drawinglayer/processor2d/processor2dtools.hxx> #include <basegfx/polygon/b2dpolygontools.hxx> -#include <boost/scoped_ptr.hpp> +#include <memory> using namespace com::sun::star; @@ -190,7 +190,7 @@ Bitmap XGradientList::CreateBitmapForUI( long nIndex ) : DrawModeFlags::Default); // create processor and draw primitives - boost::scoped_ptr<drawinglayer::processor2d::BaseProcessor2D> pProcessor2D(drawinglayer::processor2d::createPixelProcessor2DFromOutputDevice( + std::unique_ptr<drawinglayer::processor2d::BaseProcessor2D> pProcessor2D(drawinglayer::processor2d::createPixelProcessor2DFromOutputDevice( *pVirtualDevice.get(), aNewViewInformation2D)); diff --git a/svx/source/xoutdev/xtabhtch.cxx b/svx/source/xoutdev/xtabhtch.cxx index 9586aa7b2056..90316c15a94c 100644 --- a/svx/source/xoutdev/xtabhtch.cxx +++ b/svx/source/xoutdev/xtabhtch.cxx @@ -31,7 +31,7 @@ #include <drawinglayer/primitive2d/polygonprimitive2d.hxx> #include <drawinglayer/processor2d/processor2dtools.hxx> #include <basegfx/polygon/b2dpolygontools.hxx> -#include <boost/scoped_ptr.hpp> +#include <memory> using namespace ::com::sun::star; @@ -165,7 +165,7 @@ Bitmap XHatchList::CreateBitmapForUI( long nIndex ) } // create processor and draw primitives - boost::scoped_ptr<drawinglayer::processor2d::BaseProcessor2D> pProcessor2D(drawinglayer::processor2d::createPixelProcessor2DFromOutputDevice( + std::unique_ptr<drawinglayer::processor2d::BaseProcessor2D> pProcessor2D(drawinglayer::processor2d::createPixelProcessor2DFromOutputDevice( *pVirtualDevice.get(), aNewViewInformation2D)); diff --git a/svx/source/xoutdev/xtablend.cxx b/svx/source/xoutdev/xtablend.cxx index b5fcaa71693c..0429ca43d1da 100644 --- a/svx/source/xoutdev/xtablend.cxx +++ b/svx/source/xoutdev/xtablend.cxx @@ -31,7 +31,7 @@ #include <drawinglayer/primitive2d/polygonprimitive2d.hxx> #include <drawinglayer/processor2d/processor2dtools.hxx> #include <basegfx/polygon/b2dpolygontools.hxx> -#include <boost/scoped_ptr.hpp> +#include <memory> using namespace com::sun::star; @@ -148,7 +148,7 @@ Bitmap XLineEndList::CreateBitmapForUI( long nIndex ) } // create processor and draw primitives - boost::scoped_ptr<drawinglayer::processor2d::BaseProcessor2D> pProcessor2D(drawinglayer::processor2d::createPixelProcessor2DFromOutputDevice( + std::unique_ptr<drawinglayer::processor2d::BaseProcessor2D> pProcessor2D(drawinglayer::processor2d::createPixelProcessor2DFromOutputDevice( *pVirtualDevice.get(), aNewViewInformation2D)); diff --git a/toolkit/source/controls/unocontrolcontainer.cxx b/toolkit/source/controls/unocontrolcontainer.cxx index 6f5e38f51665..068b62ab2ce5 100644 --- a/toolkit/source/controls/unocontrolcontainer.cxx +++ b/toolkit/source/controls/unocontrolcontainer.cxx @@ -36,7 +36,7 @@ #include <limits> #include <map> -#include <boost/shared_ptr.hpp> +#include <memory> #include <com/sun/star/awt/VclWindowPeerAttribute.hpp> using namespace ::com::sun::star; @@ -65,7 +65,7 @@ class UnoControlHolderList public: typedef sal_Int32 ControlIdentifier; private: - typedef ::boost::shared_ptr< UnoControlHolder > ControlInfo; + typedef std::shared_ptr< UnoControlHolder > ControlInfo; typedef ::std::map< ControlIdentifier, ControlInfo > ControlMap; private: diff --git a/vbahelper/source/vbahelper/vbacommandbarhelper.hxx b/vbahelper/source/vbahelper/vbacommandbarhelper.hxx index 7937e592c87f..08f6f13bc6d2 100644 --- a/vbahelper/source/vbahelper/vbacommandbarhelper.hxx +++ b/vbahelper/source/vbahelper/vbacommandbarhelper.hxx @@ -27,8 +27,7 @@ #include <com/sun/star/container/XIndexAccess.hpp> #include <com/sun/star/container/XNameAccess.hpp> #include <com/sun/star/frame/XLayoutManager.hpp> -#include <boost/shared_ptr.hpp> - +#include <memory> static const char ITEM_DESCRIPTOR_COMMANDURL[] = "CommandURL"; static const char ITEM_DESCRIPTOR_HELPURL[] = "HelpURL"; @@ -47,7 +46,7 @@ static const char CUSTOM_TOOLBAR_STR[] = "custom_toolbar_"; static const char CUSTOM_MENU_STR[] = "vnd.openoffice.org:CustomMenu"; class VbaCommandBarHelper; -typedef ::boost::shared_ptr< VbaCommandBarHelper > VbaCommandBarHelperRef; +typedef std::shared_ptr< VbaCommandBarHelper > VbaCommandBarHelperRef; class VbaCommandBarHelper { diff --git a/writerperfect/qa/unit/WPXSvStreamTest.cxx b/writerperfect/qa/unit/WPXSvStreamTest.cxx index 9be7362ce901..897fb75a0cab 100644 --- a/writerperfect/qa/unit/WPXSvStreamTest.cxx +++ b/writerperfect/qa/unit/WPXSvStreamTest.cxx @@ -11,7 +11,7 @@ #include <cassert> #include <sstream> -#include <boost/shared_ptr.hpp> +#include <memory> #include <cppunit/extensions/HelperMacros.h> @@ -32,7 +32,7 @@ namespace io = com::sun::star::io; namespace ucb = com::sun::star::ucb; namespace uno = com::sun::star::uno; -using boost::shared_ptr; +using std::shared_ptr; using librevenge::RVNGInputStream; using librevenge::RVNG_SEEK_CUR; diff --git a/writerperfect/source/impress/KeynoteImportFilter.cxx b/writerperfect/source/impress/KeynoteImportFilter.cxx index bd51f1df69c5..df7942f5f451 100644 --- a/writerperfect/source/impress/KeynoteImportFilter.cxx +++ b/writerperfect/source/impress/KeynoteImportFilter.cxx @@ -7,7 +7,7 @@ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ -#include <boost/shared_ptr.hpp> +#include <memory> #include <com/sun/star/beans/NamedValue.hpp> #include <com/sun/star/beans/PropertyValue.hpp> #include <com/sun/star/container/XChild.hpp> @@ -33,7 +33,7 @@ #include "KeynoteImportFilter.hxx" -using boost::shared_ptr; +using std::shared_ptr; using com::sun::star::io::XInputStream; using com::sun::star::uno::Any; diff --git a/xmloff/inc/pch/precompiled_xo.hxx b/xmloff/inc/pch/precompiled_xo.hxx index 78573fcf08b3..0a6f16fa9ac0 100644 --- a/xmloff/inc/pch/precompiled_xo.hxx +++ b/xmloff/inc/pch/precompiled_xo.hxx @@ -37,7 +37,6 @@ #include <boost/ptr_container/ptr_vector.hpp> #include <memory> #include <boost/scoped_ptr.hpp> -#include <boost/shared_ptr.hpp> #include <cassert> #include <com/sun/star/animations/AnimationAdditiveMode.hpp> #include <com/sun/star/animations/AnimationCalcMode.hpp> diff --git a/xmloff/source/draw/XMLNumberStyles.cxx b/xmloff/source/draw/XMLNumberStyles.cxx index 2bf25e6a23ea..c85b896a99e4 100644 --- a/xmloff/source/draw/XMLNumberStyles.cxx +++ b/xmloff/source/draw/XMLNumberStyles.cxx @@ -17,7 +17,6 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ -#include <boost/shared_ptr.hpp> #include <tools/debug.hxx> #include <XMLNumberStylesExport.hxx> #include <XMLNumberStylesImport.hxx> @@ -486,7 +485,7 @@ private: bool mbTextual; bool mbDecimal02; OUString maText; - boost::shared_ptr< SvXMLImportContext > mpSlaveContext; + std::shared_ptr< SvXMLImportContext > mpSlaveContext; public: TYPEINFO_OVERRIDE(); diff --git a/xmloff/source/draw/shapeexport.cxx b/xmloff/source/draw/shapeexport.cxx index 51d2c952e5f7..66b82273ccd4 100644 --- a/xmloff/source/draw/shapeexport.cxx +++ b/xmloff/source/draw/shapeexport.cxx @@ -113,7 +113,7 @@ #include "xexptran.hxx" #include "XMLBase64Export.hxx" #include "XMLImageMapExport.hxx" -#include <boost/scoped_ptr.hpp> +#include <memory> #include <config_features.h> @@ -585,7 +585,7 @@ void XMLShapeExport::exportShape(const uno::Reference< drawing::XShape >& xShape sal_Int32 nZIndex = 0; uno::Reference< beans::XPropertySet > xSet( xShape, uno::UNO_QUERY ); - boost::scoped_ptr< SvXMLElementExport > mpHyperlinkElement; + std::unique_ptr< SvXMLElementExport > mpHyperlinkElement; // export hyperlinks with <a><shape/></a>. Currently only in draw since draw // does not support document events diff --git a/xmloff/source/style/PageMasterImportPropMapper.cxx b/xmloff/source/style/PageMasterImportPropMapper.cxx index de381ceaff65..b408c6a2c261 100644 --- a/xmloff/source/style/PageMasterImportPropMapper.cxx +++ b/xmloff/source/style/PageMasterImportPropMapper.cxx @@ -25,7 +25,7 @@ #include <com/sun/star/table/BorderLine2.hpp> #include <com/sun/star/container/XNameContainer.hpp> #include <xmloff/xmlimp.hxx> -#include <boost/scoped_ptr.hpp> +#include <memory> #define XML_LINE_LEFT 0 #define XML_LINE_RIGHT 1 @@ -50,7 +50,7 @@ PageMasterImportPropertyMapper::~PageMasterImportPropertyMapper() bool PageMasterImportPropertyMapper::handleSpecialItem( XMLPropertyState& rProperty, - ::std::vector< XMLPropertyState >& rProperties, + std::vector< XMLPropertyState >& rProperties, const OUString& rValue, const SvXMLUnitConverter& rUnitConverter, const SvXMLNamespaceMap& rNamespaceMap ) const @@ -82,7 +82,7 @@ bool PageMasterImportPropertyMapper::handleSpecialItem( } -void PageMasterImportPropertyMapper::finished(::std::vector< XMLPropertyState >& rProperties, sal_Int32 nStartIndex, sal_Int32 nEndIndex ) const +void PageMasterImportPropertyMapper::finished(std::vector< XMLPropertyState >& rProperties, sal_Int32 nStartIndex, sal_Int32 nEndIndex ) const { SvXMLImportPropertyMapper::finished(rProperties, nStartIndex, nEndIndex); XMLPropertyState* pAllPaddingProperty = NULL; @@ -111,22 +111,22 @@ void PageMasterImportPropertyMapper::finished(::std::vector< XMLPropertyState >& XMLPropertyState* pFooterBorderWidths[4] = { NULL, NULL, NULL, NULL }; XMLPropertyState* pHeaderHeight = NULL; XMLPropertyState* pHeaderMinHeight = NULL; - boost::scoped_ptr<XMLPropertyState> xHeaderDynamic; + std::unique_ptr<XMLPropertyState> xHeaderDynamic; XMLPropertyState* pFooterHeight = NULL; XMLPropertyState* pFooterMinHeight = NULL; - boost::scoped_ptr<XMLPropertyState> xFooterDynamic; + std::unique_ptr<XMLPropertyState> xFooterDynamic; XMLPropertyState* pAllMarginProperty = NULL; XMLPropertyState* pMargins[4] = { NULL, NULL, NULL, NULL }; - ::std::unique_ptr<XMLPropertyState> pNewMargins[4]; + std::unique_ptr<XMLPropertyState> pNewMargins[4]; XMLPropertyState* pAllHeaderMarginProperty = NULL; XMLPropertyState* pHeaderMargins[4] = { NULL, NULL, NULL, NULL }; - ::std::unique_ptr<XMLPropertyState> pNewHeaderMargins[4]; + std::unique_ptr<XMLPropertyState> pNewHeaderMargins[4]; XMLPropertyState* pAllFooterMarginProperty = NULL; XMLPropertyState* pFooterMargins[4] = { NULL, NULL, NULL, NULL }; - ::std::unique_ptr<XMLPropertyState> pNewFooterMargins[4]; + std::unique_ptr<XMLPropertyState> pNewFooterMargins[4]; - ::std::vector< XMLPropertyState >::iterator aEnd = rProperties.end(); - for (::std::vector< XMLPropertyState >::iterator aIter = rProperties.begin(); aIter != aEnd; ++aIter) + std::vector< XMLPropertyState >::iterator aEnd = rProperties.end(); + for (std::vector< XMLPropertyState >::iterator aIter = rProperties.begin(); aIter != aEnd; ++aIter) { XMLPropertyState *property = &(*aIter); sal_Int16 nContextID = getPropertySetMapper()->GetEntryContextId(property->mnIndex); diff --git a/xmloff/source/style/styleexp.cxx b/xmloff/source/style/styleexp.cxx index 8ca89b6f6507..7ea0ba1e23c2 100644 --- a/xmloff/source/style/styleexp.cxx +++ b/xmloff/source/style/styleexp.cxx @@ -39,8 +39,8 @@ #include <xmloff/xmlexp.hxx> #include <xmloff/XMLEventExport.hxx> #include <xmloff/maptype.hxx> +#include <memory> #include <set> -#include <boost/scoped_ptr.hpp> using namespace ::com::sun::star; using namespace ::com::sun::star::uno; @@ -398,7 +398,7 @@ void XMLStyleExport::exportStyleFamily( // If next styles are supported and used styles should be exported only, // the next style may be unused but has to be exported, too. In this case // the names of all exported styles are remembered. - boost::scoped_ptr<std::set<OUString> > pExportedStyles(0); + std::unique_ptr<std::set<OUString> > pExportedStyles(nullptr); bool bFirstStyle = true; const uno::Sequence< OUString> aSeq = xStyleCont->getElementNames(); diff --git a/xmlscript/source/xmldlg_imexp/imp_share.hxx b/xmlscript/source/xmldlg_imexp/imp_share.hxx index e09a72b9c2df..78754058167e 100644 --- a/xmlscript/source/xmldlg_imexp/imp_share.hxx +++ b/xmlscript/source/xmldlg_imexp/imp_share.hxx @@ -41,8 +41,8 @@ #include <com/sun/star/container/ElementExistException.hpp> #include <com/sun/star/lang/WrappedTargetRuntimeException.hpp> #include <osl/diagnose.h> +#include <memory> #include <vector> -#include <boost/shared_ptr.hpp> namespace xmlscript { @@ -118,8 +118,8 @@ struct DialogImport css::uno::Reference< css::uno::XComponentContext > _xContext; css::uno::Reference< css::util::XNumberFormatsSupplier > _xSupplier; - ::boost::shared_ptr< ::std::vector< OUString > > _pStyleNames; - ::boost::shared_ptr< ::std::vector< css::uno::Reference< css::xml::input::XElement > > > _pStyles; + std::shared_ptr< std::vector< OUString > > _pStyleNames; + std::shared_ptr< std::vector< css::uno::Reference< css::xml::input::XElement > > > _pStyles; css::uno::Reference< css::container::XNameContainer > _xDialogModel; css::uno::Reference< css::lang::XMultiServiceFactory > _xDialogModelFactory; @@ -151,8 +151,8 @@ public: css::uno::Reference<css::uno::XComponentContext> const & xContext, css::uno::Reference<css::container::XNameContainer> const & xDialogModel, - ::boost::shared_ptr< ::std::vector< OUString > >& pStyleNames, - ::boost::shared_ptr< ::std::vector< css::uno::Reference< css::xml::input::XElement > > >& pStyles, + std::shared_ptr< std::vector< OUString > >& pStyleNames, + std::shared_ptr< std::vector< css::uno::Reference< css::xml::input::XElement > > >& pStyles, css::uno::Reference<css::frame::XModel> const & xDoc ) : _xContext( xContext ) , _pStyleNames( pStyleNames ) @@ -330,8 +330,8 @@ public: class MenuPopupElement : public ElementBase { - ::std::vector< OUString > _itemValues; - ::std::vector< sal_Int16 > _itemSelected; + std::vector< OUString > _itemValues; + std::vector< sal_Int16 > _itemSelected; public: css::uno::Sequence< OUString > getItemValues(); css::uno::Sequence< sal_Int16 > getSelectedItems(); @@ -359,7 +359,7 @@ class ControlElement protected: sal_Int32 _nBasePosX, _nBasePosY; - ::std::vector< css::uno::Reference< css::xml::input::XElement > > _events; + std::vector< css::uno::Reference< css::xml::input::XElement > > _events; OUString getControlId( css::uno::Reference<css::xml::input::XAttributes> const & xAttributes ); @@ -369,7 +369,7 @@ protected: css::uno::Reference< css::xml::input::XElement > getStyle( css::uno::Reference<css::xml::input::XAttributes> const & xAttributes ); public: - ::std::vector<css::uno::Reference< css::xml::input::XElement> >& getEvents() + std::vector<css::uno::Reference< css::xml::input::XElement> >& getEvents() { return _events; } ControlElement( @@ -404,7 +404,7 @@ public: css::uno::Reference< css::xml::input::XAttributes > const & xAttributes, bool supportPrintable = true ); void importEvents( - ::std::vector< css::uno::Reference< css::xml::input::XElement > > + std::vector< css::uno::Reference< css::xml::input::XElement > > const & rEvents ); bool importStringProperty( @@ -669,7 +669,7 @@ public: class RadioGroupElement : public ControlElement { - ::std::vector< css::uno::Reference< css::xml::input::XElement > > _radios; + std::vector< css::uno::Reference< css::xml::input::XElement > > _radios; public: virtual css::uno::Reference< css::xml::input::XElement > SAL_CALL startChildElement( @@ -691,7 +691,7 @@ class TitledBoxElement : public BulletinBoardElement { OUString _label; - ::std::vector< css::uno::Reference< css::xml::input::XElement > > _radios; + std::vector< css::uno::Reference< css::xml::input::XElement > > _radios; public: virtual css::uno::Reference< css::xml::input::XElement > SAL_CALL startChildElement( diff --git a/xmlscript/source/xmldlg_imexp/xmldlg_import.cxx b/xmlscript/source/xmldlg_imexp/xmldlg_import.cxx index 4619050c910c..e5ad4dc3dee8 100644 --- a/xmlscript/source/xmldlg_imexp/xmldlg_import.cxx +++ b/xmlscript/source/xmldlg_imexp/xmldlg_import.cxx @@ -1450,7 +1450,7 @@ extern StringTriple const * const g_pEventTranslations; StringTriple const * const g_pEventTranslations = s_aEventTranslations; void ImportContext::importEvents( - ::std::vector< Reference< xml::input::XElement > > const & rEvents ) + std::vector< Reference< xml::input::XElement > > const & rEvents ) { Reference< script::XScriptEventsSupplier > xSupplier( _xControlModel, UNO_QUERY ); @@ -1826,8 +1826,8 @@ Reference< xml::sax::XDocumentHandler > SAL_CALL importDialogModel( Reference< XModel > const & xDocument ) { // single set of styles and stylenames apply to all containees - :: boost::shared_ptr< ::std::vector< OUString > > pStyleNames( new ::std::vector< OUString > ); - :: boost::shared_ptr< ::std::vector< css::uno::Reference< css::xml::input::XElement > > > pStyles( new ::std::vector< css::uno::Reference< css::xml::input::XElement > > ); + std::shared_ptr< std::vector< OUString > > pStyleNames( new std::vector< OUString > ); + std::shared_ptr< std::vector< css::uno::Reference< css::xml::input::XElement > > > pStyles( new std::vector< css::uno::Reference< css::xml::input::XElement > > ); return ::xmlscript::createDocumentHandler( static_cast< xml::input::XRoot * >( new DialogImport( xContext, xDialogModel, pStyleNames, pStyles, xDocument ) ) ); |