diff options
author | Caolán McNamara <caolanm@redhat.com> | 2015-09-17 15:41:33 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2015-09-17 17:01:14 +0100 |
commit | 6f495a195b794257e8b1302d384148be43c04cee (patch) | |
tree | c0ef4b8eeed1b1bb2e8da0deffac0a74b2eb5467 /sd/source/ui | |
parent | 74efa4f0e87e2b5fe7a577fa4673cb947c947c74 (diff) |
boost->std
Change-Id: I1e6a7fd66f90e6acd803c6cd464f1d73252f7bcb
Diffstat (limited to 'sd/source/ui')
218 files changed, 947 insertions, 987 deletions
diff --git a/sd/source/ui/animations/CustomAnimationDialog.cxx b/sd/source/ui/animations/CustomAnimationDialog.cxx index 032273a1a8b5..bb5e9890a61c 100644 --- a/sd/source/ui/animations/CustomAnimationDialog.cxx +++ b/sd/source/ui/animations/CustomAnimationDialog.cxx @@ -32,7 +32,7 @@ #include <com/sun/star/media/XManager.hpp> #include <com/sun/star/media/XPlayer.hpp> -#include <boost/shared_ptr.hpp> +#include <memory> #include <comphelper/processfactory.hxx> #include <i18nutil/unicode.hxx> diff --git a/sd/source/ui/animations/CustomAnimationList.hxx b/sd/source/ui/animations/CustomAnimationList.hxx index 58892a0f9607..851ea6756d0f 100644 --- a/sd/source/ui/animations/CustomAnimationList.hxx +++ b/sd/source/ui/animations/CustomAnimationList.hxx @@ -29,7 +29,7 @@ namespace sd { class CustomAnimationEffect; -typedef boost::shared_ptr< CustomAnimationEffect > CustomAnimationEffectPtr; +typedef std::shared_ptr< CustomAnimationEffect > CustomAnimationEffectPtr; class ICustomAnimationListController { diff --git a/sd/source/ui/animations/CustomAnimationPane.cxx b/sd/source/ui/animations/CustomAnimationPane.cxx index 7b626e2e23a3..9081eafde016 100644 --- a/sd/source/ui/animations/CustomAnimationPane.cxx +++ b/sd/source/ui/animations/CustomAnimationPane.cxx @@ -76,12 +76,12 @@ #include "drawdoc.hxx" #include "app.hrc" -#include <algorithm> - #include <basegfx/polygon/b2dpolypolygontools.hxx> #include <basegfx/matrix/b2dhommatrix.hxx> #include <basegfx/range/b2drange.hxx> -#include <boost/scoped_ptr.hpp> + +#include <algorithm> +#include <memory> using namespace ::com::sun::star; using namespace ::com::sun::star::animations; @@ -741,7 +741,7 @@ void CustomAnimationPane::updateMotionPathTags() if( mxView.is() ) { - ::boost::shared_ptr<ViewShell> xViewShell( mrBase.GetMainViewShell() ); + std::shared_ptr<ViewShell> xViewShell( mrBase.GetMainViewShell() ); if( xViewShell.get() ) pView = xViewShell->GetView(); } diff --git a/sd/source/ui/animations/SlideTransitionPane.cxx b/sd/source/ui/animations/SlideTransitionPane.cxx index 4bc66133af1d..c527ff52169a 100644 --- a/sd/source/ui/animations/SlideTransitionPane.cxx +++ b/sd/source/ui/animations/SlideTransitionPane.cxx @@ -528,7 +528,7 @@ void SlideTransitionPane::onChangeCurrentPage() { ::sd::slidesorter::SlideSorterViewShell * pSlideSorterViewShell = ::sd::slidesorter::SlideSorterViewShell::GetSlideSorter(mrBase); - ::boost::shared_ptr<sd::slidesorter::SlideSorterViewShell::PageSelection> pSelection; + std::shared_ptr<sd::slidesorter::SlideSorterViewShell::PageSelection> pSelection; if( pSlideSorterViewShell ) { diff --git a/sd/source/ui/annotations/annotationmanager.cxx b/sd/source/ui/annotations/annotationmanager.cxx index a93d010c13d8..da82d3cc9c27 100644 --- a/sd/source/ui/annotations/annotationmanager.cxx +++ b/sd/source/ui/annotations/annotationmanager.cxx @@ -81,7 +81,7 @@ #include "textapi.hxx" #include "optsitem.hxx" -#include <boost/scoped_ptr.hpp> +#include <memory> using namespace ::com::sun::star; using namespace ::com::sun::star::uno; @@ -426,7 +426,7 @@ void AnnotationManagerImpl::ExecuteReplyToAnnotation( SfxRequest& rReq ) TextApiObject* pTextApi = getTextApiObject( xAnnotation ); if( pTextApi ) { - boost::scoped_ptr< ::Outliner > pOutliner( new ::Outliner(GetAnnotationPool(),OUTLINERMODE_TEXTOBJECT) ); + std::unique_ptr< ::Outliner > pOutliner( new ::Outliner(GetAnnotationPool(),OUTLINERMODE_TEXTOBJECT) ); mpDoc->SetCalcFieldValueHdl( pOutliner.get() ); pOutliner->SetUpdateMode( true ); @@ -462,7 +462,7 @@ void AnnotationManagerImpl::ExecuteReplyToAnnotation( SfxRequest& rReq ) pOutliner->QuickSetAttribs( aAnswerSet, aSel ); } - boost::scoped_ptr< OutlinerParaObject > pOPO( pOutliner->CreateParaObject() ); + std::unique_ptr< OutlinerParaObject > pOPO( pOutliner->CreateParaObject() ); pTextApi->SetText( *pOPO.get() ); SvtUserOptions aUserOptions; @@ -668,7 +668,7 @@ void AnnotationManagerImpl::SelectNextAnnotation(bool bForeward) if( pPage && !pPage->getAnnotations().empty() ) { // switch to next/previous slide with annotations - ::boost::shared_ptr<DrawViewShell> pDrawViewShell(::boost::dynamic_pointer_cast<DrawViewShell>(mrBase.GetMainViewShell())); + std::shared_ptr<DrawViewShell> pDrawViewShell(std::dynamic_pointer_cast<DrawViewShell>(mrBase.GetMainViewShell())); if (pDrawViewShell.get() != NULL) { pDrawViewShell->ChangeEditMode(pPage->IsMasterPage() ? EM_MASTERPAGE : EM_PAGE, false); @@ -912,7 +912,7 @@ void AnnotationManagerImpl::ExecuteAnnotationContextMenu( Reference< XAnnotation if( bReadOnly && !pAnnotationWindow ) return; - boost::scoped_ptr< PopupMenu > pMenu( new PopupMenu( SdResId( pAnnotationWindow ? RID_ANNOTATION_CONTEXTMENU : RID_ANNOTATION_TAG_CONTEXTMENU ) ) ); + std::unique_ptr< PopupMenu > pMenu( new PopupMenu( SdResId( pAnnotationWindow ? RID_ANNOTATION_CONTEXTMENU : RID_ANNOTATION_TAG_CONTEXTMENU ) ) ); SvtUserOptions aUserOptions; OUString sCurrentAuthor( aUserOptions.GetFullName() ); diff --git a/sd/source/ui/annotations/annotationwindow.cxx b/sd/source/ui/annotations/annotationwindow.cxx index afc114cd7ee1..693f84e5aee5 100644 --- a/sd/source/ui/annotations/annotationwindow.cxx +++ b/sd/source/ui/annotations/annotationwindow.cxx @@ -85,7 +85,7 @@ #include "textapi.hxx" #include "sdresid.hxx" -#include <boost/scoped_ptr.hpp> +#include <memory> using namespace ::sd; using namespace ::com::sun::star; @@ -541,7 +541,7 @@ void AnnotationWindow::setAnnotation( const Reference< XAnnotation >& xAnnotatio if( pTextApi ) { - boost::scoped_ptr< OutlinerParaObject > pOPO( pTextApi->CreateText() ); + std::unique_ptr< OutlinerParaObject > pOPO( pTextApi->CreateText() ); Engine()->SetText( *pOPO.get() ); } diff --git a/sd/source/ui/app/sdmod1.cxx b/sd/source/ui/app/sdmod1.cxx index 9613ea63befb..1456939a2007 100644 --- a/sd/source/ui/app/sdmod1.cxx +++ b/sd/source/ui/app/sdmod1.cxx @@ -59,7 +59,6 @@ #include "FrameView.hxx" #include "FactoryIds.hxx" #include "sdabstdlg.hxx" -#include <boost/shared_ptr.hpp> #include <memory> #include "slideshow.hxx" @@ -85,7 +84,7 @@ public: private: ::sd::ViewShellBase& mrBase; SdDrawDocument& mrDocument; - ::boost::shared_ptr<SvMemoryStream> mpStream; + std::shared_ptr<SvMemoryStream> mpStream; }; } //end of anonymous namespace @@ -294,7 +293,7 @@ bool SdModule::OutlineToImpress(SfxRequest& rRequest) = dynamic_cast< ::sd::ViewShellBase*>(pViewFrame->GetViewShell()); if (pBase != NULL) { - ::boost::shared_ptr<FrameworkHelper> pHelper ( + std::shared_ptr<FrameworkHelper> pHelper ( FrameworkHelper::Instance(*pBase)); pHelper->RequestView( FrameworkHelper::msOutlineViewURL, @@ -556,7 +555,7 @@ SfxFrame* SdModule::ExecuteNewDocument( SfxRequest& rReq ) else { SdAbstractDialogFactory* pFact = SdAbstractDialogFactory::Create(); - boost::scoped_ptr< AbstractAssistentDlg > pPilotDlg( pFact ? pFact->CreateAssistentDlg( NULL, !bNewDocDirect ) : 0 ); + std::unique_ptr< AbstractAssistentDlg > pPilotDlg( pFact ? pFact->CreateAssistentDlg( NULL, !bNewDocDirect ) : 0 ); // Open the Pilot if( pPilotDlg.get() && pPilotDlg->Execute()==RET_OK ) @@ -626,7 +625,7 @@ SfxFrame* SdModule::ExecuteNewDocument( SfxRequest& rReq ) pOpt->SetStartWithTemplate(bStartWithTemplate); if(bNewDocDirect && !bStartWithTemplate) { - boost::scoped_ptr< SfxItemSet > pRet( CreateItemSet( SID_SD_EDITOPTIONS ) ); + std::unique_ptr< SfxItemSet > pRet( CreateItemSet( SID_SD_EDITOPTIONS ) ); if(pRet.get()) ApplyItemSet( SID_SD_EDITOPTIONS, *pRet.get() ); @@ -644,7 +643,7 @@ SfxFrame* SdModule::ExecuteNewDocument( SfxRequest& rReq ) if(bNewDocDirect && !bStartWithTemplate) { - boost::scoped_ptr< SfxItemSet > pRet( CreateItemSet( SID_SD_EDITOPTIONS ) ); + std::unique_ptr< SfxItemSet > pRet( CreateItemSet( SID_SD_EDITOPTIONS ) ); if(pRet.get()) ApplyItemSet( SID_SD_EDITOPTIONS, *pRet.get() ); } @@ -661,7 +660,7 @@ SfxFrame* SdModule::ExecuteNewDocument( SfxRequest& rReq ) if (pDoc && pBase) { - ::boost::shared_ptr<sd::ViewShell> pViewSh = pBase->GetMainViewShell(); + std::shared_ptr<sd::ViewShell> pViewSh = pBase->GetMainViewShell(); SdOptions* pOptions = GetSdOptions(pDoc->GetDocumentType()); if (pOptions && pViewSh.get()) diff --git a/sd/source/ui/app/sdxfer.cxx b/sd/source/ui/app/sdxfer.cxx index 27c72a30a3f5..f82d9da4d72d 100644 --- a/sd/source/ui/app/sdxfer.cxx +++ b/sd/source/ui/app/sdxfer.cxx @@ -751,7 +751,7 @@ sal_Int64 SAL_CALL SdTransferable::getSomething( const ::com::sun::star::uno::Se return nRet; } -void SdTransferable::AddUserData (const ::boost::shared_ptr<UserData>& rpData) +void SdTransferable::AddUserData (const std::shared_ptr<UserData>& rpData) { maUserData.push_back(rpData); } @@ -761,12 +761,12 @@ sal_Int32 SdTransferable::GetUserDataCount() const return maUserData.size(); } -::boost::shared_ptr<SdTransferable::UserData> SdTransferable::GetUserData (const sal_Int32 nIndex) const +std::shared_ptr<SdTransferable::UserData> SdTransferable::GetUserData (const sal_Int32 nIndex) const { if (nIndex>=0 && nIndex<sal_Int32(maUserData.size())) return maUserData[nIndex]; else - return ::boost::shared_ptr<UserData>(); + return std::shared_ptr<UserData>(); } namespace diff --git a/sd/source/ui/dlg/RemoteDialogClientBox.cxx b/sd/source/ui/dlg/RemoteDialogClientBox.cxx index 527ef5855a41..c4679e6f3072 100644 --- a/sd/source/ui/dlg/RemoteDialogClientBox.cxx +++ b/sd/source/ui/dlg/RemoteDialogClientBox.cxx @@ -41,7 +41,7 @@ namespace sd { // struct ClientBoxEntry -ClientBoxEntry::ClientBoxEntry( ::boost::shared_ptr<ClientInfo> pClientInfo ) : +ClientBoxEntry::ClientBoxEntry( std::shared_ptr<ClientInfo> pClientInfo ) : m_bActive( false ), m_pClientInfo( pClientInfo ) { @@ -632,7 +632,7 @@ bool ClientBox::Notify( NotifyEvent& rNEvt ) return true; } -long ClientBox::addEntry( ::boost::shared_ptr<ClientInfo> pClientInfo ) +long ClientBox::addEntry( std::shared_ptr<ClientInfo> pClientInfo ) { long nPos = 0; @@ -691,11 +691,11 @@ void ClientBox::populateEntries() #ifdef ENABLE_SDREMOTE RemoteServer::ensureDiscoverable(); - vector< ::boost::shared_ptr< ClientInfo > > aClients( RemoteServer::getClients() ); + vector< std::shared_ptr< ClientInfo > > aClients( RemoteServer::getClients() ); - const vector< ::boost::shared_ptr<ClientInfo > >::const_iterator aEnd( aClients.end() ); + const vector< std::shared_ptr<ClientInfo > >::const_iterator aEnd( aClients.end() ); - for ( vector< ::boost::shared_ptr< ClientInfo > >::const_iterator aIt( aClients.begin() ); + for ( vector< std::shared_ptr< ClientInfo > >::const_iterator aIt( aClients.begin() ); aIt != aEnd; ++aIt ) { addEntry( *aIt ); diff --git a/sd/source/ui/dlg/RemoteDialogClientBox.hxx b/sd/source/ui/dlg/RemoteDialogClientBox.hxx index a00e36e1ed47..8b35f1bb8f44 100644 --- a/sd/source/ui/dlg/RemoteDialogClientBox.hxx +++ b/sd/source/ui/dlg/RemoteDialogClientBox.hxx @@ -34,7 +34,7 @@ #include "com/sun/star/lang/XEventListener.hpp" #include "com/sun/star/deployment/XPackage.hpp" -#include <boost/shared_ptr.hpp> +#include <memory> #include "sdresid.hxx" @@ -52,14 +52,14 @@ namespace sd { struct ClientBoxEntry; struct ClientInfo; -typedef boost::shared_ptr<ClientBoxEntry> TClientBoxEntry; +typedef std::shared_ptr<ClientBoxEntry> TClientBoxEntry; struct ClientBoxEntry { bool m_bActive :1; - boost::shared_ptr<ClientInfo> m_pClientInfo; + std::shared_ptr<ClientInfo> m_pClientInfo; - ClientBoxEntry(boost::shared_ptr<ClientInfo> pClientInfo); + ClientBoxEntry(std::shared_ptr<ClientInfo> pClientInfo); ~ClientBoxEntry(); }; @@ -159,7 +159,7 @@ public: void RemoveUnlocked(); void selectEntry( const long nPos ); - long addEntry(boost::shared_ptr<ClientInfo> pClientInfo); + long addEntry(std::shared_ptr<ClientInfo> pClientInfo); void clearEntries(); void prepareChecking(); diff --git a/sd/source/ui/dlg/sdpreslt.cxx b/sd/source/ui/dlg/sdpreslt.cxx index 0776519fadb1..c8a5177c9d98 100644 --- a/sd/source/ui/dlg/sdpreslt.cxx +++ b/sd/source/ui/dlg/sdpreslt.cxx @@ -29,7 +29,7 @@ #include "drawdoc.hxx" #include "sdpage.hxx" #include "DrawDocShell.hxx" -#include <boost/scoped_ptr.hpp> +#include <memory> SdPresLayoutDlg::SdPresLayoutDlg(::sd::DrawDocShell* pDocShell, vcl::Window* pWindow, const SfxItemSet& rInAttrs) diff --git a/sd/source/ui/dlg/sdtreelb.cxx b/sd/source/ui/dlg/sdtreelb.cxx index a04069b58b4a..042d38e0a45b 100644 --- a/sd/source/ui/dlg/sdtreelb.cxx +++ b/sd/source/ui/dlg/sdtreelb.cxx @@ -1586,7 +1586,7 @@ void SdPageObjsTLB::AddShapeToTransferable ( if (pBase->GetDocShell() != &rDocShell) continue; - const ::boost::shared_ptr<sd::ViewShell> pViewShell (pBase->GetMainViewShell()); + const std::shared_ptr<sd::ViewShell> pViewShell (pBase->GetMainViewShell()); if (pViewShell) return pViewShell.get(); } diff --git a/sd/source/ui/docshell/docshel3.cxx b/sd/source/ui/docshell/docshel3.cxx index 567bcdb520a6..9e5b3ab66208 100644 --- a/sd/source/ui/docshell/docshel3.cxx +++ b/sd/source/ui/docshell/docshel3.cxx @@ -56,7 +56,7 @@ #include "View.hxx" #include "slideshow.hxx" #include "fuhhconv.hxx" -#include <boost/scoped_ptr.hpp> +#include <memory> using namespace ::com::sun::star; using namespace ::com::sun::star::beans; @@ -282,7 +282,7 @@ void DrawDocShell::Execute( SfxRequest& rReq ) SfxAbstractDialogFactory* pFact = SfxAbstractDialogFactory::Create(); if (pFact && mpViewShell) { - boost::scoped_ptr<VclAbstractDialog> pDlg(pFact->CreateVclDialog( mpViewShell->GetActiveWindow(), SID_LANGUAGE_OPTIONS )); + std::unique_ptr<VclAbstractDialog> pDlg(pFact->CreateVclDialog( mpViewShell->GetActiveWindow(), SID_LANGUAGE_OPTIONS )); pDlg->Execute(); } } diff --git a/sd/source/ui/docshell/docshel4.cxx b/sd/source/ui/docshell/docshel4.cxx index 93de709e9b24..e80bb8952eeb 100644 --- a/sd/source/ui/docshell/docshel4.cxx +++ b/sd/source/ui/docshell/docshel4.cxx @@ -768,7 +768,7 @@ bool DrawDocShell::GotoBookmark(const OUString& rBookmark) } if (!sViewURL.isEmpty()) { - ::boost::shared_ptr<FrameworkHelper> pHelper ( + std::shared_ptr<FrameworkHelper> pHelper ( FrameworkHelper::Instance(rBase)); pHelper->RequestView( sViewURL, diff --git a/sd/source/ui/docshell/docshell.cxx b/sd/source/ui/docshell/docshell.cxx index ca32796f60db..ecc5e6c51c3f 100644 --- a/sd/source/ui/docshell/docshell.cxx +++ b/sd/source/ui/docshell/docshell.cxx @@ -445,7 +445,7 @@ void DrawDocShell::ClearUndoBuffer() ViewShellBase* pViewShellBase = dynamic_cast< ViewShellBase* >( pSfxViewFrame->GetViewShell() ); if( pViewShellBase ) { - ::boost::shared_ptr<ViewShell> pViewSh( pViewShellBase->GetMainViewShell() ); + std::shared_ptr<ViewShell> pViewSh( pViewShellBase->GetMainViewShell() ); if( pViewSh.get() ) { ::sd::View* pView = pViewSh->GetView(); diff --git a/sd/source/ui/framework/configuration/ChangeRequestQueueProcessor.cxx b/sd/source/ui/framework/configuration/ChangeRequestQueueProcessor.cxx index 975e593ad27e..7db8da3b573f 100644 --- a/sd/source/ui/framework/configuration/ChangeRequestQueueProcessor.cxx +++ b/sd/source/ui/framework/configuration/ChangeRequestQueueProcessor.cxx @@ -52,7 +52,7 @@ namespace sd { namespace framework { ChangeRequestQueueProcessor::ChangeRequestQueueProcessor ( const ::rtl::Reference<ConfigurationController>& rpConfigurationController, - const ::boost::shared_ptr<ConfigurationUpdater>& rpConfigurationUpdater) + const std::shared_ptr<ConfigurationUpdater>& rpConfigurationUpdater) : maMutex(), maQueue(), mnUserEventId(0), diff --git a/sd/source/ui/framework/configuration/ChangeRequestQueueProcessor.hxx b/sd/source/ui/framework/configuration/ChangeRequestQueueProcessor.hxx index 696635d2e6c6..fa0263af47d2 100644 --- a/sd/source/ui/framework/configuration/ChangeRequestQueueProcessor.hxx +++ b/sd/source/ui/framework/configuration/ChangeRequestQueueProcessor.hxx @@ -29,7 +29,7 @@ #include <cppuhelper/interfacecontainer.hxx> #include <tools/link.hxx> -#include <boost/shared_ptr.hpp> +#include <memory> struct ImplSVEvent; @@ -56,7 +56,7 @@ public: */ ChangeRequestQueueProcessor ( const ::rtl::Reference<ConfigurationController>& rxController, - const ::boost::shared_ptr<ConfigurationUpdater>& rpUpdater); + const std::shared_ptr<ConfigurationUpdater>& rpUpdater); ~ChangeRequestQueueProcessor(); /** Sets the configuration who will be changed by subsequent change @@ -112,7 +112,7 @@ private: ::rtl::Reference<ConfigurationController> mpConfigurationController; - ::boost::shared_ptr<ConfigurationUpdater> mpConfigurationUpdater; + std::shared_ptr<ConfigurationUpdater> mpConfigurationUpdater; /** Initiate the processing of the entries in the queue. The actual processing starts asynchronously. diff --git a/sd/source/ui/framework/configuration/ConfigurationController.cxx b/sd/source/ui/framework/configuration/ConfigurationController.cxx index 54f526ebab8b..1dab1de52722 100644 --- a/sd/source/ui/framework/configuration/ConfigurationController.cxx +++ b/sd/source/ui/framework/configuration/ConfigurationController.cxx @@ -58,7 +58,7 @@ public: /** The Broadcaster class implements storing and calling of listeners. */ - ::boost::shared_ptr<ConfigurationControllerBroadcaster> mpBroadcaster; + std::shared_ptr<ConfigurationControllerBroadcaster> mpBroadcaster; /** The requested configuration which is modified (asynchronously) by calls to requestResourceActivation() and @@ -70,18 +70,18 @@ public: ViewShellBase* mpBase; - ::boost::shared_ptr<ResourceFactoryManager> mpResourceFactoryContainer; + std::shared_ptr<ResourceFactoryManager> mpResourceFactoryContainer; - ::boost::shared_ptr<ConfigurationControllerResourceManager> mpResourceManager; + std::shared_ptr<ConfigurationControllerResourceManager> mpResourceManager; - ::boost::shared_ptr<ConfigurationUpdater> mpConfigurationUpdater; + std::shared_ptr<ConfigurationUpdater> mpConfigurationUpdater; /** The queue processor ownes the queue of configuration change request objects and processes the objects. */ - ::boost::scoped_ptr<ChangeRequestQueueProcessor> mpQueueProcessor; + std::unique_ptr<ChangeRequestQueueProcessor> mpQueueProcessor; - ::boost::shared_ptr<ConfigurationUpdaterLock> mpConfigurationUpdaterLock; + std::shared_ptr<ConfigurationUpdaterLock> mpConfigurationUpdaterLock; sal_Int32 mnLockCount; }; @@ -420,7 +420,7 @@ void SAL_CALL ConfigurationController::restoreConfiguration ( // We will probably be making a couple of activation and deactivation // requests so lock the configuration controller and let it later update // all changes at once. - ::boost::shared_ptr<ConfigurationUpdaterLock> pLock ( + std::shared_ptr<ConfigurationUpdaterLock> pLock ( mpImplementation->mpConfigurationUpdater->GetLock()); // Get lists of resources that are to be activated or deactivated. diff --git a/sd/source/ui/framework/configuration/ConfigurationControllerResourceManager.cxx b/sd/source/ui/framework/configuration/ConfigurationControllerResourceManager.cxx index 5e0e92864b15..9d23701fc5cd 100644 --- a/sd/source/ui/framework/configuration/ConfigurationControllerResourceManager.cxx +++ b/sd/source/ui/framework/configuration/ConfigurationControllerResourceManager.cxx @@ -35,8 +35,8 @@ namespace sd { namespace framework { //===== ConfigurationControllerResourceManager ================================ ConfigurationControllerResourceManager::ConfigurationControllerResourceManager ( - const ::boost::shared_ptr<ResourceFactoryManager>& rpResourceFactoryContainer, - const ::boost::shared_ptr<ConfigurationControllerBroadcaster>& rpBroadcaster) + const std::shared_ptr<ResourceFactoryManager>& rpResourceFactoryContainer, + const std::shared_ptr<ConfigurationControllerBroadcaster>& rpBroadcaster) : maResourceMap(ResourceComparator()), mpResourceFactoryContainer(rpResourceFactoryContainer), mpBroadcaster(rpBroadcaster) diff --git a/sd/source/ui/framework/configuration/ConfigurationControllerResourceManager.hxx b/sd/source/ui/framework/configuration/ConfigurationControllerResourceManager.hxx index 727365574207..063aec3a393f 100644 --- a/sd/source/ui/framework/configuration/ConfigurationControllerResourceManager.hxx +++ b/sd/source/ui/framework/configuration/ConfigurationControllerResourceManager.hxx @@ -26,8 +26,8 @@ #include <osl/mutex.hxx> #include <boost/noncopyable.hpp> -#include <boost/shared_ptr.hpp> #include <map> +#include <memory> #include <vector> namespace sd { namespace framework { @@ -58,8 +58,8 @@ public: resources. */ ConfigurationControllerResourceManager ( - const ::boost::shared_ptr<ResourceFactoryManager>& rpResourceFactoryContainer, - const ::boost::shared_ptr<ConfigurationControllerBroadcaster>& rpBroadcaster); + const std::shared_ptr<ResourceFactoryManager>& rpResourceFactoryContainer, + const std::shared_ptr<ConfigurationControllerBroadcaster>& rpBroadcaster); ~ConfigurationControllerResourceManager(); @@ -108,12 +108,12 @@ private: ResourceComparator> ResourceMap; ResourceMap maResourceMap; - ::boost::shared_ptr<ResourceFactoryManager> mpResourceFactoryContainer; + std::shared_ptr<ResourceFactoryManager> mpResourceFactoryContainer; /** This broadcaster is used to notify the activation and deactivation of resources. */ - ::boost::shared_ptr<ConfigurationControllerBroadcaster> mpBroadcaster; + std::shared_ptr<ConfigurationControllerBroadcaster> mpBroadcaster; void ActivateResource ( const css::uno::Reference<css::drawing::framework::XResourceId>& rxResourceId, diff --git a/sd/source/ui/framework/configuration/ConfigurationUpdater.cxx b/sd/source/ui/framework/configuration/ConfigurationUpdater.cxx index 298924f98a86..e9e23f08f6d2 100644 --- a/sd/source/ui/framework/configuration/ConfigurationUpdater.cxx +++ b/sd/source/ui/framework/configuration/ConfigurationUpdater.cxx @@ -60,8 +60,8 @@ private: //===== ConfigurationUpdater ================================================== ConfigurationUpdater::ConfigurationUpdater ( - const ::boost::shared_ptr<ConfigurationControllerBroadcaster>& rpBroadcaster, - const ::boost::shared_ptr<ConfigurationControllerResourceManager>& rpResourceManager, + const std::shared_ptr<ConfigurationControllerBroadcaster>& rpBroadcaster, + const std::shared_ptr<ConfigurationControllerResourceManager>& rpResourceManager, const Reference<XControllerManager>& rxControllerManager) : mxControllerManager(), mpBroadcaster(rpBroadcaster), @@ -355,9 +355,9 @@ void ConfigurationUpdater::UnlockUpdates() } } -::boost::shared_ptr<ConfigurationUpdaterLock> ConfigurationUpdater::GetLock() +std::shared_ptr<ConfigurationUpdaterLock> ConfigurationUpdater::GetLock() { - return ::boost::shared_ptr<ConfigurationUpdaterLock>(new ConfigurationUpdaterLock(*this)); + return std::shared_ptr<ConfigurationUpdaterLock>(new ConfigurationUpdaterLock(*this)); } void ConfigurationUpdater::SetUpdateBeingProcessed (bool bValue) diff --git a/sd/source/ui/framework/configuration/ConfigurationUpdater.hxx b/sd/source/ui/framework/configuration/ConfigurationUpdater.hxx index 07f34c4b75c7..fb7209ef63d1 100644 --- a/sd/source/ui/framework/configuration/ConfigurationUpdater.hxx +++ b/sd/source/ui/framework/configuration/ConfigurationUpdater.hxx @@ -25,8 +25,8 @@ #include <com/sun/star/drawing/framework/XConfiguration.hpp> #include <com/sun/star/drawing/framework/XControllerManager.hpp> #include <vcl/timer.hxx> +#include <memory> #include <vector> -#include <boost/shared_ptr.hpp> namespace sd { namespace framework { @@ -49,8 +49,8 @@ public: changes and the start and end of updates via the given broadcaster. */ ConfigurationUpdater ( - const ::boost::shared_ptr<ConfigurationControllerBroadcaster>& rpBroadcaster, - const ::boost::shared_ptr<ConfigurationControllerResourceManager>& rpResourceManager, + const std::shared_ptr<ConfigurationControllerBroadcaster>& rpBroadcaster, + const std::shared_ptr<ConfigurationControllerResourceManager>& rpResourceManager, const css::uno::Reference< css::drawing::framework::XControllerManager>& rxControllerManager); ~ConfigurationUpdater(); @@ -79,7 +79,7 @@ public: returned object exists no update of the current configuration is made. */ - ::boost::shared_ptr<ConfigurationUpdaterLock> GetLock(); + std::shared_ptr<ConfigurationUpdaterLock> GetLock(); private: /** A reference to the XControllerManager is kept so that @@ -88,7 +88,7 @@ private: css::uno::Reference< css::drawing::framework::XControllerManager> mxControllerManager; - ::boost::shared_ptr<ConfigurationControllerBroadcaster> mpBroadcaster; + std::shared_ptr<ConfigurationControllerBroadcaster> mpBroadcaster; /** The current configuration holds the resources that are currently active. It is modified during an update. @@ -139,7 +139,7 @@ private: */ sal_Int32 mnFailedUpdateCount; - ::boost::shared_ptr<ConfigurationControllerResourceManager> mpResourceManager; + std::shared_ptr<ConfigurationControllerResourceManager> mpResourceManager; /** This method does the main work of an update. It calls the sub controllers that are responsible for the various types of resources diff --git a/sd/source/ui/framework/factories/BasicPaneFactory.hxx b/sd/source/ui/framework/factories/BasicPaneFactory.hxx index aeaf9b64ae67..4421732ab0d2 100644 --- a/sd/source/ui/framework/factories/BasicPaneFactory.hxx +++ b/sd/source/ui/framework/factories/BasicPaneFactory.hxx @@ -32,8 +32,7 @@ #include <cppuhelper/basemutex.hxx> #include <cppuhelper/compbase.hxx> -#include <boost/scoped_ptr.hpp> -#include <boost/shared_ptr.hpp> +#include <memory> namespace { @@ -109,7 +108,7 @@ private: ViewShellBase* mpViewShellBase; class PaneDescriptor; class PaneContainer; - ::boost::scoped_ptr<PaneContainer> mpPaneContainer; + std::unique_ptr<PaneContainer> mpPaneContainer; /** Create a new instance of FrameWindowPane. @param rPaneId diff --git a/sd/source/ui/framework/factories/BasicViewFactory.cxx b/sd/source/ui/framework/factories/BasicViewFactory.cxx index 065499bac8e5..dee1ae7c07a4 100644 --- a/sd/source/ui/framework/factories/BasicViewFactory.cxx +++ b/sd/source/ui/framework/factories/BasicViewFactory.cxx @@ -58,10 +58,10 @@ class BasicViewFactory::ViewDescriptor { public: Reference<XResource> mxView; - ::boost::shared_ptr<sd::ViewShell> mpViewShell; + std::shared_ptr<sd::ViewShell> mpViewShell; ViewShellWrapper* mpWrapper; Reference<XResourceId> mxViewId; - static bool CompareView (const ::boost::shared_ptr<ViewDescriptor>& rpDescriptor, + static bool CompareView (const std::shared_ptr<ViewDescriptor>& rpDescriptor, const Reference<XResource>& rxView) { return rpDescriptor->mxView.get() == rxView.get(); } }; @@ -69,14 +69,14 @@ public: //===== BasicViewFactory::ViewShellContainer ================================== class BasicViewFactory::ViewShellContainer - : public ::std::vector<boost::shared_ptr<ViewDescriptor> > + : public ::std::vector<std::shared_ptr<ViewDescriptor> > { public: ViewShellContainer() {}; }; class BasicViewFactory::ViewCache - : public ::std::vector<boost::shared_ptr<ViewDescriptor> > + : public ::std::vector<std::shared_ptr<ViewDescriptor> > { public: ViewCache() {}; @@ -164,7 +164,7 @@ Reference<XResource> SAL_CALL BasicViewFactory::createResource ( if (pFrame != NULL && mpBase!=NULL && pWindow!=NULL) { // Try to get the view from the cache. - ::boost::shared_ptr<ViewDescriptor> pDescriptor (GetViewFromCache(rxViewId, xPane)); + std::shared_ptr<ViewDescriptor> pDescriptor (GetViewFromCache(rxViewId, xPane)); // When the requested view is not in the cache then create a new view. if (pDescriptor.get() == NULL) @@ -201,7 +201,7 @@ void SAL_CALL BasicViewFactory::releaseResource (const Reference<XResource>& rxV ::boost::bind(&ViewDescriptor::CompareView, _1, rxView))); if (iViewShell != mpViewShellContainer->end()) { - ::boost::shared_ptr<ViewShell> pViewShell ((*iViewShell)->mpViewShell); + std::shared_ptr<ViewShell> pViewShell ((*iViewShell)->mpViewShell); if ((*iViewShell)->mxViewId->isBoundToURL( FrameworkHelper::msCenterPaneURL, AnchorBindingMode_DIRECT)) @@ -278,7 +278,7 @@ void SAL_CALL BasicViewFactory::initialize (const Sequence<Any>& aArguments) } } -::boost::shared_ptr<BasicViewFactory::ViewDescriptor> BasicViewFactory::CreateView ( +std::shared_ptr<BasicViewFactory::ViewDescriptor> BasicViewFactory::CreateView ( const Reference<XResourceId>& rxViewId, SfxViewFrame& rFrame, vcl::Window& rWindow, @@ -286,7 +286,7 @@ void SAL_CALL BasicViewFactory::initialize (const Sequence<Any>& aArguments) FrameView* pFrameView, const bool bIsCenterPane) { - ::boost::shared_ptr<ViewDescriptor> pDescriptor (new ViewDescriptor()); + std::shared_ptr<ViewDescriptor> pDescriptor (new ViewDescriptor()); pDescriptor->mpViewShell = CreateViewShell( rxViewId, @@ -323,14 +323,14 @@ void SAL_CALL BasicViewFactory::initialize (const Sequence<Any>& aArguments) return pDescriptor; } -::boost::shared_ptr<ViewShell> BasicViewFactory::CreateViewShell ( +std::shared_ptr<ViewShell> BasicViewFactory::CreateViewShell ( const Reference<XResourceId>& rxViewId, SfxViewFrame& rFrame, vcl::Window& rWindow, FrameView* pFrameView, const bool bIsCenterPane) { - ::boost::shared_ptr<ViewShell> pViewShell; + std::shared_ptr<ViewShell> pViewShell; const OUString& rsViewURL (rxViewId->getResourceURL()); if (rsViewURL.equals(FrameworkHelper::msImpressViewURL)) { @@ -403,7 +403,7 @@ void SAL_CALL BasicViewFactory::initialize (const Sequence<Any>& aArguments) } void BasicViewFactory::ReleaseView ( - const ::boost::shared_ptr<ViewDescriptor>& rpDescriptor, + const std::shared_ptr<ViewDescriptor>& rpDescriptor, bool bDoNotCache) { bool bIsCacheable (!bDoNotCache && IsCacheable(rpDescriptor)); @@ -441,7 +441,7 @@ void BasicViewFactory::ReleaseView ( } } -bool BasicViewFactory::IsCacheable (const ::boost::shared_ptr<ViewDescriptor>& rpDescriptor) +bool BasicViewFactory::IsCacheable (const std::shared_ptr<ViewDescriptor>& rpDescriptor) { bool bIsCacheable (false); @@ -451,7 +451,7 @@ bool BasicViewFactory::IsCacheable (const ::boost::shared_ptr<ViewDescriptor>& r static ::std::vector<Reference<XResourceId> > maCacheableResources; if (maCacheableResources.empty() ) { - ::boost::shared_ptr<FrameworkHelper> pHelper (FrameworkHelper::Instance(*mpBase)); + std::shared_ptr<FrameworkHelper> pHelper (FrameworkHelper::Instance(*mpBase)); // The slide sorter and the task panel are cacheable and relocatable. maCacheableResources.push_back(FrameworkHelper::CreateResourceId( @@ -474,11 +474,11 @@ bool BasicViewFactory::IsCacheable (const ::boost::shared_ptr<ViewDescriptor>& r return bIsCacheable; } -::boost::shared_ptr<BasicViewFactory::ViewDescriptor> BasicViewFactory::GetViewFromCache ( +std::shared_ptr<BasicViewFactory::ViewDescriptor> BasicViewFactory::GetViewFromCache ( const Reference<XResourceId>& rxViewId, const Reference<XPane>& rxPane) { - ::boost::shared_ptr<ViewDescriptor> pDescriptor; + std::shared_ptr<ViewDescriptor> pDescriptor; // Search for the requested view in the cache. ViewCache::iterator iEntry; @@ -515,7 +515,7 @@ bool BasicViewFactory::IsCacheable (const ::boost::shared_ptr<ViewDescriptor>& r } void BasicViewFactory::ActivateCenterView ( - const ::boost::shared_ptr<ViewDescriptor>& rpDescriptor) + const std::shared_ptr<ViewDescriptor>& rpDescriptor) { mpBase->GetDocShell()->Connect(rpDescriptor->mpViewShell.get()); diff --git a/sd/source/ui/framework/factories/BasicViewFactory.hxx b/sd/source/ui/framework/factories/BasicViewFactory.hxx index 440bf74d7208..064558c49ff5 100644 --- a/sd/source/ui/framework/factories/BasicViewFactory.hxx +++ b/sd/source/ui/framework/factories/BasicViewFactory.hxx @@ -32,9 +32,8 @@ #include <cppuhelper/compbase.hxx> #include <osl/mutex.hxx> -#include <boost/shared_ptr.hpp> -#include <boost/scoped_ptr.hpp> #include <vcl/vclptr.hxx> +#include <memory> namespace sd { class ViewShell; @@ -100,17 +99,17 @@ private: mxConfigurationController; class ViewDescriptor; class ViewShellContainer; - ::boost::scoped_ptr<ViewShellContainer> mpViewShellContainer; + std::unique_ptr<ViewShellContainer> mpViewShellContainer; ViewShellBase* mpBase; FrameView* mpFrameView; class ViewCache; ScopedVclPtr<vcl::Window> mpWindow; - ::boost::shared_ptr<ViewCache> mpViewCache; + std::shared_ptr<ViewCache> mpViewCache; css::uno::Reference<css::drawing::framework::XPane> mxLocalPane; - ::boost::shared_ptr<ViewDescriptor> CreateView ( + std::shared_ptr<ViewDescriptor> CreateView ( const css::uno::Reference<css::drawing::framework::XResourceId>& rxViewId, SfxViewFrame& rFrame, vcl::Window& rWindow, @@ -118,7 +117,7 @@ private: FrameView* pFrameView, const bool bIsCenterView); - ::boost::shared_ptr<ViewShell> CreateViewShell ( + std::shared_ptr<ViewShell> CreateViewShell ( const css::uno::Reference<css::drawing::framework::XResourceId>& rxViewId, SfxViewFrame& rFrame, vcl::Window& rWindow, @@ -126,16 +125,16 @@ private: const bool bIsCenterView); void ActivateCenterView ( - const ::boost::shared_ptr<ViewDescriptor>& rpDescriptor); + const std::shared_ptr<ViewDescriptor>& rpDescriptor); void ReleaseView ( - const ::boost::shared_ptr<ViewDescriptor>& rpDescriptor, + const std::shared_ptr<ViewDescriptor>& rpDescriptor, bool bDoNotCache = false); bool IsCacheable ( - const ::boost::shared_ptr<ViewDescriptor>& rpDescriptor); + const std::shared_ptr<ViewDescriptor>& rpDescriptor); - ::boost::shared_ptr<ViewDescriptor> GetViewFromCache ( + std::shared_ptr<ViewDescriptor> GetViewFromCache ( const css::uno::Reference<css::drawing::framework::XResourceId>& rxViewId, const css::uno::Reference<css::drawing::framework::XPane>& rxPane); }; diff --git a/sd/source/ui/framework/factories/FullScreenPane.hxx b/sd/source/ui/framework/factories/FullScreenPane.hxx index f2a963128a83..d2938ec45b3f 100644 --- a/sd/source/ui/framework/factories/FullScreenPane.hxx +++ b/sd/source/ui/framework/factories/FullScreenPane.hxx @@ -24,7 +24,7 @@ #include <com/sun/star/frame/XLayoutManager.hpp> #include <com/sun/star/uno/XComponentContext.hpp> #include <vcl/vclevent.hxx> -#include <boost/scoped_ptr.hpp> +#include <memory> class WorkWindow; diff --git a/sd/source/ui/framework/factories/ViewShellWrapper.cxx b/sd/source/ui/framework/factories/ViewShellWrapper.cxx index 68ebb2a1d536..2b3e80501a92 100644 --- a/sd/source/ui/framework/factories/ViewShellWrapper.cxx +++ b/sd/source/ui/framework/factories/ViewShellWrapper.cxx @@ -55,13 +55,13 @@ using ::com::sun::star::lang::DisposedException; namespace sd { namespace framework { ViewShellWrapper::ViewShellWrapper ( - ::boost::shared_ptr<ViewShell> pViewShell, + std::shared_ptr<ViewShell> pViewShell, const Reference<XResourceId>& rxViewId, const Reference<awt::XWindow>& rxWindow) : ViewShellWrapperInterfaceBase(MutexOwner::maMutex), mpViewShell(pViewShell), mpSlideSorterViewShell( - ::boost::dynamic_pointer_cast< ::sd::slidesorter::SlideSorterViewShell >( pViewShell )), + std::dynamic_pointer_cast< ::sd::slidesorter::SlideSorterViewShell >( pViewShell )), mxViewId(rxViewId), mxWindow(rxWindow) { diff --git a/sd/source/ui/framework/module/CenterViewFocusModule.cxx b/sd/source/ui/framework/module/CenterViewFocusModule.cxx index a0f2c54f1e9f..986f6fb87888 100644 --- a/sd/source/ui/framework/module/CenterViewFocusModule.cxx +++ b/sd/source/ui/framework/module/CenterViewFocusModule.cxx @@ -142,7 +142,7 @@ void CenterViewFocusModule::HandleNewView ( xTunnel->getSomething(ViewShellWrapper::getUnoTunnelId())); if (pViewShellWrapper != NULL) { - ::boost::shared_ptr<ViewShell> pViewShell = pViewShellWrapper->GetViewShell(); + std::shared_ptr<ViewShell> pViewShell = pViewShellWrapper->GetViewShell(); if (pViewShell.get() != NULL) mpBase->GetViewShellManager()->MoveToTop(*pViewShell); } diff --git a/sd/source/ui/framework/module/ResourceManager.hxx b/sd/source/ui/framework/module/ResourceManager.hxx index e67595155b11..d0abc5dda0bf 100644 --- a/sd/source/ui/framework/module/ResourceManager.hxx +++ b/sd/source/ui/framework/module/ResourceManager.hxx @@ -25,7 +25,7 @@ #include <com/sun/star/drawing/framework/XConfigurationController.hpp> #include <com/sun/star/frame/XController.hpp> #include <cppuhelper/compbase.hxx> -#include <boost/scoped_ptr.hpp> +#include <memory> namespace { @@ -82,7 +82,7 @@ protected: private: class MainViewContainer; - ::boost::scoped_ptr<MainViewContainer> mpActiveMainViewContainer; + std::unique_ptr<MainViewContainer> mpActiveMainViewContainer; /// The resource managed by this class. css::uno::Reference<css::drawing::framework::XResourceId> mxResourceId; diff --git a/sd/source/ui/framework/module/ShellStackGuard.hxx b/sd/source/ui/framework/module/ShellStackGuard.hxx index 63cb56baf972..5d4bf131c46f 100644 --- a/sd/source/ui/framework/module/ShellStackGuard.hxx +++ b/sd/source/ui/framework/module/ShellStackGuard.hxx @@ -31,7 +31,7 @@ #include <vcl/timer.hxx> #include <vcl/idle.hxx> #include <cppuhelper/compbase.hxx> -#include <boost/scoped_ptr.hpp> +#include <memory> namespace { @@ -84,7 +84,7 @@ private: css::uno::Reference<css::drawing::framework::XConfigurationController> mxConfigurationController; ViewShellBase* mpBase; - ::boost::scoped_ptr<ConfigurationController::Lock> mpUpdateLock; + std::unique_ptr<ConfigurationController::Lock> mpUpdateLock; Idle maPrinterPollingIdle; DECL_LINK_TYPED(TimeoutHandler, Idle*, void); diff --git a/sd/source/ui/framework/module/ToolBarModule.cxx b/sd/source/ui/framework/module/ToolBarModule.cxx index 51e4b6ba6254..3e665834a57a 100644 --- a/sd/source/ui/framework/module/ToolBarModule.cxx +++ b/sd/source/ui/framework/module/ToolBarModule.cxx @@ -141,7 +141,7 @@ void ToolBarModule::HandleUpdateStart() // stack. if (mpBase != NULL) { - ::boost::shared_ptr<ToolBarManager> pToolBarManager (mpBase->GetToolBarManager()); + std::shared_ptr<ToolBarManager> pToolBarManager (mpBase->GetToolBarManager()); mpToolBarManagerLock.reset(new ToolBarManager::UpdateLock(pToolBarManager)); pToolBarManager->LockViewShellManager(); } @@ -156,8 +156,8 @@ void ToolBarModule::HandleUpdateEnd() // no longer visible. This is done before the old view shell is // destroyed in order to avoid unnecessary updates of those tool // bars. - ::boost::shared_ptr<ToolBarManager> pToolBarManager (mpBase->GetToolBarManager()); - ::boost::shared_ptr<FrameworkHelper> pFrameworkHelper ( + std::shared_ptr<ToolBarManager> pToolBarManager (mpBase->GetToolBarManager()); + std::shared_ptr<FrameworkHelper> pFrameworkHelper ( FrameworkHelper::Instance(*mpBase)); ViewShell* pViewShell = pFrameworkHelper->GetViewShell(FrameworkHelper::msCenterPaneURL).get(); diff --git a/sd/source/ui/framework/module/ToolBarModule.hxx b/sd/source/ui/framework/module/ToolBarModule.hxx index 67ec89ea8206..60350da81777 100644 --- a/sd/source/ui/framework/module/ToolBarModule.hxx +++ b/sd/source/ui/framework/module/ToolBarModule.hxx @@ -28,7 +28,7 @@ #include <osl/mutex.hxx> #include <cppuhelper/basemutex.hxx> #include <cppuhelper/compbase.hxx> -#include <boost/scoped_ptr.hpp> +#include <memory> namespace sd { class ViewShellBase; @@ -76,7 +76,7 @@ private: css::uno::Reference< css::drawing::framework::XConfigurationController> mxConfigurationController; ViewShellBase* mpBase; - ::boost::scoped_ptr<ToolBarManager::UpdateLock> mpToolBarManagerLock; + std::unique_ptr<ToolBarManager::UpdateLock> mpToolBarManagerLock; bool mbMainViewSwitchUpdatePending; void HandleUpdateStart(); diff --git a/sd/source/ui/framework/tools/FrameworkHelper.cxx b/sd/source/ui/framework/tools/FrameworkHelper.cxx index a34d34303fec..5e9fe9575909 100644 --- a/sd/source/ui/framework/tools/FrameworkHelper.cxx +++ b/sd/source/ui/framework/tools/FrameworkHelper.cxx @@ -230,9 +230,9 @@ const OUString FrameworkHelper::msConfigurationControllerService("com.sun.star.d //----- helper ---------------------------------------------------------------- namespace { - static ::boost::shared_ptr< ViewShell > lcl_getViewShell( const Reference< XResource >& i_rViewShellWrapper ) + static ::std::shared_ptr< ViewShell > lcl_getViewShell( const Reference< XResource >& i_rViewShellWrapper ) { - ::boost::shared_ptr< ViewShell > pViewShell; + ::std::shared_ptr< ViewShell > pViewShell; if ( !i_rViewShellWrapper.is() ) return pViewShell; @@ -295,7 +295,7 @@ class FrameworkHelper::DisposeListener public FrameworkHelperDisposeListenerInterfaceBase { public: - DisposeListener (const ::boost::shared_ptr<FrameworkHelper>& rpHelper); + DisposeListener (const ::std::shared_ptr<FrameworkHelper>& rpHelper); virtual ~DisposeListener(); virtual void SAL_CALL disposing() SAL_OVERRIDE; @@ -304,7 +304,7 @@ public: throw(RuntimeException, std::exception) SAL_OVERRIDE; private: - ::boost::shared_ptr<FrameworkHelper> mpHelper; + ::std::shared_ptr<FrameworkHelper> mpHelper; }; //----- FrameworkHelper::Deleter ---------------------------------------------- @@ -320,14 +320,14 @@ public: //----- FrameworkHelper ------------------------------------------------------- -::boost::scoped_ptr<FrameworkHelper::ViewURLMap> FrameworkHelper::mpViewURLMap(new ViewURLMap()); +std::unique_ptr<FrameworkHelper::ViewURLMap> FrameworkHelper::mpViewURLMap(new ViewURLMap()); FrameworkHelper::InstanceMap FrameworkHelper::maInstanceMap; -::boost::shared_ptr<FrameworkHelper> FrameworkHelper::Instance (ViewShellBase& rBase) +::std::shared_ptr<FrameworkHelper> FrameworkHelper::Instance (ViewShellBase& rBase) { - ::boost::shared_ptr<FrameworkHelper> pHelper; + ::std::shared_ptr<FrameworkHelper> pHelper; InstanceMap::const_iterator iHelper (maInstanceMap.find(&rBase)); if (iHelper == maInstanceMap.end()) @@ -336,7 +336,7 @@ FrameworkHelper::InstanceMap FrameworkHelper::maInstanceMap; ::osl::MutexGuard aGuard (aMutexFunctor()); if (iHelper == maInstanceMap.end()) { - pHelper = ::boost::shared_ptr<FrameworkHelper>( + pHelper = ::std::shared_ptr<FrameworkHelper>( new FrameworkHelper(rBase), FrameworkHelper::Deleter()); pHelper->Initialize(); @@ -405,16 +405,16 @@ bool FrameworkHelper::IsValid() return mxConfigurationController.is(); } -::boost::shared_ptr<ViewShell> FrameworkHelper::GetViewShell (const OUString& rsPaneURL) +::std::shared_ptr<ViewShell> FrameworkHelper::GetViewShell (const OUString& rsPaneURL) { if ( !mxConfigurationController.is() ) - return ::boost::shared_ptr<ViewShell>(); + return ::std::shared_ptr<ViewShell>(); Reference<XResourceId> xPaneId( CreateResourceId( rsPaneURL ) ); return lcl_getViewShell( lcl_getFirstViewInPane( mxConfigurationController, xPaneId ) ); } -::boost::shared_ptr<ViewShell> FrameworkHelper::GetViewShell (const Reference<XView>& rxView) +::std::shared_ptr<ViewShell> FrameworkHelper::GetViewShell (const Reference<XView>& rxView) { return lcl_getViewShell( rxView.get() ); } @@ -556,7 +556,7 @@ void FrameworkHelper::HandleModeChangeSlot ( Reference<XResourceId> xPaneId ( CreateResourceId(framework::FrameworkHelper::msCenterPaneURL)); Reference<XView> xView (GetView(xPaneId)); - ::boost::shared_ptr<ViewShell> pCenterViewShell (GetViewShell(xView)); + ::std::shared_ptr<ViewShell> pCenterViewShell (GetViewShell(xView)); OUString sRequestedView; if (bIsActive) @@ -775,7 +775,7 @@ Reference<XResourceId> FrameworkHelper::CreateResourceId ( //----- FrameworkHelper::DisposeListener -------------------------------------- FrameworkHelper::DisposeListener::DisposeListener ( - const ::boost::shared_ptr<FrameworkHelper>& rpHelper) + const ::std::shared_ptr<FrameworkHelper>& rpHelper) : FrameworkHelperDisposeListenerInterfaceBase(maMutex), mpHelper(rpHelper) { diff --git a/sd/source/ui/func/fuarea.cxx b/sd/source/ui/func/fuarea.cxx index ef48a6c89bf8..5c351f5dcbc8 100644 --- a/sd/source/ui/func/fuarea.cxx +++ b/sd/source/ui/func/fuarea.cxx @@ -34,7 +34,7 @@ #include "app.hrc" #include <svx/svxdlg.hxx> #include <svx/dialogs.hrc> -#include <boost/scoped_ptr.hpp> +#include <memory> namespace sd { TYPEINIT1( FuArea, FuPoor ); @@ -61,7 +61,7 @@ void FuArea::DoExecute( SfxRequest& rReq ) mpView->GetAttributes( aNewAttr ); SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create(); - boost::scoped_ptr<AbstractSvxAreaTabDialog> pDlg(pFact ? pFact->CreateSvxAreaTabDialog( NULL, + std::unique_ptr<AbstractSvxAreaTabDialog> pDlg(pFact ? pFact->CreateSvxAreaTabDialog( NULL, &aNewAttr, mpDoc, true) : 0); diff --git a/sd/source/ui/func/fubullet.cxx b/sd/source/ui/func/fubullet.cxx index 4ef4f2cf4e72..cc989a3efd9a 100644 --- a/sd/source/ui/func/fubullet.cxx +++ b/sd/source/ui/func/fubullet.cxx @@ -38,7 +38,7 @@ #include <svx/svxdlg.hxx> #include <svx/dialogs.hrc> #include "drawview.hxx" -#include <boost/scoped_ptr.hpp> +#include <memory> #include "app.hrc" @@ -190,7 +190,7 @@ void FuBullet::InsertSpecialCharacter( SfxRequest& rReq ) aSet.Put( *pFontItem ); SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create(); - boost::scoped_ptr<SfxAbstractDialog> pDlg(pFact ? pFact->CreateSfxDialog( &mpView->GetViewShell()->GetViewFrame()->GetWindow(), aSet, + std::unique_ptr<SfxAbstractDialog> pDlg(pFact ? pFact->CreateSfxDialog( &mpView->GetViewShell()->GetViewFrame()->GetWindow(), aSet, mpView->GetViewShell()->GetViewFrame()->GetFrame().GetFrameInterface(), RID_SVXDLG_CHARMAP ) : 0); if( !pDlg ) diff --git a/sd/source/ui/func/fuchar.cxx b/sd/source/ui/func/fuchar.cxx index b8166c2cab10..5b5227ca77c5 100644 --- a/sd/source/ui/func/fuchar.cxx +++ b/sd/source/ui/func/fuchar.cxx @@ -34,7 +34,7 @@ #include "ViewShell.hxx" #include "DrawDocShell.hxx" #include "sdabstdlg.hxx" -#include <boost/scoped_ptr.hpp> +#include <memory> namespace sd { @@ -71,7 +71,7 @@ void FuChar::DoExecute( SfxRequest& rReq ) aNewAttr.Put( aEditAttr, false ); SdAbstractDialogFactory* pFact = SdAbstractDialogFactory::Create(); - boost::scoped_ptr<SfxAbstractTabDialog> pDlg(pFact ? pFact->CreateSdTabCharDialog( NULL, &aNewAttr, mpDoc->GetDocSh() ) : 0); + std::unique_ptr<SfxAbstractTabDialog> pDlg(pFact ? pFact->CreateSdTabCharDialog( NULL, &aNewAttr, mpDoc->GetDocSh() ) : 0); sal_uInt16 nResult = RET_CANCEL; if( pDlg ) { diff --git a/sd/source/ui/func/fuconbez.cxx b/sd/source/ui/func/fuconbez.cxx index f8dbe856a728..8be8252b39cc 100644 --- a/sd/source/ui/func/fuconbez.cxx +++ b/sd/source/ui/func/fuconbez.cxx @@ -180,7 +180,7 @@ bool FuConstructBezierPolygon::MouseButtonUp(const MouseEvent& rMEvt ) SdPage* pPage = dynamic_cast< SdPage* >( pPathObj ? pPathObj->GetPage() : 0 ); if( pPage ) { - boost::shared_ptr< sd::MainSequence > pMainSequence( pPage->getMainSequence() ); + std::shared_ptr< sd::MainSequence > pMainSequence( pPage->getMainSequence() ); if( pMainSequence.get() ) { Sequence< Any > aTargets; diff --git a/sd/source/ui/func/fuconnct.cxx b/sd/source/ui/func/fuconnct.cxx index 7a640ccd1ab3..494fc75ecbec 100644 --- a/sd/source/ui/func/fuconnct.cxx +++ b/sd/source/ui/func/fuconnct.cxx @@ -25,7 +25,7 @@ #include "drawdoc.hxx" #include <svx/svxdlg.hxx> #include <svx/dialogs.hrc> -#include <boost/scoped_ptr.hpp> +#include <memory> namespace sd { @@ -58,7 +58,7 @@ void FuConnectionDlg::DoExecute( SfxRequest& rReq ) if( !pArgs ) { SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create(); - boost::scoped_ptr<SfxAbstractDialog> pDlg( pFact ? pFact->CreateSfxDialog( NULL, aNewAttr, mpView, RID_SVXPAGE_CONNECTION) : 0); + std::unique_ptr<SfxAbstractDialog> pDlg( pFact ? pFact->CreateSfxDialog( NULL, aNewAttr, mpView, RID_SVXPAGE_CONNECTION) : 0); if( pDlg.get() && (pDlg->Execute() == RET_OK) ) { diff --git a/sd/source/ui/func/fucopy.cxx b/sd/source/ui/func/fucopy.cxx index 5f6ee2ce0511..e7cd23f6d4b0 100644 --- a/sd/source/ui/func/fucopy.cxx +++ b/sd/source/ui/func/fucopy.cxx @@ -38,7 +38,7 @@ #include <svx/xfillit0.hxx> #include <sfx2/request.hxx> #include "sdabstdlg.hxx" -#include <boost/scoped_ptr.hpp> +#include <memory> using namespace com::sun::star; @@ -102,7 +102,7 @@ void FuCopy::DoExecute( SfxRequest& rReq ) SdAbstractDialogFactory* pFact = SdAbstractDialogFactory::Create(); if( pFact ) { - boost::scoped_ptr<AbstractCopyDlg> pDlg(pFact->CreateCopyDlg(NULL, aSet, mpDoc->GetColorList(), mpView )); + std::unique_ptr<AbstractCopyDlg> pDlg(pFact->CreateCopyDlg(NULL, aSet, mpDoc->GetColorList(), mpView )); if (!pDlg) return; @@ -169,7 +169,7 @@ void FuCopy::DoExecute( SfxRequest& rReq ) // remove handles //HMHmpView->HideMarkHdl(); - boost::scoped_ptr<SfxProgress> pProgress; + std::unique_ptr<SfxProgress> pProgress; bool bWaiting = false; if( nNumber > 1 ) diff --git a/sd/source/ui/func/fucushow.cxx b/sd/source/ui/func/fucushow.cxx index 3c898a24e2cb..78548c3f3fe1 100644 --- a/sd/source/ui/func/fucushow.cxx +++ b/sd/source/ui/func/fucushow.cxx @@ -31,7 +31,7 @@ #include <sfx2/viewfrm.hxx> #include "sdabstdlg.hxx" -#include <boost/scoped_ptr.hpp> +#include <memory> namespace sd { @@ -57,7 +57,7 @@ rtl::Reference<FuPoor> FuCustomShowDlg::Create( ViewShell* pViewSh, ::sd::Window void FuCustomShowDlg::DoExecute( SfxRequest& ) { SdAbstractDialogFactory* pFact = SdAbstractDialogFactory::Create(); - boost::scoped_ptr<AbstractSdCustomShowDlg> pDlg(pFact ? pFact->CreateSdCustomShowDlg( NULL, *mpDoc ) : 0); + std::unique_ptr<AbstractSdCustomShowDlg> pDlg(pFact ? pFact->CreateSdCustomShowDlg( NULL, *mpDoc ) : 0); if( pDlg ) { sal_uInt16 nRet = pDlg->Execute(); diff --git a/sd/source/ui/func/fuinsert.cxx b/sd/source/ui/func/fuinsert.cxx index 2d3c5325af09..f2c1432c103b 100644 --- a/sd/source/ui/func/fuinsert.cxx +++ b/sd/source/ui/func/fuinsert.cxx @@ -82,7 +82,7 @@ #include "sdxfer.hxx" #include <vcl/svapp.hxx> #include "undo/undoobjects.hxx" -#include <boost/scoped_ptr.hpp> +#include <memory> #include "glob.hrc" #include <config_features.h> @@ -202,7 +202,7 @@ void FuInsertClipboard::DoExecute( SfxRequest& ) SotClipboardFormatId nFormatId; SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create(); - boost::scoped_ptr<SfxAbstractPasteDialog> pDlg(pFact->CreatePasteDialog( mpViewShell->GetActiveWindow() )); + std::unique_ptr<SfxAbstractPasteDialog> pDlg(pFact->CreatePasteDialog( mpViewShell->GetActiveWindow() )); if ( pDlg ) { ::com::sun::star::datatransfer::DataFlavor aFlavor; @@ -457,7 +457,7 @@ void FuInsertOLE::DoExecute( SfxRequest& rReq ) case SID_INSERT_FLOATINGFRAME : { SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create(); - boost::scoped_ptr<SfxAbstractInsertObjectDialog> pDlg( + std::unique_ptr<SfxAbstractInsertObjectDialog> pDlg( pFact->CreateInsertObjectDialog( mpViewShell->GetActiveWindow(), SD_MOD()->GetSlotPool()->GetSlot(nSlotId)->GetCommandString(), xStorage, &aServerLst )); if ( pDlg ) diff --git a/sd/source/ui/func/fuinsfil.cxx b/sd/source/ui/func/fuinsfil.cxx index 991d4f88b871..281155e1b7b4 100644 --- a/sd/source/ui/func/fuinsfil.cxx +++ b/sd/source/ui/func/fuinsfil.cxx @@ -62,7 +62,7 @@ #include "unmovss.hxx" #include "Outliner.hxx" #include "sdabstdlg.hxx" -#include <boost/scoped_ptr.hpp> +#include <memory> using namespace ::com::sun::star::lang; using namespace ::com::sun::star::uno; @@ -329,7 +329,7 @@ bool FuInsertFile::InsSDDinDrMode(SfxMedium* pMedium) mpDocSh->SetWaitCursor( false ); SdAbstractDialogFactory* pFact = SdAbstractDialogFactory::Create(); - boost::scoped_ptr<AbstractSdInsertPagesObjsDlg> pDlg(pFact ? pFact->CreateSdInsertPagesObjsDlg( NULL, mpDoc, pMedium, aFile ) : 0); + std::unique_ptr<AbstractSdInsertPagesObjsDlg> pDlg(pFact ? pFact->CreateSdInsertPagesObjsDlg( NULL, mpDoc, pMedium, aFile ) : 0); if( !pDlg ) return false; @@ -421,7 +421,7 @@ bool FuInsertFile::InsSDDinDrMode(SfxMedium* pMedium) void FuInsertFile::InsTextOrRTFinDrMode(SfxMedium* pMedium) { SdAbstractDialogFactory* pFact = SdAbstractDialogFactory::Create(); - boost::scoped_ptr<AbstractSdInsertPagesObjsDlg> pDlg(pFact ? pFact->CreateSdInsertPagesObjsDlg(NULL, mpDoc, NULL, aFile ) : 0); + std::unique_ptr<AbstractSdInsertPagesObjsDlg> pDlg(pFact ? pFact->CreateSdInsertPagesObjsDlg(NULL, mpDoc, NULL, aFile ) : 0); if( !pDlg ) return; @@ -446,7 +446,7 @@ void FuInsertFile::InsTextOrRTFinDrMode(SfxMedium* pMedium) - the draw outliner of the drawing engine has to draw something in between - the global outliner could be used in SdPage::CreatePresObj */ - boost::scoped_ptr<SdrOutliner> pOutliner(new ::sd::Outliner( mpDoc, OUTLINERMODE_TEXTOBJECT )); + std::unique_ptr<SdrOutliner> pOutliner(new ::sd::Outliner( mpDoc, OUTLINERMODE_TEXTOBJECT )); // set reference device pOutliner->SetRefDevice( SD_MOD()->GetRefDevice( *mpDocSh ) ); @@ -596,7 +596,7 @@ void FuInsertFile::InsTextOrRTFinOlMode(SfxMedium* pMedium) - the draw outliner of the drawing engine has to draw something in between - the global outliner could be used in SdPage::CreatePresObj */ - boost::scoped_ptr< ::Outliner> pOutliner(new ::Outliner( &mpDoc->GetItemPool(), OUTLINERMODE_OUTLINEOBJECT )); + std::unique_ptr< ::Outliner> pOutliner(new ::Outliner( &mpDoc->GetItemPool(), OUTLINERMODE_OUTLINEOBJECT )); pOutliner->SetStyleSheetPool(static_cast<SfxStyleSheetPool*>(mpDoc->GetStyleSheetPool())); // set reference device @@ -631,7 +631,7 @@ void FuInsertFile::InsTextOrRTFinOlMode(SfxMedium* pMedium) mpDocSh->SetWaitCursor( false ); - boost::scoped_ptr<SfxProgress> pProgress(new SfxProgress( mpDocSh, SD_RESSTR(STR_CREATE_PAGES), nNewPages)); + std::unique_ptr<SfxProgress> pProgress(new SfxProgress( mpDocSh, SD_RESSTR(STR_CREATE_PAGES), nNewPages)); if( pProgress ) pProgress->SetState( 0, 100 ); diff --git a/sd/source/ui/func/fuline.cxx b/sd/source/ui/func/fuline.cxx index f16a9d5f327f..6b97442ffd52 100644 --- a/sd/source/ui/func/fuline.cxx +++ b/sd/source/ui/func/fuline.cxx @@ -36,7 +36,7 @@ #include "app.hrc" #include <svx/svxdlg.hxx> #include <svx/dialogs.hrc> -#include <boost/scoped_ptr.hpp> +#include <memory> namespace sd { @@ -72,11 +72,11 @@ void FuLine::DoExecute( SfxRequest& rReq ) if( rMarkList.GetMarkCount() == 1 ) pObj = rMarkList.GetMark(0)->GetMarkedSdrObj(); - boost::scoped_ptr<SfxItemSet> pNewAttr(new SfxItemSet( mpDoc->GetPool() )); + std::unique_ptr<SfxItemSet> pNewAttr(new SfxItemSet( mpDoc->GetPool() )); mpView->GetAttributes( *pNewAttr ); SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create(); - boost::scoped_ptr<SfxAbstractTabDialog> pDlg(pFact ? pFact->CreateSvxLineTabDialog(NULL,pNewAttr.get(),mpDoc,pObj,bHasMarked) : 0); + std::unique_ptr<SfxAbstractTabDialog> pDlg(pFact ? pFact->CreateSvxLineTabDialog(NULL,pNewAttr.get(),mpDoc,pObj,bHasMarked) : 0); if( pDlg && (pDlg->Execute() == RET_OK) ) { mpView->SetAttributes (*(pDlg->GetOutputItemSet ())); diff --git a/sd/source/ui/func/fulinend.cxx b/sd/source/ui/func/fulinend.cxx index b963b06e5cf8..985824f860d1 100644 --- a/sd/source/ui/func/fulinend.cxx +++ b/sd/source/ui/func/fulinend.cxx @@ -32,7 +32,7 @@ #include "drawdoc.hxx" #include "View.hxx" #include "Window.hxx" -#include <boost/scoped_ptr.hpp> +#include <memory> namespace sd { @@ -114,7 +114,7 @@ void FuLineEnd::DoExecute( SfxRequest& ) } SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create(); - boost::scoped_ptr<AbstractSvxNameDialog> pDlg(pFact ? pFact->CreateSvxNameDialog( NULL, aName, aDesc ) : 0); + std::unique_ptr<AbstractSvxNameDialog> pDlg(pFact ? pFact->CreateSvxNameDialog( NULL, aName, aDesc ) : 0); if( pDlg ) { diff --git a/sd/source/ui/func/fulink.cxx b/sd/source/ui/func/fulink.cxx index 0350b2c40300..245004a24c26 100644 --- a/sd/source/ui/func/fulink.cxx +++ b/sd/source/ui/func/fulink.cxx @@ -29,7 +29,7 @@ #include "drawdoc.hxx" #include "ViewShell.hxx" #include "app.hrc" -#include <boost/scoped_ptr.hpp> +#include <memory> class SfxRequest; @@ -59,7 +59,7 @@ void FuLink::DoExecute( SfxRequest& ) sfx2::LinkManager* pLinkManager = mpDoc->GetLinkManager(); SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create(); - boost::scoped_ptr<SfxAbstractLinksDialog> pDlg(pFact->CreateLinksDialog( mpViewShell->GetActiveWindow(), pLinkManager )); + std::unique_ptr<SfxAbstractLinksDialog> pDlg(pFact->CreateLinksDialog( mpViewShell->GetActiveWindow(), pLinkManager )); if ( pDlg ) { pDlg->Execute(); diff --git a/sd/source/ui/func/fumeasur.cxx b/sd/source/ui/func/fumeasur.cxx index 22bc96e496c0..7b5bbb280629 100644 --- a/sd/source/ui/func/fumeasur.cxx +++ b/sd/source/ui/func/fumeasur.cxx @@ -25,7 +25,7 @@ #include "drawdoc.hxx" #include <svx/svxdlg.hxx> #include <svx/dialogs.hrc> -#include <boost/scoped_ptr.hpp> +#include <memory> namespace sd { @@ -58,7 +58,7 @@ void FuMeasureDlg::DoExecute( SfxRequest& rReq ) if( !pArgs ) { SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create(); - boost::scoped_ptr<SfxAbstractDialog> pDlg( pFact ? pFact->CreateSfxDialog( NULL, aNewAttr, mpView, RID_SVXPAGE_MEASURE) : 0 ); + std::unique_ptr<SfxAbstractDialog> pDlg( pFact ? pFact->CreateSfxDialog( NULL, aNewAttr, mpView, RID_SVXPAGE_MEASURE) : 0 ); if( pDlg.get() && (pDlg->Execute() == RET_OK) ) { diff --git a/sd/source/ui/func/fumorph.cxx b/sd/source/ui/func/fumorph.cxx index 6eac885048d3..a1e25babafda 100644 --- a/sd/source/ui/func/fumorph.cxx +++ b/sd/source/ui/func/fumorph.cxx @@ -43,8 +43,8 @@ #include <svx/svditer.hxx> #include <basegfx/color/bcolor.hxx> -#include <boost/scoped_ptr.hpp> #include <com/sun/star/drawing/LineStyle.hpp> +#include <memory> using namespace com::sun::star; @@ -96,7 +96,7 @@ void FuMorph::DoExecute( SfxRequest& ) SdrObject* pPolyObj1 = pCloneObj1->ConvertToPolyObj(false, false); SdrObject* pPolyObj2 = pCloneObj2->ConvertToPolyObj(false, false); SdAbstractDialogFactory* pFact = SdAbstractDialogFactory::Create(); - boost::scoped_ptr<AbstractMorphDlg> pDlg(pFact ? pFact->CreateMorphDlg( static_cast< vcl::Window*>(mpWindow), pObj1, pObj2 ) : 0); + std::unique_ptr<AbstractMorphDlg> pDlg(pFact ? pFact->CreateMorphDlg( static_cast< vcl::Window*>(mpWindow), pObj1, pObj2 ) : 0); if(pPolyObj1 && pPolyObj2 && pDlg && (pDlg->Execute() == RET_OK)) { B2DPolyPolygonList_impl aPolyPolyList; diff --git a/sd/source/ui/func/fuoaprms.cxx b/sd/source/ui/func/fuoaprms.cxx index 195991509de7..8c0b708df55c 100644 --- a/sd/source/ui/func/fuoaprms.cxx +++ b/sd/source/ui/func/fuoaprms.cxx @@ -44,7 +44,7 @@ #include "sdresid.hxx" #include <tools/helpers.hxx> #include <basegfx/polygon/b2dpolygon.hxx> -#include <boost/scoped_ptr.hpp> +#include <memory> using namespace ::com::sun::star; @@ -446,7 +446,7 @@ void FuObjectAnimationParameters::DoExecute( SfxRequest& rReq ) aSet.Put(SfxBoolItem(ATTR_ACTION_PLAYFULL, false)); SdAbstractDialogFactory* pFact = SdAbstractDialogFactory::Create(); - boost::scoped_ptr<SfxAbstractDialog> pDlg(pFact ? pFact->CreatSdActionDialog( NULL, &aSet, mpView ) : 0); + std::unique_ptr<SfxAbstractDialog> pDlg(pFact ? pFact->CreatSdActionDialog( NULL, &aSet, mpView ) : 0); short nResult = pDlg ? pDlg->Execute() : static_cast<short>(RET_CANCEL); diff --git a/sd/source/ui/func/fuolbull.cxx b/sd/source/ui/func/fuolbull.cxx index e6538561d9b2..653562aeb61e 100644 --- a/sd/source/ui/func/fuolbull.cxx +++ b/sd/source/ui/func/fuolbull.cxx @@ -38,7 +38,7 @@ #include <svx/nbdtmg.hxx> #include <svx/nbdtmgfact.hxx> #include <svx/svdoutl.hxx> -#include <boost/scoped_ptr.hpp> +#include <memory> using namespace svx::sidebar; namespace sd { @@ -82,7 +82,7 @@ void FuOutlineBullet::DoExecute( SfxRequest& rReq ) // create and execute dialog SdAbstractDialogFactory* pFact = SdAbstractDialogFactory::Create(); - boost::scoped_ptr<SfxAbstractTabDialog> pDlg(pFact ? pFact->CreateSdOutlineBulletTabDlg( NULL, &aNewAttr, mpView ) : 0); + std::unique_ptr<SfxAbstractTabDialog> pDlg(pFact ? pFact->CreateSdOutlineBulletTabDlg( NULL, &aNewAttr, mpView ) : 0); if( pDlg ) { if ( pPageItem ) @@ -97,7 +97,7 @@ void FuOutlineBullet::DoExecute( SfxRequest& rReq ) OutlinerView* pOLV = mpView->GetTextEditOutlinerView(); - boost::scoped_ptr< OutlineViewModelChangeGuard > aGuard; + std::unique_ptr< OutlineViewModelChangeGuard > aGuard; if (mpView->ISA(OutlineView)) { @@ -234,7 +234,7 @@ void FuOutlineBullet::SetCurrentBulletsNumbering(SfxRequest& rReq) } OutlinerView* pOLV = mpView->GetTextEditOutlinerView(); - boost::scoped_ptr< OutlineViewModelChangeGuard > aGuard; + std::unique_ptr< OutlineViewModelChangeGuard > aGuard; { if (mpView->ISA(OutlineView)) { diff --git a/sd/source/ui/func/fuoltext.cxx b/sd/source/ui/func/fuoltext.cxx index b7fbe74f2c7a..a3dceffd6599 100644 --- a/sd/source/ui/func/fuoltext.cxx +++ b/sd/source/ui/func/fuoltext.cxx @@ -35,7 +35,7 @@ #include "ViewShell.hxx" #include "OutlineViewShell.hxx" -#include <boost/scoped_ptr.hpp> +#include <memory> #include <stdio.h> @@ -189,7 +189,7 @@ bool FuOutlineText::KeyInput(const KeyEvent& rKEvt) { mpWindow->GrabFocus(); - boost::scoped_ptr< OutlineViewModelChangeGuard > aGuard; + std::unique_ptr< OutlineViewModelChangeGuard > aGuard; if( (nKeyGroup != KEYGROUP_CURSOR) && (nKeyGroup != KEYGROUP_FKEYS) ) aGuard.reset( new OutlineViewModelChangeGuard( *pOutlineView ) ); diff --git a/sd/source/ui/func/fupage.cxx b/sd/source/ui/func/fupage.cxx index 518f35683542..f652f82a54e3 100644 --- a/sd/source/ui/func/fupage.cxx +++ b/sd/source/ui/func/fupage.cxx @@ -67,7 +67,7 @@ #include "sdundogr.hxx" #include "helpids.h" -#include <boost/scoped_ptr.hpp> +#include <memory> using namespace com::sun::star; @@ -280,7 +280,7 @@ const SfxItemSet* FuPage::ExecuteDialog( vcl::Window* pParent ) } } - boost::scoped_ptr< SfxItemSet > pTempSet; + std::unique_ptr< SfxItemSet > pTempSet; if( GetSlotID() == SID_SELECT_BACKGROUND ) { @@ -310,7 +310,7 @@ const SfxItemSet* FuPage::ExecuteDialog( vcl::Window* pParent ) { // create the dialog SdAbstractDialogFactory* pFact = SdAbstractDialogFactory::Create(); - boost::scoped_ptr<SfxAbstractTabDialog> pDlg( pFact ? pFact->CreateSdTabPageDialog(NULL, &aMergedAttr, mpDocSh, mbDisplayBackgroundTabPage ) : 0 ); + std::unique_ptr<SfxAbstractTabDialog> pDlg( pFact ? pFact->CreateSdTabPageDialog(NULL, &aMergedAttr, mpDocSh, mbDisplayBackgroundTabPage ) : 0 ); if( pDlg.get() && pDlg->Execute() == RET_OK ) pTempSet.reset( new SfxItemSet(*pDlg->GetOutputItemSet()) ); } diff --git a/sd/source/ui/func/fuparagr.cxx b/sd/source/ui/func/fuparagr.cxx index fc4031d03d8b..e349856d2350 100644 --- a/sd/source/ui/func/fuparagr.cxx +++ b/sd/source/ui/func/fuparagr.cxx @@ -34,7 +34,7 @@ #include "drawdoc.hxx" #include "sdabstdlg.hxx" #include "sdattr.hrc" -#include <boost/scoped_ptr.hpp> +#include <memory> namespace sd { @@ -91,7 +91,7 @@ void FuParagraph::DoExecute( SfxRequest& rReq ) } SdAbstractDialogFactory* pFact = SdAbstractDialogFactory::Create(); - boost::scoped_ptr<SfxAbstractTabDialog> pDlg(pFact ? pFact->CreateSdParagraphTabDlg(NULL, &aNewAttr ) : 0); + std::unique_ptr<SfxAbstractTabDialog> pDlg(pFact ? pFact->CreateSdParagraphTabDlg(NULL, &aNewAttr ) : 0); if (!pDlg) return; diff --git a/sd/source/ui/func/fuprlout.cxx b/sd/source/ui/func/fuprlout.cxx index f087ad9de95f..b782e6f5f90a 100644 --- a/sd/source/ui/func/fuprlout.cxx +++ b/sd/source/ui/func/fuprlout.cxx @@ -52,7 +52,7 @@ #include <editeng/outliner.hxx> #include <editeng/editdata.hxx> #include "sdabstdlg.hxx" -#include <boost/scoped_ptr.hpp> +#include <memory> namespace sd { @@ -110,7 +110,7 @@ void FuPresentationLayout::DoExecute( SfxRequest& rReq ) = slidesorter::SlideSorterViewShell::GetSlideSorter(mpViewShell->GetViewShellBase()); if (pSlideSorterViewShell) { - boost::shared_ptr<slidesorter::SlideSorterViewShell::PageSelection> xSelection( + std::shared_ptr<slidesorter::SlideSorterViewShell::PageSelection> xSelection( pSlideSorterViewShell->GetPageSelection()); if (xSelection) { @@ -175,7 +175,7 @@ void FuPresentationLayout::DoExecute( SfxRequest& rReq ) else { SdAbstractDialogFactory* pFact = SdAbstractDialogFactory::Create(); - boost::scoped_ptr<AbstractSdPresLayoutDlg> pDlg(pFact ? pFact->CreateSdPresLayoutDlg(mpDocSh, NULL, aSet ) : 0); + std::unique_ptr<AbstractSdPresLayoutDlg> pDlg(pFact ? pFact->CreateSdPresLayoutDlg(mpDocSh, NULL, aSet ) : 0); sal_uInt16 nResult = pDlg ? pDlg->Execute() : static_cast<short>(RET_CANCEL); diff --git a/sd/source/ui/func/fuprobjs.cxx b/sd/source/ui/func/fuprobjs.cxx index 46988bf8fed3..e49c96762c4f 100644 --- a/sd/source/ui/func/fuprobjs.cxx +++ b/sd/source/ui/func/fuprobjs.cxx @@ -39,7 +39,7 @@ #include "prlayout.hxx" #include "unchss.hxx" #include "sdabstdlg.hxx" -#include <boost/scoped_ptr.hpp> +#include <memory> namespace sd { @@ -140,7 +140,7 @@ void FuPresentationObjects::DoExecute( SfxRequest& ) SfxStyleSheetBase& rStyleSheet = *pStyleSheet; SdAbstractDialogFactory* pFact = SdAbstractDialogFactory::Create(); - boost::scoped_ptr<SfxAbstractTabDialog> pDlg(pFact ? pFact->CreateSdPresLayoutTemplateDlg( mpDocSh, NULL, SdResId( nDlgId ), rStyleSheet, ePO, pStyleSheetPool ) : 0); + std::unique_ptr<SfxAbstractTabDialog> pDlg(pFact ? pFact->CreateSdPresLayoutTemplateDlg( mpDocSh, NULL, SdResId( nDlgId ), rStyleSheet, ePO, pStyleSheetPool ) : 0); if( pDlg && (pDlg->Execute() == RET_OK) ) { const SfxItemSet* pOutSet = pDlg->GetOutputItemSet(); diff --git a/sd/source/ui/func/fuscale.cxx b/sd/source/ui/func/fuscale.cxx index 9729951fd721..2c2db012d629 100644 --- a/sd/source/ui/func/fuscale.cxx +++ b/sd/source/ui/func/fuscale.cxx @@ -39,7 +39,7 @@ #include <sfx2/zoomitem.hxx> #include <sfx2/request.hxx> #include <svx/svxdlg.hxx> -#include <boost/scoped_ptr.hpp> +#include <memory> namespace sd { @@ -71,7 +71,7 @@ void FuScale::DoExecute( SfxRequest& rReq ) if( !pArgs ) { SfxItemSet aNewAttr( mpDoc->GetPool(), SID_ATTR_ZOOM, SID_ATTR_ZOOM ); - boost::scoped_ptr<SvxZoomItem> pZoomItem; + std::unique_ptr<SvxZoomItem> pZoomItem; SvxZoomEnableFlags nZoomValues = SvxZoomEnableFlags::ALL; nValue = (sal_Int16) mpWindow->GetZoom(); @@ -110,7 +110,7 @@ void FuScale::DoExecute( SfxRequest& rReq ) pZoomItem->SetValueSet( nZoomValues ); aNewAttr.Put( *pZoomItem ); - boost::scoped_ptr<AbstractSvxZoomDialog> pDlg; + std::unique_ptr<AbstractSvxZoomDialog> pDlg; SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create(); if(pFact) { diff --git a/sd/source/ui/func/fusldlg.cxx b/sd/source/ui/func/fusldlg.cxx index 02804b71a55b..c7b563f0d3d7 100644 --- a/sd/source/ui/func/fusldlg.cxx +++ b/sd/source/ui/func/fusldlg.cxx @@ -32,7 +32,7 @@ #include "Window.hxx" #include "optsitem.hxx" #include "sdabstdlg.hxx" -#include <boost/scoped_ptr.hpp> +#include <memory> namespace sd { @@ -110,7 +110,7 @@ void FuSlideShowDlg::DoExecute( SfxRequest& ) aDlgSet.Put( SfxInt32Item( ATTR_PRESENT_DISPLAY, pOptions->GetDisplay() ) ); SdAbstractDialogFactory* pFact = SdAbstractDialogFactory::Create(); - boost::scoped_ptr<AbstractSdStartPresDlg> pDlg(pFact ? pFact->CreateSdStartPresentationDlg(mpWindow, aDlgSet, aPageNameList, pCustomShowList) : 0); + std::unique_ptr<AbstractSdStartPresDlg> pDlg(pFact ? pFact->CreateSdStartPresentationDlg(mpWindow, aDlgSet, aPageNameList, pCustomShowList) : 0); if( pDlg && (pDlg->Execute() == RET_OK) ) { OUString aPage; diff --git a/sd/source/ui/func/fusnapln.cxx b/sd/source/ui/func/fusnapln.cxx index 4014137e40f7..dc522af70aa5 100644 --- a/sd/source/ui/func/fusnapln.cxx +++ b/sd/source/ui/func/fusnapln.cxx @@ -35,7 +35,7 @@ #include "sdabstdlg.hxx" #include "app.hrc" #include <svx/svdpagv.hxx> -#include <boost/scoped_ptr.hpp> +#include <memory> namespace sd { @@ -111,7 +111,7 @@ void FuSnapLine::DoExecute( SfxRequest& rReq ) aNewAttr.Put(SfxInt32Item(ATTR_SNAPLINE_Y, aLinePos.Y())); SdAbstractDialogFactory* pFact = SdAbstractDialogFactory::Create(); - boost::scoped_ptr<AbstractSdSnapLineDlg> pDlg(pFact ? pFact->CreateSdSnapLineDlg( NULL, aNewAttr, mpView ) : 0); + std::unique_ptr<AbstractSdSnapLineDlg> pDlg(pFact ? pFact->CreateSdSnapLineDlg( NULL, aNewAttr, mpView ) : 0); OSL_ASSERT(pDlg); if (!pDlg) return; diff --git a/sd/source/ui/func/futempl.cxx b/sd/source/ui/func/futempl.cxx index 445feef4126e..2b4624758356 100644 --- a/sd/source/ui/func/futempl.cxx +++ b/sd/source/ui/func/futempl.cxx @@ -65,7 +65,7 @@ #include "strings.hrc" #include "helpids.h" #include "sdabstdlg.hxx" -#include <boost/scoped_ptr.hpp> +#include <memory> using namespace com::sun::star::uno; using namespace com::sun::star::container; @@ -296,8 +296,8 @@ void FuTemplate::DoExecute( SfxRequest& rReq ) if( pStyleSheet ) { - boost::scoped_ptr<SfxAbstractTabDialog> pStdDlg; - boost::scoped_ptr<SfxAbstractTabDialog> pPresDlg; + std::unique_ptr<SfxAbstractTabDialog> pStdDlg; + std::unique_ptr<SfxAbstractTabDialog> pPresDlg; SdAbstractDialogFactory* pFact = SdAbstractDialogFactory::Create(); bool bOldDocInOtherLanguage = false; SfxItemSet aOriSet( pStyleSheet->GetItemSet() ); diff --git a/sd/source/ui/func/futransf.cxx b/sd/source/ui/func/futransf.cxx index 24f6a82f83e2..16a07a9cefac 100644 --- a/sd/source/ui/func/futransf.cxx +++ b/sd/source/ui/func/futransf.cxx @@ -31,7 +31,7 @@ #include "drawdoc.hxx" #include <svx/svxdlg.hxx> -#include <boost/scoped_ptr.hpp> +#include <memory> namespace sd { @@ -74,7 +74,7 @@ void FuTransform::DoExecute( SfxRequest& rReq ) SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create(); if ( pFact ) { - boost::scoped_ptr< SfxAbstractTabDialog > pDlg( pFact->CreateCaptionDialog( NULL, mpView ) ); + std::unique_ptr< SfxAbstractTabDialog > pDlg( pFact->CreateCaptionDialog( NULL, mpView ) ); const sal_uInt16* pRange = pDlg->GetInputRanges( *aNewAttr.GetPool() ); SfxItemSet aCombSet( *aNewAttr.GetPool(), pRange ); @@ -94,7 +94,7 @@ void FuTransform::DoExecute( SfxRequest& rReq ) SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create(); if(pFact) { - boost::scoped_ptr< SfxAbstractTabDialog > pDlg( pFact->CreateSvxTransformTabDialog( NULL, &aSet, mpView ) ); + std::unique_ptr< SfxAbstractTabDialog > pDlg( pFact->CreateSvxTransformTabDialog( NULL, &aSet, mpView ) ); if( pDlg.get() && (pDlg->Execute() == RET_OK) ) { rReq.Done( *( pDlg->GetOutputItemSet() ) ); diff --git a/sd/source/ui/func/futxtatt.cxx b/sd/source/ui/func/futxtatt.cxx index 4c61d4dbad8b..7342f7b9934b 100644 --- a/sd/source/ui/func/futxtatt.cxx +++ b/sd/source/ui/func/futxtatt.cxx @@ -26,7 +26,7 @@ #include "View.hxx" #include "ViewShell.hxx" #include "drawdoc.hxx" -#include <boost/scoped_ptr.hpp> +#include <memory> namespace sd { @@ -59,7 +59,7 @@ void FuTextAttrDlg::DoExecute( SfxRequest& rReq ) if( !pArgs ) { SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create(); - boost::scoped_ptr<SfxAbstractTabDialog> pDlg(pFact->CreateTextTabDialog( NULL, &aNewAttr, mpView )); + std::unique_ptr<SfxAbstractTabDialog> pDlg(pFact->CreateTextTabDialog( NULL, &aNewAttr, mpView )); sal_uInt16 nResult = pDlg->Execute(); diff --git a/sd/source/ui/func/fuvect.cxx b/sd/source/ui/func/fuvect.cxx index 798639c89030..2ceda3bc7d70 100644 --- a/sd/source/ui/func/fuvect.cxx +++ b/sd/source/ui/func/fuvect.cxx @@ -29,7 +29,7 @@ #include "strings.hrc" #include "sdresid.hxx" #include "sdabstdlg.hxx" -#include <boost/scoped_ptr.hpp> +#include <memory> namespace sd { @@ -64,7 +64,7 @@ void FuVectorize::DoExecute( SfxRequest& ) if( pObj && pObj->ISA( SdrGrafObj ) ) { SdAbstractDialogFactory* pFact = SdAbstractDialogFactory::Create(); - boost::scoped_ptr<AbstractSdVectorizeDlg> pDlg(pFact ? pFact->CreateSdVectorizeDlg( mpWindow, static_cast<SdrGrafObj*>( pObj )->GetGraphic().GetBitmap(), mpDocSh ) : 0); + std::unique_ptr<AbstractSdVectorizeDlg> pDlg(pFact ? pFact->CreateSdVectorizeDlg( mpWindow, static_cast<SdrGrafObj*>( pObj )->GetGraphic().GetBitmap(), mpDocSh ) : 0); if( pDlg && pDlg->Execute() == RET_OK ) { const GDIMetaFile& rMtf = pDlg->GetGDIMetaFile(); diff --git a/sd/source/ui/inc/DocumentRenderer.hxx b/sd/source/ui/inc/DocumentRenderer.hxx index fae3d8dbe6fb..37fd6d539b69 100644 --- a/sd/source/ui/inc/DocumentRenderer.hxx +++ b/sd/source/ui/inc/DocumentRenderer.hxx @@ -25,7 +25,7 @@ #include <com/sun/star/view/XRenderable.hpp> #include <cppuhelper/compbase.hxx> #include <cppuhelper/basemutex.hxx> -#include <boost/scoped_ptr.hpp> +#include <memory> namespace sd { @@ -63,7 +63,7 @@ public: private: class Implementation; - ::boost::scoped_ptr<Implementation> mpImpl; + std::unique_ptr<Implementation> mpImpl; }; } // end of namespace sd diff --git a/sd/source/ui/inc/OutlinerIteratorImpl.hxx b/sd/source/ui/inc/OutlinerIteratorImpl.hxx index df8ef82fdcae..946bba06ea7c 100644 --- a/sd/source/ui/inc/OutlinerIteratorImpl.hxx +++ b/sd/source/ui/inc/OutlinerIteratorImpl.hxx @@ -22,7 +22,7 @@ #include <svx/svdobj.hxx> #include "OutlinerIterator.hxx" -#include <boost/weak_ptr.hpp> +#include <memory> class SdDrawDocument; class SdPage; @@ -55,10 +55,10 @@ public: the direction is forwards otherwise it is backwards. */ IteratorImplBase (SdDrawDocument* pDocument, - const ::boost::weak_ptr<ViewShell>& rpViewShellWeak, + const std::weak_ptr<ViewShell>& rpViewShellWeak, bool bDirectionIsForward); IteratorImplBase (SdDrawDocument* pDocument, - const ::boost::weak_ptr<ViewShell>& rpViewShellWeak, + const std::weak_ptr<ViewShell>& rpViewShellWeak, bool bDirectionIsForward, PageKind ePageKind, EditMode eEditMode); virtual ~IteratorImplBase(); @@ -115,7 +115,7 @@ protected: /// The document on whose data the iterator operates. SdDrawDocument* mpDocument; /// Necessary secondary source of information. - ::boost::weak_ptr<ViewShell> mpViewShellWeak; + std::weak_ptr<ViewShell> mpViewShellWeak; /// Specifies the search direction. bool mbDirectionIsForward; }; @@ -137,7 +137,7 @@ public: const ::std::vector< SdrObjectWeakRef >& rObjectList, sal_Int32 nObjectIndex, SdDrawDocument* pDocument, - const ::boost::weak_ptr<ViewShell>& rpViewShellWeak, + const std::weak_ptr<ViewShell>& rpViewShellWeak, bool bDirectionIsForward); SelectionIteratorImpl (const SelectionIteratorImpl& rObject); virtual ~SelectionIteratorImpl(); @@ -179,12 +179,12 @@ public: ViewIteratorImpl ( sal_Int32 nPageIndex, SdDrawDocument* pDocument, - const ::boost::weak_ptr<ViewShell>& rpViewShellWeak, + const std::weak_ptr<ViewShell>& rpViewShellWeak, bool bDirectionIsForward); ViewIteratorImpl ( sal_Int32 nPageIndex, SdDrawDocument* pDocument, - const ::boost::weak_ptr<ViewShell>& rpViewShellWeak, + const std::weak_ptr<ViewShell>& rpViewShellWeak, bool bDirectionIsForward, PageKind ePageKind, EditMode eEditMode); @@ -234,7 +234,7 @@ public: PageKind ePageKind, EditMode eEditMode, SdDrawDocument* pDocument, - const ::boost::weak_ptr<ViewShell>& rpViewShellWeak, + const std::weak_ptr<ViewShell>& rpViewShellWeak, bool bDirectionIsForward); virtual ~DocumentIteratorImpl(); diff --git a/sd/source/ui/inc/PaneDockingWindow.hxx b/sd/source/ui/inc/PaneDockingWindow.hxx index a8d3b2167b34..528adf971f92 100644 --- a/sd/source/ui/inc/PaneDockingWindow.hxx +++ b/sd/source/ui/inc/PaneDockingWindow.hxx @@ -23,8 +23,7 @@ #include <sfx2/titledockwin.hxx> #include <sfx2/viewfrm.hxx> -#include <boost/scoped_ptr.hpp> -#include <boost/shared_ptr.hpp> +#include <memory> class SplitWindow; diff --git a/sd/source/ui/inc/RemoteServer.hxx b/sd/source/ui/inc/RemoteServer.hxx index 91718f9a364e..531554ff2e77 100644 --- a/sd/source/ui/inc/RemoteServer.hxx +++ b/sd/source/ui/inc/RemoteServer.hxx @@ -16,10 +16,9 @@ #include <unistd.h> #endif #include <sys/types.h> +#include <memory> #include <vector> -#include <boost/shared_ptr.hpp> - #include <osl/mutex.hxx> #include <osl/socket.hxx> #include <rtl/ref.hxx> @@ -73,10 +72,10 @@ namespace sd static void presentationStopped(); // For the control dialog - SD_DLLPUBLIC static std::vector< ::boost::shared_ptr< ClientInfo > > getClients(); - SD_DLLPUBLIC static bool connectClient( ::boost::shared_ptr< ClientInfo > pClient, + SD_DLLPUBLIC static std::vector< std::shared_ptr< ClientInfo > > getClients(); + SD_DLLPUBLIC static bool connectClient( std::shared_ptr< ClientInfo > pClient, const OUString& aPin ); - SD_DLLPUBLIC static void deauthoriseClient( ::boost::shared_ptr< ClientInfo > pClient ); + SD_DLLPUBLIC static void deauthoriseClient( std::shared_ptr< ClientInfo > pClient ); /// ensure that discoverability (eg. for Bluetooth) is enabled SD_DLLPUBLIC static void ensureDiscoverable(); @@ -93,7 +92,7 @@ namespace sd static ::std::vector<Communicator*> sCommunicators; osl::AcceptorSocket mSocket; - ::std::vector< ::boost::shared_ptr< ClientInfoInternal > > mAvailableClients; + ::std::vector< std::shared_ptr< ClientInfoInternal > > mAvailableClients; void execute() SAL_OVERRIDE; }; diff --git a/sd/source/ui/inc/SlideSorter.hxx b/sd/source/ui/inc/SlideSorter.hxx index 42dc811b68c4..0b7273a23abd 100644 --- a/sd/source/ui/inc/SlideSorter.hxx +++ b/sd/source/ui/inc/SlideSorter.hxx @@ -26,10 +26,9 @@ #include <cppuhelper/weakref.hxx> #include <sfx2/viewfrm.hxx> #include <boost/noncopyable.hpp> -#include <boost/shared_ptr.hpp> -#include <boost/scoped_ptr.hpp> #include <boost/current_function.hpp> #include <vcl/scrbar.hxx> +#include <memory> class ScrollBar; class ScrollBarBox; @@ -95,7 +94,7 @@ public: The little square enclosed by the two scroll bars. Typically the one from the ViewShell. */ - static ::boost::shared_ptr<SlideSorter> CreateSlideSorter ( + static std::shared_ptr<SlideSorter> CreateSlideSorter ( ViewShell& rViewShell, sd::Window* pContentWindow, ScrollBar* pHorizontalScrollBar, @@ -112,7 +111,7 @@ public: The parent window of the internally created content window and scroll bars. */ - static ::boost::shared_ptr<SlideSorter> CreateSlideSorter ( + static std::shared_ptr<SlideSorter> CreateSlideSorter ( ViewShellBase& rBase, ViewShell* pViewShell, vcl::Window& rParentWindow); @@ -179,11 +178,11 @@ public: /** Return a collection of properties that are used throughout the slide sorter. */ - ::boost::shared_ptr<controller::Properties> GetProperties() const; + std::shared_ptr<controller::Properties> GetProperties() const; /** Return the active theme which gives access to colors and fonts. */ - ::boost::shared_ptr<view::Theme> GetTheme() const; + std::shared_ptr<view::Theme> GetTheme() const; protected: /** This virtual method makes it possible to create a specialization of @@ -215,9 +214,9 @@ protected: private: bool mbIsValid; - ::boost::scoped_ptr<controller::SlideSorterController> mpSlideSorterController; - ::boost::scoped_ptr<model::SlideSorterModel> mpSlideSorterModel; - ::boost::scoped_ptr<view::SlideSorterView> mpSlideSorterView; + std::unique_ptr<controller::SlideSorterController> mpSlideSorterController; + std::unique_ptr<model::SlideSorterModel> mpSlideSorterModel; + std::unique_ptr<view::SlideSorterView> mpSlideSorterView; ::com::sun::star::uno::WeakReference<com::sun::star::frame::XController> mxControllerWeak; ViewShell* mpViewShell; ViewShellBase* mpViewShellBase; @@ -234,8 +233,8 @@ private: /** Some slide sorter wide properties that are used in different classes. */ - ::boost::shared_ptr<controller::Properties> mpProperties; - ::boost::shared_ptr<view::Theme> mpTheme; + std::shared_ptr<controller::Properties> mpProperties; + std::shared_ptr<view::Theme> mpTheme; SlideSorter ( ViewShell& rViewShell, diff --git a/sd/source/ui/inc/SlideSorterViewShell.hxx b/sd/source/ui/inc/SlideSorterViewShell.hxx index cd590d8869b9..892c4897ad4a 100644 --- a/sd/source/ui/inc/SlideSorterViewShell.hxx +++ b/sd/source/ui/inc/SlideSorterViewShell.hxx @@ -24,7 +24,7 @@ #include "glob.hxx" #include <sfx2/shell.hxx> #include <sfx2/viewfac.hxx> -#include <boost/shared_ptr.hpp> +#include <memory> #include <vector> namespace sd { namespace slidesorter { namespace controller { @@ -49,7 +49,7 @@ private: static void InitInterface_Impl(); public: - static ::boost::shared_ptr<SlideSorterViewShell> Create( + static std::shared_ptr<SlideSorterViewShell> Create( SfxViewFrame* pFrame, ViewShellBase& rViewShellBase, vcl::Window* pParentWindow, @@ -151,9 +151,9 @@ public: /** Return the set of selected pages. */ - ::boost::shared_ptr<PageSelection> GetPageSelection() const; + std::shared_ptr<PageSelection> GetPageSelection() const; - void SetPageSelection (const ::boost::shared_ptr<PageSelection>& rSelection); + void SetPageSelection (const std::shared_ptr<PageSelection>& rSelection); /** Add a listener that is called when the selection of the slide sorter changes. @@ -202,7 +202,7 @@ protected: virtual ::svl::IUndoManager* ImpGetUndoManager() const SAL_OVERRIDE; private: - ::boost::shared_ptr<SlideSorter> mpSlideSorter; + std::shared_ptr<SlideSorter> mpSlideSorter; bool mbIsArrangeGUIElementsPending; SlideSorterViewShell ( @@ -218,10 +218,10 @@ private: */ virtual void UpdateScrollBars() SAL_OVERRIDE; - void PostMoveSlidesActions(const ::boost::shared_ptr<SlideSorterViewShell::PageSelection> &rpSelection); + void PostMoveSlidesActions(const std::shared_ptr<SlideSorterViewShell::PageSelection> &rpSelection); }; -typedef ::boost::shared_ptr<SlideSorterViewShell::PageSelection> SharedPageSelection; +typedef std::shared_ptr<SlideSorterViewShell::PageSelection> SharedPageSelection; } } // end of namespace ::sd::slidesorter diff --git a/sd/source/ui/inc/TemplateScanner.hxx b/sd/source/ui/inc/TemplateScanner.hxx index 1a066eebd0c0..d0b87d7cc27a 100644 --- a/sd/source/ui/inc/TemplateScanner.hxx +++ b/sd/source/ui/inc/TemplateScanner.hxx @@ -25,9 +25,8 @@ #include <ucbhelper/content.hxx> #include "com/sun/star/uno/Reference.hxx" +#include <memory> #include <vector> -#include <boost/scoped_ptr.hpp> -#include <boost/shared_ptr.hpp> namespace com { namespace sun { namespace star { namespace ucb { class XContent; @@ -65,7 +64,7 @@ public: bool operator()(TemplateEntry* pA, TemplateEntry* pB) const; private: - ::boost::shared_ptr<comphelper::string::NaturalStringSorter> mpStringSorter; + std::shared_ptr<comphelper::string::NaturalStringSorter> mpStringSorter; }; /** Representation of a template or layout folder. @@ -75,7 +74,7 @@ class TemplateDir public: TemplateDir (const OUString& rsRegion, const OUString& rsUrl ) : msRegion(rsRegion), msUrl(rsUrl), maEntries(), - mbSortingEnabled(false), mpEntryCompare(NULL) {} + mbSortingEnabled(false), mpEntryCompare(nullptr) {} OUString msRegion; OUString msUrl; @@ -86,7 +85,7 @@ public: private: bool mbSortingEnabled; - ::boost::scoped_ptr<TemplateEntryCompare> mpEntryCompare; + std::unique_ptr<TemplateEntryCompare> mpEntryCompare; }; /** This class scans the template folders for impress templates. There are @@ -137,7 +136,7 @@ public: /** Return the TemplateDir object that was last added to mpTemplateDirectory. @return - <NULL/> is returned either before the template scanning is + <nullptr/> is returned either before the template scanning is started or after it has ended. */ const TemplateEntry* GetLastAddedEntry() const { return mpLastAddedEntry;} @@ -183,7 +182,7 @@ private: /** The folders that are collected by GatherFolderList(). */ class FolderDescriptorList; - ::boost::scoped_ptr<FolderDescriptorList> mpFolderDescriptors; + std::unique_ptr<FolderDescriptorList> mpFolderDescriptors; /** Set of state variables used by the methods InitializeFolderScanning(), GatherFolderList(), ScanFolder(), diff --git a/sd/source/ui/inc/ToolBarManager.hxx b/sd/source/ui/inc/ToolBarManager.hxx index 5263dd059e0b..fa681d682fd7 100644 --- a/sd/source/ui/inc/ToolBarManager.hxx +++ b/sd/source/ui/inc/ToolBarManager.hxx @@ -26,9 +26,7 @@ #include <com/sun/star/frame/XFrame.hpp> #include <sal/types.h> -#include <boost/scoped_ptr.hpp> -#include <boost/shared_ptr.hpp> -#include <boost/enable_shared_from_this.hpp> +#include <memory> class SdrView; @@ -63,16 +61,16 @@ class ViewShellManager; in a short time on a view shell switch. */ class ToolBarManager - : public ::boost::enable_shared_from_this<ToolBarManager> + : public std::enable_shared_from_this<ToolBarManager> { public: /** Use this method instead of the constructor to create new objects of this class. */ - static ::boost::shared_ptr<ToolBarManager> Create ( + static std::shared_ptr<ToolBarManager> Create ( ViewShellBase& rBase, - const ::boost::shared_ptr<tools::EventMultiplexer>& rpMultiplexer, - const ::boost::shared_ptr<ViewShellManager>& rpViewShellManager); + const std::shared_ptr<tools::EventMultiplexer>& rpMultiplexer, + const std::shared_ptr<ViewShellManager>& rpViewShellManager); ~ToolBarManager(); @@ -243,11 +241,11 @@ public: bar operations are made in a row. */ class UpdateLock { public: - UpdateLock(const ::boost::shared_ptr<ToolBarManager>& rpManager) + UpdateLock(const std::shared_ptr<ToolBarManager>& rpManager) : mpManager(rpManager) { mpManager->LockUpdate(); } ~UpdateLock() { mpManager->UnlockUpdate(); } private: - ::boost::shared_ptr<ToolBarManager> mpManager; + std::shared_ptr<ToolBarManager> mpManager; }; friend class UpdateLock; @@ -255,7 +253,7 @@ public: private: class Implementation; - ::boost::scoped_ptr<Implementation> mpImpl; + std::unique_ptr<Implementation> mpImpl; /** The ViewShellBase is used to get the XLayoutManager and to determine the plug in mode. diff --git a/sd/source/ui/inc/ViewShell.hxx b/sd/source/ui/inc/ViewShell.hxx index 24fe233896d9..bba5c73176a0 100644 --- a/sd/source/ui/inc/ViewShell.hxx +++ b/sd/source/ui/inc/ViewShell.hxx @@ -34,7 +34,6 @@ #include <com/sun/star/drawing/XDrawSubController.hpp> #include <memory> -#include <boost/shared_ptr.hpp> class SdPage; class SvxRuler; diff --git a/sd/source/ui/inc/ViewShellBase.hxx b/sd/source/ui/inc/ViewShellBase.hxx index 832add5cfb3f..6ce7e4d5ed04 100644 --- a/sd/source/ui/inc/ViewShellBase.hxx +++ b/sd/source/ui/inc/ViewShellBase.hxx @@ -27,8 +27,7 @@ #include "glob.hxx" #include <sfx2/viewsh.hxx> #include <sfx2/viewfac.hxx> -#include <boost/shared_ptr.hpp> -#include <boost/scoped_ptr.hpp> +#include <memory> class SdDrawDocument; class SfxRequest; @@ -85,13 +84,13 @@ public: */ void LateInit (const OUString& rsDefaultView); - ::boost::shared_ptr<ViewShellManager> GetViewShellManager() const; + std::shared_ptr<ViewShellManager> GetViewShellManager() const; /** Return the main view shell stacked on the called ViewShellBase object. This is usually the view shell displayed in the center pane. */ - ::boost::shared_ptr<ViewShell> GetMainViewShell() const; + std::shared_ptr<ViewShell> GetMainViewShell() const; /** When given a view frame this static method returns the corresponding sd::ViewShellBase object. @@ -201,15 +200,15 @@ public: events from various sources. This method must not be called before LateInit() has terminated. */ - ::boost::shared_ptr<tools::EventMultiplexer> GetEventMultiplexer(); + std::shared_ptr<tools::EventMultiplexer> GetEventMultiplexer(); /** returns the complete area of the current view relative to the frame window */ const Rectangle& getClientRectangle() const; - ::boost::shared_ptr<ToolBarManager> GetToolBarManager() const; - ::boost::shared_ptr<FormShellManager> GetFormShellManager() const; + std::shared_ptr<ToolBarManager> GetToolBarManager() const; + std::shared_ptr<FormShellManager> GetFormShellManager() const; DrawController& GetDrawController() const; @@ -234,7 +233,7 @@ protected: private: class Implementation; - ::boost::scoped_ptr<Implementation> mpImpl; + std::unique_ptr<Implementation> mpImpl; DrawDocShell* mpDocShell; SdDrawDocument* mpDocument; diff --git a/sd/source/ui/inc/ViewShellImplementation.hxx b/sd/source/ui/inc/ViewShellImplementation.hxx index e4a7d26a64b4..291fb201698d 100644 --- a/sd/source/ui/inc/ViewShellImplementation.hxx +++ b/sd/source/ui/inc/ViewShellImplementation.hxx @@ -24,8 +24,6 @@ #include "ViewShellManager.hxx" #include "ToolBarManager.hxx" -#include <boost/shared_ptr.hpp> -#include <boost/weak_ptr.hpp> #include <memory> class SvxIMapDlg; @@ -64,8 +62,8 @@ public: /** Create a new instance. This allows the mpSelf member to be set automatically. */ - static ::boost::shared_ptr<ToolBarManagerLock> Create ( - const ::boost::shared_ptr<ToolBarManager>& rpManager); + static std::shared_ptr<ToolBarManagerLock> Create ( + const std::shared_ptr<ToolBarManager>& rpManager); /** Release the lock. When the UI is captured (Application::IsUICaptured() returns <TRUE/>) then the lock is released later asynchronously. @@ -87,8 +85,8 @@ public: its own lifetime. This, of course, does work only when no one holds another shared_ptr longer than only temporary. */ - ::boost::shared_ptr<ToolBarManagerLock> mpSelf; - ToolBarManagerLock (const ::boost::shared_ptr<sd::ToolBarManager>& rpManager); + std::shared_ptr<ToolBarManagerLock> mpSelf; + ToolBarManagerLock (const std::shared_ptr<sd::ToolBarManager>& rpManager); ~ToolBarManagerLock(); class Deleter; @@ -96,7 +94,7 @@ public: }; // The member is not a unqiue_ptr because it takes over its own life time // control. - ::boost::weak_ptr<ToolBarManagerLock> mpUpdateLockForMouse; + std::weak_ptr<ToolBarManagerLock> mpUpdateLockForMouse; Implementation (ViewShell& rViewShell); ~Implementation(); diff --git a/sd/source/ui/inc/ViewShellManager.hxx b/sd/source/ui/inc/ViewShellManager.hxx index 66eb593f8c18..3b30fcc12c75 100644 --- a/sd/source/ui/inc/ViewShellManager.hxx +++ b/sd/source/ui/inc/ViewShellManager.hxx @@ -22,7 +22,6 @@ #include "ShellFactory.hxx" #include <memory> -#include <boost/shared_ptr.hpp> class FmFormShell; class SfxShell; @@ -54,7 +53,7 @@ class ViewShellBase; class ViewShellManager { public: - typedef ::boost::shared_ptr<ShellFactory<SfxShell> > SharedShellFactory; + typedef std::shared_ptr<ShellFactory<SfxShell> > SharedShellFactory; ViewShellManager (ViewShellBase& rBase); @@ -173,11 +172,11 @@ public: class UpdateLock { public: - UpdateLock (const ::boost::shared_ptr<ViewShellManager>& rpManager) + UpdateLock (const std::shared_ptr<ViewShellManager>& rpManager) : mpManager(rpManager) {mpManager->LockUpdate();} ~UpdateLock() {mpManager->UnlockUpdate();}; private: - ::boost::shared_ptr<ViewShellManager> mpManager; + std::shared_ptr<ViewShellManager> mpManager; }; friend class UpdateLock; diff --git a/sd/source/ui/inc/ViewTabBar.hxx b/sd/source/ui/inc/ViewTabBar.hxx index d298fd5b3f5c..67c489983a97 100644 --- a/sd/source/ui/inc/ViewTabBar.hxx +++ b/sd/source/ui/inc/ViewTabBar.hxx @@ -32,9 +32,8 @@ #include <cppuhelper/compbase.hxx> #include "MutexOwner.hxx" +#include <memory> #include <vector> -#include <boost/scoped_ptr.hpp> -#include <boost/shared_ptr.hpp> namespace sd { class ViewShellBase; diff --git a/sd/source/ui/inc/framework/Configuration.hxx b/sd/source/ui/inc/framework/Configuration.hxx index c5b60e2c2c4a..7bf486fc9605 100644 --- a/sd/source/ui/inc/framework/Configuration.hxx +++ b/sd/source/ui/inc/framework/Configuration.hxx @@ -28,7 +28,7 @@ #include <com/sun/star/container/XNamed.hpp> #include <cppuhelper/compbase.hxx> -#include <boost/scoped_ptr.hpp> +#include <memory> namespace { @@ -144,7 +144,7 @@ private: /** The resource container holds the URLs of unique resource and of resource linked to unique resources. */ - ::boost::scoped_ptr<ResourceContainer> mpResourceContainer; + std::unique_ptr<ResourceContainer> mpResourceContainer; /** The broadcaster used for notifying listeners of requests for configuration changes. diff --git a/sd/source/ui/inc/framework/ConfigurationController.hxx b/sd/source/ui/inc/framework/ConfigurationController.hxx index c9802c72db37..5cdbf0fcc128 100644 --- a/sd/source/ui/inc/framework/ConfigurationController.hxx +++ b/sd/source/ui/inc/framework/ConfigurationController.hxx @@ -35,9 +35,8 @@ #include <cppuhelper/compbase.hxx> #include <rtl/ref.hxx> -#include <boost/scoped_ptr.hpp> -#include <boost/shared_ptr.hpp> #include <boost/noncopyable.hpp> +#include <memory> namespace { @@ -195,7 +194,7 @@ public: private: class Implementation; - ::boost::scoped_ptr<Implementation> mpImplementation; + std::unique_ptr<Implementation> mpImplementation; bool mbIsDisposed; /** When the called object has already been disposed this method throws diff --git a/sd/source/ui/inc/framework/FrameworkHelper.hxx b/sd/source/ui/inc/framework/FrameworkHelper.hxx index 8407203e7644..c5a688d4e4c3 100644 --- a/sd/source/ui/inc/framework/FrameworkHelper.hxx +++ b/sd/source/ui/inc/framework/FrameworkHelper.hxx @@ -28,12 +28,9 @@ #include <com/sun/star/drawing/framework/XView.hpp> #include <com/sun/star/lang/XEventListener.hpp> -#include <boost/scoped_ptr.hpp> -#include <boost/shared_ptr.hpp> -#include <boost/enable_shared_from_this.hpp> - #include <functional> #include <map> +#include <memory> namespace sd { class ViewShell; @@ -54,7 +51,7 @@ namespace sd { namespace framework { controllers called by it throws a DisposedException. */ class FrameworkHelper - : public ::boost::enable_shared_from_this<FrameworkHelper>, + : public std::enable_shared_from_this<FrameworkHelper>, public SdGlobalResource { public: @@ -108,7 +105,7 @@ public: ViewShellBase. If such an object does not yet exist, a new one is created. */ - static ::boost::shared_ptr<FrameworkHelper> Instance (ViewShellBase& rBase); + static ::std::shared_ptr<FrameworkHelper> Instance (ViewShellBase& rBase); /** Mark the FrameworkHelper object for the given ViewShellBase as disposed. A following ReleaseInstance() call will destroy the @@ -144,7 +141,7 @@ public: When the ViewShell pointer can not be inferred from the given reference then an empty pointer is returned. */ - static ::boost::shared_ptr<ViewShell> GetViewShell ( + static ::std::shared_ptr<ViewShell> GetViewShell ( const css::uno::Reference<css::drawing::framework::XView>& rxView); typedef ::std::function<bool (const css::drawing::framework::ConfigurationChangeEvent&)> @@ -171,7 +168,7 @@ public: of the involved objects does not support XUnoTunnel (where necessary). */ - ::boost::shared_ptr<ViewShell> GetViewShell (const OUString& rsPaneURL); + ::std::shared_ptr<ViewShell> GetViewShell (const OUString& rsPaneURL); /** Return a reference to the view that is displayed in the specified pane. See GetViewShell () for a variant that returns a ViewShell @@ -303,13 +300,13 @@ public: private: typedef ::std::map< ViewShellBase*, - ::boost::shared_ptr<FrameworkHelper> > InstanceMap; + ::std::shared_ptr<FrameworkHelper> > InstanceMap; /** The instance map holds (at least) one FrameworkHelper instance for every ViewShellBase object. */ static InstanceMap maInstanceMap; class ViewURLMap; - static ::boost::scoped_ptr<ViewURLMap> mpViewURLMap; + static std::unique_ptr<ViewURLMap> mpViewURLMap; ViewShellBase& mrBase; css::uno::Reference<css::drawing::framework::XConfigurationController> diff --git a/sd/source/ui/inc/framework/ModuleController.hxx b/sd/source/ui/inc/framework/ModuleController.hxx index d9541a91e4bf..26600110d179 100644 --- a/sd/source/ui/inc/framework/ModuleController.hxx +++ b/sd/source/ui/inc/framework/ModuleController.hxx @@ -29,7 +29,7 @@ #include <com/sun/star/frame/XController.hpp> #include <cppuhelper/compbase.hxx> -#include <boost/scoped_ptr.hpp> +#include <memory> #include <set> namespace { @@ -90,9 +90,9 @@ private: css::frame::XController> mxController; class ResourceToFactoryMap; - ::boost::scoped_ptr<ResourceToFactoryMap> mpResourceToFactoryMap; + std::unique_ptr<ResourceToFactoryMap> mpResourceToFactoryMap; class LoadedFactoryContainer; - ::boost::scoped_ptr<LoadedFactoryContainer> mpLoadedFactories; + std::unique_ptr<LoadedFactoryContainer> mpLoadedFactories; ModuleController ( const css::uno::Reference<css::uno::XComponentContext>& rxContext) diff --git a/sd/source/ui/inc/framework/Pane.hxx b/sd/source/ui/inc/framework/Pane.hxx index 1fb4586380e0..2bd3ea19073a 100644 --- a/sd/source/ui/inc/framework/Pane.hxx +++ b/sd/source/ui/inc/framework/Pane.hxx @@ -27,9 +27,8 @@ #include <com/sun/star/drawing/framework/TabBarButton.hpp> #include <com/sun/star/lang/XUnoTunnel.hpp> #include <cppuhelper/compbase.hxx> -#include <boost/shared_ptr.hpp> -#include <boost/weak_ptr.hpp> #include <vcl/vclptr.hxx> +#include <memory> namespace vcl { class Window; } diff --git a/sd/source/ui/inc/framework/PresentationFactory.hxx b/sd/source/ui/inc/framework/PresentationFactory.hxx index 94a6eb0658b7..80d0ec45cb57 100644 --- a/sd/source/ui/inc/framework/PresentationFactory.hxx +++ b/sd/source/ui/inc/framework/PresentationFactory.hxx @@ -31,8 +31,7 @@ #include <osl/mutex.hxx> #include <cppuhelper/compbase.hxx> -#include <boost/scoped_ptr.hpp> -#include <boost/shared_ptr.hpp> +#include <memory> namespace { diff --git a/sd/source/ui/inc/framework/ResourceId.hxx b/sd/source/ui/inc/framework/ResourceId.hxx index 9c6bf20a38df..3394fbf917b1 100644 --- a/sd/source/ui/inc/framework/ResourceId.hxx +++ b/sd/source/ui/inc/framework/ResourceId.hxx @@ -29,7 +29,7 @@ #include <com/sun/star/lang/XServiceInfo.hpp> #include <com/sun/star/util/XURLTransformer.hpp> #include <cppuhelper/implbase.hxx> -#include <boost/scoped_ptr.hpp> +#include <memory> namespace { @@ -172,7 +172,7 @@ private: */ ::std::vector<OUString> maResourceURLs; - ::boost::scoped_ptr<css::util::URL> mpURL; + std::unique_ptr<css::util::URL> mpURL; static css::uno::WeakReference<css::util::XURLTransformer> mxURLTransformerWeak; diff --git a/sd/source/ui/inc/framework/ViewShellWrapper.hxx b/sd/source/ui/inc/framework/ViewShellWrapper.hxx index 39ece9828542..f988b62047db 100644 --- a/sd/source/ui/inc/framework/ViewShellWrapper.hxx +++ b/sd/source/ui/inc/framework/ViewShellWrapper.hxx @@ -30,7 +30,7 @@ #include <cppuhelper/compbase.hxx> #include <cppuhelper/implbase.hxx> -#include <boost/shared_ptr.hpp> +#include <memory> namespace { @@ -68,7 +68,7 @@ public: to the ViewShell object. */ ViewShellWrapper ( - ::boost::shared_ptr<ViewShell> pViewShell, + ::std::shared_ptr<ViewShell> pViewShell, const ::com::sun::star::uno::Reference< ::com::sun::star::drawing::framework::XResourceId>& rxViewId, const ::com::sun::star::uno::Reference<com::sun::star::awt::XWindow>& rxWindow); @@ -83,7 +83,7 @@ public: to obtain a pointer to the wrapped ViewShell object for a given XView object. */ - ::boost::shared_ptr<ViewShell> GetViewShell() { return mpViewShell;} + ::std::shared_ptr<ViewShell> GetViewShell() { return mpViewShell;} // XUnoTunnel @@ -140,8 +140,8 @@ public: throw (com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE; private: - ::boost::shared_ptr< ViewShell > mpViewShell; - ::boost::shared_ptr< ::sd::slidesorter::SlideSorterViewShell > mpSlideSorterViewShell; + ::std::shared_ptr< ViewShell > mpViewShell; + ::std::shared_ptr< ::sd::slidesorter::SlideSorterViewShell > mpSlideSorterViewShell; const ::com::sun::star::uno::Reference< com::sun::star::drawing::framework::XResourceId > mxViewId; ::com::sun::star::uno::Reference<com::sun::star::awt::XWindow > mxWindow; }; diff --git a/sd/source/ui/inc/pubdlg.hxx b/sd/source/ui/inc/pubdlg.hxx index a4bb07f14601..9abdd7b27f7f 100644 --- a/sd/source/ui/inc/pubdlg.hxx +++ b/sd/source/ui/inc/pubdlg.hxx @@ -31,7 +31,7 @@ #include "pres.hxx" #include "assclass.hxx" -#include <boost/scoped_ptr.hpp> +#include <memory> #include <boost/ptr_container/ptr_vector.hpp> class FixedText; @@ -145,7 +145,7 @@ private: VclPtr<RadioButton> pPage6_DocColors; VclPtr<SdHtmlAttrPreview> pPage6_Preview; - boost::scoped_ptr< ButtonSet > mpButtonSet; + std::unique_ptr< ButtonSet > mpButtonSet; // standard controls VclPtr<PushButton> pLastPageButton; diff --git a/sd/source/ui/inc/sdtreelb.hxx b/sd/source/ui/inc/sdtreelb.hxx index b68ff7ea84dd..393148159e18 100644 --- a/sd/source/ui/inc/sdtreelb.hxx +++ b/sd/source/ui/inc/sdtreelb.hxx @@ -29,8 +29,8 @@ #include <svl/urlbmk.hxx> #include <tools/ref.hxx> #include "sdxfer.hxx" +#include <memory> #include <vector> -#include <boost/scoped_ptr.hpp> class SdDrawDocument; class SfxMedium; diff --git a/sd/source/ui/inc/sdxfer.hxx b/sd/source/ui/inc/sdxfer.hxx index 6d78cfbec722..539031147709 100644 --- a/sd/source/ui/inc/sdxfer.hxx +++ b/sd/source/ui/inc/sdxfer.hxx @@ -90,7 +90,7 @@ public: /** Add a user data object. When it was added before (and not removed) then this call is ignored. */ - void AddUserData (const ::boost::shared_ptr<UserData>& rpData); + void AddUserData (const std::shared_ptr<UserData>& rpData); /** Return the number of user data objects. */ @@ -100,7 +100,7 @@ public: valid, ie not in the range [0,count) then an empty pointer is returned. */ - ::boost::shared_ptr<UserData> GetUserData (const sal_Int32 nIndex) const; + std::shared_ptr<UserData> GetUserData (const sal_Int32 nIndex) const; protected: @@ -136,7 +136,7 @@ private: bool mbPageTransferable : 1; bool mbPageTransferablePersistent : 1; bool mbIsUnoObj : 1; - ::std::vector<boost::shared_ptr<UserData> > maUserData; + ::std::vector<std::shared_ptr<UserData> > maUserData; SdTransferable( const SdTransferable& ) SAL_DELETED_FUNCTION; SdTransferable& operator=( const SdTransferable& ) SAL_DELETED_FUNCTION; diff --git a/sd/source/ui/inc/slideshow.hxx b/sd/source/ui/inc/slideshow.hxx index 67ce818be7fa..5b5f7dc92c7d 100644 --- a/sd/source/ui/inc/slideshow.hxx +++ b/sd/source/ui/inc/slideshow.hxx @@ -32,7 +32,7 @@ #include <editeng/unoipset.hxx> -#include <boost/shared_ptr.hpp> +#include <memory> namespace com { namespace sun { namespace star { @@ -214,7 +214,7 @@ private: bool mbIsInStartup; SdDrawDocument* mpDoc; - boost::shared_ptr< PresentationSettingsEx > mxCurrentSettings; + std::shared_ptr< PresentationSettingsEx > mxCurrentSettings; ViewShellBase* mpCurrentViewShellBase; ViewShellBase* mpFullScreenViewShellBase; diff --git a/sd/source/ui/inc/taskpane/ToolPanelViewShell.hxx b/sd/source/ui/inc/taskpane/ToolPanelViewShell.hxx index 4260f07d06a4..006293587b64 100644 --- a/sd/source/ui/inc/taskpane/ToolPanelViewShell.hxx +++ b/sd/source/ui/inc/taskpane/ToolPanelViewShell.hxx @@ -29,8 +29,7 @@ #include <sfx2/viewfac.hxx> #include <sfx2/dockwin.hxx> -#include <boost/shared_ptr.hpp> -#include <boost/scoped_ptr.hpp> +#include <memory> class PopupMenu; @@ -84,9 +83,9 @@ public: virtual bool RelocateToParentWindow (vcl::Window* pParentWindow) SAL_OVERRIDE; private: - ::boost::scoped_ptr< ToolPanelViewShell_Impl > mpImpl; + std::unique_ptr< ToolPanelViewShell_Impl > mpImpl; - ::boost::shared_ptr<TaskPaneShellManager> mpSubShellManager; + std::shared_ptr<TaskPaneShellManager> mpSubShellManager; /** The id of the menu in the menu bar/tool box of the parent docking window. diff --git a/sd/source/ui/inc/tools/PropertySet.hxx b/sd/source/ui/inc/tools/PropertySet.hxx index 67ce4097bf50..e48a7ca80eb1 100644 --- a/sd/source/ui/inc/tools/PropertySet.hxx +++ b/sd/source/ui/inc/tools/PropertySet.hxx @@ -23,8 +23,8 @@ #include <cppuhelper/basemutex.hxx> #include <cppuhelper/compbase.hxx> #include <com/sun/star/beans/XPropertySet.hpp> -#include <boost/scoped_ptr.hpp> #include <map> +#include <memory> namespace sd { namespace tools { @@ -117,7 +117,7 @@ protected: private: typedef ::std::multimap<OUString, css::uno::Reference<css::beans::XPropertyChangeListener> > ChangeListenerContainer; - ::boost::scoped_ptr<ChangeListenerContainer> mpChangeListeners; + std::unique_ptr<ChangeListenerContainer> mpChangeListeners; /** Call all listeners that are registered for the given property name. Call this method with an empty property name to call listeners that diff --git a/sd/source/ui/inc/tools/SdGlobalResourceContainer.hxx b/sd/source/ui/inc/tools/SdGlobalResourceContainer.hxx index b9281ab6be4a..3f33bf98b052 100644 --- a/sd/source/ui/inc/tools/SdGlobalResourceContainer.hxx +++ b/sd/source/ui/inc/tools/SdGlobalResourceContainer.hxx @@ -22,7 +22,6 @@ #include "sdmod.hxx" #include <memory> -#include <boost/shared_ptr.hpp> #include <com/sun/star/uno/XInterface.hpp> namespace sd { @@ -74,7 +73,7 @@ public: time of the destruction of SgGlobalResourceContainer no other references exist the resource is destroyed as well. */ - void AddResource (::boost::shared_ptr<SdGlobalResource> pResource); + void AddResource (std::shared_ptr<SdGlobalResource> pResource); /** Add a resource that is implemented as UNO object. Destruction (when the sd modules is unloaded) is done by a) calling dispose() diff --git a/sd/source/ui/inc/tools/TimerBasedTaskExecution.hxx b/sd/source/ui/inc/tools/TimerBasedTaskExecution.hxx index 7880bd7ecde1..d08a084df04a 100644 --- a/sd/source/ui/inc/tools/TimerBasedTaskExecution.hxx +++ b/sd/source/ui/inc/tools/TimerBasedTaskExecution.hxx @@ -22,7 +22,7 @@ #include <vcl/timer.hxx> -#include <boost/shared_ptr.hpp> +#include <memory> namespace sd { namespace tools { @@ -48,8 +48,8 @@ public: @param nMaxTimePerStep The maximal time for executing steps without yielding control. */ - static ::boost::shared_ptr<TimerBasedTaskExecution> Create ( - const ::boost::shared_ptr<AsynchronousTask>& rpTask, + static std::shared_ptr<TimerBasedTaskExecution> Create ( + const std::shared_ptr<AsynchronousTask>& rpTask, sal_uInt32 nMillisecondsBetweenSteps, sal_uInt32 nMaxTimePerStep); @@ -62,23 +62,23 @@ public: checks the given weak_ptr for being expired and catches bad_weak_ptr exceptions. */ - static void ReleaseTask (const ::boost::weak_ptr<TimerBasedTaskExecution>& rpTask); + static void ReleaseTask (const std::weak_ptr<TimerBasedTaskExecution>& rpTask); private: - ::boost::shared_ptr<AsynchronousTask> mpTask; + std::shared_ptr<AsynchronousTask> mpTask; Timer maTimer; /** This shared_ptr to this is used to destroy a TimerBasedTaskExecution object when its task has been executed completely. */ - ::boost::shared_ptr<TimerBasedTaskExecution> mpSelf; + std::shared_ptr<TimerBasedTaskExecution> mpSelf; sal_uInt32 mnMaxTimePerStep; TimerBasedTaskExecution ( - const ::boost::shared_ptr<AsynchronousTask>& rpTask, + const std::shared_ptr<AsynchronousTask>& rpTask, sal_uInt32 nMillisecondsBetweenSteps, sal_uInt32 nMaxTimePerStep); ~TimerBasedTaskExecution(); - void SetSelf (const ::boost::shared_ptr<TimerBasedTaskExecution>& rpSelf); + void SetSelf (const std::shared_ptr<TimerBasedTaskExecution>& rpSelf); class Deleter; friend class Deleter; diff --git a/sd/source/ui/presenter/CanvasUpdateRequester.cxx b/sd/source/ui/presenter/CanvasUpdateRequester.cxx index 134ef6251e44..8a82cc2f0dab 100644 --- a/sd/source/ui/presenter/CanvasUpdateRequester.cxx +++ b/sd/source/ui/presenter/CanvasUpdateRequester.cxx @@ -38,7 +38,7 @@ public: CanvasUpdateRequester::RequesterMap CanvasUpdateRequester::maRequesterMap; -::boost::shared_ptr<CanvasUpdateRequester> CanvasUpdateRequester::Instance ( +std::shared_ptr<CanvasUpdateRequester> CanvasUpdateRequester::Instance ( const Reference<rendering::XSpriteCanvas>& rxSharedCanvas) { RequesterMap::const_iterator iRequester; @@ -49,7 +49,7 @@ CanvasUpdateRequester::RequesterMap CanvasUpdateRequester::maRequesterMap; } // No requester for the given canvas found. Create a new one. - ::boost::shared_ptr<CanvasUpdateRequester> pRequester ( + std::shared_ptr<CanvasUpdateRequester> pRequester ( new CanvasUpdateRequester(rxSharedCanvas), Deleter()); maRequesterMap.push_back(RequesterMap::value_type(rxSharedCanvas,pRequester)); return pRequester; diff --git a/sd/source/ui/presenter/CanvasUpdateRequester.hxx b/sd/source/ui/presenter/CanvasUpdateRequester.hxx index abd1973f161e..b04281921d3f 100644 --- a/sd/source/ui/presenter/CanvasUpdateRequester.hxx +++ b/sd/source/ui/presenter/CanvasUpdateRequester.hxx @@ -22,10 +22,10 @@ #include <com/sun/star/rendering/XSpriteCanvas.hpp> #include <boost/noncopyable.hpp> -#include <boost/shared_ptr.hpp> #include <sal/types.h> #include <tools/solar.h> #include <tools/link.hxx> +#include <memory> #include <vector> struct ImplSVEvent; @@ -43,7 +43,7 @@ public: /** @return the Canvas UpdateRequester object for the given shared canvas. A new object is created when it does not already exist. */ - static ::boost::shared_ptr<CanvasUpdateRequester> Instance ( + static std::shared_ptr<CanvasUpdateRequester> Instance ( const css::uno::Reference<css::rendering::XSpriteCanvas>& rxCanvas); void RequestUpdate (const bool bUpdateAll); @@ -56,7 +56,7 @@ private: typedef ::std::vector< ::std::pair< css::uno::Reference<css::rendering::XSpriteCanvas>, - ::boost::shared_ptr<CanvasUpdateRequester> > > RequesterMap; + std::shared_ptr<CanvasUpdateRequester> > > RequesterMap; static RequesterMap maRequesterMap; css::uno::Reference<css::rendering::XSpriteCanvas> mxCanvas; diff --git a/sd/source/ui/presenter/PresenterCanvas.hxx b/sd/source/ui/presenter/PresenterCanvas.hxx index af3b06d718f9..57bc21e7ac68 100644 --- a/sd/source/ui/presenter/PresenterCanvas.hxx +++ b/sd/source/ui/presenter/PresenterCanvas.hxx @@ -35,7 +35,7 @@ #include <cppuhelper/basemutex.hxx> #include <cppuhelper/compbase.hxx> #include <boost/noncopyable.hpp> -#include <boost/shared_ptr.hpp> +#include <memory> namespace sd { namespace presenter { @@ -375,7 +375,7 @@ private: /** The UpdateRequester is used by updateScreen() to schedule updateScreen() calls at the shared canvas. */ - ::boost::shared_ptr<CanvasUpdateRequester> mpUpdateRequester; + std::shared_ptr<CanvasUpdateRequester> mpUpdateRequester; /** The clip rectangle as given to SetClip(). */ diff --git a/sd/source/ui/presenter/PresenterPreviewCache.cxx b/sd/source/ui/presenter/PresenterPreviewCache.cxx index 00406b0759b0..879791ec5210 100644 --- a/sd/source/ui/presenter/PresenterPreviewCache.cxx +++ b/sd/source/ui/presenter/PresenterPreviewCache.cxx @@ -55,7 +55,7 @@ public: virtual bool IsIdle() SAL_OVERRIDE; virtual bool IsVisible (CacheKey aKey) SAL_OVERRIDE; virtual const SdrPage* GetPage (CacheKey aKey) SAL_OVERRIDE; - virtual ::boost::shared_ptr<std::vector<CacheKey> > GetEntryList (bool bVisible) SAL_OVERRIDE; + virtual std::shared_ptr<std::vector<CacheKey> > GetEntryList (bool bVisible) SAL_OVERRIDE; virtual sal_Int32 GetPriority (CacheKey aKey) SAL_OVERRIDE; virtual ::com::sun::star::uno::Reference<com::sun::star::uno::XInterface> GetModel() SAL_OVERRIDE; @@ -297,10 +297,10 @@ const SdrPage* PresenterPreviewCache::PresenterCacheContext::GetPage (CacheKey a return static_cast<const SdrPage*>(aKey); } -::boost::shared_ptr<std::vector<CacheKey> > +std::shared_ptr<std::vector<CacheKey> > PresenterPreviewCache::PresenterCacheContext::GetEntryList (bool bVisible) { - ::boost::shared_ptr<std::vector<CacheKey> > pKeys (new std::vector<CacheKey>()); + std::shared_ptr<std::vector<CacheKey> > pKeys (new std::vector<CacheKey>()); if ( ! mxSlides.is()) return pKeys; diff --git a/sd/source/ui/presenter/PresenterPreviewCache.hxx b/sd/source/ui/presenter/PresenterPreviewCache.hxx index f3999ef11969..e471ddd61c16 100644 --- a/sd/source/ui/presenter/PresenterPreviewCache.hxx +++ b/sd/source/ui/presenter/PresenterPreviewCache.hxx @@ -27,7 +27,7 @@ #include <cppuhelper/compbase.hxx> #include <cppuhelper/basemutex.hxx> #include <boost/noncopyable.hpp> -#include <boost/shared_ptr.hpp> +#include <memory> namespace sd { namespace presenter { @@ -97,8 +97,8 @@ private: css::uno::Reference<css::uno::XComponentContext> mxComponentContext; class PresenterCacheContext; Size maPreviewSize; - ::boost::shared_ptr<PresenterCacheContext> mpCacheContext; - ::boost::shared_ptr<sd::slidesorter::cache::PageCache> mpCache; + std::shared_ptr<PresenterCacheContext> mpCacheContext; + std::shared_ptr<sd::slidesorter::cache::PageCache> mpCache; /** This method throws a DisposedException when the object has already been disposed. diff --git a/sd/source/ui/presenter/PresenterTextView.hxx b/sd/source/ui/presenter/PresenterTextView.hxx index ac30c3c8bd10..0b389c0bde6c 100644 --- a/sd/source/ui/presenter/PresenterTextView.hxx +++ b/sd/source/ui/presenter/PresenterTextView.hxx @@ -26,7 +26,7 @@ #include <cppuhelper/basemutex.hxx> #include <cppuhelper/implbase.hxx> #include <boost/noncopyable.hpp> -#include <boost/scoped_ptr.hpp> +#include <memory> namespace com { namespace sun { namespace star { namespace uno { class XComponentContext; @@ -68,7 +68,7 @@ protected: private: class Implementation; - ::boost::scoped_ptr<Implementation> mpImplementation; + std::unique_ptr<Implementation> mpImplementation; /** This method throws a DisposedException when the object has already been disposed. diff --git a/sd/source/ui/remotecontrol/BluetoothServer.cxx b/sd/source/ui/remotecontrol/BluetoothServer.cxx index 0de7b9a8c74e..fb817ddc443f 100644 --- a/sd/source/ui/remotecontrol/BluetoothServer.cxx +++ b/sd/source/ui/remotecontrol/BluetoothServer.cxx @@ -11,10 +11,9 @@ #include <iostream> #include <iomanip> +#include <memory> #include <new> -#include <boost/scoped_ptr.hpp> - #include <sal/log.hxx> #ifdef LINUX_BLUETOOTH @@ -702,7 +701,7 @@ getDBusBooleanProperty( DBusConnection *pConnection, DBusObject *pAdapter, *pBoolean = false; bool bRet = false; - ::boost::scoped_ptr< DBusObject > pProperties ( + std::unique_ptr< DBusObject > pProperties ( pAdapter->cloneForInterface( "org.freedesktop.DBus.Properties" ) ); DBusMessage *pMsg = pProperties->getMethodCall( "Get" ); @@ -763,7 +762,7 @@ setDBusBooleanProperty( DBusConnection *pConnection, DBusObject *pAdapter, { assert( pAdapter ); - ::boost::scoped_ptr< DBusObject > pProperties( + std::unique_ptr< DBusObject > pProperties( pAdapter->cloneForInterface( "org.freedesktop.DBus.Properties" ) ); DBusMessage *pMsg = pProperties->getMethodCall( "Set" ); diff --git a/sd/source/ui/remotecontrol/BluetoothServer.hxx b/sd/source/ui/remotecontrol/BluetoothServer.hxx index 2427ed7c1f08..bb24268a000b 100644 --- a/sd/source/ui/remotecontrol/BluetoothServer.hxx +++ b/sd/source/ui/remotecontrol/BluetoothServer.hxx @@ -10,10 +10,9 @@ #define INCLUDED_SD_SOURCE_UI_REMOTECONTROL_BLUETOOTHSERVER_HXX #include <osl/thread.hxx> +#include <memory> #include <vector> -#include <boost/scoped_ptr.hpp> - #if (defined(LINUX) && !defined(__FreeBSD_kernel__)) && defined(ENABLE_DBUS) # define LINUX_BLUETOOTH #endif @@ -47,7 +46,7 @@ namespace sd #ifdef LINUX_BLUETOOTH struct Impl; - boost::scoped_ptr<Impl> mpImpl; + std::unique_ptr<Impl> mpImpl; #endif virtual void SAL_CALL run() SAL_OVERRIDE; diff --git a/sd/source/ui/remotecontrol/Server.cxx b/sd/source/ui/remotecontrol/Server.cxx index 0b7f37a62f23..ad9dcc345df2 100644 --- a/sd/source/ui/remotecontrol/Server.cxx +++ b/sd/source/ui/remotecontrol/Server.cxx @@ -129,7 +129,7 @@ void RemoteServer::execute() OUString aAddress = aClientAddr.getHostname(); MutexGuard aGuard( sDataMutex ); - ::boost::shared_ptr< ClientInfoInternal > pClient( + std::shared_ptr< ClientInfoInternal > pClient( new ClientInfoInternal( OStringToOUString( aName, RTL_TEXTENCODING_UTF8 ), aAddress, false, pSocket, OStringToOUString( aPin, @@ -239,10 +239,10 @@ void RemoteServer::removeCommunicator( Communicator* mCommunicator ) } } -std::vector< ::boost::shared_ptr< ClientInfo > > RemoteServer::getClients() +std::vector< std::shared_ptr< ClientInfo > > RemoteServer::getClients() { SAL_INFO( "sdremote", "RemoteServer::getClients() called" ); - std::vector< ::boost::shared_ptr< ClientInfo > > aClients; + std::vector< std::shared_ptr< ClientInfo > > aClients; if ( spServer ) { MutexGuard aGuard( sDataMutex ); @@ -266,13 +266,13 @@ std::vector< ::boost::shared_ptr< ClientInfo > > RemoteServer::getClients() Sequence< OUString > aNames = xConfig->getElementNames(); for ( int i = 0; i < aNames.getLength(); i++ ) { - aClients.push_back( ::boost::shared_ptr< ClientInfo > ( new ClientInfo( aNames[i], "", true ) ) ); + aClients.push_back( std::shared_ptr< ClientInfo > ( new ClientInfo( aNames[i], "", true ) ) ); } return aClients; } -bool RemoteServer::connectClient( ::boost::shared_ptr< ClientInfo > pClient, const OUString& aPin ) +bool RemoteServer::connectClient( std::shared_ptr< ClientInfo > pClient, const OUString& aPin ) { SAL_INFO( "sdremote", "RemoteServer::connectClient called" ); if ( !spServer ) @@ -321,7 +321,7 @@ bool RemoteServer::connectClient( ::boost::shared_ptr< ClientInfo > pClient, con sCommunicators.push_back( pCommunicator ); - for ( vector< ::boost::shared_ptr< ClientInfoInternal > >::iterator aIt = spServer->mAvailableClients.begin(); + for ( vector< std::shared_ptr< ClientInfoInternal > >::iterator aIt = spServer->mAvailableClients.begin(); aIt != spServer->mAvailableClients.end(); ++aIt ) { if ( pClient == *aIt ) @@ -339,7 +339,7 @@ bool RemoteServer::connectClient( ::boost::shared_ptr< ClientInfo > pClient, con } } -void RemoteServer::deauthoriseClient( ::boost::shared_ptr< ClientInfo > pClient ) +void RemoteServer::deauthoriseClient( std::shared_ptr< ClientInfo > pClient ) { // TODO: we probably want to forcefully disconnect at this point too? // But possibly via a separate function to allow just disconnecting from diff --git a/sd/source/ui/sidebar/AllMasterPagesSelector.cxx b/sd/source/ui/sidebar/AllMasterPagesSelector.cxx index e700df1443ed..769ffd1aac77 100644 --- a/sd/source/ui/sidebar/AllMasterPagesSelector.cxx +++ b/sd/source/ui/sidebar/AllMasterPagesSelector.cxx @@ -86,7 +86,7 @@ VclPtr<vcl::Window> AllMasterPagesSelector::Create ( if (pDocument == NULL) return NULL; - ::boost::shared_ptr<MasterPageContainer> pContainer (new MasterPageContainer()); + std::shared_ptr<MasterPageContainer> pContainer (new MasterPageContainer()); VclPtrInstance<AllMasterPagesSelector> pSelector( pParent, @@ -104,7 +104,7 @@ AllMasterPagesSelector::AllMasterPagesSelector ( vcl::Window* pParent, SdDrawDocument& rDocument, ViewShellBase& rBase, - const ::boost::shared_ptr<MasterPageContainer>& rpContainer, + const std::shared_ptr<MasterPageContainer>& rpContainer, const css::uno::Reference<css::ui::XSidebar>& rxSidebar) : MasterPagesSelector(pParent, rDocument, rBase, rpContainer, rxSidebar), mpSortedMasterPages(new SortedMasterPageDescriptorList()) diff --git a/sd/source/ui/sidebar/AllMasterPagesSelector.hxx b/sd/source/ui/sidebar/AllMasterPagesSelector.hxx index 96130c6f6efe..d0486ae5ecaa 100644 --- a/sd/source/ui/sidebar/AllMasterPagesSelector.hxx +++ b/sd/source/ui/sidebar/AllMasterPagesSelector.hxx @@ -61,7 +61,7 @@ private: vcl::Window* pParent, SdDrawDocument& rDocument, ViewShellBase& rBase, - const ::boost::shared_ptr<MasterPageContainer>& rpContainer, + const std::shared_ptr<MasterPageContainer>& rpContainer, const css::uno::Reference<css::ui::XSidebar>& rxSidebar); virtual ~AllMasterPagesSelector(); diff --git a/sd/source/ui/sidebar/CurrentMasterPagesSelector.cxx b/sd/source/ui/sidebar/CurrentMasterPagesSelector.cxx index 7dd6a3dfb53f..624bb4ec38c2 100644 --- a/sd/source/ui/sidebar/CurrentMasterPagesSelector.cxx +++ b/sd/source/ui/sidebar/CurrentMasterPagesSelector.cxx @@ -51,7 +51,7 @@ VclPtr<vcl::Window> CurrentMasterPagesSelector::Create ( if (pDocument == NULL) return NULL; - ::boost::shared_ptr<MasterPageContainer> pContainer (new MasterPageContainer()); + std::shared_ptr<MasterPageContainer> pContainer (new MasterPageContainer()); VclPtrInstance<CurrentMasterPagesSelector> pSelector( pParent, @@ -69,7 +69,7 @@ CurrentMasterPagesSelector::CurrentMasterPagesSelector ( vcl::Window* pParent, SdDrawDocument& rDocument, ViewShellBase& rBase, - const ::boost::shared_ptr<MasterPageContainer>& rpContainer, + const std::shared_ptr<MasterPageContainer>& rpContainer, const css::uno::Reference<css::ui::XSidebar>& rxSidebar) : MasterPagesSelector (pParent, rDocument, rBase, rpContainer, rxSidebar) { @@ -154,8 +154,8 @@ void CurrentMasterPagesSelector::Fill (ItemList& rItemList) pMasterPage->GetName(), OUString(), pMasterPage->IsPrecious(), - ::boost::shared_ptr<PageObjectProvider>(new ExistingPageProvider(pMasterPage)), - ::boost::shared_ptr<PreviewProvider>(new PagePreviewProvider()))); + std::shared_ptr<PageObjectProvider>(new ExistingPageProvider(pMasterPage)), + std::shared_ptr<PreviewProvider>(new PagePreviewProvider()))); aToken = mpContainer->PutMasterPage(pDescriptor); } @@ -242,8 +242,8 @@ void CurrentMasterPagesSelector::ProcessPopupMenu (Menu& rMenu) rMenu.EnableItem(SID_DELETE_MASTER_PAGE, false); } - ::boost::shared_ptr<DrawViewShell> pDrawViewShell ( - ::boost::dynamic_pointer_cast<DrawViewShell>(mrBase.GetMainViewShell())); + std::shared_ptr<DrawViewShell> pDrawViewShell ( + std::dynamic_pointer_cast<DrawViewShell>(mrBase.GetMainViewShell())); if (pDrawViewShell && pDrawViewShell->GetEditMode() == EM_MASTERPAGE) { diff --git a/sd/source/ui/sidebar/CurrentMasterPagesSelector.hxx b/sd/source/ui/sidebar/CurrentMasterPagesSelector.hxx index 2a51ac104f3f..d80b0baab8b6 100644 --- a/sd/source/ui/sidebar/CurrentMasterPagesSelector.hxx +++ b/sd/source/ui/sidebar/CurrentMasterPagesSelector.hxx @@ -66,7 +66,7 @@ private: vcl::Window* pParent, SdDrawDocument& rDocument, ViewShellBase& rBase, - const ::boost::shared_ptr<MasterPageContainer>& rpContainer, + const std::shared_ptr<MasterPageContainer>& rpContainer, const css::uno::Reference<css::ui::XSidebar>& rxSidebar); virtual ~CurrentMasterPagesSelector(); virtual void dispose() SAL_OVERRIDE; diff --git a/sd/source/ui/sidebar/DocumentHelper.cxx b/sd/source/ui/sidebar/DocumentHelper.cxx index 4dedf6d69d4e..38c3d36c4d3f 100644 --- a/sd/source/ui/sidebar/DocumentHelper.cxx +++ b/sd/source/ui/sidebar/DocumentHelper.cxx @@ -287,7 +287,7 @@ void DocumentHelper::ProvideStyles ( void DocumentHelper::AssignMasterPageToPageList ( SdDrawDocument& rTargetDocument, SdPage* pMasterPage, - const ::boost::shared_ptr<std::vector<SdPage*> >& rpPageList) + const std::shared_ptr<std::vector<SdPage*> >& rpPageList) { if (pMasterPage == NULL || !pMasterPage->IsMasterPage()) return; @@ -467,7 +467,7 @@ void DocumentHelper::AssignMasterPageToPage ( SdPage* DocumentHelper::ProvideMasterPage ( SdDrawDocument& rTargetDocument, SdPage* pMasterPage, - const ::boost::shared_ptr<std::vector<SdPage*> >& rpPageList) + const std::shared_ptr<std::vector<SdPage*> >& rpPageList) { // Make sure that both the master page and its notes master exist // in the source document. If one is missing then return without diff --git a/sd/source/ui/sidebar/DocumentHelper.hxx b/sd/source/ui/sidebar/DocumentHelper.hxx index 0c457b209dc6..f29b5c6fae27 100644 --- a/sd/source/ui/sidebar/DocumentHelper.hxx +++ b/sd/source/ui/sidebar/DocumentHelper.hxx @@ -21,7 +21,7 @@ #define INCLUDED_SD_SOURCE_UI_SIDEBAR_DOCUMENTHELPER_HXX #include <rtl/ustring.hxx> -#include <boost/shared_ptr.hpp> +#include <memory> #include <vector> class SdDrawDocument; @@ -66,7 +66,7 @@ public: static void AssignMasterPageToPageList ( SdDrawDocument& rTargetDocument, SdPage* pMasterPage, - const ::boost::shared_ptr<std::vector<SdPage*> >& rPageList); + const std::shared_ptr<std::vector<SdPage*> >& rPageList); private: static SdPage* AddMasterPage ( @@ -79,7 +79,7 @@ private: static SdPage* ProvideMasterPage ( SdDrawDocument& rTargetDocument, SdPage* pMasterPage, - const ::boost::shared_ptr<std::vector<SdPage*> >& rpPageList); + const std::shared_ptr<std::vector<SdPage*> >& rpPageList); /** Assign the given master page to the given page. @param pMasterPage diff --git a/sd/source/ui/sidebar/LayoutMenu.cxx b/sd/source/ui/sidebar/LayoutMenu.cxx index 38e9fea125e7..69bb63904468 100644 --- a/sd/source/ui/sidebar/LayoutMenu.cxx +++ b/sd/source/ui/sidebar/LayoutMenu.cxx @@ -609,7 +609,7 @@ void LayoutMenu::Command (const CommandEvent& rEvent) } // Setup the menu. - ::boost::shared_ptr<PopupMenu> pMenu (new PopupMenu(SdResId(RID_TASKPANE_LAYOUTMENU_POPUP))); + std::shared_ptr<PopupMenu> pMenu (new PopupMenu(SdResId(RID_TASKPANE_LAYOUTMENU_POPUP))); FloatingWindow* pMenuWindow = dynamic_cast<FloatingWindow*>(pMenu->GetWindow()); if (pMenuWindow != NULL) pMenuWindow->SetPopupModeFlags( diff --git a/sd/source/ui/sidebar/MasterPageContainer.cxx b/sd/source/ui/sidebar/MasterPageContainer.cxx index 2b55982f3e04..55a1b3abb104 100644 --- a/sd/source/ui/sidebar/MasterPageContainer.cxx +++ b/sd/source/ui/sidebar/MasterPageContainer.cxx @@ -54,8 +54,7 @@ #include "pres.hxx" #include <osl/mutex.hxx> #include <osl/getglobalmutex.hxx> -#include <boost/scoped_ptr.hpp> -#include <boost/weak_ptr.hpp> +#include <memory> using namespace ::com::sun::star; using namespace ::com::sun::star::uno; @@ -78,10 +77,10 @@ class MasterPageContainer::Implementation public: mutable ::osl::Mutex maMutex; - static ::boost::weak_ptr<Implementation> mpInstance; + static std::weak_ptr<Implementation> mpInstance; MasterPageContainerType maContainer; - static ::boost::shared_ptr<Implementation> Instance(); + static std::shared_ptr<Implementation> Instance(); void LateInit(); void AddChangeListener (const Link<MasterPageContainerChangeEvent&,void>& rLink); @@ -132,7 +131,7 @@ private: enum InitializationState { NOT_INITIALIZED, INITIALIZING, INITIALIZED } meInitializationState; - ::boost::scoped_ptr<MasterPageContainerQueue> mpRequestQueue; + std::unique_ptr<MasterPageContainerQueue> mpRequestQueue; ::com::sun::star::uno::Reference<com::sun::star::frame::XModel> mxModel; SdDrawDocument* mpDocument; PreviewRenderer maPreviewRenderer; @@ -163,7 +162,7 @@ private: // We have to remember the tasks for initialization and filling in case // a MasterPageContainer object is destroyed before these tasks have // been completed. - ::boost::weak_ptr<sd::tools::TimerBasedTaskExecution> mpFillerTask; + std::weak_ptr<sd::tools::TimerBasedTaskExecution> mpFillerTask; Size maSmallPreviewSizePixel; Size maLargePreviewSizePixel; @@ -180,13 +179,13 @@ private: //===== MasterPageContainer =================================================== -::boost::weak_ptr<MasterPageContainer::Implementation> +std::weak_ptr<MasterPageContainer::Implementation> MasterPageContainer::Implementation::mpInstance; -::boost::shared_ptr<MasterPageContainer::Implementation> +std::shared_ptr<MasterPageContainer::Implementation> MasterPageContainer::Implementation::Instance() { - ::boost::shared_ptr<MasterPageContainer::Implementation> pInstance; + std::shared_ptr<MasterPageContainer::Implementation> pInstance; if (Implementation::mpInstance.expired()) { @@ -195,25 +194,25 @@ private: if (Implementation::mpInstance.expired()) { OSL_DOUBLE_CHECKED_LOCKING_MEMORY_BARRIER(); - pInstance = ::boost::shared_ptr<MasterPageContainer::Implementation>( + pInstance = std::shared_ptr<MasterPageContainer::Implementation>( new MasterPageContainer::Implementation(), MasterPageContainer::Implementation::Deleter()); SdGlobalResourceContainer::Instance().AddResource(pInstance); Implementation::mpInstance = pInstance; } else - pInstance = ::boost::shared_ptr<MasterPageContainer::Implementation>( + pInstance = std::shared_ptr<MasterPageContainer::Implementation>( Implementation::mpInstance); } else { OSL_DOUBLE_CHECKED_LOCKING_MEMORY_BARRIER(); - pInstance = ::boost::shared_ptr<MasterPageContainer::Implementation>( + pInstance = std::shared_ptr<MasterPageContainer::Implementation>( Implementation::mpInstance); } - DBG_ASSERT (pInstance.get()!=NULL, - "MasterPageContainer::Implementation::Instance(): instance is NULL"); + DBG_ASSERT (pInstance.get()!=nullptr, + "MasterPageContainer::Implementation::Instance(): instance is nullptr"); return pInstance; } @@ -260,7 +259,7 @@ MasterPageContainer::Token MasterPageContainer::PutMasterPage ( void MasterPageContainer::AcquireToken (Token aToken) { SharedMasterPageDescriptor pDescriptor = mpImpl->GetDescriptor(aToken); - if (pDescriptor.get() != NULL) + if (pDescriptor.get() != nullptr) { ++pDescriptor->mnUseCount; } @@ -269,7 +268,7 @@ void MasterPageContainer::AcquireToken (Token aToken) void MasterPageContainer::ReleaseToken (Token aToken) { SharedMasterPageDescriptor pDescriptor = mpImpl->GetDescriptor(aToken); - if (pDescriptor.get() != NULL) + if (pDescriptor.get() != nullptr) { OSL_ASSERT(pDescriptor->mnUseCount>0); --pDescriptor->mnUseCount; @@ -357,7 +356,7 @@ MasterPageContainer::Token MasterPageContainer::GetTokenForPageObject ( const ::osl::MutexGuard aGuard (mpImpl->maMutex); Token aResult (NIL_TOKEN); - if (pPage != NULL) + if (pPage != nullptr) { MasterPageContainerType::iterator iEntry ( ::std::find_if ( @@ -376,7 +375,7 @@ OUString MasterPageContainer::GetURLForToken ( const ::osl::MutexGuard aGuard (mpImpl->maMutex); SharedMasterPageDescriptor pDescriptor = mpImpl->GetDescriptor(aToken); - if (pDescriptor.get() != NULL) + if (pDescriptor.get() != nullptr) return pDescriptor->msURL; else return OUString(); @@ -388,7 +387,7 @@ OUString MasterPageContainer::GetPageNameForToken ( const ::osl::MutexGuard aGuard (mpImpl->maMutex); SharedMasterPageDescriptor pDescriptor = mpImpl->GetDescriptor(aToken); - if (pDescriptor.get() != NULL) + if (pDescriptor.get() != nullptr) return pDescriptor->msPageName; else return OUString(); @@ -400,7 +399,7 @@ OUString MasterPageContainer::GetStyleNameForToken ( const ::osl::MutexGuard aGuard (mpImpl->maMutex); SharedMasterPageDescriptor pDescriptor = mpImpl->GetDescriptor(aToken); - if (pDescriptor.get() != NULL) + if (pDescriptor.get() != nullptr) return pDescriptor->msStyleName; else return OUString(); @@ -412,12 +411,12 @@ SdPage* MasterPageContainer::GetPageObjectForToken ( { const ::osl::MutexGuard aGuard (mpImpl->maMutex); - SdPage* pPageObject = NULL; + SdPage* pPageObject = nullptr; SharedMasterPageDescriptor pDescriptor = mpImpl->GetDescriptor(aToken); - if (pDescriptor.get() != NULL) + if (pDescriptor.get() != nullptr) { pPageObject = pDescriptor->mpMasterPage; - if (pPageObject == NULL) + if (pPageObject == nullptr) { // The page object is not (yet) present. Call // UpdateDescriptor() to trigger the PageObjectProvider() to @@ -436,7 +435,7 @@ MasterPageContainer::Origin MasterPageContainer::GetOriginForToken (Token aToken const ::osl::MutexGuard aGuard (mpImpl->maMutex); SharedMasterPageDescriptor pDescriptor = mpImpl->GetDescriptor(aToken); - if (pDescriptor.get() != NULL) + if (pDescriptor.get() != nullptr) return pDescriptor->meOrigin; else return UNKNOWN; @@ -447,7 +446,7 @@ sal_Int32 MasterPageContainer::GetTemplateIndexForToken (Token aToken) const ::osl::MutexGuard aGuard (mpImpl->maMutex); SharedMasterPageDescriptor pDescriptor = mpImpl->GetDescriptor(aToken); - if (pDescriptor.get() != NULL) + if (pDescriptor.get() != nullptr) return pDescriptor->mnTemplateIndex; else return -1; @@ -487,9 +486,9 @@ MasterPageContainer::Implementation::Implementation() : maMutex(), maContainer(), meInitializationState(NOT_INITIALIZED), - mpRequestQueue(NULL), - mxModel(NULL), - mpDocument(NULL), + mpRequestQueue(nullptr), + mxModel(nullptr), + mpDocument(nullptr), maPreviewRenderer(), mbFirstPageObjectSeen(false), maLargePreviewBeingCreated(), @@ -524,7 +523,7 @@ MasterPageContainer::Implementation::~Implementation() { } } - mxModel = NULL; + mxModel = nullptr; } void MasterPageContainer::Implementation::LateInit() @@ -537,10 +536,10 @@ void MasterPageContainer::Implementation::LateInit() OSL_ASSERT(Instance().get()==this); mpRequestQueue.reset(MasterPageContainerQueue::Create( - ::boost::shared_ptr<MasterPageContainerQueue::ContainerAdapter>(Instance()))); + std::shared_ptr<MasterPageContainerQueue::ContainerAdapter>(Instance()))); mpFillerTask = ::sd::tools::TimerBasedTaskExecution::Create( - ::boost::shared_ptr<tools::AsynchronousTask>(new MasterPageContainerFiller(*this)), + std::shared_ptr<tools::AsynchronousTask>(new MasterPageContainerFiller(*this)), 5, 50); @@ -581,7 +580,7 @@ void MasterPageContainer::Implementation::UpdatePreviewSizePixel() MasterPageContainerType::const_iterator iDescriptor; MasterPageContainerType::const_iterator iContainerEnd(maContainer.end()); for (iDescriptor=maContainer.begin(); iDescriptor!=iContainerEnd; ++iDescriptor) - if (*iDescriptor!=0 && (*iDescriptor)->mpMasterPage != NULL) + if (*iDescriptor!=0 && (*iDescriptor)->mpMasterPage != nullptr) { Size aPageSize ((*iDescriptor)->mpMasterPage->GetSize()); OSL_ASSERT(aPageSize.Width() > 0 && aPageSize.Height() > 0); @@ -623,7 +622,7 @@ IMPL_LINK_TYPED(MasterPageContainer::Implementation,AsynchronousNotifyCallback, EventData* pData = static_cast<EventData*>(p); const ::osl::MutexGuard aGuard (maMutex); - if (pData != NULL) + if (pData != nullptr) { FireContainerChange(pData->first, pData->second); delete pData; @@ -650,7 +649,7 @@ MasterPageContainer::Token MasterPageContainer::Implementation::PutMasterPage ( if (aEntry == maContainer.end()) { // Insert a new MasterPageDescriptor. - bool bIgnore (rpDescriptor->mpPageObjectProvider.get()==NULL + bool bIgnore (rpDescriptor->mpPageObjectProvider.get()==nullptr && rpDescriptor->msURL.isEmpty()); if ( ! bIgnore) @@ -687,7 +686,7 @@ MasterPageContainer::Token MasterPageContainer::Implementation::PutMasterPage ( aResult = (*aEntry)->maToken; std::unique_ptr<std::vector<MasterPageContainerChangeEvent::EventType> > pEventTypes( (*aEntry)->Update(*rpDescriptor)); - if (pEventTypes.get()!=NULL && pEventTypes->size()>0) + if (pEventTypes.get()!=nullptr && pEventTypes->size()>0) { // One or more aspects of the descriptor have changed. Send // appropriate events to the listeners. @@ -708,7 +707,7 @@ bool MasterPageContainer::Implementation::HasToken (Token aToken) const { return aToken>=0 && (unsigned)aToken<maContainer.size() - && maContainer[aToken].get()!=NULL; + && maContainer[aToken].get()!=nullptr; } const SharedMasterPageDescriptor MasterPageContainer::Implementation::GetDescriptor ( @@ -733,7 +732,7 @@ void MasterPageContainer::Implementation::InvalidatePreview (Token aToken) const ::osl::MutexGuard aGuard (maMutex); SharedMasterPageDescriptor pDescriptor (GetDescriptor(aToken)); - if (pDescriptor.get() != NULL) + if (pDescriptor.get() != nullptr) { pDescriptor->maSmallPreview = Image(); pDescriptor->maLargePreview = Image(); @@ -754,7 +753,7 @@ Image MasterPageContainer::Implementation::GetPreviewForToken ( // When the preview is missing but inexpensively creatable then do that // now. - if (pDescriptor.get()!=NULL) + if (pDescriptor.get()!=nullptr) { if (ePreviewState == PS_CREATABLE) if (UpdateDescriptor(pDescriptor, false,false, true)) @@ -802,11 +801,11 @@ MasterPageContainer::PreviewState MasterPageContainer::Implementation::GetPrevie PreviewState eState (PS_NOT_AVAILABLE); SharedMasterPageDescriptor pDescriptor = GetDescriptor(aToken); - if (pDescriptor.get() != NULL) + if (pDescriptor.get() != nullptr) { if (pDescriptor->maLargePreview.GetSizePixel().Width() != 0) eState = PS_AVAILABLE; - else if (pDescriptor->mpPreviewProvider.get() != NULL) + else if (pDescriptor->mpPreviewProvider.get() != nullptr) { // The preview does not exist but can be created. When that is // not expensive then do it at once. @@ -825,7 +824,7 @@ MasterPageContainer::PreviewState MasterPageContainer::Implementation::GetPrevie bool MasterPageContainer::Implementation::RequestPreview (Token aToken) { SharedMasterPageDescriptor pDescriptor = GetDescriptor(aToken); - if (pDescriptor.get() != NULL) + if (pDescriptor.get() != nullptr) return mpRequestQueue->RequestPreview(pDescriptor); else return false; @@ -939,7 +938,7 @@ void MasterPageContainer::Implementation::CleanContainer() // elements in the middle can not be removed because that would // invalidate the references still held by others. int nIndex (maContainer.size()-1); - while (nIndex>=0 && maContainer[nIndex].get()==NULL) + while (nIndex>=0 && maContainer[nIndex].get()==nullptr) --nIndex; maContainer.resize(++nIndex); } @@ -979,7 +978,7 @@ bool MasterPageContainer::Implementation::UpdateDescriptor ( // and the caller needs the preview. bForcePageObject |= (bForcePreview && rpDescriptor->mpPreviewProvider->NeedsPageObject() - && rpDescriptor->mpMasterPage==NULL); + && rpDescriptor->mpMasterPage==nullptr); // Define a cost threshold so that an update or page object or preview // that is at least this cost are made at once. Updates with higher cost diff --git a/sd/source/ui/sidebar/MasterPageContainer.hxx b/sd/source/ui/sidebar/MasterPageContainer.hxx index d1f27b9a1b21..5e23c6a1065e 100644 --- a/sd/source/ui/sidebar/MasterPageContainer.hxx +++ b/sd/source/ui/sidebar/MasterPageContainer.hxx @@ -29,7 +29,7 @@ #include <vcl/timer.hxx> #include "tools/SdGlobalResourceContainer.hxx" -#include <boost/shared_ptr.hpp> +#include <memory> class SdPage; @@ -109,7 +109,7 @@ public: the existing entry is replaced/updated by the given one. Otherwise a new entry is inserted. */ - Token PutMasterPage (const ::boost::shared_ptr<MasterPageDescriptor>& rDescriptor); + Token PutMasterPage (const std::shared_ptr<MasterPageDescriptor>& rDescriptor); void AcquireToken (Token aToken); void ReleaseToken (Token aToken); @@ -137,7 +137,7 @@ public: SdPage* GetPageObjectForToken (Token aToken, bool bLoad=true); Origin GetOriginForToken (Token aToken); sal_Int32 GetTemplateIndexForToken (Token aToken); - ::boost::shared_ptr<MasterPageDescriptor> GetDescriptorForToken (Token aToken); + std::shared_ptr<MasterPageDescriptor> GetDescriptorForToken (Token aToken); void InvalidatePreview (Token aToken); @@ -157,7 +157,7 @@ public: private: class Implementation; - ::boost::shared_ptr<Implementation> mpImpl; + std::shared_ptr<Implementation> mpImpl; PreviewSize mePreviewSize; }; diff --git a/sd/source/ui/sidebar/MasterPageContainerFiller.cxx b/sd/source/ui/sidebar/MasterPageContainerFiller.cxx index f85c72f360e4..c47d2ed52cc0 100644 --- a/sd/source/ui/sidebar/MasterPageContainerFiller.cxx +++ b/sd/source/ui/sidebar/MasterPageContainerFiller.cxx @@ -46,8 +46,8 @@ MasterPageContainerFiller::MasterPageContainerFiller (ContainerAdapter& rpAdapte OUString(), OUString(), false, - ::boost::shared_ptr<PageObjectProvider>(new DefaultPageObjectProvider()), - ::boost::shared_ptr<PreviewProvider>(new PagePreviewProvider()))); + std::shared_ptr<PageObjectProvider>(new DefaultPageObjectProvider()), + std::shared_ptr<PreviewProvider>(new PagePreviewProvider()))); mrContainerAdapter.PutMasterPage(pDescriptor); } @@ -146,9 +146,9 @@ MasterPageContainerFiller::State MasterPageContainerFiller::AddTemplate() mpLastAddedEntry->msTitle, OUString(), false, - ::boost::shared_ptr<PageObjectProvider>( + std::shared_ptr<PageObjectProvider>( new TemplatePageObjectProvider(mpLastAddedEntry->msPath)), - ::boost::shared_ptr<PreviewProvider>( + std::shared_ptr<PreviewProvider>( new TemplatePreviewProvider(mpLastAddedEntry->msPath)))); // For user supplied templates we use a different preview provider: // The preview in the document shows not only shapes on the master @@ -156,7 +156,7 @@ MasterPageContainerFiller::State MasterPageContainerFiller::AddTemplate() // therefore these previews are discarded and created directly from // the page objects. if (pDescriptor->GetURLClassification() == MasterPageDescriptor::URLCLASS_USER) - pDescriptor->mpPreviewProvider = ::boost::shared_ptr<PreviewProvider>( + pDescriptor->mpPreviewProvider = std::shared_ptr<PreviewProvider>( new PagePreviewProvider()); mrContainerAdapter.PutMasterPage(pDescriptor); diff --git a/sd/source/ui/sidebar/MasterPageContainerQueue.cxx b/sd/source/ui/sidebar/MasterPageContainerQueue.cxx index d23c9f21246a..0f6906759746 100644 --- a/sd/source/ui/sidebar/MasterPageContainerQueue.cxx +++ b/sd/source/ui/sidebar/MasterPageContainerQueue.cxx @@ -82,7 +82,7 @@ public: //===== MasterPageContainerQueue ============================================== MasterPageContainerQueue* MasterPageContainerQueue::Create ( - const ::boost::weak_ptr<ContainerAdapter>& rpContainer) + const std::weak_ptr<ContainerAdapter>& rpContainer) { MasterPageContainerQueue* pQueue = new MasterPageContainerQueue(rpContainer); pQueue->LateInit(); @@ -90,7 +90,7 @@ MasterPageContainerQueue* MasterPageContainerQueue::Create ( } MasterPageContainerQueue::MasterPageContainerQueue ( - const ::boost::weak_ptr<ContainerAdapter>& rpContainer) + const std::weak_ptr<ContainerAdapter>& rpContainer) : mpWeakContainer(rpContainer), mpRequestQueue(new RequestQueue()), maDelayedPreviewCreationTimer(), @@ -219,7 +219,7 @@ IMPL_LINK_TYPED(MasterPageContainerQueue, DelayedPreviewCreation, Timer*, pTimer mnRequestsServedCount += 1; if ( ! mpWeakContainer.expired()) { - ::boost::shared_ptr<ContainerAdapter> pContainer (mpWeakContainer); + std::shared_ptr<ContainerAdapter> pContainer (mpWeakContainer); if (pContainer.get() != NULL) pContainer->UpdateDescriptor(aRequest.mpDescriptor,false,true,true); } diff --git a/sd/source/ui/sidebar/MasterPageContainerQueue.hxx b/sd/source/ui/sidebar/MasterPageContainerQueue.hxx index b60d2c03147c..e8b1553ac546 100644 --- a/sd/source/ui/sidebar/MasterPageContainerQueue.hxx +++ b/sd/source/ui/sidebar/MasterPageContainerQueue.hxx @@ -23,8 +23,7 @@ #include "MasterPageContainer.hxx" #include "MasterPageDescriptor.hxx" -#include <boost/scoped_ptr.hpp> -#include <boost/weak_ptr.hpp> +#include <memory> namespace sd { namespace sidebar { @@ -50,7 +49,7 @@ public: }; static MasterPageContainerQueue* Create ( - const ::boost::weak_ptr<ContainerAdapter>& rpContainer); + const std::weak_ptr<ContainerAdapter>& rpContainer); virtual ~MasterPageContainerQueue(); /** This method is typically called for entries in the container for @@ -78,10 +77,10 @@ public: void ProcessAllRequests(); private: - ::boost::weak_ptr<ContainerAdapter> mpWeakContainer; + std::weak_ptr<ContainerAdapter> mpWeakContainer; class PreviewCreationRequest; class RequestQueue; - ::boost::scoped_ptr<RequestQueue> mpRequestQueue; + std::unique_ptr<RequestQueue> mpRequestQueue; Timer maDelayedPreviewCreationTimer; sal_uInt32 mnRequestsServedCount; @@ -115,7 +114,7 @@ private: */ static sal_uInt32 snWaitForMoreRequestsCount; - MasterPageContainerQueue (const ::boost::weak_ptr<ContainerAdapter>& rpContainer); + MasterPageContainerQueue (const std::weak_ptr<ContainerAdapter>& rpContainer); void LateInit(); /** Calculate the priority that defines the order in which requests diff --git a/sd/source/ui/sidebar/MasterPageDescriptor.cxx b/sd/source/ui/sidebar/MasterPageDescriptor.cxx index ad9ea155cddb..025b3f23512e 100644 --- a/sd/source/ui/sidebar/MasterPageDescriptor.cxx +++ b/sd/source/ui/sidebar/MasterPageDescriptor.cxx @@ -34,8 +34,8 @@ MasterPageDescriptor::MasterPageDescriptor ( const OUString& rsPageName, const OUString& rsStyleName, const bool bIsPrecious, - const ::boost::shared_ptr<PageObjectProvider>& rpPageObjectProvider, - const ::boost::shared_ptr<PreviewProvider>& rpPreviewProvider) + const std::shared_ptr<PageObjectProvider>& rpPageObjectProvider, + const std::shared_ptr<PreviewProvider>& rpPreviewProvider) : maToken(MasterPageContainer::NIL_TOKEN), meOrigin(eOrigin), msURL(INetURLObject(rsURL).GetMainURL(INetURLObject::DECODE_UNAMBIGUOUS)), @@ -196,7 +196,7 @@ int MasterPageDescriptor::UpdatePageObject ( // will create the real one. maSmallPreview = Image(); maLargePreview = Image(); - mpPreviewProvider = ::boost::shared_ptr<PreviewProvider>(new PagePreviewProvider()); + mpPreviewProvider = std::shared_ptr<PreviewProvider>(new PagePreviewProvider()); } else { diff --git a/sd/source/ui/sidebar/MasterPageDescriptor.hxx b/sd/source/ui/sidebar/MasterPageDescriptor.hxx index a002203b897a..f2519e55a019 100644 --- a/sd/source/ui/sidebar/MasterPageDescriptor.hxx +++ b/sd/source/ui/sidebar/MasterPageDescriptor.hxx @@ -21,7 +21,7 @@ #define INCLUDED_SD_SOURCE_UI_SIDEBAR_MASTERPAGEDESCRIPTOR_HXX #include "MasterPageContainer.hxx" -#include <boost/shared_ptr.hpp> +#include <memory> namespace sd { namespace sidebar { @@ -29,7 +29,7 @@ class PageObjectProvider; class PreviewProvider; class MasterPageDescriptor; -typedef ::boost::shared_ptr<MasterPageDescriptor> SharedMasterPageDescriptor; +typedef std::shared_ptr<MasterPageDescriptor> SharedMasterPageDescriptor; /** A collection of data that is stored for every master page in the MasterpageContainer. @@ -44,8 +44,8 @@ public: const OUString& rPageName, const OUString& rStyleName, const bool bIsPrecious, - const ::boost::shared_ptr<PageObjectProvider>& rpPageObjectProvider, - const ::boost::shared_ptr<PreviewProvider>& rpPreviewProvider); + const std::shared_ptr<PageObjectProvider>& rpPageObjectProvider, + const std::shared_ptr<PreviewProvider>& rpPreviewProvider); MasterPageDescriptor (const MasterPageDescriptor& rDescriptor); ~MasterPageDescriptor(); @@ -185,12 +185,12 @@ public: /** The prewview provider. May be empty. May be replaced during the lifetime of a MasterPageDescriptor object. */ - ::boost::shared_ptr<PreviewProvider> mpPreviewProvider; + std::shared_ptr<PreviewProvider> mpPreviewProvider; /** The master page provider. May be empty. May be replaced during the lifetime of a MasterPageDescriptor object. */ - ::boost::shared_ptr<PageObjectProvider> mpPageObjectProvider; + std::shared_ptr<PageObjectProvider> mpPageObjectProvider; /** This index represents the order in which templates are provided via the TemplateScanner. It defines the order in which the entries in diff --git a/sd/source/ui/sidebar/MasterPagesSelector.cxx b/sd/source/ui/sidebar/MasterPagesSelector.cxx index 1ae6067113b6..9aa811fb7618 100644 --- a/sd/source/ui/sidebar/MasterPagesSelector.cxx +++ b/sd/source/ui/sidebar/MasterPagesSelector.cxx @@ -68,7 +68,7 @@ MasterPagesSelector::MasterPagesSelector ( vcl::Window* pParent, SdDrawDocument& rDocument, ViewShellBase& rBase, - const ::boost::shared_ptr<MasterPageContainer>& rpContainer, + const std::shared_ptr<MasterPageContainer>& rpContainer, const css::uno::Reference<css::ui::XSidebar>& rxSidebar) : PreviewValueSet(pParent), maMutex(), @@ -222,7 +222,7 @@ void MasterPagesSelector::Command (const CommandEvent& rEvent) } // Setup the menu. - ::boost::scoped_ptr<PopupMenu> pMenu (new PopupMenu(GetContextMenuResId())); + std::unique_ptr<PopupMenu> pMenu (new PopupMenu(GetContextMenuResId())); FloatingWindow* pMenuWindow = dynamic_cast<FloatingWindow*>(pMenu->GetWindow()); if (pMenuWindow != NULL) pMenuWindow->SetPopupModeFlags( diff --git a/sd/source/ui/sidebar/MasterPagesSelector.hxx b/sd/source/ui/sidebar/MasterPagesSelector.hxx index 33a49cbd69c2..8d65e5ad2b78 100644 --- a/sd/source/ui/sidebar/MasterPagesSelector.hxx +++ b/sd/source/ui/sidebar/MasterPagesSelector.hxx @@ -60,7 +60,7 @@ public: vcl::Window* pParent, SdDrawDocument& rDocument, ViewShellBase& rBase, - const ::boost::shared_ptr<MasterPageContainer>& rpContainer, + const std::shared_ptr<MasterPageContainer>& rpContainer, const css::uno::Reference<css::ui::XSidebar>& rxSidebar); virtual ~MasterPagesSelector(); virtual void dispose() SAL_OVERRIDE; @@ -108,7 +108,7 @@ public: protected: mutable ::osl::Mutex maMutex; - ::boost::shared_ptr<MasterPageContainer> mpContainer; + std::shared_ptr<MasterPageContainer> mpContainer; SdDrawDocument& mrDocument; bool mbSmallPreviewSize; diff --git a/sd/source/ui/sidebar/PanelBase.hxx b/sd/source/ui/sidebar/PanelBase.hxx index b05e1a7a77fb..16c58068a28b 100644 --- a/sd/source/ui/sidebar/PanelBase.hxx +++ b/sd/source/ui/sidebar/PanelBase.hxx @@ -25,7 +25,7 @@ #include <vcl/ctrl.hxx> -#include <boost/scoped_ptr.hpp> +#include <memory> namespace sd { diff --git a/sd/source/ui/sidebar/PanelFactory.hxx b/sd/source/ui/sidebar/PanelFactory.hxx index bdab2d639de6..53b182acf33b 100644 --- a/sd/source/ui/sidebar/PanelFactory.hxx +++ b/sd/source/ui/sidebar/PanelFactory.hxx @@ -28,10 +28,9 @@ #include <com/sun/star/uno/XComponentContext.hpp> #include <com/sun/star/lang/XInitialization.hpp> -#include <map> #include <boost/noncopyable.hpp> -#include <boost/shared_ptr.hpp> - +#include <map> +#include <memory> namespace sd { class ViewShellBase; diff --git a/sd/source/ui/sidebar/RecentMasterPagesSelector.cxx b/sd/source/ui/sidebar/RecentMasterPagesSelector.cxx index 271438486dcd..c4492e837b87 100644 --- a/sd/source/ui/sidebar/RecentMasterPagesSelector.cxx +++ b/sd/source/ui/sidebar/RecentMasterPagesSelector.cxx @@ -41,7 +41,7 @@ VclPtr<vcl::Window> RecentMasterPagesSelector::Create ( if (pDocument == NULL) return NULL; - ::boost::shared_ptr<MasterPageContainer> pContainer (new MasterPageContainer()); + std::shared_ptr<MasterPageContainer> pContainer (new MasterPageContainer()); VclPtrInstance<RecentMasterPagesSelector> pSelector( pParent, @@ -59,7 +59,7 @@ RecentMasterPagesSelector::RecentMasterPagesSelector ( vcl::Window* pParent, SdDrawDocument& rDocument, ViewShellBase& rBase, - const ::boost::shared_ptr<MasterPageContainer>& rpContainer, + const std::shared_ptr<MasterPageContainer>& rpContainer, const css::uno::Reference<css::ui::XSidebar>& rxSidebar) : MasterPagesSelector (pParent, rDocument, rBase, rpContainer, rxSidebar) { @@ -128,7 +128,7 @@ void RecentMasterPagesSelector::Fill (ItemList& rItemList) void RecentMasterPagesSelector::AssignMasterPageToPageList ( SdPage* pMasterPage, - const ::boost::shared_ptr<std::vector<SdPage*> >& rpPageList) + const std::shared_ptr<std::vector<SdPage*> >& rpPageList) { sal_uInt16 nSelectedItemId = PreviewValueSet::GetSelectItemId(); diff --git a/sd/source/ui/sidebar/RecentMasterPagesSelector.hxx b/sd/source/ui/sidebar/RecentMasterPagesSelector.hxx index 33bc2c303096..0b2500c4e849 100644 --- a/sd/source/ui/sidebar/RecentMasterPagesSelector.hxx +++ b/sd/source/ui/sidebar/RecentMasterPagesSelector.hxx @@ -54,7 +54,7 @@ protected: */ virtual void AssignMasterPageToPageList ( SdPage* pMasterPage, - const ::boost::shared_ptr<std::vector<SdPage*> >& rpPageList) SAL_OVERRIDE; + const std::shared_ptr<std::vector<SdPage*> >& rpPageList) SAL_OVERRIDE; virtual void ProcessPopupMenu (Menu& rMenu) SAL_OVERRIDE; @@ -63,7 +63,7 @@ private: vcl::Window* pParent, SdDrawDocument& rDocument, ViewShellBase& rBase, - const ::boost::shared_ptr<MasterPageContainer>& rpContainer, + const std::shared_ptr<MasterPageContainer>& rpContainer, const css::uno::Reference<css::ui::XSidebar>& rxSidebar); virtual ~RecentMasterPagesSelector(); virtual void dispose() SAL_OVERRIDE; diff --git a/sd/source/ui/sidebar/RecentlyUsedMasterPages.cxx b/sd/source/ui/sidebar/RecentlyUsedMasterPages.cxx index 052f8331a61d..318108d19987 100644 --- a/sd/source/ui/sidebar/RecentlyUsedMasterPages.cxx +++ b/sd/source/ui/sidebar/RecentlyUsedMasterPages.cxx @@ -152,9 +152,9 @@ void RecentlyUsedMasterPages::LoadPersistentValues() OUString(), sName, false, - ::boost::shared_ptr<PageObjectProvider>( + std::shared_ptr<PageObjectProvider>( new TemplatePageObjectProvider(sURL)), - ::boost::shared_ptr<PreviewProvider>( + std::shared_ptr<PreviewProvider>( new TemplatePreviewProvider(sURL)))); // For user supplied templates we use a different // preview provider: The preview in the document shows @@ -163,7 +163,7 @@ void RecentlyUsedMasterPages::LoadPersistentValues() // these previews are discarded and created directly // from the page objects. if (pDescriptor->GetURLClassification() == MasterPageDescriptor::URLCLASS_USER) - pDescriptor->mpPreviewProvider = ::boost::shared_ptr<PreviewProvider>( + pDescriptor->mpPreviewProvider = std::shared_ptr<PreviewProvider>( new PagePreviewProvider()); MasterPageContainer::Token aToken (mpContainer->PutMasterPage(pDescriptor)); mvMasterPages.push_back(Descriptor(aToken,sURL,sName)); diff --git a/sd/source/ui/sidebar/RecentlyUsedMasterPages.hxx b/sd/source/ui/sidebar/RecentlyUsedMasterPages.hxx index 8853a8aed59b..778b97dfbea4 100644 --- a/sd/source/ui/sidebar/RecentlyUsedMasterPages.hxx +++ b/sd/source/ui/sidebar/RecentlyUsedMasterPages.hxx @@ -89,7 +89,7 @@ private: typedef ::std::vector<Descriptor> MasterPageList; MasterPageList mvMasterPages; unsigned long int mnMaxListSize; - ::boost::shared_ptr<MasterPageContainer> mpContainer; + std::shared_ptr<MasterPageContainer> mpContainer; RecentlyUsedMasterPages(); virtual ~RecentlyUsedMasterPages(); diff --git a/sd/source/ui/slideshow/SlideShowRestarter.cxx b/sd/source/ui/slideshow/SlideShowRestarter.cxx index 42417ad7ccaa..be3db6ab1958 100644 --- a/sd/source/ui/slideshow/SlideShowRestarter.cxx +++ b/sd/source/ui/slideshow/SlideShowRestarter.cxx @@ -100,7 +100,7 @@ IMPL_LINK_NOARG_TYPED(SlideShowRestarter, EndPresentation, void*, void) // restart of the slide show. if (mpViewShellBase != NULL) { - ::boost::shared_ptr<FrameworkHelper> pHelper( + ::std::shared_ptr<FrameworkHelper> pHelper( FrameworkHelper::Instance(*mpViewShellBase)); if (pHelper->GetConfigurationController()->getResource( FrameworkHelper::CreateResourceId(FrameworkHelper::msFullScreenPaneURL)).is()) diff --git a/sd/source/ui/slideshow/SlideShowRestarter.hxx b/sd/source/ui/slideshow/SlideShowRestarter.hxx index 42b494c91fd0..240d6ec77ef7 100644 --- a/sd/source/ui/slideshow/SlideShowRestarter.hxx +++ b/sd/source/ui/slideshow/SlideShowRestarter.hxx @@ -24,7 +24,7 @@ #include "ViewShellBase.hxx" #include <rtl/ref.hxx> #include <tools/link.hxx> -#include <boost/enable_shared_from_this.hpp> +#include <memory> namespace sd { @@ -37,7 +37,7 @@ namespace sd { opportunity to show or hide depending on the number of available displays. */ class SlideShowRestarter - : public boost::enable_shared_from_this<SlideShowRestarter> + : public std::enable_shared_from_this<SlideShowRestarter> { public: /** Create a new SlideShowRestarter object. @@ -64,7 +64,7 @@ private: ImplSVEvent * mnEventId; ::rtl::Reference<SlideShow> mpSlideShow; ViewShellBase* mpViewShellBase; - ::boost::shared_ptr<SlideShowRestarter> mpSelf; + ::std::shared_ptr<SlideShowRestarter> mpSelf; sal_Int32 mnDisplayCount; SfxDispatcher* mpDispatcher; sal_Int32 mnCurrentSlideNumber; diff --git a/sd/source/ui/slideshow/slideshow.cxx b/sd/source/ui/slideshow/slideshow.cxx index 46cec5f87145..a04d0cd08b0a 100644 --- a/sd/source/ui/slideshow/slideshow.cxx +++ b/sd/source/ui/slideshow/slideshow.cxx @@ -94,7 +94,7 @@ namespace { } private: - ::boost::shared_ptr<SlideShowRestarter> mpRestarter; + ::std::shared_ptr<SlideShowRestarter> mpRestarter; }; } @@ -701,7 +701,7 @@ void SAL_CALL SlideShow::end() // Get the shell pointer in its own scope to be sure that // the shared_ptr to the shell is released before DoClose() // is called. - ::boost::shared_ptr<ViewShell> pSharedView (pFullScreenViewShellBase->GetMainViewShell()); + ::std::shared_ptr<ViewShell> pSharedView (pFullScreenViewShellBase->GetMainViewShell()); pShell = dynamic_cast<PresentationViewShell*>(pSharedView.get()); } if( pShell && pShell->GetViewFrame() ) @@ -973,7 +973,7 @@ void SlideShow::activate( ViewShellBase& rBase ) { if( (mpFullScreenViewShellBase == &rBase) && !mxController.is() ) { - ::boost::shared_ptr<PresentationViewShell> pShell = ::boost::dynamic_pointer_cast<PresentationViewShell>(rBase.GetMainViewShell()); + ::std::shared_ptr<PresentationViewShell> pShell = std::dynamic_pointer_cast<PresentationViewShell>(rBase.GetMainViewShell()); if(pShell.get() != NULL) { pShell->FinishInitialization( mpFullScreenFrameView ); @@ -1093,8 +1093,8 @@ void SlideShow::StartInPlacePresentation() ViewShell::ShellType eShell = ViewShell::ST_NONE; - ::boost::shared_ptr<FrameworkHelper> pHelper(FrameworkHelper::Instance(*mpCurrentViewShellBase)); - ::boost::shared_ptr<ViewShell> pMainViewShell(pHelper->GetViewShell(FrameworkHelper::msCenterPaneURL)); + ::std::shared_ptr<FrameworkHelper> pHelper(FrameworkHelper::Instance(*mpCurrentViewShellBase)); + ::std::shared_ptr<ViewShell> pMainViewShell(pHelper->GetViewShell(FrameworkHelper::msCenterPaneURL)); if( pMainViewShell.get() ) eShell = pMainViewShell->GetShellType(); @@ -1170,7 +1170,7 @@ void SlideShow::StartFullscreenPresentation( ) // changes made by the presentation have an effect on the other // view shells. FrameView* pOriginalFrameView = 0; - ::boost::shared_ptr<ViewShell> xShell(mpCurrentViewShellBase->GetMainViewShell()); + ::std::shared_ptr<ViewShell> xShell(mpCurrentViewShellBase->GetMainViewShell()); if (xShell.get()) pOriginalFrameView = xShell->GetFrameView(); diff --git a/sd/source/ui/slideshow/slideshowimpl.hxx b/sd/source/ui/slideshow/slideshowimpl.hxx index a7af2838e268..6cf680235c3d 100644 --- a/sd/source/ui/slideshow/slideshowimpl.hxx +++ b/sd/source/ui/slideshow/slideshowimpl.hxx @@ -112,7 +112,7 @@ struct WrappedShapeEventImpl WrappedShapeEventImpl() : meClickAction( css::presentation::ClickAction_NONE ), mnVerb( 0 ) {}; }; -typedef boost::shared_ptr< WrappedShapeEventImpl > WrappedShapeEventImplPtr; +typedef std::shared_ptr< WrappedShapeEventImpl > WrappedShapeEventImplPtr; typedef std::map< css::uno::Reference< css::drawing::XShape >, WrappedShapeEventImplPtr > WrappedShapeEventImplMap; class SlideShowListenerProxy : private ::cppu::BaseMutex, @@ -336,7 +336,7 @@ private: VclPtr<ShowWindow> mpShowWindow; VclPtr<PushButton> mpTimeButton; - boost::shared_ptr< AnimationSlideController > mpSlideController; + std::shared_ptr< AnimationSlideController > mpSlideController; long mnRestoreSlide; Point maSlideOrigin; diff --git a/sd/source/ui/slidesorter/cache/SlsBitmapCache.cxx b/sd/source/ui/slidesorter/cache/SlsBitmapCache.cxx index eabd8aeb0176..46a3fca292af 100644 --- a/sd/source/ui/slidesorter/cache/SlsBitmapCache.cxx +++ b/sd/source/ui/slidesorter/cache/SlsBitmapCache.cxx @@ -43,7 +43,7 @@ public: ~CacheEntry() {}; inline void Recycle (const CacheEntry& rEntry); inline sal_Int32 GetMemorySize() const; - void Compress (const ::boost::shared_ptr<BitmapCompressor>& rpCompressor); + void Compress (const std::shared_ptr<BitmapCompressor>& rpCompressor); inline void Decompress(); bool IsUpToDate() const { return mbIsUpToDate; } @@ -67,8 +67,8 @@ public: private: Bitmap maPreview; Bitmap maMarkedPreview; - ::boost::shared_ptr<BitmapReplacement> mpReplacement; - ::boost::shared_ptr<BitmapCompressor> mpCompressor; + std::shared_ptr<BitmapReplacement> mpReplacement; + std::shared_ptr<BitmapCompressor> mpCompressor; Size maBitmapSize; bool mbIsUpToDate; sal_Int32 mnLastAccessTime; @@ -414,7 +414,7 @@ void BitmapCache::Recycle (const BitmapCache& rCache) void BitmapCache::Compress ( const CacheKey& rKey, - const ::boost::shared_ptr<BitmapCompressor>& rpCompressor) + const std::shared_ptr<BitmapCompressor>& rpCompressor) { ::osl::MutexGuard aGuard (maMutex); @@ -504,7 +504,7 @@ inline sal_Int32 BitmapCache::CacheEntry::GetMemorySize() const return nSize; } -void BitmapCache::CacheEntry::Compress (const ::boost::shared_ptr<BitmapCompressor>& rpCompressor) +void BitmapCache::CacheEntry::Compress (const std::shared_ptr<BitmapCompressor>& rpCompressor) { if ( ! maPreview.IsEmpty()) { diff --git a/sd/source/ui/slidesorter/cache/SlsBitmapCache.hxx b/sd/source/ui/slidesorter/cache/SlsBitmapCache.hxx index fe022d4ace48..29390abb943f 100644 --- a/sd/source/ui/slidesorter/cache/SlsBitmapCache.hxx +++ b/sd/source/ui/slidesorter/cache/SlsBitmapCache.hxx @@ -24,8 +24,7 @@ class SdrPage; #include <vcl/bitmapex.hxx> #include <osl/mutex.hxx> -#include <boost/shared_ptr.hpp> -#include <boost/scoped_ptr.hpp> +#include <memory> namespace sd { namespace slidesorter { namespace cache { @@ -170,12 +169,12 @@ public: */ void Compress ( const CacheKey& rKey, - const ::boost::shared_ptr<BitmapCompressor>& rpCompressor); + const std::shared_ptr<BitmapCompressor>& rpCompressor); private: mutable ::osl::Mutex maMutex; - ::boost::scoped_ptr<CacheBitmapContainer> mpBitmapContainer; + std::unique_ptr<CacheBitmapContainer> mpBitmapContainer; /** Total size of bytes that are occupied by bitmaps in the cache for whom the slides are currently not inside the visible area. diff --git a/sd/source/ui/slidesorter/cache/SlsBitmapCompressor.cxx b/sd/source/ui/slidesorter/cache/SlsBitmapCompressor.cxx index d1e222214d4d..da99597c9f61 100644 --- a/sd/source/ui/slidesorter/cache/SlsBitmapCompressor.cxx +++ b/sd/source/ui/slidesorter/cache/SlsBitmapCompressor.cxx @@ -43,9 +43,9 @@ public: virtual sal_Int32 GetMemorySize() const SAL_OVERRIDE { return maPreview.GetSizeBytes(); } }; -::boost::shared_ptr<BitmapReplacement> NoBitmapCompression::Compress (const Bitmap& rBitmap) const +std::shared_ptr<BitmapReplacement> NoBitmapCompression::Compress (const Bitmap& rBitmap) const { - return ::boost::shared_ptr<BitmapReplacement>(new DummyReplacement(rBitmap)); + return std::shared_ptr<BitmapReplacement>(new DummyReplacement(rBitmap)); } Bitmap NoBitmapCompression::Decompress (const BitmapReplacement& rBitmapData) const @@ -60,9 +60,9 @@ bool NoBitmapCompression::IsLossless() const //===== CompressionByDeletion ================================================= -::boost::shared_ptr<BitmapReplacement> CompressionByDeletion::Compress (const Bitmap& ) const +std::shared_ptr<BitmapReplacement> CompressionByDeletion::Compress (const Bitmap& ) const { - return ::boost::shared_ptr<BitmapReplacement>(); + return std::shared_ptr<BitmapReplacement>(); } Bitmap CompressionByDeletion::Decompress (const BitmapReplacement& ) const @@ -100,7 +100,7 @@ sal_Int32 ResolutionReduction::ResolutionReducedReplacement::GetMemorySize() con return maPreview.GetSizeBytes(); } -::boost::shared_ptr<BitmapReplacement> ResolutionReduction::Compress ( +std::shared_ptr<BitmapReplacement> ResolutionReduction::Compress ( const Bitmap& rBitmap) const { ResolutionReducedReplacement* pResult = new ResolutionReducedReplacement(); @@ -113,7 +113,7 @@ sal_Int32 ResolutionReduction::ResolutionReducedReplacement::GetMemorySize() con pResult->maPreview.Scale(Size(mnWidth,nHeight)); } - return ::boost::shared_ptr<BitmapReplacement>(pResult); + return std::shared_ptr<BitmapReplacement>(pResult); } Bitmap ResolutionReduction::Decompress (const BitmapReplacement& rBitmapData) const @@ -161,7 +161,7 @@ public: } }; -::boost::shared_ptr<BitmapReplacement> PngCompression::Compress (const Bitmap& rBitmap) const +std::shared_ptr<BitmapReplacement> PngCompression::Compress (const Bitmap& rBitmap) const { vcl::PNGWriter aWriter (rBitmap); SvMemoryStream aStream (32768, 32768); @@ -173,7 +173,7 @@ public: pResult->mpData = new char[pResult->mnDataSize]; memcpy(pResult->mpData, aStream.GetData(), pResult->mnDataSize); - return ::boost::shared_ptr<BitmapReplacement>(pResult); + return std::shared_ptr<BitmapReplacement>(pResult); } Bitmap PngCompression::Decompress ( diff --git a/sd/source/ui/slidesorter/cache/SlsBitmapCompressor.hxx b/sd/source/ui/slidesorter/cache/SlsBitmapCompressor.hxx index 6c40c0d4d4c4..243ebcfbfb90 100644 --- a/sd/source/ui/slidesorter/cache/SlsBitmapCompressor.hxx +++ b/sd/source/ui/slidesorter/cache/SlsBitmapCompressor.hxx @@ -21,7 +21,7 @@ #define INCLUDED_SD_SOURCE_UI_SLIDESORTER_CACHE_SLSBITMAPCOMPRESSOR_HXX #include <sal/types.h> -#include <boost/shared_ptr.hpp> +#include <memory> class Bitmap; @@ -38,7 +38,7 @@ public: /** Compress the given bitmap into a replacement format that is specific to the compressor class. */ - virtual ::boost::shared_ptr<BitmapReplacement> Compress (const Bitmap& rBitmap) const = 0; + virtual std::shared_ptr<BitmapReplacement> Compress (const Bitmap& rBitmap) const = 0; /** Decompress the given replacement data into a preview bitmap. Depending on the compression technique the returned bitmap may @@ -82,7 +82,7 @@ class NoBitmapCompression class DummyReplacement; public: virtual ~NoBitmapCompression() {} - virtual ::boost::shared_ptr<BitmapReplacement> Compress (const Bitmap& rpBitmap) const SAL_OVERRIDE; + virtual std::shared_ptr<BitmapReplacement> Compress (const Bitmap& rpBitmap) const SAL_OVERRIDE; virtual Bitmap Decompress (const BitmapReplacement& rBitmapData) const SAL_OVERRIDE; virtual bool IsLossless() const SAL_OVERRIDE; }; @@ -97,7 +97,7 @@ class CompressionByDeletion { public: virtual ~CompressionByDeletion() {} - virtual ::boost::shared_ptr<BitmapReplacement> Compress (const Bitmap& rBitmap) const SAL_OVERRIDE; + virtual std::shared_ptr<BitmapReplacement> Compress (const Bitmap& rBitmap) const SAL_OVERRIDE; virtual Bitmap Decompress (const BitmapReplacement& rBitmapData) const SAL_OVERRIDE; virtual bool IsLossless() const SAL_OVERRIDE; }; @@ -114,7 +114,7 @@ class ResolutionReduction static const sal_Int32 mnWidth = 100; public: virtual ~ResolutionReduction() {} - virtual ::boost::shared_ptr<BitmapReplacement> Compress (const Bitmap& rpBitmap) const SAL_OVERRIDE; + virtual std::shared_ptr<BitmapReplacement> Compress (const Bitmap& rpBitmap) const SAL_OVERRIDE; /** Scale the replacement bitmap up to the original size. */ virtual Bitmap Decompress (const BitmapReplacement& rBitmapData) const SAL_OVERRIDE; @@ -130,7 +130,7 @@ class PngCompression class PngReplacement; public: virtual ~PngCompression() {} - virtual ::boost::shared_ptr<BitmapReplacement> Compress (const Bitmap& rBitmap) const SAL_OVERRIDE; + virtual std::shared_ptr<BitmapReplacement> Compress (const Bitmap& rBitmap) const SAL_OVERRIDE; virtual Bitmap Decompress (const BitmapReplacement& rBitmapData) const SAL_OVERRIDE; virtual bool IsLossless() const SAL_OVERRIDE; }; diff --git a/sd/source/ui/slidesorter/cache/SlsBitmapFactory.hxx b/sd/source/ui/slidesorter/cache/SlsBitmapFactory.hxx index 80805787be51..af4323b64b1b 100644 --- a/sd/source/ui/slidesorter/cache/SlsBitmapFactory.hxx +++ b/sd/source/ui/slidesorter/cache/SlsBitmapFactory.hxx @@ -21,7 +21,7 @@ #define INCLUDED_SD_SOURCE_UI_SLIDESORTER_CACHE_SLSBITMAPFACTORY_HXX #include "PreviewRenderer.hxx" -#include <boost/shared_ptr.hpp> +#include <memory> class SdPage; class Size; diff --git a/sd/source/ui/slidesorter/cache/SlsCacheCompactor.cxx b/sd/source/ui/slidesorter/cache/SlsCacheCompactor.cxx index ea0dc48d9264..d85a7064cdf7 100644 --- a/sd/source/ui/slidesorter/cache/SlsCacheCompactor.cxx +++ b/sd/source/ui/slidesorter/cache/SlsCacheCompactor.cxx @@ -64,13 +64,13 @@ public: CacheCompactionByCompression ( ::sd::slidesorter::cache::BitmapCache& rCache, sal_Int32 nMaximalCacheSize, - const ::boost::shared_ptr< ::sd::slidesorter::cache::BitmapCompressor>& rpCompressor); + const std::shared_ptr< ::sd::slidesorter::cache::BitmapCompressor>& rpCompressor); protected: virtual void Run() SAL_OVERRIDE; private: - ::boost::shared_ptr< ::sd::slidesorter::cache::BitmapCompressor> mpCompressor; + std::shared_ptr< ::sd::slidesorter::cache::BitmapCompressor> mpCompressor; }; } // end of anonymous namespace @@ -87,7 +87,7 @@ namespace sd { namespace slidesorter { namespace cache { static const char sResolution[] = "ResolutionReduction"; static const char sPNGCompression[] = "PNGCompression"; - ::boost::shared_ptr<BitmapCompressor> pCompressor; + std::shared_ptr<BitmapCompressor> pCompressor; OUString sCompressionPolicy(sPNGCompression); Any aCompressionPolicy (CacheConfiguration::Instance()->GetValue("CompressionPolicy")); if (aCompressionPolicy.has<OUString>()) @@ -159,7 +159,7 @@ namespace { CacheCompactionByCompression::CacheCompactionByCompression ( ::sd::slidesorter::cache::BitmapCache& rCache, sal_Int32 nMaximalCacheSize, - const ::boost::shared_ptr< ::sd::slidesorter::cache::BitmapCompressor>& rpCompressor) + const std::shared_ptr< ::sd::slidesorter::cache::BitmapCompressor>& rpCompressor) : CacheCompactor(rCache,nMaximalCacheSize), mpCompressor(rpCompressor) { diff --git a/sd/source/ui/slidesorter/cache/SlsCacheConfiguration.cxx b/sd/source/ui/slidesorter/cache/SlsCacheConfiguration.cxx index cae6b2724504..39ad6efd7962 100644 --- a/sd/source/ui/slidesorter/cache/SlsCacheConfiguration.cxx +++ b/sd/source/ui/slidesorter/cache/SlsCacheConfiguration.cxx @@ -35,15 +35,15 @@ namespace sd { namespace slidesorter { namespace cache { namespace { - typedef ::boost::shared_ptr<CacheConfiguration> CacheConfigSharedPtr; + typedef std::shared_ptr<CacheConfiguration> CacheConfigSharedPtr; class theInstance : public rtl::Static<CacheConfigSharedPtr, theInstance> {}; } -::boost::weak_ptr<CacheConfiguration> CacheConfiguration::mpWeakInstance; +std::weak_ptr<CacheConfiguration> CacheConfiguration::mpWeakInstance; Timer CacheConfiguration::maReleaseTimer; -::boost::shared_ptr<CacheConfiguration> CacheConfiguration::Instance() +std::shared_ptr<CacheConfiguration> CacheConfiguration::Instance() { SolarMutexGuard aSolarGuard; CacheConfigSharedPtr &rInstancePtr = theInstance::get(); @@ -51,7 +51,7 @@ Timer CacheConfiguration::maReleaseTimer; { // Maybe somebody else kept a previously created instance alive. if ( ! mpWeakInstance.expired()) - rInstancePtr = ::boost::shared_ptr<CacheConfiguration>(mpWeakInstance); + rInstancePtr = std::shared_ptr<CacheConfiguration>(mpWeakInstance); if (rInstancePtr.get() == NULL) { // We have to create a new instance. diff --git a/sd/source/ui/slidesorter/cache/SlsCacheConfiguration.hxx b/sd/source/ui/slidesorter/cache/SlsCacheConfiguration.hxx index 2f55a20cae49..606233b38a2e 100644 --- a/sd/source/ui/slidesorter/cache/SlsCacheConfiguration.hxx +++ b/sd/source/ui/slidesorter/cache/SlsCacheConfiguration.hxx @@ -23,8 +23,7 @@ #include <com/sun/star/uno/Any.hxx> #include <vcl/timer.hxx> #include <com/sun/star/container/XNameAccess.hpp> -#include <boost/shared_ptr.hpp> -#include <boost/weak_ptr.hpp> +#include <memory> namespace sd { namespace slidesorter { namespace cache { @@ -38,7 +37,7 @@ public: seconds. Subsequent calls to this function will create a new instance. */ - static ::boost::shared_ptr<CacheConfiguration> Instance(); + static std::shared_ptr<CacheConfiguration> Instance(); /** Look up the specified value in MultiPaneGUI/SlideSorter/PreviewCache. When the specified value @@ -50,7 +49,7 @@ private: /** When a caller holds a reference after we have released ours we use this weak pointer to avoid creating a new instance. */ - static ::boost::weak_ptr<CacheConfiguration> mpWeakInstance; + static std::weak_ptr<CacheConfiguration> mpWeakInstance; static Timer maReleaseTimer; ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameAccess> mxCacheNode; diff --git a/sd/source/ui/slidesorter/cache/SlsGenericPageCache.cxx b/sd/source/ui/slidesorter/cache/SlsGenericPageCache.cxx index fe4a6dda6116..d2058991eb92 100644 --- a/sd/source/ui/slidesorter/cache/SlsGenericPageCache.cxx +++ b/sd/source/ui/slidesorter/cache/SlsGenericPageCache.cxx @@ -214,7 +214,7 @@ void GenericPageCache::RequestPreviewBitmap ( bool GenericPageCache::InvalidatePreviewBitmap (const CacheKey aKey) { // Invalidate the page in all caches that reference it, not just this one. - ::boost::shared_ptr<cache::PageCacheManager> pCacheManager ( + std::shared_ptr<cache::PageCacheManager> pCacheManager ( cache::PageCacheManager::Instance()); if (pCacheManager) return pCacheManager->InvalidatePreviewBitmap( diff --git a/sd/source/ui/slidesorter/cache/SlsGenericPageCache.hxx b/sd/source/ui/slidesorter/cache/SlsGenericPageCache.hxx index 207dceeb531e..315b91411b0d 100644 --- a/sd/source/ui/slidesorter/cache/SlsGenericPageCache.hxx +++ b/sd/source/ui/slidesorter/cache/SlsGenericPageCache.hxx @@ -22,7 +22,7 @@ #include "SlideSorter.hxx" #include "SlsRequestQueue.hxx" -#include <boost/scoped_ptr.hpp> +#include <memory> namespace sd { namespace slidesorter { namespace cache { @@ -128,11 +128,11 @@ public: void Resume(); private: - ::boost::shared_ptr<BitmapCache> mpBitmapCache; + std::shared_ptr<BitmapCache> mpBitmapCache; RequestQueue maRequestQueue; - ::boost::scoped_ptr<QueueProcessor> mpQueueProcessor; + std::unique_ptr<QueueProcessor> mpQueueProcessor; SharedCacheContext mpCacheContext; diff --git a/sd/source/ui/slidesorter/cache/SlsPageCacheManager.cxx b/sd/source/ui/slidesorter/cache/SlsPageCacheManager.cxx index 9e8624bb3add..0e639944a58e 100644 --- a/sd/source/ui/slidesorter/cache/SlsPageCacheManager.cxx +++ b/sd/source/ui/slidesorter/cache/SlsPageCacheManager.cxx @@ -25,7 +25,7 @@ #include <deque> #include <map> -#include <boost/weak_ptr.hpp> +#include <memory> namespace { @@ -62,12 +62,12 @@ class RecentlyUsedCacheDescriptor public: ::sd::slidesorter::cache::PageCacheManager::DocumentKey mpDocument; Size maPreviewSize; - ::boost::shared_ptr< ::sd::slidesorter::cache::PageCacheManager::Cache> mpCache; + std::shared_ptr< ::sd::slidesorter::cache::PageCacheManager::Cache> mpCache; RecentlyUsedCacheDescriptor( ::sd::slidesorter::cache::PageCacheManager::DocumentKey pDocument, const Size& rPreviewSize, - const ::boost::shared_ptr< ::sd::slidesorter::cache::PageCacheManager::Cache>& rpCache) + const std::shared_ptr< ::sd::slidesorter::cache::PageCacheManager::Cache>& rpCache) :mpDocument(pDocument),maPreviewSize(rPreviewSize),mpCache(rpCache) {} }; @@ -112,7 +112,7 @@ namespace sd { namespace slidesorter { namespace cache { */ class PageCacheManager::PageCacheContainer : public std::unordered_map<CacheDescriptor, - ::boost::shared_ptr<PageCacheManager::Cache>, + std::shared_ptr<PageCacheManager::Cache>, CacheDescriptor::Hash, CacheDescriptor::Equal> { @@ -123,12 +123,12 @@ public: address only. */ class CompareWithCache { public: - CompareWithCache(const ::boost::shared_ptr<PageCacheManager::Cache>& rpCache) + CompareWithCache(const std::shared_ptr<PageCacheManager::Cache>& rpCache) : mpCache(rpCache) {} bool operator () (const PageCacheContainer::value_type& rValue) const { return rValue.second == mpCache; } private: - ::boost::shared_ptr<PageCacheManager::Cache> mpCache; + std::shared_ptr<PageCacheManager::Cache> mpCache; }; }; @@ -160,18 +160,18 @@ public: //===== PageCacheManager ==================================================== -::boost::weak_ptr<PageCacheManager> PageCacheManager::mpInstance; +std::weak_ptr<PageCacheManager> PageCacheManager::mpInstance; -::boost::shared_ptr<PageCacheManager> PageCacheManager::Instance() +std::shared_ptr<PageCacheManager> PageCacheManager::Instance() { - ::boost::shared_ptr<PageCacheManager> pInstance; + std::shared_ptr<PageCacheManager> pInstance; ::osl::MutexGuard aGuard (::osl::Mutex::getGlobalMutex()); pInstance = mpInstance.lock(); if (pInstance.get() == NULL) { - pInstance = ::boost::shared_ptr<PageCacheManager>( + pInstance = std::shared_ptr<PageCacheManager>( new PageCacheManager(), PageCacheManager::Deleter()); mpInstance = pInstance; @@ -191,11 +191,11 @@ PageCacheManager::~PageCacheManager() { } -::boost::shared_ptr<PageCacheManager::Cache> PageCacheManager::GetCache ( +std::shared_ptr<PageCacheManager::Cache> PageCacheManager::GetCache ( DocumentKey pDocument, const Size& rPreviewSize) { - ::boost::shared_ptr<Cache> pResult; + std::shared_ptr<Cache> pResult; // Look for the cache in the list of active caches. CacheDescriptor aKey (pDocument, rPreviewSize); @@ -224,7 +224,7 @@ PageCacheManager::~PageCacheManager() } void PageCacheManager::Recycle ( - const ::boost::shared_ptr<Cache>& rpCache, + const std::shared_ptr<Cache>& rpCache, DocumentKey pDocument, const Size& rPreviewSize) { @@ -258,7 +258,7 @@ void PageCacheManager::Recycle ( } } -void PageCacheManager::ReleaseCache (const ::boost::shared_ptr<Cache>& rpCache) +void PageCacheManager::ReleaseCache (const std::shared_ptr<Cache>& rpCache) { PageCacheContainer::iterator iCache (::std::find_if( mpPageCaches->begin(), @@ -275,14 +275,14 @@ void PageCacheManager::ReleaseCache (const ::boost::shared_ptr<Cache>& rpCache) } } -::boost::shared_ptr<PageCacheManager::Cache> PageCacheManager::ChangeSize ( - const ::boost::shared_ptr<Cache>& rpCache, +std::shared_ptr<PageCacheManager::Cache> PageCacheManager::ChangeSize ( + const std::shared_ptr<Cache>& rpCache, const Size& rOldPreviewSize, const Size& rNewPreviewSize) { (void)rOldPreviewSize; - ::boost::shared_ptr<Cache> pResult; + std::shared_ptr<Cache> pResult; if (rpCache.get() != NULL) { @@ -388,11 +388,11 @@ void PageCacheManager::ReleasePreviewBitmap (const SdrPage* pPage) iCache->second->ReleaseBitmap(pPage); } -::boost::shared_ptr<PageCacheManager::Cache> PageCacheManager::GetRecentlyUsedCache ( +std::shared_ptr<PageCacheManager::Cache> PageCacheManager::GetRecentlyUsedCache ( DocumentKey pDocument, const Size& rPreviewSize) { - ::boost::shared_ptr<Cache> pCache; + std::shared_ptr<Cache> pCache; // Look for the cache in the list of recently used caches. RecentlyUsedPageCaches::iterator iQueue (mpRecentlyUsedPageCaches->find(pDocument)); @@ -414,7 +414,7 @@ void PageCacheManager::ReleasePreviewBitmap (const SdrPage* pPage) void PageCacheManager::PutRecentlyUsedCache( DocumentKey pDocument, const Size& rPreviewSize, - const ::boost::shared_ptr<Cache>& rpCache) + const std::shared_ptr<Cache>& rpCache) { // Look up the list of recently used caches for the given document. RecentlyUsedPageCaches::iterator iQueue (mpRecentlyUsedPageCaches->find(pDocument)); diff --git a/sd/source/ui/slidesorter/cache/SlsQueueProcessor.cxx b/sd/source/ui/slidesorter/cache/SlsQueueProcessor.cxx index 212734e3df0b..b3ef313c100a 100644 --- a/sd/source/ui/slidesorter/cache/SlsQueueProcessor.cxx +++ b/sd/source/ui/slidesorter/cache/SlsQueueProcessor.cxx @@ -27,7 +27,7 @@ namespace sd { namespace slidesorter { namespace cache { QueueProcessor::QueueProcessor ( RequestQueue& rQueue, - const ::boost::shared_ptr<BitmapCache>& rpCache, + const std::shared_ptr<BitmapCache>& rpCache, const Size& rPreviewSize, const bool bDoSuperSampling, const SharedCacheContext& rpCacheContext) @@ -182,7 +182,7 @@ void QueueProcessor::ProcessOneRequest ( } void QueueProcessor::SetBitmapCache ( - const ::boost::shared_ptr<BitmapCache>& rpCache) + const std::shared_ptr<BitmapCache>& rpCache) { mpCache = rpCache; } diff --git a/sd/source/ui/slidesorter/cache/SlsQueueProcessor.hxx b/sd/source/ui/slidesorter/cache/SlsQueueProcessor.hxx index 40fd28b59ce9..906e2e84beb9 100644 --- a/sd/source/ui/slidesorter/cache/SlsQueueProcessor.hxx +++ b/sd/source/ui/slidesorter/cache/SlsQueueProcessor.hxx @@ -55,7 +55,7 @@ public: typedef ::std::function<bool ()> IdleDetectionCallback; QueueProcessor ( RequestQueue& rQueue, - const ::boost::shared_ptr<BitmapCache>& rpCache, + const std::shared_ptr<BitmapCache>& rpCache, const Size& rPreviewSize, const bool bDoSuperSampling, const SharedCacheContext& rpCacheContext); @@ -83,7 +83,7 @@ public: BitmapCache. This is usually necessary after calling PageCacheManager::ChangeSize(). */ - void SetBitmapCache (const ::boost::shared_ptr<BitmapCache>& rpCache); + void SetBitmapCache (const std::shared_ptr<BitmapCache>& rpCache); private: /** This mutex is used to guard the queue processor. Be careful not to @@ -100,7 +100,7 @@ private: bool mbDoSuperSampling; SharedCacheContext mpCacheContext; RequestQueue& mrQueue; - ::boost::shared_ptr<BitmapCache> mpCache; + std::shared_ptr<BitmapCache> mpCache; BitmapFactory maBitmapFactory; bool mbIsPaused; diff --git a/sd/source/ui/slidesorter/cache/SlsRequestFactory.cxx b/sd/source/ui/slidesorter/cache/SlsRequestFactory.cxx index ce4b860710d7..aec7035c3f33 100644 --- a/sd/source/ui/slidesorter/cache/SlsRequestFactory.cxx +++ b/sd/source/ui/slidesorter/cache/SlsRequestFactory.cxx @@ -34,7 +34,7 @@ void RequestFactory::operator()( RequestQueue& rRequestQueue, const SharedCacheContext& rpCacheContext) { - ::boost::shared_ptr<std::vector<CacheKey> > aKeys; + std::shared_ptr<std::vector<CacheKey> > aKeys; // Add the requests for the visible pages. aKeys = rpCacheContext->GetEntryList(true); diff --git a/sd/source/ui/slidesorter/cache/SlsRequestQueue.hxx b/sd/source/ui/slidesorter/cache/SlsRequestQueue.hxx index 21b47c24bef7..a499b16956d6 100644 --- a/sd/source/ui/slidesorter/cache/SlsRequestQueue.hxx +++ b/sd/source/ui/slidesorter/cache/SlsRequestQueue.hxx @@ -27,7 +27,7 @@ #include <osl/mutex.hxx> #include <svx/sdrpageuser.hxx> -#include <boost/scoped_ptr.hpp> +#include <memory> namespace sd { namespace slidesorter { namespace cache { @@ -110,7 +110,7 @@ public: private: ::osl::Mutex maMutex; class Container; - ::boost::scoped_ptr<Container> mpRequestQueue; + std::unique_ptr<Container> mpRequestQueue; SharedCacheContext mpCacheContext; /** A lower bound of the lowest priority of all elements in the queues. diff --git a/sd/source/ui/slidesorter/controller/SlideSorterController.cxx b/sd/source/ui/slidesorter/controller/SlideSorterController.cxx index 1aaae267a10a..96ed5554e8e6 100644 --- a/sd/source/ui/slidesorter/controller/SlideSorterController.cxx +++ b/sd/source/ui/slidesorter/controller/SlideSorterController.cxx @@ -83,7 +83,7 @@ #include <com/sun/star/drawing/XDrawPages.hpp> #include <com/sun/star/accessibility/AccessibleEventId.hpp> -#include <boost/scoped_ptr.hpp> +#include <memory> using namespace ::com::sun::star; using namespace ::com::sun::star::uno; @@ -240,25 +240,25 @@ ScrollBarManager& SlideSorterController::GetScrollBarManager() return *mpScrollBarManager.get(); } -::boost::shared_ptr<CurrentSlideManager> SlideSorterController::GetCurrentSlideManager() const +std::shared_ptr<CurrentSlideManager> SlideSorterController::GetCurrentSlideManager() const { OSL_ASSERT(mpCurrentSlideManager.get()!=NULL); return mpCurrentSlideManager; } -::boost::shared_ptr<SlotManager> SlideSorterController::GetSlotManager() const +std::shared_ptr<SlotManager> SlideSorterController::GetSlotManager() const { OSL_ASSERT(mpSlotManager.get()!=NULL); return mpSlotManager; } -::boost::shared_ptr<SelectionManager> SlideSorterController::GetSelectionManager() const +std::shared_ptr<SelectionManager> SlideSorterController::GetSelectionManager() const { OSL_ASSERT(mpSelectionManager.get()!=NULL); return mpSelectionManager; } -::boost::shared_ptr<InsertionIndicatorHandler> +std::shared_ptr<InsertionIndicatorHandler> SlideSorterController::GetInsertionIndicatorHandler() const { OSL_ASSERT(mpInsertionIndicatorHandler.get()!=NULL); @@ -330,7 +330,7 @@ bool SlideSorterController::Command ( // view shell, b) the edit mode, and c) on whether the selection // is empty or not. ViewShell::ShellType eMainViewShellType (ViewShell::ST_NONE); - ::boost::shared_ptr<ViewShell> pMainViewShell ( + std::shared_ptr<ViewShell> pMainViewShell ( pViewShell->GetViewShellBase().GetMainViewShell()); if (pMainViewShell.get() != NULL) eMainViewShellType = pMainViewShell->GetShellType(); @@ -355,7 +355,7 @@ bool SlideSorterController::Command ( else nPopupId = RID_SLIDE_SORTER_MASTER_NOSEL_POPUP; } - ::boost::scoped_ptr<InsertionIndicatorHandler::ForceShowContext> pContext; + std::unique_ptr<InsertionIndicatorHandler::ForceShowContext> pContext; if (pPage == NULL) { // When there is no selection, then we show the insertion diff --git a/sd/source/ui/slidesorter/controller/SlsAnimator.cxx b/sd/source/ui/slidesorter/controller/SlsAnimator.cxx index 0d43120c134f..a4c6734fc5f4 100644 --- a/sd/source/ui/slidesorter/controller/SlsAnimator.cxx +++ b/sd/source/ui/slidesorter/controller/SlsAnimator.cxx @@ -110,7 +110,7 @@ Animator::AnimationId Animator::AddAnimation ( if (mbIsDisposed) return -1; - boost::shared_ptr<Animation> pAnimation ( + std::shared_ptr<Animation> pAnimation ( new Animation( rAnimation, nStartOffset / 1000.0, diff --git a/sd/source/ui/slidesorter/controller/SlsClipboard.cxx b/sd/source/ui/slidesorter/controller/SlsClipboard.cxx index b270ac67a58c..2ef25e5b5d48 100644 --- a/sd/source/ui/slidesorter/controller/SlsClipboard.cxx +++ b/sd/source/ui/slidesorter/controller/SlsClipboard.cxx @@ -73,7 +73,6 @@ #include <rtl/ustring.hxx> #include <osl/mutex.hxx> #include <vcl/svapp.hxx> -#include <boost/bind.hpp> namespace sd { namespace slidesorter { namespace controller { @@ -112,7 +111,7 @@ class Clipboard::UndoContext public: UndoContext ( SdDrawDocument* pDocument, - const ::boost::shared_ptr<ViewShell>& rpMainViewShell) + const std::shared_ptr<ViewShell>& rpMainViewShell) : mpDocument(pDocument), mpMainViewShell(rpMainViewShell) { @@ -138,7 +137,7 @@ public: } private: SdDrawDocument* mpDocument; - ::boost::shared_ptr<ViewShell> mpMainViewShell; + std::shared_ptr<ViewShell> mpMainViewShell; }; Clipboard::Clipboard (SlideSorter& rSlideSorter) @@ -271,7 +270,7 @@ sal_Int32 Clipboard::GetInsertionPosition (vcl::Window* pWindow) // selection. // d) After the last page when there is no selection and no focus. - ::boost::shared_ptr<controller::InsertionIndicatorHandler> pInsertionIndicatorHandler ( + std::shared_ptr<controller::InsertionIndicatorHandler> pInsertionIndicatorHandler ( mrController.GetInsertionIndicatorHandler()); if (pInsertionIndicatorHandler->IsActive()) { @@ -400,7 +399,7 @@ void Clipboard::CreateSlideTransferable ( aSelectedPages.Rewind(); ::std::vector<TransferableData::Representative> aRepresentatives; aRepresentatives.reserve(3); - ::boost::shared_ptr<cache::PageCache> pPreviewCache ( + std::shared_ptr<cache::PageCache> pPreviewCache ( mrSlideSorter.GetView().GetPreviewCache()); while (aSelectedPages.HasMoreElements()) { @@ -469,7 +468,7 @@ void Clipboard::CreateSlideTransferable ( } } -::boost::shared_ptr<SdTransferable::UserData> Clipboard::CreateTransferableUserData (SdTransferable* pTransferable) +std::shared_ptr<SdTransferable::UserData> Clipboard::CreateTransferableUserData (SdTransferable* pTransferable) { do { @@ -514,7 +513,7 @@ void Clipboard::CreateSlideTransferable ( // Create preview. ::std::vector<TransferableData::Representative> aRepresentatives; aRepresentatives.reserve(1); - ::boost::shared_ptr<cache::PageCache> pPreviewCache ( + std::shared_ptr<cache::PageCache> pPreviewCache ( rSlideSorter.GetView().GetPreviewCache()); model::SharedPageDescriptor pDescriptor (rSlideSorter.GetModel().GetPageDescriptor((nPageIndex-1)/2)); if ( ! pDescriptor || pDescriptor->GetPage()==NULL) @@ -531,7 +530,7 @@ void Clipboard::CreateSlideTransferable ( rOtherClipboard.maPagesToRemove.push_back(pDescriptor->GetPage()); // Create the new transferable. - ::boost::shared_ptr<SdTransferable::UserData> pNewTransferable ( + std::shared_ptr<SdTransferable::UserData> pNewTransferable ( new TransferableData( pSlideSorterViewShell, aRepresentatives)); @@ -551,7 +550,7 @@ void Clipboard::CreateSlideTransferable ( } while (false); - return ::boost::shared_ptr<SdTransferable::UserData>(); + return std::shared_ptr<SdTransferable::UserData>(); } void Clipboard::StartDrag ( @@ -704,7 +703,7 @@ sal_Int8 Clipboard::ExecuteDrop ( ( pDragTransferable->GetView() != &mrSlideSorter.GetView() ) || ( nXOffset >= 2 && nYOffset >= 2 ); - ::boost::shared_ptr<InsertionIndicatorHandler> pInsertionIndicatorHandler( + std::shared_ptr<InsertionIndicatorHandler> pInsertionIndicatorHandler( mrController.GetInsertionIndicatorHandler()); // Get insertion position and then turn off the insertion indicator. pInsertionIndicatorHandler->UpdatePosition(aEventModelPosition, rEvent.mnAction); @@ -744,7 +743,7 @@ sal_Int8 Clipboard::ExecuteDrop ( // only that is notified automatically about the drag // operation being finished. Because the target slide sorter // has be notified, too, add a callback for that. - ::boost::shared_ptr<TransferableData> pSlideSorterTransferable ( + std::shared_ptr<TransferableData> pSlideSorterTransferable ( TransferableData::GetFromTransferable(pDragTransferable)); BOOST_ASSERT(pSlideSorterTransferable); if (pSlideSorterTransferable @@ -785,7 +784,7 @@ bool Clipboard::IsInsertionTrivial ( SdTransferable* pTransferable, const sal_Int8 nDndAction) const { - ::boost::shared_ptr<TransferableData> pSlideSorterTransferable ( + std::shared_ptr<TransferableData> pSlideSorterTransferable ( TransferableData::GetFromTransferable(pTransferable)); if (pSlideSorterTransferable && pSlideSorterTransferable->GetSourceViewShell() != mrSlideSorter.GetViewShell()) @@ -877,9 +876,9 @@ sal_Int8 Clipboard::ExecuteOrAcceptShapeDrop ( // technical reasons: The actual code to accept or execute a shape drop // is implemented in the ViewShell class and uses the page view of the // main edit view. This is not possible without a DrawViewShell. - ::boost::shared_ptr<DrawViewShell> pDrawViewShell; + std::shared_ptr<DrawViewShell> pDrawViewShell; if (mrSlideSorter.GetViewShell() != NULL) - pDrawViewShell = ::boost::dynamic_pointer_cast<DrawViewShell>( + pDrawViewShell = std::dynamic_pointer_cast<DrawViewShell>( mrSlideSorter.GetViewShell()->GetViewShellBase().GetMainViewShell()); if (pDrawViewShell.get() != NULL && (pDrawViewShell->GetShellType() == ViewShell::ST_IMPRESS diff --git a/sd/source/ui/slidesorter/controller/SlsCurrentSlideManager.cxx b/sd/source/ui/slidesorter/controller/SlsCurrentSlideManager.cxx index b14c36caff4b..b167ab23c08a 100644 --- a/sd/source/ui/slidesorter/controller/SlsCurrentSlideManager.cxx +++ b/sd/source/ui/slidesorter/controller/SlsCurrentSlideManager.cxx @@ -190,8 +190,8 @@ void CurrentSlideManager::SetCurrentSlideAtTabControl (const SharedPageDescripto ViewShellBase* pBase = mrSlideSorter.GetViewShellBase(); if (pBase != NULL) { - ::boost::shared_ptr<DrawViewShell> pDrawViewShell ( - ::boost::dynamic_pointer_cast<DrawViewShell>(pBase->GetMainViewShell())); + std::shared_ptr<DrawViewShell> pDrawViewShell ( + std::dynamic_pointer_cast<DrawViewShell>(pBase->GetMainViewShell())); if (pDrawViewShell) { sal_uInt16 nPageNumber = (rpDescriptor->GetPage()->GetPageNum()-1)/2; diff --git a/sd/source/ui/slidesorter/controller/SlsDragAndDropContext.cxx b/sd/source/ui/slidesorter/controller/SlsDragAndDropContext.cxx index 93fc920193d5..5fb9af5837cb 100644 --- a/sd/source/ui/slidesorter/controller/SlsDragAndDropContext.cxx +++ b/sd/source/ui/slidesorter/controller/SlsDragAndDropContext.cxx @@ -89,7 +89,7 @@ void DragAndDropContext::UpdatePosition ( // constant while scrolling.) sd::Window *pWindow (mpTargetSlideSorter->GetContentWindow()); const Point aMouseModelPosition (pWindow->PixelToLogic(rMousePosition)); - ::boost::shared_ptr<InsertionIndicatorHandler> pInsertionIndicatorHandler ( + std::shared_ptr<InsertionIndicatorHandler> pInsertionIndicatorHandler ( mpTargetSlideSorter->GetController().GetInsertionIndicatorHandler()); bool bDoAutoScroll = bAllowAutoScroll diff --git a/sd/source/ui/slidesorter/controller/SlsInsertionIndicatorHandler.cxx b/sd/source/ui/slidesorter/controller/SlsInsertionIndicatorHandler.cxx index 42b932e640a8..3f433ac44992 100644 --- a/sd/source/ui/slidesorter/controller/SlsInsertionIndicatorHandler.cxx +++ b/sd/source/ui/slidesorter/controller/SlsInsertionIndicatorHandler.cxx @@ -171,7 +171,7 @@ void InsertionIndicatorHandler::SetPosition ( } } -::boost::shared_ptr<view::InsertAnimator> InsertionIndicatorHandler::GetInsertAnimator() +std::shared_ptr<view::InsertAnimator> InsertionIndicatorHandler::GetInsertAnimator() { if ( ! mpInsertAnimator) mpInsertAnimator.reset(new view::InsertAnimator(mrSlideSorter)); @@ -234,7 +234,7 @@ bool InsertionIndicatorHandler::IsInsertionTrivial (const sal_Int8 nDndAction) //===== InsertionIndicatorHandler::ForceShowContext =========================== InsertionIndicatorHandler::ForceShowContext::ForceShowContext ( - const ::boost::shared_ptr<InsertionIndicatorHandler>& rpHandler) + const std::shared_ptr<InsertionIndicatorHandler>& rpHandler) : mpHandler(rpHandler) { mpHandler->ForceShow(); diff --git a/sd/source/ui/slidesorter/controller/SlsListener.cxx b/sd/source/ui/slidesorter/controller/SlsListener.cxx index d4f65d7375f0..486834e17fe0 100644 --- a/sd/source/ui/slidesorter/controller/SlsListener.cxx +++ b/sd/source/ui/slidesorter/controller/SlsListener.cxx @@ -595,7 +595,7 @@ void Listener::HandleShapeModification (const SdrPage* pPage) // Invalidate the preview of the page (in all slide sorters that display // it.) - ::boost::shared_ptr<cache::PageCacheManager> pCacheManager (cache::PageCacheManager::Instance()); + std::shared_ptr<cache::PageCacheManager> pCacheManager (cache::PageCacheManager::Instance()); if ( ! pCacheManager) return; SdDrawDocument* pDocument = mrSlideSorter.GetModel().GetDocument(); diff --git a/sd/source/ui/slidesorter/controller/SlsListener.hxx b/sd/source/ui/slidesorter/controller/SlsListener.hxx index 0753edd986e4..09dec77c5655 100644 --- a/sd/source/ui/slidesorter/controller/SlsListener.hxx +++ b/sd/source/ui/slidesorter/controller/SlsListener.hxx @@ -32,7 +32,7 @@ #include <svl/lstner.hxx> #include <tools/link.hxx> -#include <boost/shared_ptr.hpp> +#include <memory> namespace sd { class ViewShellBase; @@ -151,7 +151,7 @@ private: events. It is references counted in order to cope with events that are expected but never sent. */ - ::boost::shared_ptr<SlideSorterController::ModelChangeLock> mpModelChangeLock; + std::shared_ptr<SlideSorterController::ModelChangeLock> mpModelChangeLock; void ReleaseListeners(); diff --git a/sd/source/ui/slidesorter/controller/SlsPageSelector.cxx b/sd/source/ui/slidesorter/controller/SlsPageSelector.cxx index b9563ae7b814..f2603e4f0af3 100644 --- a/sd/source/ui/slidesorter/controller/SlsPageSelector.cxx +++ b/sd/source/ui/slidesorter/controller/SlsPageSelector.cxx @@ -37,7 +37,7 @@ #include "ViewShellBase.hxx" #include <com/sun/star/drawing/XDrawView.hpp> #include <com/sun/star/beans/XPropertySet.hpp> -#include <boost/shared_ptr.hpp> +#include <memory> using namespace ::com::sun::star; using namespace ::com::sun::star::uno; @@ -261,9 +261,9 @@ void PageSelector::DisableBroadcasting() mnBroadcastDisableLevel ++; } -::boost::shared_ptr<PageSelector::PageSelection> PageSelector::GetPageSelection() const +std::shared_ptr<PageSelector::PageSelection> PageSelector::GetPageSelection() const { - ::boost::shared_ptr<PageSelection> pSelection (new PageSelection()); + std::shared_ptr<PageSelection> pSelection (new PageSelection()); pSelection->reserve(GetSelectedPageCount()); int nPageCount = GetPageCount(); @@ -278,7 +278,7 @@ void PageSelector::DisableBroadcasting() } void PageSelector::SetPageSelection ( - const ::boost::shared_ptr<PageSelection>& rpSelection, + const std::shared_ptr<PageSelection>& rpSelection, const bool bUpdateCurrentPage) { PageSelection::const_iterator iPage; @@ -322,7 +322,7 @@ void PageSelector::UpdateCurrentPage (const bool bUpdateOnlyWhenPending) // selection to just the new current slide. To prevent that, // we store (and at the end of this scope restore) the current // selection. - ::boost::shared_ptr<PageSelection> pSelection (GetPageSelection()); + std::shared_ptr<PageSelection> pSelection (GetPageSelection()); mrController.GetCurrentSlideManager()->SwitchCurrentSlide(pCurrentPageDescriptor); diff --git a/sd/source/ui/slidesorter/controller/SlsSelectionFunction.cxx b/sd/source/ui/slidesorter/controller/SlsSelectionFunction.cxx index 7a456824b01a..95f850791ff4 100644 --- a/sd/source/ui/slidesorter/controller/SlsSelectionFunction.cxx +++ b/sd/source/ui/slidesorter/controller/SlsSelectionFunction.cxx @@ -306,7 +306,7 @@ protected: virtual bool ProcessDragEvent (SelectionFunction::EventDescriptor& rDescriptor) SAL_OVERRIDE; private: - ::boost::scoped_ptr<DragAndDropContext> mpDragAndDropContext; + std::unique_ptr<DragAndDropContext> mpDragAndDropContext; }; //===== SelectionFunction ===================================================== @@ -683,7 +683,7 @@ void SelectionFunction::ProcessEvent (EventDescriptor& rDescriptor) // The call to ProcessEvent may switch to another mode handler. // Prevent the untimely destruction of the called handler by acquiring a // temporary reference here. - ::boost::shared_ptr<ModeHandler> pModeHandler (mpModeHandler); + std::shared_ptr<ModeHandler> pModeHandler (mpModeHandler); pModeHandler->ProcessEvent(rDescriptor); } @@ -697,7 +697,7 @@ bool Match ( void SelectionFunction::SwitchToNormalMode() { if (mpModeHandler->GetMode() != NormalMode) - SwitchMode(::boost::shared_ptr<ModeHandler>( + SwitchMode(std::shared_ptr<ModeHandler>( new NormalModeHandler(mrSlideSorter, *this))); } @@ -706,7 +706,7 @@ void SelectionFunction::SwitchToDragAndDropMode (const Point& rMousePosition) if (mpModeHandler->GetMode() != DragAndDropMode) { #ifndef MACOSX - ::boost::shared_ptr<DragAndDropModeHandler> handler( + std::shared_ptr<DragAndDropModeHandler> handler( new DragAndDropModeHandler(mrSlideSorter, *this)); SwitchMode(handler); // Delayed initialization, only after mpModeHanler is set, otherwise DND initialization @@ -714,7 +714,7 @@ void SelectionFunction::SwitchToDragAndDropMode (const Point& rMousePosition) // and without mpModeHandler set it would again try to set a new handler. handler->Initialize(rMousePosition, mpWindow); #else - SwitchMode(::boost::shared_ptr<ModeHandler>( + SwitchMode(std::shared_ptr<ModeHandler>( new DragAndDropModeHandler(mrSlideSorter, *this, rMousePosition, mpWindow))); #endif } @@ -727,7 +727,7 @@ void SelectionFunction::SwitchToMultiSelectionMode ( if (mpModeHandler->GetMode() != MultiSelectionMode) #ifndef MACOSX { - ::boost::shared_ptr<MultiSelectionModeHandler> handler( + std::shared_ptr<MultiSelectionModeHandler> handler( new MultiSelectionModeHandler(mrSlideSorter, *this, rMousePosition)); SwitchMode(handler); // Delayed initialization, only after mpModeHanler is set, the handle ctor @@ -735,12 +735,12 @@ void SelectionFunction::SwitchToMultiSelectionMode ( handler->Initialize(nEventCode); } #else - SwitchMode(::boost::shared_ptr<ModeHandler>( + SwitchMode(std::shared_ptr<ModeHandler>( new MultiSelectionModeHandler(mrSlideSorter, *this, rMousePosition, nEventCode))); #endif } -void SelectionFunction::SwitchMode (const ::boost::shared_ptr<ModeHandler>& rpHandler) +void SelectionFunction::SwitchMode (const std::shared_ptr<ModeHandler>& rpHandler) { // Not all modes allow mouse over indicator. if (mpModeHandler->IsMouseOverIndicatorAllowed() != rpHandler->IsMouseOverIndicatorAllowed()) @@ -765,8 +765,8 @@ void SelectionFunction::ResetMouseAnchor() { if (mpModeHandler && mpModeHandler->GetMode() == NormalMode) { - ::boost::shared_ptr<NormalModeHandler> pHandler ( - ::boost::dynamic_pointer_cast<NormalModeHandler>(mpModeHandler)); + std::shared_ptr<NormalModeHandler> pHandler ( + std::dynamic_pointer_cast<NormalModeHandler>(mpModeHandler)); if (pHandler) pHandler->ResetButtonDownLocation(); } @@ -1120,7 +1120,7 @@ bool NormalModeHandler::ProcessButtonDownEvent ( // Insert a new slide: // First of all we need to set the insertion indicator which sets the // position where the new slide will be inserted. - ::boost::shared_ptr<InsertionIndicatorHandler> pInsertionIndicatorHandler + std::shared_ptr<InsertionIndicatorHandler> pInsertionIndicatorHandler = mrSlideSorter.GetController().GetInsertionIndicatorHandler(); pInsertionIndicatorHandler->Start(false); diff --git a/sd/source/ui/slidesorter/controller/SlsSlotManager.cxx b/sd/source/ui/slidesorter/controller/SlsSlotManager.cxx index 5a32041c1e31..446c6fc8c5d9 100644 --- a/sd/source/ui/slidesorter/controller/SlsSlotManager.cxx +++ b/sd/source/ui/slidesorter/controller/SlsSlotManager.cxx @@ -88,7 +88,7 @@ #include <vcl/svapp.hxx> #include <boost/bind.hpp> -#include <boost/scoped_ptr.hpp> +#include <memory> using namespace ::com::sun::star; using namespace ::com::sun::star::uno; @@ -263,7 +263,7 @@ void SlotManager::FuTemporary (SfxRequest& rRequest) case SID_PHOTOALBUM: { SdAbstractDialogFactory* pFact = SdAbstractDialogFactory::Create(); - boost::scoped_ptr<VclAbstractDialog> pDlg(pFact ? pFact->CreateSdPhotoAlbumDialog( + std::unique_ptr<VclAbstractDialog> pDlg(pFact ? pFact->CreateSdPhotoAlbumDialog( mrSlideSorter.GetContentWindow(), pDocument) : 0); @@ -374,8 +374,8 @@ void SlotManager::FuSupport (SfxRequest& rRequest) ViewShellBase* pBase = mrSlideSorter.GetViewShellBase(); if (pBase != NULL) { - ::boost::shared_ptr<DrawViewShell> pDrawViewShell ( - ::boost::dynamic_pointer_cast<DrawViewShell>(pBase->GetMainViewShell())); + std::shared_ptr<DrawViewShell> pDrawViewShell ( + std::dynamic_pointer_cast<DrawViewShell>(pBase->GetMainViewShell())); if (pDrawViewShell.get() != NULL) pDrawViewShell->FuSupport(rRequest); } @@ -733,8 +733,8 @@ void SlotManager::GetClipboardState ( SfxItemSet& rSet) ViewShellBase* pBase = mrSlideSorter.GetViewShellBase(); if (pBase != NULL) { - ::boost::shared_ptr<DrawViewShell> pDrawViewShell ( - ::boost::dynamic_pointer_cast<DrawViewShell>(pBase->GetMainViewShell())); + std::shared_ptr<DrawViewShell> pDrawViewShell ( + std::dynamic_pointer_cast<DrawViewShell>(pBase->GetMainViewShell())); if (pDrawViewShell.get() != NULL) { TransferableDataHelper aDataHelper ( @@ -904,7 +904,7 @@ void SlotManager::RenameSlide() SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create(); DBG_ASSERT(pFact, "Dialog creation failed!"); - boost::scoped_ptr<AbstractSvxNameDialog> aNameDlg(pFact->CreateSvxNameDialog( + std::unique_ptr<AbstractSvxNameDialog> aNameDlg(pFact->CreateSvxNameDialog( mrSlideSorter.GetContentWindow(), aPageName, aDescr)); DBG_ASSERT(aNameDlg, "Dialog creation failed!"); diff --git a/sd/source/ui/slidesorter/controller/SlsTransferableData.cxx b/sd/source/ui/slidesorter/controller/SlsTransferableData.cxx index 85777682c4e2..a5c9a41eea98 100644 --- a/sd/source/ui/slidesorter/controller/SlsTransferableData.cxx +++ b/sd/source/ui/slidesorter/controller/SlsTransferableData.cxx @@ -32,24 +32,24 @@ SdTransferable* TransferableData::CreateTransferable ( const ::std::vector<Representative>& rRepresentatives) { SdTransferable* pTransferable = new SdTransferable (pSrcDoc, pWorkView, bInitOnGetData); - ::boost::shared_ptr<TransferableData> pData (new TransferableData(pViewShell, rRepresentatives)); + std::shared_ptr<TransferableData> pData (new TransferableData(pViewShell, rRepresentatives)); pTransferable->AddUserData(pData); return pTransferable; } -::boost::shared_ptr<TransferableData> TransferableData::GetFromTransferable (const SdTransferable* pTransferable) +std::shared_ptr<TransferableData> TransferableData::GetFromTransferable (const SdTransferable* pTransferable) { if (pTransferable) { for (sal_Int32 nIndex=0,nCount=pTransferable->GetUserDataCount(); nIndex<nCount; ++nIndex) { - ::boost::shared_ptr<TransferableData> xData = - ::boost::dynamic_pointer_cast<TransferableData>(pTransferable->GetUserData(nIndex)); + std::shared_ptr<TransferableData> xData = + std::dynamic_pointer_cast<TransferableData>(pTransferable->GetUserData(nIndex)); if (xData) return xData; } } - return ::boost::shared_ptr<TransferableData>(); + return std::shared_ptr<TransferableData>(); } TransferableData::TransferableData ( diff --git a/sd/source/ui/slidesorter/inc/cache/SlsCacheContext.hxx b/sd/source/ui/slidesorter/inc/cache/SlsCacheContext.hxx index 206ef860819e..10126e663c4b 100644 --- a/sd/source/ui/slidesorter/inc/cache/SlsCacheContext.hxx +++ b/sd/source/ui/slidesorter/inc/cache/SlsCacheContext.hxx @@ -22,7 +22,7 @@ #include <sal/types.h> #include <com/sun/star/uno/XInterface.hpp> -#include <boost/shared_ptr.hpp> +#include <memory> #include <vector> class SdrPage; @@ -76,7 +76,7 @@ public: to allow rendering of previews that are not visible (ahead of time). When not then return an empty pointer or an empty vector. */ - virtual ::boost::shared_ptr<std::vector<CacheKey> > GetEntryList (bool bVisible) = 0; + virtual std::shared_ptr<std::vector<CacheKey> > GetEntryList (bool bVisible) = 0; /** Return the priority that defines the order in which previews are created for different keys/pages. Typically the visible pages come @@ -92,7 +92,7 @@ public: virtual ::com::sun::star::uno::Reference<com::sun::star::uno::XInterface> GetModel() = 0; }; -typedef ::boost::shared_ptr<CacheContext> SharedCacheContext; +typedef std::shared_ptr<CacheContext> SharedCacheContext; } } } // end of namespace ::sd::slidesorter::cache diff --git a/sd/source/ui/slidesorter/inc/cache/SlsPageCache.hxx b/sd/source/ui/slidesorter/inc/cache/SlsPageCache.hxx index 27b8e9e35baf..022c88b82735 100644 --- a/sd/source/ui/slidesorter/inc/cache/SlsPageCache.hxx +++ b/sd/source/ui/slidesorter/inc/cache/SlsPageCache.hxx @@ -22,8 +22,8 @@ #include "cache/SlsCacheContext.hxx" #include <sal/types.h> -#include <boost/scoped_ptr.hpp> #include <vcl/bitmap.hxx> +#include <memory> class Size; @@ -152,7 +152,7 @@ public: void Resume(); private: - ::boost::scoped_ptr<GenericPageCache> mpImplementation; + std::unique_ptr<GenericPageCache> mpImplementation; }; } } } // end of namespace ::sd::slidesorter::cache diff --git a/sd/source/ui/slidesorter/inc/cache/SlsPageCacheManager.hxx b/sd/source/ui/slidesorter/inc/cache/SlsPageCacheManager.hxx index e6ed624f6032..257aaec0839d 100644 --- a/sd/source/ui/slidesorter/inc/cache/SlsPageCacheManager.hxx +++ b/sd/source/ui/slidesorter/inc/cache/SlsPageCacheManager.hxx @@ -22,7 +22,6 @@ #include <sal/types.h> #include <com/sun/star/uno/XInterface.hpp> -#include <boost/shared_ptr.hpp> #include <memory> #include <vector> @@ -42,12 +41,12 @@ class PageCacheManager { public: typedef BitmapCache Cache; - typedef ::std::vector< ::std::pair<Size, ::boost::shared_ptr<BitmapCache> > > BestFittingPageCaches; + typedef std::vector< std::pair<Size, std::shared_ptr<BitmapCache> > > BestFittingPageCaches; typedef css::uno::Reference<css::uno::XInterface> DocumentKey; /** Return the one instance of the PageCacheManager class. */ - static ::boost::shared_ptr<PageCacheManager> Instance(); + static std::shared_ptr<PageCacheManager> Instance(); /** Look up the cache for the given model in which the previews have the specified size. If no such cache exists, then one is created. When @@ -58,7 +57,7 @@ public: The returned cache lives as long as somebody keeps a shared pointer and the ReleaseCache() method has not been called. */ - ::boost::shared_ptr<Cache> GetCache ( + std::shared_ptr<Cache> GetCache ( DocumentKey pDocument, const Size& rPreviewSize); @@ -66,14 +65,14 @@ public: cache. After that the cache will live as long as the caller (and maybe others) holds its reference. */ - void ReleaseCache (const ::boost::shared_ptr<Cache>& rpCache); + void ReleaseCache (const std::shared_ptr<Cache>& rpCache); /** This is an information to the cache manager that the size of preview bitmaps in the specified cache has changed. */ - ::boost::shared_ptr<Cache> ChangeSize ( - const ::boost::shared_ptr<Cache>& rpCache, + std::shared_ptr<Cache> ChangeSize ( + const std::shared_ptr<Cache>& rpCache, const Size& rOldPreviewSize, const Size& rNewPreviewSize); @@ -109,15 +108,15 @@ private: shared_ptr so that the cache manager has the same life time as the ViewShellBase. */ - static ::boost::weak_ptr<PageCacheManager> mpInstance; + static std::weak_ptr<PageCacheManager> mpInstance; /// List of active caches. class PageCacheContainer; - ::std::unique_ptr<PageCacheContainer> mpPageCaches; + std::unique_ptr<PageCacheContainer> mpPageCaches; /// List of inactive, recently used caches. class RecentlyUsedPageCaches; - ::std::unique_ptr<RecentlyUsedPageCaches> mpRecentlyUsedPageCaches; + std::unique_ptr<RecentlyUsedPageCaches> mpRecentlyUsedPageCaches; /** The maximal number of recently used caches that are kept alive after they have become inactive, i.e. after they are not used anymore by a @@ -131,7 +130,7 @@ private: class Deleter; friend class Deleter; - ::boost::shared_ptr<Cache> GetRecentlyUsedCache( + std::shared_ptr<Cache> GetRecentlyUsedCache( DocumentKey pDocument, const Size& rSize); @@ -142,7 +141,7 @@ private: void PutRecentlyUsedCache( DocumentKey pDocument, const Size& rPreviewSize, - const ::boost::shared_ptr<Cache>& rpCache); + const std::shared_ptr<Cache>& rpCache); /** Return a sorted list of the available caches, both active caches and those recently used, for the given document. The sort order is so @@ -157,7 +156,7 @@ private: BitmapCache with already exisiting previews. */ void Recycle ( - const ::boost::shared_ptr<Cache>& rpCache, + const std::shared_ptr<Cache>& rpCache, DocumentKey pDocument, const Size& rPreviewSize); }; diff --git a/sd/source/ui/slidesorter/inc/controller/SlideSorterController.hxx b/sd/source/ui/slidesorter/inc/controller/SlideSorterController.hxx index 8d1d378991c1..743772791594 100644 --- a/sd/source/ui/slidesorter/inc/controller/SlideSorterController.hxx +++ b/sd/source/ui/slidesorter/inc/controller/SlideSorterController.hxx @@ -30,7 +30,7 @@ #include <tools/link.hxx> #include <tools/gen.hxx> -#include <boost/scoped_ptr.hpp> +#include <memory> namespace sd { namespace slidesorter { class SlideSorter; @@ -116,10 +116,10 @@ public: */ ScrollBarManager& GetScrollBarManager(); - ::boost::shared_ptr<CurrentSlideManager> GetCurrentSlideManager() const; - ::boost::shared_ptr<SlotManager> GetSlotManager() const; - ::boost::shared_ptr<SelectionManager> GetSelectionManager() const; - ::boost::shared_ptr<InsertionIndicatorHandler> GetInsertionIndicatorHandler() const; + std::shared_ptr<CurrentSlideManager> GetCurrentSlideManager() const; + std::shared_ptr<SlotManager> GetSlotManager() const; + std::shared_ptr<SelectionManager> GetSelectionManager() const; + std::shared_ptr<InsertionIndicatorHandler> GetInsertionIndicatorHandler() const; /** This method forwards the call to the SlideSorterView and executes pending operations like moving selected pages into the visible area. @@ -215,7 +215,7 @@ public: /** Return an Animator object. */ - ::boost::shared_ptr<Animator> GetAnimator() const { return mpAnimator;} + std::shared_ptr<Animator> GetAnimator() const { return mpAnimator;} VisibleAreaManager& GetVisibleAreaManager() const; @@ -226,16 +226,16 @@ private: SlideSorter& mrSlideSorter; model::SlideSorterModel& mrModel; view::SlideSorterView& mrView; - ::boost::scoped_ptr<PageSelector> mpPageSelector; - ::boost::scoped_ptr<FocusManager> mpFocusManager; - ::boost::shared_ptr<SlotManager> mpSlotManager; - ::boost::scoped_ptr<ScrollBarManager> mpScrollBarManager; - mutable ::boost::shared_ptr<CurrentSlideManager> mpCurrentSlideManager; - ::boost::shared_ptr<SelectionManager> mpSelectionManager; - ::boost::scoped_ptr<controller::Clipboard> mpClipboard; - ::boost::shared_ptr<InsertionIndicatorHandler> mpInsertionIndicatorHandler; - ::boost::shared_ptr<Animator> mpAnimator; - ::boost::scoped_ptr<VisibleAreaManager> mpVisibleAreaManager; + std::unique_ptr<PageSelector> mpPageSelector; + std::unique_ptr<FocusManager> mpFocusManager; + std::shared_ptr<SlotManager> mpSlotManager; + std::unique_ptr<ScrollBarManager> mpScrollBarManager; + mutable std::shared_ptr<CurrentSlideManager> mpCurrentSlideManager; + std::shared_ptr<SelectionManager> mpSelectionManager; + std::unique_ptr<controller::Clipboard> mpClipboard; + std::shared_ptr<InsertionIndicatorHandler> mpInsertionIndicatorHandler; + std::shared_ptr<Animator> mpAnimator; + std::unique_ptr<VisibleAreaManager> mpVisibleAreaManager; // The listener listens to UNO events and thus is a UNO object. ::rtl::Reference<controller::Listener> mpListener; diff --git a/sd/source/ui/slidesorter/inc/controller/SlsAnimator.hxx b/sd/source/ui/slidesorter/inc/controller/SlsAnimator.hxx index 09135d9738b0..f9c8db38773d 100644 --- a/sd/source/ui/slidesorter/inc/controller/SlsAnimator.hxx +++ b/sd/source/ui/slidesorter/inc/controller/SlsAnimator.hxx @@ -27,9 +27,7 @@ #include <vcl/idle.hxx> #include <sal/types.h> -#include <boost/noncopyable.hpp> -#include <boost/scoped_ptr.hpp> -#include <boost/shared_ptr.hpp> +#include <memory> #include <functional> #include <vector> @@ -99,11 +97,11 @@ private: Idle maIdle; bool mbIsDisposed; class Animation; - typedef ::std::vector<boost::shared_ptr<Animation> > AnimationList; + typedef ::std::vector<std::shared_ptr<Animation> > AnimationList; AnimationList maAnimations; ::canvas::tools::ElapsedTime maElapsedTime; - ::boost::scoped_ptr<view::SlideSorterView::DrawLock> mpDrawLock; + std::unique_ptr<view::SlideSorterView::DrawLock> mpDrawLock; AnimationId mnNextAnimationId; diff --git a/sd/source/ui/slidesorter/inc/controller/SlsClipboard.hxx b/sd/source/ui/slidesorter/inc/controller/SlsClipboard.hxx index 5caeba792722..546facbf0e2e 100644 --- a/sd/source/ui/slidesorter/inc/controller/SlsClipboard.hxx +++ b/sd/source/ui/slidesorter/inc/controller/SlsClipboard.hxx @@ -66,7 +66,7 @@ public: transferable. The returned transferable is set up with all information necessary so that it can be dropped on a slide sorter. */ - static ::boost::shared_ptr<SdTransferable::UserData> CreateTransferableUserData (SdTransferable* pTransferable); + static std::shared_ptr<SdTransferable::UserData> CreateTransferableUserData (SdTransferable* pTransferable); void HandleSlotCall (SfxRequest& rRequest); diff --git a/sd/source/ui/slidesorter/inc/controller/SlsInsertionIndicatorHandler.hxx b/sd/source/ui/slidesorter/inc/controller/SlsInsertionIndicatorHandler.hxx index d4084e6cc90d..80b1049ec61e 100644 --- a/sd/source/ui/slidesorter/inc/controller/SlsInsertionIndicatorHandler.hxx +++ b/sd/source/ui/slidesorter/inc/controller/SlsInsertionIndicatorHandler.hxx @@ -62,10 +62,10 @@ public: class ForceShowContext { public: - ForceShowContext (const ::boost::shared_ptr<InsertionIndicatorHandler>& rpHandler); + ForceShowContext (const std::shared_ptr<InsertionIndicatorHandler>& rpHandler); ~ForceShowContext(); private: - const ::boost::shared_ptr<InsertionIndicatorHandler> mpHandler; + const std::shared_ptr<InsertionIndicatorHandler> mpHandler; }; /** Update the indicator icon from the current transferable (from the @@ -107,8 +107,8 @@ public: private: SlideSorter& mrSlideSorter; - ::boost::shared_ptr<view::InsertAnimator> mpInsertAnimator; - ::boost::shared_ptr<view::InsertionIndicatorOverlay> mpInsertionIndicatorOverlay; + std::shared_ptr<view::InsertAnimator> mpInsertAnimator; + std::shared_ptr<view::InsertionIndicatorOverlay> mpInsertionIndicatorOverlay; view::InsertPosition maInsertPosition; Mode meMode; bool mbIsInsertionTrivial; @@ -121,7 +121,7 @@ private: void SetPosition ( const Point& rPoint, const Mode eMode); - ::boost::shared_ptr<view::InsertAnimator> GetInsertAnimator(); + std::shared_ptr<view::InsertAnimator> GetInsertAnimator(); /** Make the insertion indicator visible (that is the show part) and keep it visible, even when the mouse leaves the window (that is the diff --git a/sd/source/ui/slidesorter/inc/controller/SlsPageSelector.hxx b/sd/source/ui/slidesorter/inc/controller/SlsPageSelector.hxx index 9f2051cff76e..1a1ec8a87fa9 100644 --- a/sd/source/ui/slidesorter/inc/controller/SlsPageSelector.hxx +++ b/sd/source/ui/slidesorter/inc/controller/SlsPageSelector.hxx @@ -125,7 +125,7 @@ public: even if pages are exchanged a later call to SetPageSelection() is valid. */ - ::boost::shared_ptr<PageSelection> GetPageSelection() const; + std::shared_ptr<PageSelection> GetPageSelection() const; /** Restore a page selection according to the given selection object. @param rSelection @@ -142,7 +142,7 @@ public: used to prevent a recursion loop. */ void SetPageSelection ( - const ::boost::shared_ptr<PageSelection>& rSelection, + const std::shared_ptr<PageSelection>& rSelection, const bool bUpdateCurrentPage = true); /** Call this method after the model has changed to set the number diff --git a/sd/source/ui/slidesorter/inc/controller/SlsSelectionFunction.hxx b/sd/source/ui/slidesorter/inc/controller/SlsSelectionFunction.hxx index bc10d3b39618..723a3567e06e 100644 --- a/sd/source/ui/slidesorter/inc/controller/SlsSelectionFunction.hxx +++ b/sd/source/ui/slidesorter/inc/controller/SlsSelectionFunction.hxx @@ -26,7 +26,7 @@ #include "fupoor.hxx" #include <svtools/transfer.hxx> #include <boost/noncopyable.hpp> -#include <boost/scoped_ptr.hpp> +#include <memory> namespace sd { namespace slidesorter { class SlideSorter; @@ -142,7 +142,7 @@ private: /** The selection function can be in one of several mutually exclusive modes. */ - ::boost::shared_ptr<ModeHandler> mpModeHandler; + std::shared_ptr<ModeHandler> mpModeHandler; /** Make the slide nOffset slides away of the current one the new current slide. When the new index is outside the range of valid @@ -174,7 +174,7 @@ private: void StopDragAndDrop(); - void SwitchMode (const ::boost::shared_ptr<ModeHandler>& rpHandler); + void SwitchMode (const std::shared_ptr<ModeHandler>& rpHandler); }; } } } // end of namespace ::sd::slidesorter::controller diff --git a/sd/source/ui/slidesorter/inc/controller/SlsSelectionManager.hxx b/sd/source/ui/slidesorter/inc/controller/SlsSelectionManager.hxx index eddbf63c0e00..f754ab15ef0c 100644 --- a/sd/source/ui/slidesorter/inc/controller/SlsSelectionManager.hxx +++ b/sd/source/ui/slidesorter/inc/controller/SlsSelectionManager.hxx @@ -103,7 +103,7 @@ public: */ void SetInsertionPosition (const sal_Int32 nInsertionPosition); - ::boost::shared_ptr<SelectionObserver> GetSelectionObserver() const { return mpSelectionObserver;} + std::shared_ptr<SelectionObserver> GetSelectionObserver() const { return mpSelectionObserver;} private: SlideSorter& mrSlideSorter; @@ -134,9 +134,9 @@ private: Animator::AnimationId mnAnimationId; class PageInsertionListener; - ::boost::scoped_ptr<PageInsertionListener> mpPageInsertionListener; + std::unique_ptr<PageInsertionListener> mpPageInsertionListener; - ::boost::shared_ptr<SelectionObserver> mpSelectionObserver; + std::shared_ptr<SelectionObserver> mpSelectionObserver; /** Delete the given list of normal pages. This method is a helper function for DeleteSelectedPages(). diff --git a/sd/source/ui/slidesorter/inc/controller/SlsSelectionObserver.hxx b/sd/source/ui/slidesorter/inc/controller/SlsSelectionObserver.hxx index 6cbeb2804795..4bdfc158db89 100644 --- a/sd/source/ui/slidesorter/inc/controller/SlsSelectionObserver.hxx +++ b/sd/source/ui/slidesorter/inc/controller/SlsSelectionObserver.hxx @@ -21,8 +21,8 @@ #define INCLUDED_SD_SOURCE_UI_SLIDESORTER_INC_CONTROLLER_SLSSELECTIONOBSERVER_HXX #include <sal/types.h> +#include <memory> #include <vector> -#include <boost/shared_ptr.hpp> namespace sd { namespace slidesorter { class SlideSorter; @@ -60,7 +60,7 @@ public: ~Context(); void Abort(); private: - ::boost::shared_ptr<SelectionObserver> mpSelectionObserver; + std::shared_ptr<SelectionObserver> mpSelectionObserver; }; private: diff --git a/sd/source/ui/slidesorter/inc/controller/SlsTransferableData.hxx b/sd/source/ui/slidesorter/inc/controller/SlsTransferableData.hxx index bc189e0a466e..0874ee2451c5 100644 --- a/sd/source/ui/slidesorter/inc/controller/SlsTransferableData.hxx +++ b/sd/source/ui/slidesorter/inc/controller/SlsTransferableData.hxx @@ -63,7 +63,7 @@ public: SlideSorterViewShell* pViewShell, const ::std::vector<TransferableData::Representative>& rRepresentatives); - static ::boost::shared_ptr<TransferableData> GetFromTransferable (const SdTransferable* pTransferable); + static std::shared_ptr<TransferableData> GetFromTransferable (const SdTransferable* pTransferable); TransferableData ( SlideSorterViewShell* pViewShell, diff --git a/sd/source/ui/slidesorter/inc/model/SlsSharedPageDescriptor.hxx b/sd/source/ui/slidesorter/inc/model/SlsSharedPageDescriptor.hxx index ec76ec99dc07..cee3acc1ae0c 100644 --- a/sd/source/ui/slidesorter/inc/model/SlsSharedPageDescriptor.hxx +++ b/sd/source/ui/slidesorter/inc/model/SlsSharedPageDescriptor.hxx @@ -20,13 +20,13 @@ #ifndef INCLUDED_SD_SOURCE_UI_SLIDESORTER_INC_MODEL_SLSSHAREDPAGEDESCRIPTOR_HXX #define INCLUDED_SD_SOURCE_UI_SLIDESORTER_INC_MODEL_SLSSHAREDPAGEDESCRIPTOR_HXX -#include <boost/shared_ptr.hpp> +#include <memory> namespace sd { namespace slidesorter { namespace model { class PageDescriptor; -typedef ::boost::shared_ptr<PageDescriptor> SharedPageDescriptor; +typedef std::shared_ptr<PageDescriptor> SharedPageDescriptor; } } } // end of namespace ::sd::slidesorter::model diff --git a/sd/source/ui/slidesorter/inc/view/SlideSorterView.hxx b/sd/source/ui/slidesorter/inc/view/SlideSorterView.hxx index 9d7f242a4aaf..6368cd67d6ff 100644 --- a/sd/source/ui/slidesorter/inc/view/SlideSorterView.hxx +++ b/sd/source/ui/slidesorter/inc/view/SlideSorterView.hxx @@ -35,7 +35,6 @@ #include <vcl/outdev.hxx> #include <drawinglayer/primitive2d/baseprimitive2d.hxx> #include <memory> -#include <boost/shared_ptr.hpp> #include <boost/noncopyable.hpp> class Point; @@ -145,7 +144,7 @@ public: */ void InvalidatePageObjectVisibilities(); - ::boost::shared_ptr<cache::PageCache> GetPreviewCache(); + std::shared_ptr<cache::PageCache> GetPreviewCache(); /** Return the range of currently visible page objects including the first and last one in that range. @@ -189,8 +188,8 @@ public: void UpdateOrientation(); - ::boost::shared_ptr<PageObjectPainter> GetPageObjectPainter(); - ::boost::shared_ptr<LayeredDevice> GetLayeredDevice() const { return mpLayeredDevice;} + std::shared_ptr<PageObjectPainter> GetPageObjectPainter(); + std::shared_ptr<LayeredDevice> GetLayeredDevice() const { return mpLayeredDevice;} class DrawLock { @@ -219,20 +218,20 @@ private: bool mbIsDisposed; ::std::unique_ptr<Layouter> mpLayouter; bool mbPageObjectVisibilitiesValid; - ::boost::shared_ptr<cache::PageCache> mpPreviewCache; - ::boost::shared_ptr<LayeredDevice> mpLayeredDevice; + std::shared_ptr<cache::PageCache> mpPreviewCache; + std::shared_ptr<LayeredDevice> mpLayeredDevice; Range maVisiblePageRange; bool mbModelChangedWhileModifyEnabled; Size maPreviewSize; bool mbPreciousFlagUpdatePending; Layouter::Orientation meOrientation; - ::boost::shared_ptr<controller::Properties> mpProperties; + std::shared_ptr<controller::Properties> mpProperties; model::SharedPageDescriptor mpPageUnderMouse; - ::boost::shared_ptr<PageObjectPainter> mpPageObjectPainter; - ::boost::shared_ptr<SelectionPainter> mpSelectionPainter; + std::shared_ptr<PageObjectPainter> mpPageObjectPainter; + std::shared_ptr<SelectionPainter> mpSelectionPainter; vcl::Region maRedrawRegion; SharedILayerPainter mpBackgroundPainter; - ::boost::scoped_ptr<ToolTip> mpToolTip; + std::unique_ptr<ToolTip> mpToolTip; bool mbIsRearrangePending; ::std::vector<Link<LinkParamNone*,void>> maVisibilityChangeListeners; diff --git a/sd/source/ui/slidesorter/inc/view/SlsFontProvider.hxx b/sd/source/ui/slidesorter/inc/view/SlsFontProvider.hxx index 6507bb957a33..b503109e019a 100644 --- a/sd/source/ui/slidesorter/inc/view/SlsFontProvider.hxx +++ b/sd/source/ui/slidesorter/inc/view/SlsFontProvider.hxx @@ -22,7 +22,7 @@ #include "tools/SdGlobalResourceContainer.hxx" -#include <boost/shared_ptr.hpp> +#include <memory> #include <vcl/mapmod.hxx> namespace vcl { class Font; } @@ -36,7 +36,7 @@ class FontProvider : public SdGlobalResource { public: - typedef boost::shared_ptr<vcl::Font> SharedFontPointer; + typedef std::shared_ptr<vcl::Font> SharedFontPointer; /** Return the single instance of this class. Throws a RuntimeException when no instance can be created. diff --git a/sd/source/ui/slidesorter/inc/view/SlsILayerPainter.hxx b/sd/source/ui/slidesorter/inc/view/SlsILayerPainter.hxx index 20d524c8beec..f317f70f900a 100644 --- a/sd/source/ui/slidesorter/inc/view/SlsILayerPainter.hxx +++ b/sd/source/ui/slidesorter/inc/view/SlsILayerPainter.hxx @@ -20,8 +20,8 @@ #ifndef INCLUDED_SD_SOURCE_UI_SLIDESORTER_INC_VIEW_SLSILAYERPAINTER_HXX #define INCLUDED_SD_SOURCE_UI_SLIDESORTER_INC_VIEW_SLSILAYERPAINTER_HXX -#include <boost/shared_ptr.hpp> #include <sal/types.h> +#include <memory> class OutputDevice; class Rectangle; @@ -35,7 +35,7 @@ public: virtual void Invalidate (const Rectangle& rInvalidationBox) = 0; }; -typedef ::boost::shared_ptr<ILayerInvalidator> SharedILayerInvalidator; +typedef std::shared_ptr<ILayerInvalidator> SharedILayerInvalidator; class ILayerPainter { @@ -48,7 +48,7 @@ public: OutputDevice& rDevice, const Rectangle& rRepaintArea) = 0; }; -typedef ::boost::shared_ptr<ILayerPainter> SharedILayerPainter; +typedef std::shared_ptr<ILayerPainter> SharedILayerPainter; } } } // end of namespace ::sd::slidesorter::view diff --git a/sd/source/ui/slidesorter/inc/view/SlsInsertAnimator.hxx b/sd/source/ui/slidesorter/inc/view/SlsInsertAnimator.hxx index 344232805586..2e3753f49adf 100644 --- a/sd/source/ui/slidesorter/inc/view/SlsInsertAnimator.hxx +++ b/sd/source/ui/slidesorter/inc/view/SlsInsertAnimator.hxx @@ -21,7 +21,7 @@ #define INCLUDED_SD_SOURCE_UI_SLIDESORTER_INC_VIEW_SLSINSERTANIMATOR_HXX #include "controller/SlsAnimator.hxx" -#include <boost/scoped_ptr.hpp> +#include <memory> #include <boost/noncopyable.hpp> namespace sd { namespace slidesorter { namespace view { @@ -53,7 +53,7 @@ public: private: class Implementation; - ::boost::shared_ptr<Implementation> mpImplementation; + std::shared_ptr<Implementation> mpImplementation; }; } } } // end of namespace ::sd::slidesorter::view diff --git a/sd/source/ui/slidesorter/inc/view/SlsInsertionIndicatorOverlay.hxx b/sd/source/ui/slidesorter/inc/view/SlsInsertionIndicatorOverlay.hxx index 5f604726a172..71ea6642d90a 100644 --- a/sd/source/ui/slidesorter/inc/view/SlsInsertionIndicatorOverlay.hxx +++ b/sd/source/ui/slidesorter/inc/view/SlsInsertionIndicatorOverlay.hxx @@ -27,8 +27,7 @@ #include <tools/gen.hxx> #include <vcl/bitmapex.hxx> -#include <boost/scoped_ptr.hpp> -#include <boost/enable_shared_from_this.hpp> +#include <memory> #include <vector> class OutputDevice; @@ -50,7 +49,7 @@ class FramePainter; */ class InsertionIndicatorOverlay : public ILayerPainter, - public ::boost::enable_shared_from_this<InsertionIndicatorOverlay> + public std::enable_shared_from_this<InsertionIndicatorOverlay> { public: InsertionIndicatorOverlay (SlideSorter& rSlideSorter); @@ -87,7 +86,7 @@ private: Point maLocation; BitmapEx maIcon; Point maIconOffset; - ::boost::scoped_ptr<FramePainter> mpShadowPainter; + std::unique_ptr<FramePainter> mpShadowPainter; void SetPositionAndSize (const Rectangle& rBoundingBox); Point PaintRepresentatives ( diff --git a/sd/source/ui/slidesorter/inc/view/SlsLayouter.hxx b/sd/source/ui/slidesorter/inc/view/SlsLayouter.hxx index 15068205a5f4..2ebed558939f 100644 --- a/sd/source/ui/slidesorter/inc/view/SlsLayouter.hxx +++ b/sd/source/ui/slidesorter/inc/view/SlsLayouter.hxx @@ -65,10 +65,10 @@ public: Layouter ( sd::Window *rpWindow, - const ::boost::shared_ptr<Theme>& rpTheme); + const std::shared_ptr<Theme>& rpTheme); ~Layouter(); - ::boost::shared_ptr<PageObjectLayouter> GetPageObjectLayouter() const; + std::shared_ptr<PageObjectLayouter> GetPageObjectLayouter() const; /** Set the interval of valid column counts. When nMinimalColumnCount <= nMaximalColumnCount is not fulfilled then the call is ignored. @param nMinimalColumnCount @@ -186,7 +186,7 @@ public: class Implementation; private: - ::boost::scoped_ptr<Implementation> mpImplementation; + std::unique_ptr<Implementation> mpImplementation; VclPtr<sd::Window> mpWindow; }; diff --git a/sd/source/ui/slidesorter/inc/view/SlsPageObjectLayouter.hxx b/sd/source/ui/slidesorter/inc/view/SlsPageObjectLayouter.hxx index 97a4db1329d5..fa283214e133 100644 --- a/sd/source/ui/slidesorter/inc/view/SlsPageObjectLayouter.hxx +++ b/sd/source/ui/slidesorter/inc/view/SlsPageObjectLayouter.hxx @@ -135,7 +135,7 @@ private: Rectangle maCustomAnimationEffectBoundingBox; const Image maTransitionEffectIcon; const Image maCustomAnimationEffectIcon; - const boost::shared_ptr<vcl::Font> mpPageNumberFont; + const std::shared_ptr<vcl::Font> mpPageNumberFont; Size GetPageNumberAreaSize (const int nPageCount); Rectangle CalculatePreviewBoundingBox ( diff --git a/sd/source/ui/slidesorter/inc/view/SlsPageObjectPainter.hxx b/sd/source/ui/slidesorter/inc/view/SlsPageObjectPainter.hxx index c47a1eb88c33..978bddf7ddeb 100644 --- a/sd/source/ui/slidesorter/inc/view/SlsPageObjectPainter.hxx +++ b/sd/source/ui/slidesorter/inc/view/SlsPageObjectPainter.hxx @@ -24,7 +24,7 @@ #include "model/SlsPageDescriptor.hxx" #include "view/SlsLayouter.hxx" #include "view/SlsTheme.hxx" -#include <boost/scoped_ptr.hpp> +#include <memory> namespace sd { namespace slidesorter { namespace cache { class PageCache; @@ -51,7 +51,7 @@ public: the given theme is the same object as the one already in use by this painter everything that depends on the theme is updated. */ - void SetTheme (const ::boost::shared_ptr<view::Theme>& rpTheme); + void SetTheme (const std::shared_ptr<view::Theme>& rpTheme); /** Return a preview bitmap for the given page descriptor. When the page is excluded from the show then the preview is marked @@ -70,12 +70,12 @@ public: private: const Layouter& mrLayouter; - ::boost::shared_ptr<cache::PageCache> mpCache; - ::boost::shared_ptr<controller::Properties> mpProperties; - ::boost::shared_ptr<view::Theme> mpTheme; - ::boost::shared_ptr<vcl::Font> mpPageNumberFont; - ::boost::scoped_ptr<FramePainter> mpShadowPainter; - ::boost::scoped_ptr<FramePainter> mpFocusBorderPainter; + std::shared_ptr<cache::PageCache> mpCache; + std::shared_ptr<controller::Properties> mpProperties; + std::shared_ptr<view::Theme> mpTheme; + std::shared_ptr<vcl::Font> mpPageNumberFont; + std::unique_ptr<FramePainter> mpShadowPainter; + std::unique_ptr<FramePainter> mpFocusBorderPainter; Bitmap maNormalBackground; Bitmap maSelectionBackground; Bitmap maFocusedSelectionBackground; diff --git a/sd/source/ui/slidesorter/inc/view/SlsTheme.hxx b/sd/source/ui/slidesorter/inc/view/SlsTheme.hxx index 808b515de22c..5aaf9c9ac101 100644 --- a/sd/source/ui/slidesorter/inc/view/SlsTheme.hxx +++ b/sd/source/ui/slidesorter/inc/view/SlsTheme.hxx @@ -27,8 +27,7 @@ #include <vcl/gradient.hxx> #include <tools/color.hxx> -#include <boost/shared_ptr.hpp> -#include <boost/weak_ptr.hpp> +#include <memory> namespace sd { namespace slidesorter { namespace controller { class Properties; @@ -44,13 +43,13 @@ const int Theme_FocusIndicatorWidth = 3; class Theme { public: - Theme (const ::boost::shared_ptr<controller::Properties>& rpProperties); + Theme (const std::shared_ptr<controller::Properties>& rpProperties); /** Call this method to update some colors as response to a change of a system color change. */ void Update ( - const ::boost::shared_ptr<controller::Properties>& rpProperties); + const std::shared_ptr<controller::Properties>& rpProperties); // BitmapEx GetInsertIndicatorIcon() const; @@ -58,7 +57,7 @@ public: Font_PageNumber, Font_PageCount }; - static boost::shared_ptr<vcl::Font> GetFont ( + static std::shared_ptr<vcl::Font> GetFont ( const FontType eType, const OutputDevice& rDevice); diff --git a/sd/source/ui/slidesorter/shell/SlideSorter.cxx b/sd/source/ui/slidesorter/shell/SlideSorter.cxx index fd45631f4a08..dc574435e73b 100644 --- a/sd/source/ui/slidesorter/shell/SlideSorter.cxx +++ b/sd/source/ui/slidesorter/shell/SlideSorter.cxx @@ -69,14 +69,14 @@ private: //===== SlideSorter =========================================================== -::boost::shared_ptr<SlideSorter> SlideSorter::CreateSlideSorter( +std::shared_ptr<SlideSorter> SlideSorter::CreateSlideSorter( ViewShell& rViewShell, sd::Window* pContentWindow, ScrollBar* pHorizontalScrollBar, ScrollBar* pVerticalScrollBar, ScrollBarBox* pScrollBarBox) { - ::boost::shared_ptr<SlideSorter> pSlideSorter( + std::shared_ptr<SlideSorter> pSlideSorter( new SlideSorter( rViewShell, pContentWindow, @@ -87,12 +87,12 @@ private: return pSlideSorter; } -::boost::shared_ptr<SlideSorter> SlideSorter::CreateSlideSorter ( +std::shared_ptr<SlideSorter> SlideSorter::CreateSlideSorter ( ViewShellBase& rBase, ViewShell* pViewShell, vcl::Window& rParentWindow) { - ::boost::shared_ptr<SlideSorter> pSlideSorter( + std::shared_ptr<SlideSorter> pSlideSorter( new SlideSorter( rBase, pViewShell, @@ -419,13 +419,13 @@ void SlideSorter::SetCurrentFunction (const rtl::Reference<FuPoor>& rpFunction) } } -::boost::shared_ptr<controller::Properties> SlideSorter::GetProperties() const +std::shared_ptr<controller::Properties> SlideSorter::GetProperties() const { OSL_ASSERT(mpProperties); return mpProperties; } -::boost::shared_ptr<view::Theme> SlideSorter::GetTheme() const +std::shared_ptr<view::Theme> SlideSorter::GetTheme() const { OSL_ASSERT(mpTheme); return mpTheme; diff --git a/sd/source/ui/slidesorter/shell/SlideSorterService.hxx b/sd/source/ui/slidesorter/shell/SlideSorterService.hxx index 8df86926d785..d71a7e7fee61 100644 --- a/sd/source/ui/slidesorter/shell/SlideSorterService.hxx +++ b/sd/source/ui/slidesorter/shell/SlideSorterService.hxx @@ -32,8 +32,7 @@ #include <cppuhelper/compbase.hxx> #include <cppuhelper/propshlp.hxx> #include <boost/noncopyable.hpp> -#include <boost/shared_ptr.hpp> -#include <boost/scoped_ptr.hpp> +#include <memory> namespace sd { namespace slidesorter { @@ -181,10 +180,10 @@ public: throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE; private: - ::boost::shared_ptr<SlideSorter> mpSlideSorter; + std::shared_ptr<SlideSorter> mpSlideSorter; css::uno::Reference<css::drawing::framework::XResourceId> mxViewId; css::uno::Reference<css::awt::XWindow> mxParentWindow; - ::boost::scoped_ptr<cppu::IPropertyArrayHelper> mpPropertyArrayHelper; + std::unique_ptr<cppu::IPropertyArrayHelper> mpPropertyArrayHelper; void Resize(); diff --git a/sd/source/ui/slidesorter/shell/SlideSorterViewShell.cxx b/sd/source/ui/slidesorter/shell/SlideSorterViewShell.cxx index 4adcc1ffdcd4..bd64a4f078ee 100644 --- a/sd/source/ui/slidesorter/shell/SlideSorterViewShell.cxx +++ b/sd/source/ui/slidesorter/shell/SlideSorterViewShell.cxx @@ -90,7 +90,7 @@ void SlideSorterViewShell::InitInterface_Impl() TYPEINIT1(SlideSorterViewShell, ViewShell); -::boost::shared_ptr<SlideSorterViewShell> SlideSorterViewShell::Create ( +std::shared_ptr<SlideSorterViewShell> SlideSorterViewShell::Create ( SfxViewFrame* pFrame, ViewShellBase& rViewShellBase, vcl::Window* pParentWindow, @@ -99,7 +99,7 @@ TYPEINIT1(SlideSorterViewShell, ViewShell); { (void)bIsCenterPane; - ::boost::shared_ptr<SlideSorterViewShell> pViewShell; + std::shared_ptr<SlideSorterViewShell> pViewShell; try { pViewShell.reset( @@ -216,7 +216,7 @@ SlideSorterViewShell* SlideSorterViewShell::GetSlideSorter (ViewShellBase& rBase try { - ::boost::shared_ptr<FrameworkHelper> pFrameworkHelper (FrameworkHelper::Instance(rBase)); + std::shared_ptr<FrameworkHelper> pFrameworkHelper (FrameworkHelper::Instance(rBase)); if (pFrameworkHelper->IsValid()) for (int i=0; pViewShell==NULL && !aPaneURLs[i].isEmpty(); ++i) { @@ -341,7 +341,7 @@ SdPage* SlideSorterViewShell::GetActualPage() // (if we are that not ourself). if ( ! IsMainViewShell()) { - ::boost::shared_ptr<ViewShell> pMainViewShell = GetViewShellBase().GetMainViewShell(); + std::shared_ptr<ViewShell> pMainViewShell = GetViewShellBase().GetMainViewShell(); if (pMainViewShell.get() != NULL) pCurrentPage = pMainViewShell->GetActualPage(); } @@ -473,7 +473,7 @@ void SlideSorterViewShell::Activate (bool bIsMDIActivate) // Determine and broadcast the context that belongs to the main view shell. EnumContext::Context eContext = EnumContext::Context_Unknown; - ::boost::shared_ptr<ViewShell> pMainViewShell (GetViewShellBase().GetMainViewShell()); + std::shared_ptr<ViewShell> pMainViewShell (GetViewShellBase().GetMainViewShell()); ViewShell::ShellType eMainViewShellType ( pMainViewShell ? pMainViewShell->GetShellType() @@ -545,7 +545,7 @@ void SlideSorterViewShell::ReadFrameViewData (FrameView* pFrameView) // certain values. if ( ! IsMainViewShell()) { - ::boost::shared_ptr<ViewShell> pMainViewShell = GetViewShellBase().GetMainViewShell(); + std::shared_ptr<ViewShell> pMainViewShell = GetViewShellBase().GetMainViewShell(); if (pMainViewShell.get() != NULL) mpSlideSorter->GetController().GetCurrentSlideManager()->NotifyCurrentSlideChange( pMainViewShell->getCurrentPage()); @@ -678,7 +678,7 @@ sal_Int8 SlideSorterViewShell::ExecuteDrop ( nLayer); } -::boost::shared_ptr<SlideSorterViewShell::PageSelection> +std::shared_ptr<SlideSorterViewShell::PageSelection> SlideSorterViewShell::GetPageSelection() const { OSL_ASSERT(mpSlideSorter.get()!=NULL); @@ -686,7 +686,7 @@ sal_Int8 SlideSorterViewShell::ExecuteDrop ( } void SlideSorterViewShell::SetPageSelection ( - const ::boost::shared_ptr<PageSelection>& rSelection) + const std::shared_ptr<PageSelection>& rSelection) { OSL_ASSERT(mpSlideSorter.get()!=NULL); mpSlideSorter->GetController().GetPageSelector().SetPageSelection(rSelection); @@ -710,7 +710,7 @@ void SlideSorterViewShell::ExecMovePageFirst (SfxRequest& /*rReq*/) { // SdDrawDocument MovePages is based on SdPage IsSelected, so // transfer the SlideSorter selection to SdPages (*it) - ::boost::shared_ptr<SlideSorterViewShell::PageSelection> pSelection ( GetPageSelection() ); + std::shared_ptr<SlideSorterViewShell::PageSelection> pSelection ( GetPageSelection() ); for (auto it = pSelection->begin(); it != pSelection->end() ; ++it ) { GetDoc()->SetSelected(*it, true); } @@ -725,7 +725,7 @@ void SlideSorterViewShell::GetStateMovePageFirst (SfxItemSet& rSet) { if ( ! IsMainViewShell()) { - ::boost::shared_ptr<ViewShell> pMainViewShell = GetViewShellBase().GetMainViewShell(); + std::shared_ptr<ViewShell> pMainViewShell = GetViewShellBase().GetMainViewShell(); if (pMainViewShell.get() != NULL && pMainViewShell->ISA(DrawViewShell)) { DrawViewShell* pDrawViewShell = dynamic_cast<DrawViewShell*>(pMainViewShell.get()); @@ -740,7 +740,7 @@ void SlideSorterViewShell::GetStateMovePageFirst (SfxItemSet& rSet) sal_uInt16 firstSelectedPageNo = SAL_MAX_UINT16; sal_uInt16 pageNo; - ::boost::shared_ptr<SlideSorterViewShell::PageSelection> pSelection ( GetPageSelection() ); + std::shared_ptr<SlideSorterViewShell::PageSelection> pSelection ( GetPageSelection() ); for (auto it = pSelection->begin(); it != pSelection->end() ; ++it ) { // Check page number pageNo = (*it)->GetPageNum(); @@ -762,7 +762,7 @@ void SlideSorterViewShell::ExecMovePageUp (SfxRequest& /*rReq*/) sal_uInt16 pageNo; // SdDrawDocument MovePages is based on SdPage IsSelected, so // transfer the SlideSorter selection to SdPages (*it) - ::boost::shared_ptr<SlideSorterViewShell::PageSelection> pSelection ( GetPageSelection() ); + std::shared_ptr<SlideSorterViewShell::PageSelection> pSelection ( GetPageSelection() ); for (auto it = pSelection->begin(); it != pSelection->end() ; ++it ) { // Check page number pageNo = (*it)->GetPageNum(); @@ -794,7 +794,7 @@ void SlideSorterViewShell::ExecMovePageDown (SfxRequest& /*rReq*/) sal_uInt16 pageNo; // SdDrawDocument MovePages is based on SdPage IsSelected, so // transfer the SlideSorter selection to SdPages (*it) - ::boost::shared_ptr<SlideSorterViewShell::PageSelection> pSelection ( GetPageSelection() ); + std::shared_ptr<SlideSorterViewShell::PageSelection> pSelection ( GetPageSelection() ); for (auto it = pSelection->begin(); it != pSelection->end() ; ++it ) { // Check page number @@ -826,7 +826,7 @@ void SlideSorterViewShell::ExecMovePageLast (SfxRequest& /*rReq*/) { // SdDrawDocument MovePages is based on SdPage IsSelected, so // transfer the SlideSorter selection to SdPages (*it) - ::boost::shared_ptr<SlideSorterViewShell::PageSelection> pSelection ( GetPageSelection() ); + std::shared_ptr<SlideSorterViewShell::PageSelection> pSelection ( GetPageSelection() ); for (auto it = pSelection->begin(); it != pSelection->end() ; ++it ) { GetDoc()->SetSelected(*it, true); } @@ -842,7 +842,7 @@ void SlideSorterViewShell::ExecMovePageLast (SfxRequest& /*rReq*/) void SlideSorterViewShell::GetStateMovePageLast (SfxItemSet& rSet) { - ::boost::shared_ptr<ViewShell> pMainViewShell = GetViewShellBase().GetMainViewShell(); + std::shared_ptr<ViewShell> pMainViewShell = GetViewShellBase().GetMainViewShell(); if (pMainViewShell.get() != NULL && pMainViewShell->ISA(DrawViewShell)) { DrawViewShell* pDrawViewShell = dynamic_cast<DrawViewShell*>(pMainViewShell.get()); @@ -858,7 +858,7 @@ void SlideSorterViewShell::GetStateMovePageLast (SfxItemSet& rSet) sal_uInt16 pageNo; // SdDrawDocument MovePages is based on SdPage IsSelected, so // transfer the SlideSorter selection to SdPages (*it) - ::boost::shared_ptr<SlideSorterViewShell::PageSelection> pSelection ( GetPageSelection() ); + std::shared_ptr<SlideSorterViewShell::PageSelection> pSelection ( GetPageSelection() ); for (auto it = pSelection->begin(); it != pSelection->end() ; ++it ) { // Check page number @@ -879,7 +879,7 @@ void SlideSorterViewShell::GetStateMovePageLast (SfxItemSet& rSet) } } -void SlideSorterViewShell::PostMoveSlidesActions(const ::boost::shared_ptr<SlideSorterViewShell::PageSelection> &rpSelection) +void SlideSorterViewShell::PostMoveSlidesActions(const std::shared_ptr<SlideSorterViewShell::PageSelection> &rpSelection) { sal_uInt16 nNoOfPages = GetDoc()->GetSdPageCount(PK_STANDARD); for (sal_uInt16 nPage = 0; nPage < nNoOfPages; nPage++) diff --git a/sd/source/ui/slidesorter/view/SlideSorterView.cxx b/sd/source/ui/slidesorter/view/SlideSorterView.cxx index 0cf7ea0274df..a023aa4fd154 100644 --- a/sd/source/ui/slidesorter/view/SlideSorterView.cxx +++ b/sd/source/ui/slidesorter/view/SlideSorterView.cxx @@ -287,8 +287,8 @@ void SlideSorterView::HandleDataChangeEvent() GetPageObjectPainter()->SetTheme(mrSlideSorter.GetTheme()); // Update the color used by the background painter. - ::boost::shared_ptr<BackgroundPainter> pPainter ( - ::boost::dynamic_pointer_cast<BackgroundPainter>(mpBackgroundPainter)); + std::shared_ptr<BackgroundPainter> pPainter ( + std::dynamic_pointer_cast<BackgroundPainter>(mpBackgroundPainter)); if (pPainter) pPainter->SetColor(mrSlideSorter.GetTheme()->GetColor(Theme::Color_Background)); @@ -417,7 +417,7 @@ void SlideSorterView::Layout () pWindow->SetViewOrigin (aViewBox.TopLeft()); pWindow->SetViewSize (aViewBox.GetSize()); - ::boost::shared_ptr<PageObjectLayouter> pPageObjectLayouter( + std::shared_ptr<PageObjectLayouter> pPageObjectLayouter( mpLayouter->GetPageObjectLayouter()); if (pPageObjectLayouter) { @@ -509,7 +509,7 @@ void SlideSorterView::UpdatePreciousFlags() mbPreciousFlagUpdatePending = false; model::SharedPageDescriptor pDescriptor; - ::boost::shared_ptr<cache::PageCache> pCache = GetPreviewCache(); + std::shared_ptr<cache::PageCache> pCache = GetPreviewCache(); sal_Int32 nPageCount (mrModel.GetPageCount()); for (int nIndex=0; nIndex<=nPageCount; ++nIndex) @@ -698,7 +698,7 @@ void SlideSorterView::ConfigurationChanged ( } -::boost::shared_ptr<cache::PageCache> SlideSorterView::GetPreviewCache() +std::shared_ptr<cache::PageCache> SlideSorterView::GetPreviewCache() { sd::Window *pWindow (mrSlideSorter.GetContentWindow()); if (pWindow && mpPreviewCache.get() == NULL) @@ -841,7 +841,7 @@ bool SlideSorterView::SetState ( return bModified; } -::boost::shared_ptr<PageObjectPainter> SlideSorterView::GetPageObjectPainter() +std::shared_ptr<PageObjectPainter> SlideSorterView::GetPageObjectPainter() { if ( ! mpPageObjectPainter) mpPageObjectPainter.reset(new PageObjectPainter(mrSlideSorter)); diff --git a/sd/source/ui/slidesorter/view/SlsInsertAnimator.cxx b/sd/source/ui/slidesorter/view/SlsInsertAnimator.cxx index 5e5ef8580416..f73529409104 100644 --- a/sd/source/ui/slidesorter/view/SlsInsertAnimator.cxx +++ b/sd/source/ui/slidesorter/view/SlsInsertAnimator.cxx @@ -25,9 +25,9 @@ #include "model/SlideSorterModel.hxx" #include "model/SlsPageEnumerationProvider.hxx" +#include <memory> #include <set> #include <boost/bind.hpp> -#include <boost/enable_shared_from_this.hpp> namespace sd { namespace slidesorter { namespace view { @@ -38,11 +38,11 @@ class PageObjectRun; class AnimatorAccess { public: - virtual void AddRun (const ::boost::shared_ptr<PageObjectRun>& rRun) = 0; - virtual void RemoveRun (const ::boost::shared_ptr<PageObjectRun>& rRun) = 0; + virtual void AddRun (const std::shared_ptr<PageObjectRun>& rRun) = 0; + virtual void RemoveRun (const std::shared_ptr<PageObjectRun>& rRun) = 0; virtual model::SlideSorterModel& GetModel (void) const = 0; virtual view::SlideSorterView& GetView (void) const = 0; - virtual ::boost::shared_ptr<controller::Animator> GetAnimator (void) = 0; + virtual std::shared_ptr<controller::Animator> GetAnimator (void) = 0; virtual VclPtr<sd::Window> GetContentWindow (void) = 0; protected: @@ -52,7 +52,7 @@ protected: /** Controller of the position offsets of all page objects in one row or one column. */ -class PageObjectRun : public ::boost::enable_shared_from_this<PageObjectRun> +class PageObjectRun : public std::enable_shared_from_this<PageObjectRun> { public: PageObjectRun ( @@ -88,8 +88,8 @@ public: class Comparator { public: bool operator() ( - const ::boost::shared_ptr<PageObjectRun>& rpRunA, - const ::boost::shared_ptr<PageObjectRun>& rpRunB) const + const std::shared_ptr<PageObjectRun>& rpRunA, + const std::shared_ptr<PageObjectRun>& rpRunB) const { return rpRunA->mnRunIndex < rpRunB->mnRunIndex; } @@ -101,7 +101,7 @@ private: void RestartAnimation(); }; -typedef ::boost::shared_ptr<PageObjectRun> SharedPageObjectRun; +typedef std::shared_ptr<PageObjectRun> SharedPageObjectRun; Point Blend (const Point& rPointA, const Point& rPointB, const double nT) { @@ -122,19 +122,19 @@ public: const InsertPosition& rInsertPosition, const controller::Animator::AnimationMode eAnimationMode); - virtual void AddRun (const ::boost::shared_ptr<PageObjectRun>& rRun) SAL_OVERRIDE; - virtual void RemoveRun (const ::boost::shared_ptr<PageObjectRun>& rRun) SAL_OVERRIDE; + virtual void AddRun (const std::shared_ptr<PageObjectRun>& rRun) SAL_OVERRIDE; + virtual void RemoveRun (const std::shared_ptr<PageObjectRun>& rRun) SAL_OVERRIDE; virtual model::SlideSorterModel& GetModel() const SAL_OVERRIDE { return mrModel; } virtual view::SlideSorterView& GetView() const SAL_OVERRIDE { return mrView; } - virtual ::boost::shared_ptr<controller::Animator> GetAnimator() SAL_OVERRIDE { return mpAnimator; } + virtual std::shared_ptr<controller::Animator> GetAnimator() SAL_OVERRIDE { return mpAnimator; } virtual VclPtr<sd::Window> GetContentWindow() SAL_OVERRIDE { return mrSlideSorter.GetContentWindow(); } private: model::SlideSorterModel& mrModel; view::SlideSorterView& mrView; SlideSorter& mrSlideSorter; - ::boost::shared_ptr<controller::Animator> mpAnimator; + std::shared_ptr<controller::Animator> mpAnimator; typedef ::std::set<SharedPageObjectRun, PageObjectRun::Comparator> RunContainer; RunContainer maRuns; InsertPosition maInsertPosition; @@ -264,7 +264,7 @@ InsertAnimator::Implementation::RunContainer::const_iterator nRunIndex)); } -void InsertAnimator::Implementation::AddRun (const ::boost::shared_ptr<PageObjectRun>& rRun) +void InsertAnimator::Implementation::AddRun (const std::shared_ptr<PageObjectRun>& rRun) { if (rRun) { @@ -276,7 +276,7 @@ void InsertAnimator::Implementation::AddRun (const ::boost::shared_ptr<PageObjec } } -void InsertAnimator::Implementation::RemoveRun (const ::boost::shared_ptr<PageObjectRun>& rRun) +void InsertAnimator::Implementation::RemoveRun (const std::shared_ptr<PageObjectRun>& rRun) { if (rRun) { diff --git a/sd/source/ui/slidesorter/view/SlsInsertionIndicatorOverlay.cxx b/sd/source/ui/slidesorter/view/SlsInsertionIndicatorOverlay.cxx index d10615fc3b86..ba7805234ffa 100644 --- a/sd/source/ui/slidesorter/view/SlsInsertionIndicatorOverlay.cxx +++ b/sd/source/ui/slidesorter/view/SlsInsertionIndicatorOverlay.cxx @@ -85,7 +85,7 @@ void InsertionIndicatorOverlay::Create (const SdTransferable* pTransferable) if (pTransferable == NULL) return; - ::boost::shared_ptr<controller::TransferableData> pData ( + std::shared_ptr<controller::TransferableData> pData ( controller::TransferableData::GetFromTransferable(pTransferable)); if ( ! pData) return; @@ -110,9 +110,9 @@ void InsertionIndicatorOverlay::Create ( const sal_Int32 nSelectionCount) { view::Layouter& rLayouter (mrSlideSorter.GetView().GetLayouter()); - ::boost::shared_ptr<view::PageObjectLayouter> pPageObjectLayouter ( + std::shared_ptr<view::PageObjectLayouter> pPageObjectLayouter ( rLayouter.GetPageObjectLayouter()); - ::boost::shared_ptr<view::Theme> pTheme (mrSlideSorter.GetTheme()); + std::shared_ptr<view::Theme> pTheme (mrSlideSorter.GetTheme()); const Size aOriginalPreviewSize (pPageObjectLayouter->GetPreviewSize( PageObjectLayouter::WindowCoordinateSystem)); @@ -241,8 +241,8 @@ void InsertionIndicatorOverlay::PaintPageCount ( const Point& rFirstPageOffset) const { // Paint the number of slides. - ::boost::shared_ptr<view::Theme> pTheme (mrSlideSorter.GetTheme()); - ::boost::shared_ptr<vcl::Font> pFont(Theme::GetFont(Theme::Font_PageCount, rDevice)); + std::shared_ptr<view::Theme> pTheme (mrSlideSorter.GetTheme()); + std::shared_ptr<vcl::Font> pFont(Theme::GetFont(Theme::Font_PageCount, rDevice)); if (pFont) { OUString sNumber (OUString::number(nSelectionCount)); @@ -323,7 +323,7 @@ void InsertionIndicatorOverlay::Show() { mbIsVisible = true; - ::boost::shared_ptr<LayeredDevice> pLayeredDevice ( + std::shared_ptr<LayeredDevice> pLayeredDevice ( mrSlideSorter.GetView().GetLayeredDevice()); if (pLayeredDevice) { @@ -340,7 +340,7 @@ void InsertionIndicatorOverlay::Hide() { mbIsVisible = false; - ::boost::shared_ptr<LayeredDevice> pLayeredDevice ( + std::shared_ptr<LayeredDevice> pLayeredDevice ( mrSlideSorter.GetView().GetLayeredDevice()); if (pLayeredDevice) { diff --git a/sd/source/ui/slidesorter/view/SlsLayeredDevice.cxx b/sd/source/ui/slidesorter/view/SlsLayeredDevice.cxx index f385ae549ff0..137f4f5bbf10 100644 --- a/sd/source/ui/slidesorter/view/SlsLayeredDevice.cxx +++ b/sd/source/ui/slidesorter/view/SlsLayeredDevice.cxx @@ -39,7 +39,7 @@ class LayerInvalidator : public ILayerInvalidator { public: LayerInvalidator ( - const ::boost::shared_ptr<LayeredDevice>& rpLayeredDevice, + const std::shared_ptr<LayeredDevice>& rpLayeredDevice, sd::Window *pTargetWindow, const int nLayer) : mpLayeredDevice(rpLayeredDevice), @@ -59,7 +59,7 @@ public: } private: - const ::boost::shared_ptr<LayeredDevice> mpLayeredDevice; + const std::shared_ptr<LayeredDevice> mpLayeredDevice; VclPtr<sd::Window> mpTargetWindow; const int mnLayer; }; @@ -129,7 +129,7 @@ private: void ValidateRectangle (const Rectangle& rBox); }; -typedef ::boost::shared_ptr<Layer> SharedLayer; +typedef std::shared_ptr<Layer> SharedLayer; } // end of anonymous namespace diff --git a/sd/source/ui/slidesorter/view/SlsLayeredDevice.hxx b/sd/source/ui/slidesorter/view/SlsLayeredDevice.hxx index f614842afe33..989dadb545cf 100644 --- a/sd/source/ui/slidesorter/view/SlsLayeredDevice.hxx +++ b/sd/source/ui/slidesorter/view/SlsLayeredDevice.hxx @@ -27,9 +27,7 @@ #include <vcl/virdev.hxx> #include <boost/noncopyable.hpp> -#include <boost/scoped_ptr.hpp> -#include <boost/shared_ptr.hpp> -#include <boost/enable_shared_from_this.hpp> +#include <memory> #include <vector> class Rectangle; @@ -41,7 +39,7 @@ namespace sd { namespace slidesorter { namespace view { Each layer may contain any number of painters. */ class LayeredDevice - : public ::boost::enable_shared_from_this<LayeredDevice> + : public std::enable_shared_from_this<LayeredDevice> { public: @@ -74,7 +72,7 @@ public: private: VclPtr<sd::Window> mpTargetWindow; class LayerContainer; - ::boost::scoped_ptr<LayerContainer> mpLayers; + std::unique_ptr<LayerContainer> mpLayers; ScopedVclPtr<VirtualDevice> mpBackBuffer; MapMode maSavedMapMode; diff --git a/sd/source/ui/slidesorter/view/SlsLayouter.cxx b/sd/source/ui/slidesorter/view/SlsLayouter.cxx index b63b307435e2..65a83e7a68a7 100644 --- a/sd/source/ui/slidesorter/view/SlsLayouter.cxx +++ b/sd/source/ui/slidesorter/view/SlsLayouter.cxx @@ -57,8 +57,8 @@ public: /// rows. sal_Int32 mnMaxRowCount; Size maPageObjectSize; - ::boost::shared_ptr<PageObjectLayouter> mpPageObjectLayouter; - ::boost::shared_ptr<view::Theme> mpTheme; + std::shared_ptr<PageObjectLayouter> mpPageObjectLayouter; + std::shared_ptr<view::Theme> mpTheme; /** Specify how the gap between two page objects is associated with the page objects. @@ -201,7 +201,7 @@ public: protected: Implementation ( sd::Window *pWindow, - const ::boost::shared_ptr<view::Theme>& rpTheme); + const std::shared_ptr<view::Theme>& rpTheme); explicit Implementation (const Implementation& rImplementation); virtual void CalculateRowAndColumnCount (const Size& rWindowSize) = 0; @@ -272,7 +272,7 @@ class GridImplementation : public Layouter::Implementation public: GridImplementation ( sd::Window *pWindow, - const ::boost::shared_ptr<view::Theme>& rpTheme); + const std::shared_ptr<view::Theme>& rpTheme); explicit GridImplementation(const Implementation& rImplementation); virtual Layouter::Orientation GetOrientation() const SAL_OVERRIDE; @@ -293,7 +293,7 @@ protected: Layouter::Layouter ( sd::Window *pWindow, - const ::boost::shared_ptr<Theme>& rpTheme) + const std::shared_ptr<Theme>& rpTheme) : mpImplementation(new GridImplementation(pWindow, rpTheme)), mpWindow(pWindow) { @@ -303,7 +303,7 @@ Layouter::~Layouter() { } -::boost::shared_ptr<PageObjectLayouter> Layouter::GetPageObjectLayouter() const +std::shared_ptr<PageObjectLayouter> Layouter::GetPageObjectLayouter() const { return mpImplementation->mpPageObjectLayouter; } @@ -428,7 +428,7 @@ Layouter::Implementation* Layouter::Implementation::Create ( Layouter::Implementation::Implementation ( sd::Window *pWindow, - const ::boost::shared_ptr<view::Theme>& rpTheme) + const std::shared_ptr<view::Theme>& rpTheme) : mpWindow(pWindow), mnRequestedLeftBorder(5), mnRequestedRightBorder(5), @@ -1103,7 +1103,7 @@ void VerticalImplementation::CalculateLogicalInsertPosition ( GridImplementation::GridImplementation ( sd::Window *pWindow, - const ::boost::shared_ptr<view::Theme>& rpTheme) + const std::shared_ptr<view::Theme>& rpTheme) : Implementation(pWindow, rpTheme) { } diff --git a/sd/source/ui/slidesorter/view/SlsPageObjectPainter.cxx b/sd/source/ui/slidesorter/view/SlsPageObjectPainter.cxx index 91b7e8ef3346..1d9444d145f3 100644 --- a/sd/source/ui/slidesorter/view/SlsPageObjectPainter.cxx +++ b/sd/source/ui/slidesorter/view/SlsPageObjectPainter.cxx @@ -33,8 +33,8 @@ #include <vcl/svapp.hxx> #include <vcl/vclenum.hxx> #include <vcl/virdev.hxx> -#include <boost/scoped_ptr.hpp> #include "CustomAnimationEffect.hxx" +#include <memory> using namespace ::drawinglayer::primitive2d; @@ -101,7 +101,7 @@ bool PageObjectPainter::UpdatePageObjectLayouter() return true; } -void PageObjectPainter::SetTheme (const ::boost::shared_ptr<view::Theme>& rpTheme) +void PageObjectPainter::SetTheme (const std::shared_ptr<view::Theme>& rpTheme) { mpTheme = rpTheme; } @@ -292,7 +292,7 @@ void PageObjectPainter::PaintCustomAnimationEffect ( const model::SharedPageDescriptor& rpDescriptor) { SdPage* pPage = rpDescriptor->GetPage(); - boost::shared_ptr< MainSequence > aMainSequence = pPage->getMainSequence(); + std::shared_ptr< MainSequence > aMainSequence = pPage->getMainSequence(); EffectSequence::iterator aIter = aMainSequence->getBegin(); EffectSequence::iterator aEnd = aMainSequence->getEnd(); if ( aIter != aEnd ) diff --git a/sd/source/ui/slidesorter/view/SlsTheme.cxx b/sd/source/ui/slidesorter/view/SlsTheme.cxx index d7fddd2b7d5a..f669b6ad4639 100644 --- a/sd/source/ui/slidesorter/view/SlsTheme.cxx +++ b/sd/source/ui/slidesorter/view/SlsTheme.cxx @@ -59,7 +59,7 @@ ColorData HGBAdapt ( nNewBrightness>=0 ? nNewBrightness : nBrightness); } -Theme::Theme (const ::boost::shared_ptr<controller::Properties>& rpProperties) +Theme::Theme (const std::shared_ptr<controller::Properties>& rpProperties) : maBackgroundColor(rpProperties->GetBackgroundColor().GetColor()), maPageBackgroundColor(COL_WHITE), maGradients(), @@ -82,7 +82,7 @@ Theme::Theme (const ::boost::shared_ptr<controller::Properties>& rpProperties) Update(rpProperties); } -void Theme::Update (const ::boost::shared_ptr<controller::Properties>& rpProperties) +void Theme::Update (const std::shared_ptr<controller::Properties>& rpProperties) { // Set up colors. maBackgroundColor = rpProperties->GetBackgroundColor().GetColor(); @@ -128,11 +128,11 @@ void Theme::Update (const ::boost::shared_ptr<controller::Properties>& rpPropert } } -::boost::shared_ptr<vcl::Font> Theme::GetFont ( +std::shared_ptr<vcl::Font> Theme::GetFont ( const FontType eType, const OutputDevice& rDevice) { - ::boost::shared_ptr<vcl::Font> pFont; + std::shared_ptr<vcl::Font> pFont; switch (eType) { diff --git a/sd/source/ui/slidesorter/view/SlsViewCacheContext.cxx b/sd/source/ui/slidesorter/view/SlsViewCacheContext.cxx index ffd9a825319c..3ad7c0ba7151 100644 --- a/sd/source/ui/slidesorter/view/SlsViewCacheContext.cxx +++ b/sd/source/ui/slidesorter/view/SlsViewCacheContext.cxx @@ -83,9 +83,9 @@ const SdrPage* ViewCacheContext::GetPage (cache::CacheKey aKey) return static_cast<const SdrPage*>(aKey); } -::boost::shared_ptr<std::vector<cache::CacheKey> > ViewCacheContext::GetEntryList (bool bVisible) +std::shared_ptr<std::vector<cache::CacheKey> > ViewCacheContext::GetEntryList (bool bVisible) { - ::boost::shared_ptr<std::vector<cache::CacheKey> > pKeys (new std::vector<cache::CacheKey>()); + std::shared_ptr<std::vector<cache::CacheKey> > pKeys (new std::vector<cache::CacheKey>()); model::PageEnumeration aPageEnumeration ( bVisible diff --git a/sd/source/ui/slidesorter/view/SlsViewCacheContext.hxx b/sd/source/ui/slidesorter/view/SlsViewCacheContext.hxx index 19b814a73879..02740539292a 100644 --- a/sd/source/ui/slidesorter/view/SlsViewCacheContext.hxx +++ b/sd/source/ui/slidesorter/view/SlsViewCacheContext.hxx @@ -45,7 +45,7 @@ public: virtual bool IsIdle() SAL_OVERRIDE; virtual bool IsVisible (cache::CacheKey aKey) SAL_OVERRIDE; virtual const SdrPage* GetPage (cache::CacheKey aKey) SAL_OVERRIDE; - virtual ::boost::shared_ptr<std::vector<cache::CacheKey> > GetEntryList (bool bVisible) SAL_OVERRIDE; + virtual std::shared_ptr<std::vector<cache::CacheKey> > GetEntryList (bool bVisible) SAL_OVERRIDE; virtual sal_Int32 GetPriority (cache::CacheKey aKey) SAL_OVERRIDE; virtual ::com::sun::star::uno::Reference<com::sun::star::uno::XInterface> GetModel() SAL_OVERRIDE; diff --git a/sd/source/ui/table/TableDesignPane.cxx b/sd/source/ui/table/TableDesignPane.cxx index 8c5c05c7f6fa..c29e590c2ca4 100644 --- a/sd/source/ui/table/TableDesignPane.cxx +++ b/sd/source/ui/table/TableDesignPane.cxx @@ -500,8 +500,8 @@ CellInfo::CellInfo( const Reference< XStyle >& xStyle ) } } -typedef std::vector< boost::shared_ptr< CellInfo > > CellInfoVector; -typedef boost::shared_ptr< CellInfo > CellInfoMatrix[nPreviewColumns][nPreviewRows]; +typedef std::vector< std::shared_ptr< CellInfo > > CellInfoVector; +typedef std::shared_ptr< CellInfo > CellInfoMatrix[nPreviewColumns][nPreviewRows]; struct TableStyleSettings { @@ -550,7 +550,7 @@ static void FillCellInfoMatrix( const CellInfoVector& rStyle, const TableStyleSe for( sal_Int32 nCol = 0; nCol < nPreviewColumns; ++nCol ) { - boost::shared_ptr< CellInfo > xCellInfo; + std::shared_ptr< CellInfo > xCellInfo; // first and last row win first, if used and available if( bFirstRow ) @@ -646,7 +646,7 @@ const Bitmap CreateDesignPreview( const Reference< XIndexAccess >& xTableStyle, sal_Int32 nX = 0; for( sal_Int32 nCol = 0; nCol < nPreviewColumns; ++nCol, nX += nCellWidth-1 ) { - boost::shared_ptr< CellInfo > xCellInfo( aMatrix[nCol][nRow] ); + std::shared_ptr< CellInfo > xCellInfo( aMatrix[nCol][nRow] ); Color aTextColor( COL_AUTO ); if( xCellInfo.get() ) @@ -680,7 +680,7 @@ const Bitmap CreateDesignPreview( const Reference< XIndexAccess >& xTableStyle, sal_Int32 nX = 0; for( sal_Int32 nCol = 0; nCol < nPreviewColumns; ++nCol, nX += nCellWidth-1 ) { - boost::shared_ptr< CellInfo > xCellInfo( aMatrix[nCol][nRow] ); + std::shared_ptr< CellInfo > xCellInfo( aMatrix[nCol][nRow] ); if( xCellInfo.get() ) { @@ -704,7 +704,7 @@ const Bitmap CreateDesignPreview( const Reference< XIndexAccess >& xTableStyle, if( (nBorderCol >= 0) && (nBorderCol < nPreviewColumns) && (nBorderRow >= 0) && (nBorderRow < nPreviewRows) ) { // check border - boost::shared_ptr< CellInfo > xBorderInfo( aMatrix[nBorderCol][nBorderRow] ); + std::shared_ptr< CellInfo > xBorderInfo( aMatrix[nBorderCol][nBorderRow] ); if( xBorderInfo.get() ) { const ::editeng::SvxBorderLine* pBorderLine2 = xBorderInfo->maBorder.GetLine(static_cast<SvxBoxItemLine>(static_cast<int>(nLine)^1)); diff --git a/sd/source/ui/table/TableDesignPane.hxx b/sd/source/ui/table/TableDesignPane.hxx index 419ab7cb7cc4..ecbe8931129a 100644 --- a/sd/source/ui/table/TableDesignPane.hxx +++ b/sd/source/ui/table/TableDesignPane.hxx @@ -32,7 +32,7 @@ #include <vcl/button.hxx> #include <svx/sidebar/PanelLayout.hxx> -#include <boost/scoped_ptr.hpp> +#include <memory> namespace sd { diff --git a/sd/source/ui/table/tablefunction.cxx b/sd/source/ui/table/tablefunction.cxx index b05d570298b3..e2129cc80373 100644 --- a/sd/source/ui/table/tablefunction.cxx +++ b/sd/source/ui/table/tablefunction.cxx @@ -63,7 +63,7 @@ #include "sdresid.hxx" #include "undo/undoobjects.hxx" -#include <boost/scoped_ptr.hpp> +#include <memory> using namespace ::sd; using namespace sdr::table; @@ -128,7 +128,7 @@ void DrawViewShell::FuTable(SfxRequest& rReq) if( (nColumns == 0) || (nRows == 0) ) { SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create(); - boost::scoped_ptr<SvxAbstractNewTableDialog> pDlg( pFact ? pFact->CreateSvxNewTableDialog( NULL ) : 0); + std::unique_ptr<SvxAbstractNewTableDialog> pDlg( pFact ? pFact->CreateSvxNewTableDialog( NULL ) : 0); if( !pDlg.get() || (pDlg->Execute() != RET_OK) ) break; diff --git a/sd/source/ui/table/tableobjectbar.cxx b/sd/source/ui/table/tableobjectbar.cxx index 71df3dffe6eb..3fe246a6ab63 100644 --- a/sd/source/ui/table/tableobjectbar.cxx +++ b/sd/source/ui/table/tableobjectbar.cxx @@ -50,7 +50,7 @@ #include "tableobjectbar.hxx" -#include <boost/scoped_ptr.hpp> +#include <memory> using namespace sd; using namespace sd::ui::table; @@ -140,7 +140,7 @@ void TableObjectBar::Execute( SfxRequest& rReq ) case SID_TABLE_INSERT_COL_DLG: { SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create(); - boost::scoped_ptr<SvxAbstractInsRowColDlg> pDlg( pFact ? pFact->CreateSvxInsRowColDlg( mpView->GetViewShell()->GetParentWindow(), nSlotId == SID_TABLE_INSERT_COL_DLG, SD_MOD()->GetSlotPool()->GetSlot(nSlotId)->GetCommand()) : 0); + std::unique_ptr<SvxAbstractInsRowColDlg> pDlg( pFact ? pFact->CreateSvxInsRowColDlg( mpView->GetViewShell()->GetParentWindow(), nSlotId == SID_TABLE_INSERT_COL_DLG, SD_MOD()->GetSlotPool()->GetSlot(nSlotId)->GetCommand()) : 0); if( pDlg.get() && (pDlg->Execute() == 1) ) { diff --git a/sd/source/ui/tools/PreviewRenderer.cxx b/sd/source/ui/tools/PreviewRenderer.cxx index b5b9645a6587..81b7ab176041 100644 --- a/sd/source/ui/tools/PreviewRenderer.cxx +++ b/sd/source/ui/tools/PreviewRenderer.cxx @@ -36,7 +36,7 @@ #include <svx/sdr/contact/viewobjectcontact.hxx> #include <svx/sdr/contact/viewcontact.hxx> -#include <boost/scoped_ptr.hpp> +#include <memory> using namespace ::com::sun::star; using namespace ::com::sun::star::uno; @@ -308,7 +308,7 @@ void PreviewRenderer::PaintPage ( } // Use a special redirector to prevent PresObj shapes from being painted. - boost::scoped_ptr<ViewRedirector> pRedirector; + std::unique_ptr<ViewRedirector> pRedirector; if ( ! bDisplayPresentationObjects) pRedirector.reset(new ViewRedirector()); diff --git a/sd/source/ui/tools/SdGlobalResourceContainer.cxx b/sd/source/ui/tools/SdGlobalResourceContainer.cxx index 88eab7dd0518..d6c0a02cf701 100644 --- a/sd/source/ui/tools/SdGlobalResourceContainer.cxx +++ b/sd/source/ui/tools/SdGlobalResourceContainer.cxx @@ -43,7 +43,7 @@ private: typedef ::std::vector<SdGlobalResource*> ResourceList; ResourceList maResources; - typedef ::std::vector<boost::shared_ptr<SdGlobalResource> > SharedResourceList; + typedef ::std::vector<std::shared_ptr<SdGlobalResource> > SharedResourceList; SharedResourceList maSharedResources; typedef ::std::vector<Reference<XInterface> > XInterfaceResourceList; @@ -89,7 +89,7 @@ void SdGlobalResourceContainer::AddResource ( } void SdGlobalResourceContainer::AddResource ( - ::boost::shared_ptr<SdGlobalResource> pResource) + std::shared_ptr<SdGlobalResource> pResource) { ::osl::MutexGuard aGuard (mpImpl->maMutex); diff --git a/sd/source/ui/tools/TimerBasedTaskExecution.cxx b/sd/source/ui/tools/TimerBasedTaskExecution.cxx index a6b1299834ce..039606ea62a1 100644 --- a/sd/source/ui/tools/TimerBasedTaskExecution.cxx +++ b/sd/source/ui/tools/TimerBasedTaskExecution.cxx @@ -21,8 +21,8 @@ #include "tools/AsynchronousTask.hxx" #include <tools/time.hxx> #include <osl/diagnose.h> -#include <boost/weak_ptr.hpp> #include "sal/log.hxx" +#include <memory> namespace sd { namespace tools { @@ -37,12 +37,12 @@ public: } }; -::boost::shared_ptr<TimerBasedTaskExecution> TimerBasedTaskExecution::Create ( - const ::boost::shared_ptr<AsynchronousTask>& rpTask, +std::shared_ptr<TimerBasedTaskExecution> TimerBasedTaskExecution::Create ( + const std::shared_ptr<AsynchronousTask>& rpTask, sal_uInt32 nMillisecondsBetweenSteps, sal_uInt32 nMaxTimePerStep) { - ::boost::shared_ptr<TimerBasedTaskExecution> pExecution( + std::shared_ptr<TimerBasedTaskExecution> pExecution( new TimerBasedTaskExecution(rpTask,nMillisecondsBetweenSteps,nMaxTimePerStep), Deleter()); // Let the new object have a shared_ptr to itself, so that it can @@ -60,16 +60,16 @@ void TimerBasedTaskExecution::Release() //static void TimerBasedTaskExecution::ReleaseTask ( - const ::boost::weak_ptr<TimerBasedTaskExecution>& rpExecution) + const std::weak_ptr<TimerBasedTaskExecution>& rpExecution) { if ( ! rpExecution.expired()) { try { - ::boost::shared_ptr<tools::TimerBasedTaskExecution> pExecution (rpExecution); + std::shared_ptr<tools::TimerBasedTaskExecution> pExecution (rpExecution); pExecution->Release(); } - catch (const ::boost::bad_weak_ptr&) + catch (const std::bad_weak_ptr&) { // When a bad_weak_ptr has been thrown then the object pointed // to by rpTask has been released right after we checked that it @@ -80,7 +80,7 @@ void TimerBasedTaskExecution::ReleaseTask ( } TimerBasedTaskExecution::TimerBasedTaskExecution ( - const ::boost::shared_ptr<AsynchronousTask>& rpTask, + const std::shared_ptr<AsynchronousTask>& rpTask, sal_uInt32 nMillisecondsBetweenSteps, sal_uInt32 nMaxTimePerStep) : mpTask(rpTask), @@ -100,7 +100,7 @@ TimerBasedTaskExecution::~TimerBasedTaskExecution() } void TimerBasedTaskExecution::SetSelf ( - const ::boost::shared_ptr<TimerBasedTaskExecution>& rpSelf) + const std::shared_ptr<TimerBasedTaskExecution>& rpSelf) { if (mpTask.get() != NULL) mpSelf = rpSelf; diff --git a/sd/source/ui/unoidl/DrawController.cxx b/sd/source/ui/unoidl/DrawController.cxx index 78fcbe04db87..cc9f88a63305 100644 --- a/sd/source/ui/unoidl/DrawController.cxx +++ b/sd/source/ui/unoidl/DrawController.cxx @@ -48,7 +48,7 @@ #include <sfx2/sidebar/EnumContext.hxx> #include <svx/sidebar/ContextChangeEventMultiplexer.hxx> -#include <boost/shared_ptr.hpp> +#include <memory> using namespace ::std; using namespace ::cppu; @@ -138,7 +138,7 @@ void SAL_CALL DrawController::dispose() { mbDisposing = true; - boost::shared_ptr<ViewShell> pViewShell; + std::shared_ptr<ViewShell> pViewShell; if (mpBase) pViewShell = mpBase->GetMainViewShell(); if ( pViewShell ) @@ -508,7 +508,7 @@ void DrawController::FirePropertyChange ( void DrawController::BroadcastContextChange() const { - ::boost::shared_ptr<ViewShell> pViewShell (mpBase->GetMainViewShell()); + std::shared_ptr<ViewShell> pViewShell (mpBase->GetMainViewShell()); if ( ! pViewShell) return; @@ -703,7 +703,7 @@ uno::Reference< form::runtime::XFormController > SAL_CALL DrawController::getFor FmFormShell* pFormShell = mpBase->GetFormShellManager()->GetFormShell(); SdrView* pSdrView = mpBase->GetDrawView(); - ::boost::shared_ptr<ViewShell> pViewShell = mpBase->GetMainViewShell(); + std::shared_ptr<ViewShell> pViewShell = mpBase->GetMainViewShell(); ::sd::Window* pWindow = pViewShell ? pViewShell->GetActiveWindow() : NULL; uno::Reference< form::runtime::XFormController > xController( NULL ); @@ -740,7 +740,7 @@ uno::Reference< awt::XControl > SAL_CALL DrawController::getControl( const uno:: FmFormShell* pFormShell = mpBase->GetFormShellManager()->GetFormShell(); SdrView* pSdrView = mpBase->GetDrawView(); - ::boost::shared_ptr<ViewShell> pViewShell = mpBase->GetMainViewShell(); + std::shared_ptr<ViewShell> pViewShell = mpBase->GetMainViewShell(); ::sd::Window* pWindow = pViewShell ? pViewShell->GetActiveWindow() : NULL; uno::Reference< awt::XControl > xControl( NULL ); diff --git a/sd/source/ui/unoidl/facreg.cxx b/sd/source/ui/unoidl/facreg.cxx index 0a553f9222d8..8a7d894b60d0 100644 --- a/sd/source/ui/unoidl/facreg.cxx +++ b/sd/source/ui/unoidl/facreg.cxx @@ -28,7 +28,7 @@ #include "sal/types.h" #include <string.h> -#include <boost/shared_ptr.hpp> +#include <memory> #include <unordered_map> using namespace com::sun::star; @@ -46,8 +46,8 @@ enum FactoryId typedef std::unordered_map<OUString, FactoryId, OUStringHash> FactoryMap; namespace { -static ::boost::shared_ptr<FactoryMap> spFactoryMap; -::boost::shared_ptr<FactoryMap> GetFactoryMap() +static std::shared_ptr<FactoryMap> spFactoryMap; +std::shared_ptr<FactoryMap> GetFactoryMap() { if (spFactoryMap.get() == NULL) { @@ -76,7 +76,7 @@ SAL_DLLPUBLIC_EXPORT void * SAL_CALL sd_component_getFactory( uno::Reference<lang::XSingleServiceFactory> xFactory; uno::Reference<lang::XSingleComponentFactory> xComponentFactory; - ::boost::shared_ptr<FactoryMap> pFactoryMap (GetFactoryMap()); + std::shared_ptr<FactoryMap> pFactoryMap (GetFactoryMap()); OUString sImplementationName (OUString::createFromAscii(pImplName)); FactoryMap::const_iterator iFactory (pFactoryMap->find(sImplementationName)); if (iFactory != pFactoryMap->end()) diff --git a/sd/source/ui/view/DocumentRenderer.cxx b/sd/source/ui/view/DocumentRenderer.cxx index 81dc5b7daa86..86df4579f849 100644 --- a/sd/source/ui/view/DocumentRenderer.cxx +++ b/sd/source/ui/view/DocumentRenderer.cxx @@ -68,7 +68,7 @@ namespace { public: PrintOptions ( const vcl::PrinterOptionsHelper& rHelper, - const ::std::vector<sal_Int32>& rSlidesPerPage) + const std::vector<sal_Int32>& rSlidesPerPage) : mrProperties(rHelper), maSlidesPerPage(rSlidesPerPage) { @@ -221,7 +221,7 @@ namespace { private: const vcl::PrinterOptionsHelper& mrProperties; - const ::std::vector<sal_Int32> maSlidesPerPage; + const std::vector<sal_Int32> maSlidesPerPage; /** When the value of the property with name pName is a boolean then return its value. When the property is unknown then @@ -353,14 +353,14 @@ namespace { } } - ::std::vector<sal_Int32> GetSlidesPerPage() const + std::vector<sal_Int32> GetSlidesPerPage() const { return maSlidesPerPage; } private: - ::std::vector<beans::PropertyValue> maProperties; - ::std::vector<sal_Int32> maSlidesPerPage; + std::vector<beans::PropertyValue> maProperties; + std::vector<sal_Int32> maSlidesPerPage; bool mbImpress; sal_Int32 mnCurPage; @@ -799,9 +799,9 @@ namespace { // Print at least two rows and columns. More if the document // page fits completely onto the printer page. - const sal_Int32 nColumnCount (::std::max(sal_Int32(2), + const sal_Int32 nColumnCount (std::max(sal_Int32(2), sal_Int32(aPrintSize.Width() / nPageWidth))); - const sal_Int32 nRowCount (::std::max(sal_Int32(2), + const sal_Int32 nRowCount (std::max(sal_Int32(2), sal_Int32(aPrintSize.Height() / nPageHeight))); for (sal_Int32 nRow=0; nRow<nRowCount; ++nRow) for (sal_Int32 nColumn=0; nColumn<nColumnCount; ++nColumn) @@ -913,7 +913,7 @@ namespace { public: HandoutPrinterPage ( const sal_uInt16 nHandoutPageIndex, - const ::std::vector<sal_uInt16>& rPageIndices, + const std::vector<sal_uInt16>& rPageIndices, const MapMode& rMapMode, const OUString& rsPageString, const Point& rPageStringOffset, @@ -1045,7 +1045,7 @@ namespace { private: const sal_uInt16 mnHandoutPageIndex; - const ::std::vector<sal_uInt16> maPageIndices; + const std::vector<sal_uInt16> maPageIndices; }; /** The outline information (title, subtitle, outline objects) of the @@ -1119,7 +1119,7 @@ namespace { } private: - ::boost::scoped_ptr<OutlinerParaObject> mpParaObject; + std::unique_ptr<OutlinerParaObject> mpParaObject; }; } @@ -1247,23 +1247,23 @@ public: Printer& rPrinter (*mpPrinter); - ::boost::shared_ptr<ViewShell> pViewShell (mrBase.GetMainViewShell()); + std::shared_ptr<ViewShell> pViewShell (mrBase.GetMainViewShell()); if ( ! pViewShell) return; SdDrawDocument* pDocument = pViewShell->GetDoc(); OSL_ASSERT(pDocument!=NULL); - ::boost::shared_ptr<DrawViewShell> pDrawViewShell( - ::boost::dynamic_pointer_cast<DrawViewShell>(mrBase.GetMainViewShell())); + std::shared_ptr<DrawViewShell> pDrawViewShell( + std::dynamic_pointer_cast<DrawViewShell>(mrBase.GetMainViewShell())); - if ( ! mpPrintView) + if (!mpPrintView) mpPrintView.reset(new DrawView(mrBase.GetDocShell(), &rPrinter, NULL)); if (nIndex<0 || sal::static_int_cast<sal_uInt32>(nIndex)>=maPrinterPages.size()) return; - const ::boost::shared_ptr<PrinterPage> pPage (maPrinterPages[nIndex]); + const std::shared_ptr<PrinterPage> pPage (maPrinterPages[nIndex]); OSL_ASSERT(pPage); if ( ! pPage) return; @@ -1322,11 +1322,11 @@ private: bool mbIsDisposed; VclPtr<Printer> mpPrinter; Size maPrinterPageSizePixel; - ::boost::scoped_ptr<PrintOptions> mpOptions; - ::std::vector< ::boost::shared_ptr< ::sd::PrinterPage> > maPrinterPages; - ::boost::scoped_ptr<DrawView> mpPrintView; + std::unique_ptr<PrintOptions> mpOptions; + std::vector< std::shared_ptr< ::sd::PrinterPage> > maPrinterPages; + std::unique_ptr<DrawView> mpPrintView; bool mbHasOrientationWarningBeenShown; - ::std::vector<sal_Int32> maSlidesPerPage; + std::vector<sal_Int32> maSlidesPerPage; awt::Size maPrintSize; void Dispose() @@ -1620,7 +1620,7 @@ private: long nPageH = aOutRect.GetHeight(); - ::std::vector< sal_Int32 > aPages; + std::vector< sal_Int32 > aPages; sal_Int32 nPageCount = mrBase.GetDocument()->GetSdPageCount(PK_STANDARD); StringRangeEnumerator::getRangesFromString( mpOptions->GetPrinterSelection(nPageCount, GetCurrentPageIndex()), @@ -1724,7 +1724,7 @@ private: } maPrinterPages.push_back( - ::boost::shared_ptr<PrinterPage>( + std::shared_ptr<PrinterPage>( new OutlinerPrinterPage( pOutliner->CreateParaObject(), aMap, @@ -1798,7 +1798,7 @@ private: aMap.SetOrigin(Point()); } - ::boost::shared_ptr<ViewShell> pViewShell (mrBase.GetMainViewShell()); + std::shared_ptr<ViewShell> pViewShell (mrBase.GetMainViewShell()); pViewShell->WriteFrameViewData(); // Count page shapes. @@ -1820,7 +1820,7 @@ private: StringRangeEnumerator aRangeEnum( mpOptions->GetPrinterSelection(nPageCount, GetCurrentPageIndex()), 0, nPageCount-1); - ::std::vector<sal_uInt16> aPageIndices; + std::vector<sal_uInt16> aPageIndices; sal_uInt16 nPrinterPageIndex = 0; StringRangeEnumerator::Iterator it = aRangeEnum.begin(), itEnd = aRangeEnum.end(); bool bLastLoop = (it == itEnd); @@ -1840,7 +1840,7 @@ private: if (!aPageIndices.empty() && (aPageIndices.size() == nShapeCount || bLastLoop)) { maPrinterPages.push_back( - ::boost::shared_ptr<PrinterPage>( + std::shared_ptr<PrinterPage>( new HandoutPrinterPage( nPrinterPageIndex++, aPageIndices, @@ -1889,7 +1889,7 @@ private: const PageKind ePageKind, PrintInfo& rInfo) { - ::boost::shared_ptr<ViewShell> pViewShell (mrBase.GetMainViewShell()); + std::shared_ptr<ViewShell> pViewShell (mrBase.GetMainViewShell()); pViewShell->WriteFrameViewData(); sal_Int32 nPageCount = mrBase.GetDocument()->GetSdPageCount(PK_STANDARD); @@ -2022,7 +2022,7 @@ private: StringRangeEnumerator aRangeEnum( mpOptions->GetPrinterSelection(nPageCount, GetCurrentPageIndex()), 0, nPageCount-1); - ::std::vector< sal_uInt16 > aPageVector; + std::vector< sal_uInt16 > aPageVector; for (StringRangeEnumerator::Iterator it = aRangeEnum.begin(), itEnd = aRangeEnum.end(); @@ -2035,23 +2035,23 @@ private: } // create pairs of pages to print on each page - typedef ::std::vector< ::std::pair< sal_uInt16, sal_uInt16 > > PairVector; + typedef std::vector< std::pair< sal_uInt16, sal_uInt16 > > PairVector; PairVector aPairVector; if ( ! aPageVector.empty()) { sal_uInt32 nFirstIndex = 0, nLastIndex = aPageVector.size() - 1; if( aPageVector.size() & 1 ) - aPairVector.push_back( ::std::make_pair( (sal_uInt16) 65535, aPageVector[ nFirstIndex++ ] ) ); + aPairVector.push_back( std::make_pair( (sal_uInt16) 65535, aPageVector[ nFirstIndex++ ] ) ); else - aPairVector.push_back( ::std::make_pair( aPageVector[ nLastIndex-- ], aPageVector[ nFirstIndex++ ] ) ); + aPairVector.push_back( std::make_pair( aPageVector[ nLastIndex-- ], aPageVector[ nFirstIndex++ ] ) ); while( nFirstIndex < nLastIndex ) { if( nFirstIndex & 1 ) - aPairVector.push_back( ::std::make_pair( aPageVector[ nFirstIndex++ ], aPageVector[ nLastIndex-- ] ) ); + aPairVector.push_back( std::make_pair( aPageVector[ nFirstIndex++ ], aPageVector[ nLastIndex-- ] ) ); else - aPairVector.push_back( ::std::make_pair( aPageVector[ nLastIndex-- ], aPageVector[ nFirstIndex++ ] ) ); + aPairVector.push_back( std::make_pair( aPageVector[ nLastIndex-- ], aPageVector[ nFirstIndex++ ] ) ); } } @@ -2065,14 +2065,14 @@ private: if ((!bIsIndexOdd && mpOptions->IsPrintFrontPage()) || (bIsIndexOdd && mpOptions->IsPrintBackPage())) { - const ::std::pair<sal_uInt16, sal_uInt16> aPair (aPairVector[nIndex]); + const std::pair<sal_uInt16, sal_uInt16> aPair (aPairVector[nIndex]); Point aSecondOffset (aOffset); if (rInfo.meOrientation == ORIENTATION_LANDSCAPE) aSecondOffset.X() += aAdjustedPrintSize.Width() / 2; else aSecondOffset.Y() += aAdjustedPrintSize.Height() / 2; maPrinterPages.push_back( - ::boost::shared_ptr<PrinterPage>( + std::shared_ptr<PrinterPage>( new BookletPrinterPage( aPair.first, aPair.second, @@ -2105,7 +2105,7 @@ private: nPaperBin = rInfo.mpPrinter->GetPaperBin(); maPrinterPages.push_back( - ::boost::shared_ptr<PrinterPage>( + std::shared_ptr<PrinterPage>( new TiledPrinterPage( sal::static_int_cast<sal_uInt16>(nPageIndex), ePageKind, @@ -2153,7 +2153,7 @@ private: // if CutPage is set then do not move it, otherwise move the // scaled page to printable area maPrinterPages.push_back( - ::boost::shared_ptr<PrinterPage>( + std::shared_ptr<PrinterPage>( new RegularPrinterPage( sal::static_int_cast<sal_uInt16>(nPageIndex), ePageKind, @@ -2189,7 +2189,7 @@ private: { aMap.SetOrigin(aPageOrigin); maPrinterPages.push_back( - ::boost::shared_ptr<PrinterPage>( + std::shared_ptr<PrinterPage>( new RegularPrinterPage( sal::static_int_cast<sal_uInt16>(nPageIndex), ePageKind, diff --git a/sd/source/ui/view/MediaObjectBar.cxx b/sd/source/ui/view/MediaObjectBar.cxx index 64d7884823ff..7c191ae057c7 100644 --- a/sd/source/ui/view/MediaObjectBar.cxx +++ b/sd/source/ui/view/MediaObjectBar.cxx @@ -39,7 +39,7 @@ #include "drawview.hxx" #include "sdresid.hxx" #include "drawdoc.hxx" -#include <boost/scoped_ptr.hpp> +#include <memory> using namespace sd; @@ -86,7 +86,7 @@ void MediaObjectBar::GetState( SfxItemSet& rSet ) { if( SID_AVMEDIA_TOOLBOX == nWhich ) { - boost::scoped_ptr<SdrMarkList> pMarkList(new SdrMarkList( mpView->GetMarkedObjectList() )); + std::unique_ptr<SdrMarkList> pMarkList(new SdrMarkList( mpView->GetMarkedObjectList() )); bool bDisable = true; if( 1 == pMarkList->GetMarkCount() ) @@ -123,7 +123,7 @@ void MediaObjectBar::Execute( SfxRequest& rReq ) if( pItem ) { - boost::scoped_ptr<SdrMarkList> pMarkList(new SdrMarkList( mpView->GetMarkedObjectList() )); + std::unique_ptr<SdrMarkList> pMarkList(new SdrMarkList( mpView->GetMarkedObjectList() )); if( 1 == pMarkList->GetMarkCount() ) { diff --git a/sd/source/ui/view/Outliner.cxx b/sd/source/ui/view/Outliner.cxx index c1964def738c..29521588152b 100644 --- a/sd/source/ui/view/Outliner.cxx +++ b/sd/source/ui/view/Outliner.cxx @@ -104,7 +104,7 @@ public: */ void ProvideOutlinerView ( Outliner& rOutliner, - const ::boost::shared_ptr<ViewShell>& rpViewShell, + const std::shared_ptr<ViewShell>& rpViewShell, vcl::Window* pWindow); /** This method is called when the OutlinerView is no longer used. @@ -256,7 +256,7 @@ void Outliner::PrepareSpelling() SetViewShell (pBase->GetMainViewShell()); SetRefDevice( SD_MOD()->GetRefDevice( *mpDrawDocument->GetDocSh() ) ); - ::boost::shared_ptr<ViewShell> pViewShell (mpWeakViewShell.lock()); + std::shared_ptr<ViewShell> pViewShell (mpWeakViewShell.lock()); if (pViewShell) { mbStringFound = false; @@ -291,8 +291,8 @@ void Outliner::StartSpelling() void Outliner::EndSpelling() { // Keep old view shell alive until we release the outliner view. - ::boost::shared_ptr<ViewShell> pViewShell (mpWeakViewShell.lock()); - ::boost::shared_ptr<ViewShell> pOldViewShell (pViewShell); + std::shared_ptr<ViewShell> pViewShell (mpWeakViewShell.lock()); + std::shared_ptr<ViewShell> pOldViewShell (pViewShell); ViewShellBase* pBase = PTR_CAST(ViewShellBase,SfxViewShell::Current()); if (pBase != NULL) @@ -353,7 +353,7 @@ void Outliner::EndSpelling() bool Outliner::SpellNextDocument() { - ::boost::shared_ptr<ViewShell> pViewShell (mpWeakViewShell.lock()); + std::shared_ptr<ViewShell> pViewShell (mpWeakViewShell.lock()); if (pViewShell->ISA(OutlineViewShell)) { // When doing a spell check in the outline view then there is @@ -445,7 +445,7 @@ bool Outliner::StartSearchAndReplace (const SvxSearchItem* pSearchItem) bool bAbort = false; if (pBase != NULL) { - ::boost::shared_ptr<ViewShell> pShell (pBase->GetMainViewShell()); + std::shared_ptr<ViewShell> pShell (pBase->GetMainViewShell()); SetViewShell(pShell); if (pShell.get() == NULL) bAbort = true; @@ -465,7 +465,7 @@ bool Outliner::StartSearchAndReplace (const SvxSearchItem* pSearchItem) } } - ::boost::shared_ptr<ViewShell> pViewShell (mpWeakViewShell.lock()); + std::shared_ptr<ViewShell> pViewShell (mpWeakViewShell.lock()); if ( ! pViewShell) { OSL_ASSERT(pViewShell); @@ -523,7 +523,7 @@ void Outliner::Initialize (bool bDirectionIsForward) maObjectIterator = ::sd::outliner::OutlinerContainer(this).current(); maCurrentPosition = *maObjectIterator; - ::boost::shared_ptr<ViewShell> pViewShell (mpWeakViewShell.lock()); + std::shared_ptr<ViewShell> pViewShell (mpWeakViewShell.lock()); if ( ! pViewShell) { OSL_ASSERT(pViewShell); @@ -584,7 +584,7 @@ bool Outliner::SearchAndReplaceAll() // matches. RememberStartPosition (); - ::boost::shared_ptr<ViewShell> pViewShell (mpWeakViewShell.lock()); + std::shared_ptr<ViewShell> pViewShell (mpWeakViewShell.lock()); if ( ! pViewShell) { OSL_ASSERT(pViewShell); @@ -637,7 +637,7 @@ bool Outliner::SearchAndReplaceOnce() if( NULL == pOutlinerView || !GetEditEngine().HasView( &pOutlinerView->GetEditView() ) ) return true; - ::boost::shared_ptr<ViewShell> pViewShell (mpWeakViewShell.lock()); + std::shared_ptr<ViewShell> pViewShell (mpWeakViewShell.lock()); if (pViewShell != 0) { mpView = pViewShell->GetView(); @@ -731,9 +731,9 @@ void Outliner::DetectChange() { ::sd::outliner::IteratorPosition aPosition (maCurrentPosition); - ::boost::shared_ptr<ViewShell> pViewShell (mpWeakViewShell.lock()); - ::boost::shared_ptr<DrawViewShell> pDrawViewShell ( - ::boost::dynamic_pointer_cast<DrawViewShell>(pViewShell)); + std::shared_ptr<ViewShell> pViewShell (mpWeakViewShell.lock()); + std::shared_ptr<DrawViewShell> pDrawViewShell ( + std::dynamic_pointer_cast<DrawViewShell>(pViewShell)); // Detect whether the view has been switched from the outside. if (pDrawViewShell.get() != NULL @@ -825,7 +825,7 @@ bool Outliner::DetectSelectionChange() void Outliner::RememberStartPosition() { - ::boost::shared_ptr<ViewShell> pViewShell (mpWeakViewShell.lock()); + std::shared_ptr<ViewShell> pViewShell (mpWeakViewShell.lock()); if ( ! pViewShell) { OSL_ASSERT(pViewShell); @@ -837,8 +837,8 @@ void Outliner::RememberStartPosition() if (pViewShell->ISA(DrawViewShell)) { - ::boost::shared_ptr<DrawViewShell> pDrawViewShell ( - ::boost::dynamic_pointer_cast<DrawViewShell>(pViewShell)); + std::shared_ptr<DrawViewShell> pDrawViewShell ( + std::dynamic_pointer_cast<DrawViewShell>(pViewShell)); if (pDrawViewShell.get() != NULL) { meStartViewMode = pDrawViewShell->GetPageKind(); @@ -884,7 +884,7 @@ void Outliner::RestoreStartPosition() if (mnStartPageIndex == (sal_uInt16)-1 ) bRestore = false; // Dont't restore when the view shell is not valid. - ::boost::shared_ptr<ViewShell> pViewShell (mpWeakViewShell.lock()); + std::shared_ptr<ViewShell> pViewShell (mpWeakViewShell.lock()); if (pViewShell == 0) bRestore = false; @@ -892,8 +892,8 @@ void Outliner::RestoreStartPosition() { if (pViewShell->ISA(DrawViewShell)) { - ::boost::shared_ptr<DrawViewShell> pDrawViewShell ( - ::boost::dynamic_pointer_cast<DrawViewShell>(pViewShell)); + std::shared_ptr<DrawViewShell> pDrawViewShell ( + std::dynamic_pointer_cast<DrawViewShell>(pViewShell)); SetViewMode (meStartViewMode); if (pDrawViewShell.get() != NULL) SetPage (meStartEditMode, mnStartPageIndex); @@ -959,7 +959,7 @@ void Outliner::ProvideNextTextObject() { PutTextIntoOutliner (); - ::boost::shared_ptr<ViewShell> pViewShell (mpWeakViewShell.lock()); + std::shared_ptr<ViewShell> pViewShell (mpWeakViewShell.lock()); if (pViewShell != 0) switch (meMode) { @@ -986,7 +986,7 @@ void Outliner::ProvideNextTextObject() void Outliner::EndOfSearch() { - ::boost::shared_ptr<ViewShell> pViewShell (mpWeakViewShell.lock()); + std::shared_ptr<ViewShell> pViewShell (mpWeakViewShell.lock()); if ( ! pViewShell) { OSL_ASSERT(pViewShell); @@ -1185,9 +1185,9 @@ void Outliner::PrepareSearchAndReplace() void Outliner::SetViewMode (PageKind ePageKind) { - ::boost::shared_ptr<ViewShell> pViewShell (mpWeakViewShell.lock()); - ::boost::shared_ptr<DrawViewShell> pDrawViewShell( - ::boost::dynamic_pointer_cast<DrawViewShell>(pViewShell)); + std::shared_ptr<ViewShell> pViewShell (mpWeakViewShell.lock()); + std::shared_ptr<DrawViewShell> pDrawViewShell( + std::dynamic_pointer_cast<DrawViewShell>(pViewShell)); if (pDrawViewShell.get()!=NULL && ePageKind != pDrawViewShell->GetPageKind()) { // Restore old edit mode. @@ -1214,7 +1214,7 @@ void Outliner::SetViewMode (PageKind ePageKind) bool bMatchMayExist = mbMatchMayExist; ViewShellBase& rBase = pViewShell->GetViewShellBase(); - SetViewShell(::boost::shared_ptr<ViewShell>()); + SetViewShell(std::shared_ptr<ViewShell>()); framework::FrameworkHelper::Instance(rBase)->RequestView( sViewURL, framework::FrameworkHelper::msCenterPaneURL); @@ -1240,7 +1240,7 @@ void Outliner::SetViewMode (PageKind ePageKind) // Save edit mode so that it can be restored when switching the view // shell again. - pDrawViewShell = ::boost::dynamic_pointer_cast<DrawViewShell>(pViewShell); + pDrawViewShell = std::dynamic_pointer_cast<DrawViewShell>(pViewShell); OSL_ASSERT(pDrawViewShell.get()!=NULL); if (pDrawViewShell.get() != NULL) mpImpl->meOriginalEditMode = pDrawViewShell->GetEditMode(); @@ -1251,9 +1251,9 @@ void Outliner::SetPage (EditMode eEditMode, sal_uInt16 nPageIndex) { if ( ! mbRestrictSearchToSelection) { - ::boost::shared_ptr<ViewShell> pViewShell (mpWeakViewShell.lock()); - ::boost::shared_ptr<DrawViewShell> pDrawViewShell( - ::boost::dynamic_pointer_cast<DrawViewShell>(pViewShell)); + std::shared_ptr<ViewShell> pViewShell (mpWeakViewShell.lock()); + std::shared_ptr<DrawViewShell> pDrawViewShell( + std::dynamic_pointer_cast<DrawViewShell>(pViewShell)); OSL_ASSERT(pDrawViewShell.get()!=NULL); if (pDrawViewShell.get() != NULL) { @@ -1274,7 +1274,7 @@ void Outliner::EnterEditMode (bool bGrabFocus) // Make FuText the current function. SfxUInt16Item aItem (SID_TEXTEDIT, 1); - ::boost::shared_ptr<ViewShell> pViewShell (mpWeakViewShell.lock()); + std::shared_ptr<ViewShell> pViewShell (mpWeakViewShell.lock()); pViewShell->GetDispatcher()-> Execute(SID_TEXTEDIT, SfxCallMode::SYNCHRON | SfxCallMode::RECORD, &aItem, 0L); @@ -1370,9 +1370,9 @@ SdrObject* Outliner::SetObject ( return rPosition.mxObject.get(); } -void Outliner::SetViewShell (const ::boost::shared_ptr<ViewShell>& rpViewShell) +void Outliner::SetViewShell (const std::shared_ptr<ViewShell>& rpViewShell) { - ::boost::shared_ptr<ViewShell> pViewShell (mpWeakViewShell.lock()); + std::shared_ptr<ViewShell> pViewShell (mpWeakViewShell.lock()); if (pViewShell != rpViewShell) { // Set the new view shell. @@ -1424,7 +1424,7 @@ void Outliner::HandleChangedSelection() void Outliner::StartConversion( sal_Int16 nSourceLanguage, sal_Int16 nTargetLanguage, const vcl::Font *pTargetFont, sal_Int32 nOptions, bool bIsInteractive ) { - ::boost::shared_ptr<ViewShell> pViewShell (mpWeakViewShell.lock()); + std::shared_ptr<ViewShell> pViewShell (mpWeakViewShell.lock()); bool bMultiDoc = pViewShell->ISA(DrawViewShell); meMode = TEXT_CONVERSION; @@ -1481,7 +1481,7 @@ void Outliner::BeginConversion() if (pBase != NULL) SetViewShell (pBase->GetMainViewShell()); - ::boost::shared_ptr<ViewShell> pViewShell (mpWeakViewShell.lock()); + std::shared_ptr<ViewShell> pViewShell (mpWeakViewShell.lock()); if (pViewShell) { mbStringFound = false; @@ -1509,7 +1509,7 @@ void Outliner::EndConversion() bool Outliner::ConvertNextDocument() { - ::boost::shared_ptr<ViewShell> pViewShell (mpWeakViewShell.lock()); + std::shared_ptr<ViewShell> pViewShell (mpWeakViewShell.lock()); if (pViewShell && pViewShell->ISA(OutlineViewShell) ) return false; @@ -1611,7 +1611,7 @@ Outliner::Implementation::~Implementation() */ void Outliner::Implementation::ProvideOutlinerView ( Outliner& rOutliner, - const ::boost::shared_ptr<ViewShell>& rpViewShell, + const std::shared_ptr<ViewShell>& rpViewShell, vcl::Window* pWindow) { if (rpViewShell.get() != NULL) @@ -1646,7 +1646,7 @@ void Outliner::Implementation::ProvideOutlinerView ( rOutliner.SetText(OUString(), rOutliner.GetParagraph(0)); meOriginalEditMode = - ::boost::static_pointer_cast<DrawViewShell>(rpViewShell)->GetEditMode(); + std::static_pointer_cast<DrawViewShell>(rpViewShell)->GetEditMode(); } break; diff --git a/sd/source/ui/view/OutlinerIterator.cxx b/sd/source/ui/view/OutlinerIterator.cxx index 2fcd500b986f..1186b60527c7 100644 --- a/sd/source/ui/view/OutlinerIterator.cxx +++ b/sd/source/ui/view/OutlinerIterator.cxx @@ -197,7 +197,7 @@ Iterator OutlinerContainer::CreateIterator (IteratorLocation aLocation) Iterator OutlinerContainer::CreateSelectionIterator ( const ::std::vector<SdrObjectWeakRef>& rObjectList, SdDrawDocument* pDocument, - const ::boost::shared_ptr<ViewShell>& rpViewShell, + const std::shared_ptr<ViewShell>& rpViewShell, bool bDirectionIsForward, IteratorLocation aLocation) { @@ -236,7 +236,7 @@ Iterator OutlinerContainer::CreateSelectionIterator ( Iterator OutlinerContainer::CreateDocumentIterator ( SdDrawDocument* pDocument, - const ::boost::shared_ptr<ViewShell>& rpViewShell, + const std::shared_ptr<ViewShell>& rpViewShell, bool bDirectionIsForward, IteratorLocation aLocation) { @@ -275,8 +275,8 @@ Iterator OutlinerContainer::CreateDocumentIterator ( break; case CURRENT: - const ::boost::shared_ptr<DrawViewShell> pDrawViewShell( - ::boost::dynamic_pointer_cast<DrawViewShell>(rpViewShell)); + const std::shared_ptr<DrawViewShell> pDrawViewShell( + std::dynamic_pointer_cast<DrawViewShell>(rpViewShell)); if (pDrawViewShell.get()) { ePageKind = pDrawViewShell->GetPageKind(); @@ -300,7 +300,7 @@ Iterator OutlinerContainer::CreateDocumentIterator ( sal_Int32 OutlinerContainer::GetPageIndex ( SdDrawDocument* pDocument, - const ::boost::shared_ptr<ViewShell>& rpViewShell, + const std::shared_ptr<ViewShell>& rpViewShell, PageKind ePageKind, EditMode eEditMode, bool bDirectionIsForward, @@ -311,8 +311,8 @@ sal_Int32 OutlinerContainer::GetPageIndex ( sal_Int32 nPageIndex; sal_Int32 nPageCount; - const ::boost::shared_ptr<DrawViewShell> pDrawViewShell( - ::boost::dynamic_pointer_cast<DrawViewShell>(rpViewShell)); + const std::shared_ptr<DrawViewShell> pDrawViewShell( + std::dynamic_pointer_cast<DrawViewShell>(rpViewShell)); switch (eEditMode) { @@ -363,16 +363,16 @@ sal_Int32 OutlinerContainer::GetPageIndex ( //===== IteratorImplBase ==================================================== IteratorImplBase::IteratorImplBase(SdDrawDocument* pDocument, - const ::boost::weak_ptr<ViewShell>& rpViewShellWeak, + const std::weak_ptr<ViewShell>& rpViewShellWeak, bool bDirectionIsForward) : maPosition() , mpDocument (pDocument) , mpViewShellWeak (rpViewShellWeak) , mbDirectionIsForward (bDirectionIsForward) { - ::boost::shared_ptr<DrawViewShell> pDrawViewShell; + std::shared_ptr<DrawViewShell> pDrawViewShell; if ( ! mpViewShellWeak.expired()) - pDrawViewShell = ::boost::dynamic_pointer_cast<DrawViewShell>(rpViewShellWeak.lock()); + pDrawViewShell = std::dynamic_pointer_cast<DrawViewShell>(rpViewShellWeak.lock()); if (pDrawViewShell.get()) { @@ -387,7 +387,7 @@ IteratorImplBase::IteratorImplBase(SdDrawDocument* pDocument, } IteratorImplBase::IteratorImplBase( SdDrawDocument* pDocument, - const ::boost::weak_ptr<ViewShell>& rpViewShellWeak, + const std::weak_ptr<ViewShell>& rpViewShellWeak, bool bDirectionIsForward, PageKind ePageKind, EditMode eEditMode) : maPosition() , mpDocument (pDocument) @@ -442,7 +442,7 @@ SelectionIteratorImpl::SelectionIteratorImpl ( const ::std::vector<SdrObjectWeakRef>& rObjectList, sal_Int32 nObjectIndex, SdDrawDocument* pDocument, - const ::boost::weak_ptr<ViewShell>& rpViewShellWeak, + const std::weak_ptr<ViewShell>& rpViewShellWeak, bool bDirectionIsForward) : IteratorImplBase (pDocument, rpViewShellWeak, bDirectionIsForward), mrObjectList(rObjectList), @@ -542,7 +542,7 @@ bool SelectionIteratorImpl::IsEqual ( ViewIteratorImpl::ViewIteratorImpl ( sal_Int32 nPageIndex, SdDrawDocument* pDocument, - const ::boost::weak_ptr<ViewShell>& rpViewShellWeak, + const std::weak_ptr<ViewShell>& rpViewShellWeak, bool bDirectionIsForward) : IteratorImplBase (pDocument, rpViewShellWeak, bDirectionIsForward), mbPageChangeOccurred(false), @@ -555,7 +555,7 @@ ViewIteratorImpl::ViewIteratorImpl ( ViewIteratorImpl::ViewIteratorImpl ( sal_Int32 nPageIndex, SdDrawDocument* pDocument, - const ::boost::weak_ptr<ViewShell>& rpViewShellWeak, + const std::weak_ptr<ViewShell>& rpViewShellWeak, bool bDirectionIsForward, PageKind ePageKind, EditMode eEditMode) @@ -729,7 +729,7 @@ DocumentIteratorImpl::DocumentIteratorImpl ( sal_Int32 nPageIndex, PageKind ePageKind, EditMode eEditMode, SdDrawDocument* pDocument, - const ::boost::weak_ptr<ViewShell>& rpViewShellWeak, + const std::weak_ptr<ViewShell>& rpViewShellWeak, bool bDirectionIsForward) : ViewIteratorImpl (nPageIndex, pDocument, rpViewShellWeak, bDirectionIsForward, ePageKind, eEditMode) diff --git a/sd/source/ui/view/ToolBarManager.cxx b/sd/source/ui/view/ToolBarManager.cxx index 053989d79800..ee078591fd6b 100644 --- a/sd/source/ui/view/ToolBarManager.cxx +++ b/sd/source/ui/view/ToolBarManager.cxx @@ -151,8 +151,8 @@ public: This ViewShellManager is used to activate or deactivate shells. */ void UpdateShells ( - const ::boost::shared_ptr<ViewShell>& rpMainViewShell, - const ::boost::shared_ptr<ViewShellManager>& rpManager); + const std::shared_ptr<ViewShell>& rpMainViewShell, + const std::shared_ptr<ViewShellManager>& rpManager); private: class ShellDescriptor @@ -184,8 +184,8 @@ class ToolBarRules { public: ToolBarRules ( - const ::boost::shared_ptr<ToolBarManager>& rpToolBarManager, - const ::boost::shared_ptr<ViewShellManager>& rpViewShellManager); + const std::shared_ptr<ToolBarManager>& rpToolBarManager, + const std::shared_ptr<ViewShellManager>& rpViewShellManager); /** This method calls MainViewShellChanged() and SelectionHasChanged() for the current main view shell and its view. @@ -222,8 +222,8 @@ public: sd::ShellId nShellId); private: - ::boost::shared_ptr<ToolBarManager> mpToolBarManager; - ::boost::shared_ptr<ViewShellManager> mpViewShellManager; + std::shared_ptr<ToolBarManager> mpToolBarManager; + std::shared_ptr<ViewShellManager> mpViewShellManager; }; } // end of anonymous namespace @@ -243,9 +243,9 @@ public: */ Implementation ( ViewShellBase& rBase, - const ::boost::shared_ptr<sd::tools::EventMultiplexer>& rpMultiplexer, - const ::boost::shared_ptr<ViewShellManager>& rpViewShellManager, - const ::boost::shared_ptr<ToolBarManager>& rpToolBarManager); + const std::shared_ptr<sd::tools::EventMultiplexer>& rpMultiplexer, + const std::shared_ptr<ViewShellManager>& rpViewShellManager, + const std::shared_ptr<ToolBarManager>& rpToolBarManager); ~Implementation(); void SetValid (bool bValid); @@ -300,7 +300,7 @@ private: mutable ::osl::Mutex maMutex; ViewShellBase& mrBase; - ::boost::shared_ptr<sd::tools::EventMultiplexer> mpEventMultiplexer; + std::shared_ptr<sd::tools::EventMultiplexer> mpEventMultiplexer; bool mbIsValid; ToolBarList maToolBarList; ToolBarShellList maToolBarShellList; @@ -346,12 +346,12 @@ const OUString ToolBarManager::msGraphicObjectBar("graphicobjectbar"); const OUString ToolBarManager::msMediaObjectBar("mediaobjectbar"); const OUString ToolBarManager::msTableObjectBar("tableobjectbar"); -::boost::shared_ptr<ToolBarManager> ToolBarManager::Create ( +std::shared_ptr<ToolBarManager> ToolBarManager::Create ( ViewShellBase& rBase, - const ::boost::shared_ptr<sd::tools::EventMultiplexer>& rpMultiplexer, - const ::boost::shared_ptr<ViewShellManager>& rpViewShellManager) + const std::shared_ptr<sd::tools::EventMultiplexer>& rpMultiplexer, + const std::shared_ptr<ViewShellManager>& rpViewShellManager) { - ::boost::shared_ptr<ToolBarManager> pManager (new ToolBarManager()); + std::shared_ptr<ToolBarManager> pManager (new ToolBarManager()); pManager->mpImpl.reset( new Implementation(rBase,rpMultiplexer,rpViewShellManager,pManager)); return pManager; @@ -515,9 +515,9 @@ const OUString ToolBarManager::Implementation::msToolBarResourcePrefix("private: ToolBarManager::Implementation::Implementation ( ViewShellBase& rBase, - const ::boost::shared_ptr<sd::tools::EventMultiplexer>& rpMultiplexer, - const ::boost::shared_ptr<ViewShellManager>& rpViewShellManager, - const ::boost::shared_ptr<ToolBarManager>& rpToolBarManager) + const std::shared_ptr<sd::tools::EventMultiplexer>& rpMultiplexer, + const std::shared_ptr<ViewShellManager>& rpViewShellManager, + const std::shared_ptr<ToolBarManager>& rpToolBarManager) : maMutex(), mrBase(rBase), mpEventMultiplexer(rpMultiplexer), @@ -954,8 +954,8 @@ LayouterLock::~LayouterLock() //===== ToolBarRules ========================================================== ToolBarRules::ToolBarRules ( - const ::boost::shared_ptr<sd::ToolBarManager>& rpToolBarManager, - const ::boost::shared_ptr<sd::ViewShellManager>& rpViewShellManager) + const std::shared_ptr<sd::ToolBarManager>& rpToolBarManager, + const std::shared_ptr<sd::ViewShellManager>& rpViewShellManager) : mpToolBarManager(rpToolBarManager), mpViewShellManager(rpViewShellManager) { @@ -1397,8 +1397,8 @@ void ToolBarShellList::ReleaseAllShells (ToolBarRules& rRules) } void ToolBarShellList::UpdateShells ( - const ::boost::shared_ptr<ViewShell>& rpMainViewShell, - const ::boost::shared_ptr<ViewShellManager>& rpManager) + const std::shared_ptr<ViewShell>& rpMainViewShell, + const std::shared_ptr<ViewShellManager>& rpManager) { if (rpMainViewShell.get() != NULL) { diff --git a/sd/source/ui/view/ViewShellBase.cxx b/sd/source/ui/view/ViewShellBase.cxx index a6fda969ca9f..461d9bf05f26 100644 --- a/sd/source/ui/view/ViewShellBase.cxx +++ b/sd/source/ui/view/ViewShellBase.cxx @@ -140,10 +140,10 @@ public: It does not include the ViewTabBar. */ VclPtr<vcl::Window> mpViewWindow; - ::boost::shared_ptr<ToolBarManager> mpToolBarManager; - ::boost::shared_ptr<ViewShellManager> mpViewShellManager; - ::boost::shared_ptr<tools::EventMultiplexer> mpEventMultiplexer; - ::boost::shared_ptr<FormShellManager> mpFormShellManager; + std::shared_ptr<ToolBarManager> mpToolBarManager; + std::shared_ptr<ViewShellManager> mpViewShellManager; + std::shared_ptr<tools::EventMultiplexer> mpEventMultiplexer; + std::shared_ptr<FormShellManager> mpFormShellManager; Implementation (ViewShellBase& rBase); ~Implementation(); @@ -191,7 +191,7 @@ private: order to ensure that it stays alive while the ViewShellBase is alive. */ - ::boost::shared_ptr<slidesorter::cache::PageCacheManager> mpPageCacheManager; + std::shared_ptr<slidesorter::cache::PageCacheManager> mpPageCacheManager; }; namespace { @@ -313,7 +313,7 @@ void ViewShellBase::LateInit (const OUString& rsDefaultView) if (sView.isEmpty()) sView = GetInitialViewShellType(); - ::boost::shared_ptr<FrameworkHelper> pHelper (FrameworkHelper::Instance(*this)); + std::shared_ptr<FrameworkHelper> pHelper (FrameworkHelper::Instance(*this)); // Create the resource ids for the center pane and view. const Reference<drawing::framework::XResourceId> xCenterPaneId ( @@ -359,14 +359,14 @@ void ViewShellBase::LateInit (const OUString& rsDefaultView) } } -::boost::shared_ptr<ViewShellManager> ViewShellBase::GetViewShellManager() const +std::shared_ptr<ViewShellManager> ViewShellBase::GetViewShellManager() const { return mpImpl->mpViewShellManager; } -::boost::shared_ptr<ViewShell> ViewShellBase::GetMainViewShell() const +std::shared_ptr<ViewShell> ViewShellBase::GetMainViewShell() const { - ::boost::shared_ptr<ViewShell> pMainViewShell ( + std::shared_ptr<ViewShell> pMainViewShell ( framework::FrameworkHelper::Instance(*const_cast<ViewShellBase*>(this)) ->GetViewShell(framework::FrameworkHelper::msCenterPaneURL)); if (pMainViewShell.get() == NULL) @@ -423,7 +423,7 @@ void ViewShellBase::InitializeFramework() OUString ViewShellBase::GetSelectionText(bool bCompleteWords) { - ::boost::shared_ptr<ViewShell> const pMainShell(GetMainViewShell()); + std::shared_ptr<ViewShell> const pMainShell(GetMainViewShell()); DrawViewShell *const pDrawViewShell( dynamic_cast<DrawViewShell*>(pMainShell.get())); return (pDrawViewShell) @@ -433,7 +433,7 @@ OUString ViewShellBase::GetSelectionText(bool bCompleteWords) bool ViewShellBase::HasSelection(bool bText) const { - ::boost::shared_ptr<ViewShell> const pMainShell(GetMainViewShell()); + std::shared_ptr<ViewShell> const pMainShell(GetMainViewShell()); DrawViewShell *const pDrawViewShell( dynamic_cast<DrawViewShell*>(pMainShell.get())); return (pDrawViewShell) @@ -538,8 +538,8 @@ sal_uInt16 ViewShellBase::SetPrinter ( bScaleAll = (aWarnBox->Execute() == RET_YES); } - ::boost::shared_ptr<DrawViewShell> pDrawViewShell ( - ::boost::dynamic_pointer_cast<DrawViewShell>(GetMainViewShell())); + std::shared_ptr<DrawViewShell> pDrawViewShell ( + std::dynamic_pointer_cast<DrawViewShell>(GetMainViewShell())); if (pDrawViewShell) { SdPage* pPage = GetDocument()->GetSdPage( @@ -903,7 +903,7 @@ OUString ViewShellBase::GetInitialViewShellType() return sRequestedView; } -::boost::shared_ptr<tools::EventMultiplexer> ViewShellBase::GetEventMultiplexer() +std::shared_ptr<tools::EventMultiplexer> ViewShellBase::GetEventMultiplexer() { OSL_ASSERT(mpImpl.get()!=NULL); OSL_ASSERT(mpImpl->mpEventMultiplexer.get()!=NULL); @@ -916,7 +916,7 @@ const Rectangle& ViewShellBase::getClientRectangle() const return mpImpl->maClientArea; } -::boost::shared_ptr<ToolBarManager> ViewShellBase::GetToolBarManager() const +std::shared_ptr<ToolBarManager> ViewShellBase::GetToolBarManager() const { OSL_ASSERT(mpImpl.get()!=NULL); OSL_ASSERT(mpImpl->mpToolBarManager.get()!=NULL); @@ -924,7 +924,7 @@ const Rectangle& ViewShellBase::getClientRectangle() const return mpImpl->mpToolBarManager; } -::boost::shared_ptr<FormShellManager> ViewShellBase::GetFormShellManager() const +std::shared_ptr<FormShellManager> ViewShellBase::GetFormShellManager() const { OSL_ASSERT(mpImpl.get()!=NULL); OSL_ASSERT(mpImpl->mpFormShellManager.get()!=NULL); @@ -1041,7 +1041,7 @@ void ViewShellBase::Implementation::ProcessRestoreEditingViewSlot() pFrameView->GetPageKindOnLoad()); pFrameView->SetPageKind( pFrameView->GetPageKindOnLoad()); - ::boost::shared_ptr<FrameworkHelper> pHelper (FrameworkHelper::Instance(mrBase)); + std::shared_ptr<FrameworkHelper> pHelper (FrameworkHelper::Instance(mrBase)); pHelper->RequestView( FrameworkHelper::GetViewURL(pFrameView->GetViewShellTypeOnLoad()), FrameworkHelper::msCenterPaneURL); @@ -1387,7 +1387,7 @@ void FocusForwardingWindow::dispose() void FocusForwardingWindow::KeyInput (const KeyEvent& rKEvt) { - ::boost::shared_ptr<ViewShell> pViewShell = mrBase.GetMainViewShell(); + std::shared_ptr<ViewShell> pViewShell = mrBase.GetMainViewShell(); if (pViewShell.get() != NULL) { vcl::Window* pWindow = pViewShell->GetActiveWindow(); @@ -1404,7 +1404,7 @@ void FocusForwardingWindow::KeyInput (const KeyEvent& rKEvt) void FocusForwardingWindow::Command (const CommandEvent& rEvent) { - ::boost::shared_ptr<ViewShell> pViewShell = mrBase.GetMainViewShell(); + std::shared_ptr<ViewShell> pViewShell = mrBase.GetMainViewShell(); if (pViewShell.get() != NULL) { vcl::Window* pWindow = pViewShell->GetActiveWindow(); diff --git a/sd/source/ui/view/ViewShellImplementation.cxx b/sd/source/ui/view/ViewShellImplementation.cxx index a0c190512df9..970e9db8a05f 100644 --- a/sd/source/ui/view/ViewShellImplementation.cxx +++ b/sd/source/ui/view/ViewShellImplementation.cxx @@ -77,7 +77,7 @@ ViewShell::Implementation::~Implementation() { if ( ! mpUpdateLockForMouse.expired()) { - ::boost::shared_ptr<ToolBarManagerLock> pLock(mpUpdateLockForMouse); + std::shared_ptr<ToolBarManagerLock> pLock(mpUpdateLockForMouse); if (pLock.get() != NULL) { // Force the ToolBarManagerLock to be released even when the @@ -328,11 +328,11 @@ class ViewShell::Implementation::ToolBarManagerLock::Deleter { public: void operator() (ToolBarManagerLock* pObject) { delete pObject; } }; -::boost::shared_ptr<ViewShell::Implementation::ToolBarManagerLock> +std::shared_ptr<ViewShell::Implementation::ToolBarManagerLock> ViewShell::Implementation::ToolBarManagerLock::Create ( - const ::boost::shared_ptr<ToolBarManager>& rpManager) + const std::shared_ptr<ToolBarManager>& rpManager) { - ::boost::shared_ptr<ToolBarManagerLock> pLock ( + std::shared_ptr<ToolBarManagerLock> pLock ( new ViewShell::Implementation::ToolBarManagerLock(rpManager), ViewShell::Implementation::ToolBarManagerLock::Deleter()); pLock->mpSelf = pLock; @@ -340,7 +340,7 @@ class ViewShell::Implementation::ToolBarManagerLock::Deleter { public: } ViewShell::Implementation::ToolBarManagerLock::ToolBarManagerLock ( - const ::boost::shared_ptr<ToolBarManager>& rpManager) + const std::shared_ptr<ToolBarManager>& rpManager) : mpLock(new ToolBarManager::UpdateLock(rpManager)), maTimer() { diff --git a/sd/source/ui/view/drtxtob1.cxx b/sd/source/ui/view/drtxtob1.cxx index fea331f1813f..be7b3fc0cdc4 100644 --- a/sd/source/ui/view/drtxtob1.cxx +++ b/sd/source/ui/view/drtxtob1.cxx @@ -72,7 +72,7 @@ #include "Outliner.hxx" #include "futext.hxx" -#include <boost/scoped_ptr.hpp> +#include <memory> namespace sd { @@ -87,7 +87,7 @@ void TextObjectBar::Execute( SfxRequest &rReq ) sal_uInt16 nSlot = rReq.GetSlot(); OutlinerView* pOLV = mpView->GetTextEditOutlinerView(); - boost::scoped_ptr< OutlineViewModelChangeGuard > aGuard; + std::unique_ptr< OutlineViewModelChangeGuard > aGuard; if (mpView->ISA(OutlineView)) { @@ -154,7 +154,7 @@ void TextObjectBar::Execute( SfxRequest &rReq ) SfxItemSet aTmpSet( pOLV->GetOutliner()->GetParaAttribs( nPara ) ); aAttr.Put( aTmpSet, false ); // sal_False= InvalidItems is not default, handle it as "holes" const SvxULSpaceItem& rItem = static_cast<const SvxULSpaceItem&>( aAttr.Get( EE_PARA_ULSPACE ) ); - boost::scoped_ptr<SvxULSpaceItem> pNewItem(static_cast<SvxULSpaceItem*>(rItem.Clone())); + std::unique_ptr<SvxULSpaceItem> pNewItem(static_cast<SvxULSpaceItem*>(rItem.Clone())); long nUpper = pNewItem->GetUpper(); if( nSlot == SID_PARASPACE_INCREASE ) @@ -195,7 +195,7 @@ void TextObjectBar::Execute( SfxRequest &rReq ) { SfxItemSet aNewAttrs(*(aEditAttr.GetPool()), aEditAttr.GetRanges()); const SvxULSpaceItem& rItem = static_cast<const SvxULSpaceItem&>( aEditAttr.Get( EE_PARA_ULSPACE ) ); - boost::scoped_ptr<SvxULSpaceItem> pNewItem(static_cast<SvxULSpaceItem*>( rItem.Clone() )); + std::unique_ptr<SvxULSpaceItem> pNewItem(static_cast<SvxULSpaceItem*>( rItem.Clone() )); long nUpper = pNewItem->GetUpper(); if( nSlot == SID_PARASPACE_INCREASE ) diff --git a/sd/source/ui/view/drviews2.cxx b/sd/source/ui/view/drviews2.cxx index 103a892d7419..358d3cea0075 100644 --- a/sd/source/ui/view/drviews2.cxx +++ b/sd/source/ui/view/drviews2.cxx @@ -171,7 +171,7 @@ #include <sfx2/sidebar/Sidebar.hxx> #include "ViewShellBase.hxx" -#include <boost/scoped_ptr.hpp> +#include <memory> namespace { const char CustomAnimationPanelId[] = "CustomAnimationPanel"; @@ -427,7 +427,7 @@ void DrawViewShell::FuTemporary(SfxRequest& rReq) SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create(); DBG_ASSERT(pFact, "Dialog creation failed!"); - boost::scoped_ptr<AbstractSvxNameDialog> aNameDlg(pFact->CreateSvxNameDialog( GetActiveWindow(), aPageName, aDescr )); + std::unique_ptr<AbstractSvxNameDialog> aNameDlg(pFact->CreateSvxNameDialog( GetActiveWindow(), aPageName, aDescr )); DBG_ASSERT(aNameDlg, "Dialog creation failed!"); aNameDlg->SetText( aTitle ); aNameDlg->SetCheckNameHdl( LINK( this, DrawViewShell, RenameSlideHdl ), true ); @@ -801,7 +801,7 @@ void DrawViewShell::FuTemporary(SfxRequest& rReq) case SID_SET_DEFAULT: { - boost::scoped_ptr<SfxItemSet> pSet; + std::unique_ptr<SfxItemSet> pSet; if (mpDrawView->IsTextEdit()) { @@ -876,7 +876,7 @@ void DrawViewShell::FuTemporary(SfxRequest& rReq) { std::pair<SfxItemSet*,SdrObjUserCall*> &rAttr = aAttrList[j++]; - boost::scoped_ptr<SfxItemSet> pNewSet(rAttr.first); + std::unique_ptr<SfxItemSet> pNewSet(rAttr.first); SdrObjUserCall* pUserCall = rAttr.second; if ( pNewSet && pNewSet->GetItemState( SDRATTR_TEXT_MINFRAMEHEIGHT ) == SfxItemState::SET ) @@ -1398,7 +1398,7 @@ void DrawViewShell::FuTemporary(SfxRequest& rReq) aNewAttr.Put( SdAttrLayerThisPage() ); SdAbstractDialogFactory* pFact = SdAbstractDialogFactory::Create(); - boost::scoped_ptr<AbstractSdInsertLayerDlg> pDlg(pFact ? pFact->CreateSdInsertLayerDlg(NULL, aNewAttr, true, SD_RESSTR(STR_INSERTLAYER)) : 0); + std::unique_ptr<AbstractSdInsertLayerDlg> pDlg(pFact ? pFact->CreateSdInsertLayerDlg(NULL, aNewAttr, true, SD_RESSTR(STR_INSERTLAYER)) : 0); if( pDlg ) { pDlg->SetHelpId( SD_MOD()->GetSlotPool()->GetSlot( SID_INSERTLAYER )->GetCommand() ); @@ -1566,7 +1566,7 @@ void DrawViewShell::FuTemporary(SfxRequest& rReq) aNewAttr.Put( SdAttrLayerThisPage() ); SdAbstractDialogFactory* pFact = SdAbstractDialogFactory::Create(); - boost::scoped_ptr<AbstractSdInsertLayerDlg> pDlg(pFact ? pFact->CreateSdInsertLayerDlg(NULL, aNewAttr, bDelete, SD_RESSTR(STR_MODIFYLAYER)) : 0); + std::unique_ptr<AbstractSdInsertLayerDlg> pDlg(pFact ? pFact->CreateSdInsertLayerDlg(NULL, aNewAttr, bDelete, SD_RESSTR(STR_MODIFYLAYER)) : 0); if( pDlg ) { pDlg->SetHelpId( SD_MOD()->GetSlotPool()->GetSlot( SID_MODIFYLAYER )->GetCommand() ); @@ -1836,7 +1836,7 @@ void DrawViewShell::FuTemporary(SfxRequest& rReq) case SID_INSERT_FLD_FILE: { sal_uInt16 nMul = 1; - boost::scoped_ptr<SvxFieldItem> pFieldItem; + std::unique_ptr<SvxFieldItem> pFieldItem; switch( nSId ) { @@ -1976,12 +1976,12 @@ void DrawViewShell::FuTemporary(SfxRequest& rReq) { // Dialog... SdAbstractDialogFactory* pFact = SdAbstractDialogFactory::Create(); - boost::scoped_ptr<AbstractSdModifyFieldDlg> pDlg(pFact ? pFact->CreateSdModifyFieldDlg(GetActiveWindow(), pFldItem->GetField(), pOLV->GetAttribs() ) : 0); + std::unique_ptr<AbstractSdModifyFieldDlg> pDlg(pFact ? pFact->CreateSdModifyFieldDlg(GetActiveWindow(), pFldItem->GetField(), pOLV->GetAttribs() ) : 0); if( pDlg && pDlg->Execute() == RET_OK ) { // To make a correct SetAttribs() call at the utlinerView // it is necessary to split the actions here - boost::scoped_ptr<SvxFieldData> pField(pDlg->GetField()); + std::unique_ptr<SvxFieldData> pField(pDlg->GetField()); ESelection aSel = pOLV->GetSelection(); bool bSelectionWasModified(false); @@ -2085,7 +2085,7 @@ void DrawViewShell::FuTemporary(SfxRequest& rReq) SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create(); OSL_ENSURE(pFact, "Dialog creation failed!"); - boost::scoped_ptr<AbstractSvxObjectNameDialog> pDlg(pFact->CreateSvxObjectNameDialog(NULL, aName)); + std::unique_ptr<AbstractSvxObjectNameDialog> pDlg(pFact->CreateSvxObjectNameDialog(NULL, aName)); OSL_ENSURE(pDlg, "Dialog creation failed!"); pDlg->SetCheckNameHdl(LINK(this, DrawViewShell, NameObjectHdl)); @@ -2118,7 +2118,7 @@ void DrawViewShell::FuTemporary(SfxRequest& rReq) SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create(); OSL_ENSURE(pFact, "Dialog creation failed!"); - boost::scoped_ptr<AbstractSvxObjectTitleDescDialog> pDlg(pFact->CreateSvxObjectTitleDescDialog(NULL, aTitle, aDescription)); + std::unique_ptr<AbstractSvxObjectTitleDescDialog> pDlg(pFact->CreateSvxObjectTitleDescDialog(NULL, aTitle, aDescription)); OSL_ENSURE(pDlg, "Dialog creation failed!"); if(RET_OK == pDlg->Execute()) @@ -2366,7 +2366,7 @@ void DrawViewShell::FuTemporary(SfxRequest& rReq) SdAbstractDialogFactory* pFact = SdAbstractDialogFactory::Create(); if( pFact ) { - boost::scoped_ptr<VclAbstractDialog> pDlg(pFact->CreateBreakDlg(GetActiveWindow(), mpDrawView, GetDocSh(), nCount, static_cast<sal_uLong>(nAnz) )); + std::unique_ptr<VclAbstractDialog> pDlg(pFact->CreateBreakDlg(GetActiveWindow(), mpDrawView, GetDocSh(), nCount, static_cast<sal_uLong>(nAnz) )); if( pDlg ) { pDlg->Execute(); @@ -2880,7 +2880,7 @@ void DrawViewShell::FuTemporary(SfxRequest& rReq) case SID_PHOTOALBUM: { SdAbstractDialogFactory* pFact = SdAbstractDialogFactory::Create(); - boost::scoped_ptr<VclAbstractDialog> pDlg(pFact ? pFact->CreateSdPhotoAlbumDialog( + std::unique_ptr<VclAbstractDialog> pDlg(pFact ? pFact->CreateSdPhotoAlbumDialog( GetActiveWindow(), GetDoc()) : 0); diff --git a/sd/source/ui/view/drviews3.cxx b/sd/source/ui/view/drviews3.cxx index f95eacae4b19..a6ec31ef3df4 100644 --- a/sd/source/ui/view/drviews3.cxx +++ b/sd/source/ui/view/drviews3.cxx @@ -84,7 +84,7 @@ #include <com/sun/star/frame/XFrame.hpp> #include <editeng/lspcitem.hxx> #include <editeng/ulspitem.hxx> -#include <boost/scoped_ptr.hpp> +#include <memory> using namespace ::com::sun::star::uno; using namespace ::com::sun::star::drawing::framework; @@ -293,7 +293,7 @@ void DrawViewShell::ExecCtrl(SfxRequest& rReq) case SID_INSERT_DATE_TIME: { SdAbstractDialogFactory* pFact = SdAbstractDialogFactory::Create(); - boost::scoped_ptr<AbstractHeaderFooterDialog> pDlg(pFact ? pFact->CreateHeaderFooterDialog( this, GetActiveWindow(), GetDoc(), mpActualPage ) : 0); + std::unique_ptr<AbstractHeaderFooterDialog> pDlg(pFact ? pFact->CreateHeaderFooterDialog( this, GetActiveWindow(), GetDoc(), mpActualPage ) : 0); if( pDlg ) { pDlg->Execute(); @@ -317,7 +317,7 @@ void DrawViewShell::ExecCtrl(SfxRequest& rReq) pPage = static_cast<SdPage*>(&pPage->TRG_GetMasterPage()); SdAbstractDialogFactory* pFact = SdAbstractDialogFactory::Create(); - boost::scoped_ptr<VclAbstractDialog> pDlg(pFact ? pFact->CreateMasterLayoutDialog( GetActiveWindow(), GetDoc(), pPage ) : 0); + std::unique_ptr<VclAbstractDialog> pDlg(pFact ? pFact->CreateMasterLayoutDialog( GetActiveWindow(), GetDoc(), pPage ) : 0); if( pDlg ) { pDlg->Execute(); diff --git a/sd/source/ui/view/drviews4.cxx b/sd/source/ui/view/drviews4.cxx index 43dab6be0282..5c2210335ffa 100644 --- a/sd/source/ui/view/drviews4.cxx +++ b/sd/source/ui/view/drviews4.cxx @@ -63,7 +63,7 @@ #include <svx/svditer.hxx> #include <navigatr.hxx> -#include <boost/scoped_ptr.hpp> +#include <memory> namespace sd { @@ -563,7 +563,7 @@ void DrawViewShell::Command(const CommandEvent& rCEvt, ::sd::Window* pWin) aMPos = Point( 20, 20 ); aFieldPopup.Execute( pWin, aMPos ); - boost::scoped_ptr<SvxFieldData> pField(aFieldPopup.GetField()); + std::unique_ptr<SvxFieldData> pField(aFieldPopup.GetField()); if( pField ) { SvxFieldItem aFieldItem( *pField, EE_FEATURE_FIELD ); @@ -896,7 +896,7 @@ void DrawViewShell::ShowSnapLineContextMenu ( const Point& rMouseLocation) { const SdrHelpLine& rHelpLine (rPageView.GetHelpLines()[nSnapLineIndex]); - ::boost::scoped_ptr<PopupMenu> pMenu (new PopupMenu ()); + std::unique_ptr<PopupMenu> pMenu (new PopupMenu ()); if (rHelpLine.GetKind() == SDRHELPLINE_POINT) { diff --git a/sd/source/ui/view/drviews5.cxx b/sd/source/ui/view/drviews5.cxx index d42f2aa894d8..0f7ff416f90b 100644 --- a/sd/source/ui/view/drviews5.cxx +++ b/sd/source/ui/view/drviews5.cxx @@ -62,7 +62,7 @@ #include "ViewShellBase.hxx" #include "FormShellManager.hxx" #include "DrawController.hxx" -#include <boost/scoped_ptr.hpp> +#include <memory> namespace sd { diff --git a/sd/source/ui/view/drviews9.cxx b/sd/source/ui/view/drviews9.cxx index 13f80cc720a8..7623e4bbb0c0 100644 --- a/sd/source/ui/view/drviews9.cxx +++ b/sd/source/ui/view/drviews9.cxx @@ -60,7 +60,7 @@ #include <svx/galleryitem.hxx> #include <com/sun/star/gallery/GalleryItemType.hpp> #include <com/sun/star/drawing/LineStyle.hpp> -#include <boost/scoped_ptr.hpp> +#include <memory> using namespace com::sun::star; @@ -202,7 +202,7 @@ void DrawViewShell::AttrExec (SfxRequest &rReq) CheckLineTo (rReq); SfxBindings& rBindings = GetViewFrame()->GetBindings(); - boost::scoped_ptr<SfxItemSet> pAttr(new SfxItemSet ( GetDoc()->GetPool() )); + std::unique_ptr<SfxItemSet> pAttr(new SfxItemSet ( GetDoc()->GetPool() )); GetView()->GetAttributes( *pAttr ); const SfxItemSet* pArgs = rReq.GetArgs(); diff --git a/sd/source/ui/view/drviewsa.cxx b/sd/source/ui/view/drviewsa.cxx index 1c82bbccbb22..e2ff2092d92c 100644 --- a/sd/source/ui/view/drviewsa.cxx +++ b/sd/source/ui/view/drviewsa.cxx @@ -69,7 +69,7 @@ #include "DrawController.hxx" #include <boost/bind.hpp> -#include <boost/scoped_ptr.hpp> +#include <memory> using namespace ::com::sun::star; using namespace ::com::sun::star::uno; @@ -553,7 +553,7 @@ void DrawViewShell::GetStatusBarState(SfxItemSet& rSet) } else { - boost::scoped_ptr<SvxZoomItem> pZoomItem; + std::unique_ptr<SvxZoomItem> pZoomItem; sal_uInt16 nZoom = (sal_uInt16) GetActiveWindow()->GetZoom(); if( mbZoomOnPage ) diff --git a/sd/source/ui/view/drviewsf.cxx b/sd/source/ui/view/drviewsf.cxx index aada4c5cdc37..1e1e322f817d 100644 --- a/sd/source/ui/view/drviewsf.cxx +++ b/sd/source/ui/view/drviewsf.cxx @@ -63,7 +63,7 @@ #include <editeng/adjustitem.hxx> #include <svx/nbdtmgfact.hxx> #include <svx/nbdtmg.hxx> -#include <boost/scoped_ptr.hpp> +#include <memory> using namespace svx::sidebar; using namespace ::com::sun::star; @@ -578,7 +578,7 @@ void DrawViewShell::GetAttrState( SfxItemSet& rSet ) SfxItemSet aNewAttr( GetPool(), EE_ITEMS_START, EE_ITEMS_END ); aNewAttr.Put( aEditAttr, false ); - boost::scoped_ptr<SvxNumRule> pNumRule; + std::unique_ptr<SvxNumRule> pNumRule; const SfxPoolItem* pTmpItem=NULL; sal_uInt16 nNumItemId = SID_ATTR_NUMBERING_RULE; sal_uInt16 nActNumLvl = mpDrawView->GetSelectionLevel(); @@ -676,7 +676,7 @@ void DrawViewShell::GetAttrState( SfxItemSet& rSet ) nWhich = aIter.NextWhich(); } - boost::scoped_ptr<SfxItemSet> pSet; + std::unique_ptr<SfxItemSet> pSet; if( bAttr ) { diff --git a/sd/source/ui/view/outlnvs2.cxx b/sd/source/ui/view/outlnvs2.cxx index 7806b653dfea..a12ac7bb4b38 100644 --- a/sd/source/ui/view/outlnvs2.cxx +++ b/sd/source/ui/view/outlnvs2.cxx @@ -63,7 +63,7 @@ #include "framework/FrameworkHelper.hxx" #include "DrawViewShell.hxx" #include "slideshow.hxx" -#include <boost/scoped_ptr.hpp> +#include <memory> using namespace ::com::sun::star::uno; using namespace ::com::sun::star::presentation; @@ -312,7 +312,7 @@ void OutlineViewShell::FuTemporary(SfxRequest &rReq) case SID_PHOTOALBUM: { SdAbstractDialogFactory* pFact = SdAbstractDialogFactory::Create(); - boost::scoped_ptr<VclAbstractDialog> pDlg(pFact ? pFact->CreateSdPhotoAlbumDialog( + std::unique_ptr<VclAbstractDialog> pDlg(pFact ? pFact->CreateSdPhotoAlbumDialog( GetActiveWindow(), GetDoc()) : 0); @@ -357,7 +357,7 @@ void OutlineViewShell::ShowSlideShow(SfxRequest& rReq) void OutlineViewShell::FuTemporaryModify(SfxRequest &rReq) { sal_uInt16 nSId = rReq.GetSlot(); - boost::scoped_ptr< OutlineViewModelChangeGuard > aGuard; + std::unique_ptr< OutlineViewModelChangeGuard > aGuard; if (nSId != SID_OUTLINE_BULLET && nSId != FN_SVX_SET_BULLET && nSId != FN_SVX_SET_NUMBER) { aGuard.reset( new OutlineViewModelChangeGuard(*pOlView) ); @@ -488,7 +488,7 @@ void OutlineViewShell::FuTemporaryModify(SfxRequest &rReq) case SID_INSERT_FLD_PAGES: case SID_INSERT_FLD_FILE: { - boost::scoped_ptr<SvxFieldItem> pFieldItem; + std::unique_ptr<SvxFieldItem> pFieldItem; switch( nSId ) { @@ -583,10 +583,10 @@ void OutlineViewShell::FuTemporaryModify(SfxRequest &rReq) { // Dialog... SdAbstractDialogFactory* pFact = SdAbstractDialogFactory::Create(); - boost::scoped_ptr<AbstractSdModifyFieldDlg> pDlg(pFact ? pFact->CreateSdModifyFieldDlg(GetActiveWindow(), pFldItem->GetField(), pOutlinerView->GetAttribs() ) : 0); + std::unique_ptr<AbstractSdModifyFieldDlg> pDlg(pFact ? pFact->CreateSdModifyFieldDlg(GetActiveWindow(), pFldItem->GetField(), pOutlinerView->GetAttribs() ) : 0); if( pDlg && (pDlg->Execute() == RET_OK) ) { - boost::scoped_ptr<SvxFieldData> pField(pDlg->GetField()); + std::unique_ptr<SvxFieldData> pField(pDlg->GetField()); if( pField ) { SvxFieldItem aFieldItem( *pField, EE_FEATURE_FIELD ); diff --git a/sd/source/ui/view/outlnvsh.cxx b/sd/source/ui/view/outlnvsh.cxx index a690de1acc08..79f89985d09c 100644 --- a/sd/source/ui/view/outlnvsh.cxx +++ b/sd/source/ui/view/outlnvsh.cxx @@ -86,7 +86,7 @@ #include "DrawController.hxx" #include "framework/FrameworkHelper.hxx" -#include <boost/scoped_ptr.hpp> +#include <memory> using namespace ::com::sun::star; using namespace ::com::sun::star::uno; @@ -425,7 +425,7 @@ void OutlineViewShell::FuSupport(SfxRequest &rReq) bool bPreviewState = false; sal_uLong nSlot = rReq.GetSlot(); - boost::scoped_ptr< OutlineViewModelChangeGuard > aGuard; + std::unique_ptr< OutlineViewModelChangeGuard > aGuard; if( pOlView && ( (nSlot == SID_TRANSLITERATE_SENTENCE_CASE) || (nSlot == SID_TRANSLITERATE_TITLE_CASE) || @@ -1272,7 +1272,7 @@ void OutlineViewShell::GetStatusBarState(SfxItemSet& rSet) { sal_uInt16 nZoom = (sal_uInt16) GetActiveWindow()->GetZoom(); - boost::scoped_ptr<SvxZoomItem> pZoomItem(new SvxZoomItem( SvxZoomType::PERCENT, nZoom )); + std::unique_ptr<SvxZoomItem> pZoomItem(new SvxZoomItem( SvxZoomType::PERCENT, nZoom )); // limit area SvxZoomEnableFlags nZoomValues = SvxZoomEnableFlags::ALL; diff --git a/sd/source/ui/view/sdview.cxx b/sd/source/ui/view/sdview.cxx index 18fbf2e7e68b..675799067e9c 100644 --- a/sd/source/ui/view/sdview.cxx +++ b/sd/source/ui/view/sdview.cxx @@ -93,8 +93,8 @@ #include <basegfx/matrix/b2dhommatrixtools.hxx> #include "DrawController.hxx" +#include <memory> #include <numeric> -#include <boost/scoped_ptr.hpp> using namespace com::sun::star; using namespace com::sun::star::uno; @@ -1268,7 +1268,7 @@ bool View::ShouldToggleOn( return false; bool bToggleOn = false; - boost::scoped_ptr<SdrOutliner> pOutliner(SdrMakeOutliner(OUTLINERMODE_TEXTOBJECT, *pSdrModel)); + std::unique_ptr<SdrOutliner> pOutliner(SdrMakeOutliner(OUTLINERMODE_TEXTOBJECT, *pSdrModel)); const size_t nMarkCount = GetMarkedObjectCount(); for (size_t nIndex = 0; nIndex < nMarkCount && !bToggleOn; ++nIndex) { @@ -1336,8 +1336,8 @@ void View::ChangeMarkedObjectsBulletsNumbering( const bool bToggleOn = ShouldToggleOn( bToggle, bHandleBullets ); - boost::scoped_ptr<SdrOutliner> pOutliner(SdrMakeOutliner(OUTLINERMODE_TEXTOBJECT, *pSdrModel)); - boost::scoped_ptr<OutlinerView> pOutlinerView(new OutlinerView(pOutliner.get(), pWindow)); + std::unique_ptr<SdrOutliner> pOutliner(SdrMakeOutliner(OUTLINERMODE_TEXTOBJECT, *pSdrModel)); + std::unique_ptr<OutlinerView> pOutlinerView(new OutlinerView(pOutliner.get(), pWindow)); const size_t nMarkCount = GetMarkedObjectCount(); for (size_t nIndex = 0; nIndex < nMarkCount; ++nIndex) diff --git a/sd/source/ui/view/sdview2.cxx b/sd/source/ui/view/sdview2.cxx index 7bb04352864f..24bff878d70c 100644 --- a/sd/source/ui/view/sdview2.cxx +++ b/sd/source/ui/view/sdview2.cxx @@ -65,7 +65,7 @@ #include <vcl/svapp.hxx> #include "slideshow.hxx" -#include <boost/scoped_ptr.hpp> +#include <memory> namespace sd { @@ -888,7 +888,7 @@ bool View::GetExchangeList (std::vector<OUString> &rExchangeList, OUString aDesc(SD_RESSTR(STR_DESC_NAMEGROUP)); SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create(); - boost::scoped_ptr<AbstractSvxNameDialog> pDlg; + std::unique_ptr<AbstractSvxNameDialog> pDlg; if (pFact) pDlg.reset(pFact->CreateSvxNameDialog( mpViewSh->GetActiveWindow(), aNewName, aDesc )); diff --git a/sd/source/ui/view/sdview3.cxx b/sd/source/ui/view/sdview3.cxx index f0dd92267b69..d9a4211320fb 100644 --- a/sd/source/ui/view/sdview3.cxx +++ b/sd/source/ui/view/sdview3.cxx @@ -76,7 +76,7 @@ #include <vcl/cvtgrf.hxx> #include <svx/sdrhittesthelper.hxx> #include <svx/xbtmpit.hxx> -#include <boost/scoped_ptr.hpp> +#include <memory> // - Namespaces - @@ -267,7 +267,7 @@ bool View::InsertData( const TransferableDataHelper& rDataHelper, TransferableDataHelper aDataHelper( rDataHelper ); SdrObject* pPickObj = NULL; SdPage* pPage = NULL; - boost::scoped_ptr<ImageMap> pImageMap; + std::unique_ptr<ImageMap> pImageMap; bool bReturn = false; bool bLink = ( ( mnAction & DND_ACTION_LINK ) != 0 ); bool bCopy = ( ( ( mnAction & DND_ACTION_COPY ) != 0 ) || bLink ); @@ -1504,7 +1504,7 @@ bool View::InsertData( const TransferableDataHelper& rDataHelper, bool View::PasteRTFTable( ::tools::SvRef<SotStorageStream> xStm, SdrPage* pPage, SdrInsertFlags nPasteOptions ) { - boost::scoped_ptr<SdDrawDocument> pModel(new SdDrawDocument( DOCUMENT_TYPE_IMPRESS, mpDocSh )); + std::unique_ptr<SdDrawDocument> pModel(new SdDrawDocument( DOCUMENT_TYPE_IMPRESS, mpDocSh )); pModel->NewOrLoadCompleted(NEW_DOC); pModel->GetItemPool().SetDefaultMetric(SFX_MAPUNIT_100TH_MM); pModel->InsertPage(pModel->AllocPage(false)); diff --git a/sd/source/ui/view/viewoverlaymanager.cxx b/sd/source/ui/view/viewoverlaymanager.cxx index 815801549b5b..a48b08db6214 100644 --- a/sd/source/ui/view/viewoverlaymanager.cxx +++ b/sd/source/ui/view/viewoverlaymanager.cxx @@ -488,7 +488,7 @@ bool ViewOverlayManager::CreateTags() { bool bChanges = false; - ::boost::shared_ptr<ViewShell> aMainShell = mrBase.GetMainViewShell(); + std::shared_ptr<ViewShell> aMainShell = mrBase.GetMainViewShell(); SdPage* pPage = aMainShell.get() ? aMainShell->getCurrentPage() : NULL; diff --git a/sd/source/ui/view/viewshel.cxx b/sd/source/ui/view/viewshel.cxx index dc49a6b508cd..c060272f5e4d 100644 --- a/sd/source/ui/view/viewshel.cxx +++ b/sd/source/ui/view/viewshel.cxx @@ -635,7 +635,7 @@ void ViewShell::MouseMove(const MouseEvent& rMEvt, ::sd::Window* pWin) { if ( ! mpImpl->mpUpdateLockForMouse.expired()) { - ::boost::shared_ptr<ViewShell::Implementation::ToolBarManagerLock> pLock( + std::shared_ptr<ViewShell::Implementation::ToolBarManagerLock> pLock( mpImpl->mpUpdateLockForMouse); if (pLock.get() != NULL) pLock->Release(); @@ -683,7 +683,7 @@ void ViewShell::MouseButtonUp(const MouseEvent& rMEvt, ::sd::Window* pWin) if ( ! mpImpl->mpUpdateLockForMouse.expired()) { - ::boost::shared_ptr<ViewShell::Implementation::ToolBarManagerLock> pLock( + std::shared_ptr<ViewShell::Implementation::ToolBarManagerLock> pLock( mpImpl->mpUpdateLockForMouse); if (pLock.get() != NULL) pLock->Release(); |