diff options
author | Caolán McNamara <caolanm@redhat.com> | 2015-09-18 09:09:12 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2015-09-23 11:19:17 +0000 |
commit | 177ea7a2818ee64de3eaa9b587d70fe461468005 (patch) | |
tree | 60d3838c3f7daff05fc94e4bf2d7c83b2c013041 /sd/source/ui/slidesorter | |
parent | a44e03b5d7822d026a3b2fbaf039522f085defed (diff) |
boost::shared_ptr->std::shared_ptr
Change-Id: I2c6ac98f0984534894759cfbf4449eb554801cf8
Reviewed-on: https://gerrit.libreoffice.org/18678
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'sd/source/ui/slidesorter')
62 files changed, 269 insertions, 277 deletions
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..30452196b4b5 100644 --- a/sd/source/ui/slidesorter/cache/SlsBitmapCache.hxx +++ b/sd/source/ui/slidesorter/cache/SlsBitmapCache.hxx @@ -24,7 +24,7 @@ class SdrPage; #include <vcl/bitmapex.hxx> #include <osl/mutex.hxx> -#include <boost/shared_ptr.hpp> +#include <memory> #include <boost/scoped_ptr.hpp> namespace sd { namespace slidesorter { namespace cache { @@ -170,7 +170,7 @@ public: */ void Compress ( const CacheKey& rKey, - const ::boost::shared_ptr<BitmapCompressor>& rpCompressor); + const std::shared_ptr<BitmapCompressor>& rpCompressor); private: mutable ::osl::Mutex maMutex; 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..1bdafdd6a15a 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,7 +128,7 @@ public: void Resume(); private: - ::boost::shared_ptr<BitmapCache> mpBitmapCache; + std::shared_ptr<BitmapCache> mpBitmapCache; RequestQueue maRequestQueue; 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..13f1b8fc19ce 100644 --- a/sd/source/ui/slidesorter/cache/SlsRequestQueue.hxx +++ b/sd/source/ui/slidesorter/cache/SlsRequestQueue.hxx @@ -27,6 +27,7 @@ #include <osl/mutex.hxx> #include <svx/sdrpageuser.hxx> +#include <memory> #include <boost/scoped_ptr.hpp> diff --git a/sd/source/ui/slidesorter/controller/SlideSorterController.cxx b/sd/source/ui/slidesorter/controller/SlideSorterController.cxx index 845f4b8ba075..c716c641ec5b 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(); 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..8fb9de6564d3 100644 --- a/sd/source/ui/slidesorter/controller/SlsSelectionFunction.cxx +++ b/sd/source/ui/slidesorter/controller/SlsSelectionFunction.cxx @@ -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..fada1c12b6b0 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; @@ -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 ( 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..df62ffd53bf6 100644 --- a/sd/source/ui/slidesorter/inc/cache/SlsPageCache.hxx +++ b/sd/source/ui/slidesorter/inc/cache/SlsPageCache.hxx @@ -22,8 +22,9 @@ #include "cache/SlsCacheContext.hxx" #include <sal/types.h> -#include <boost/scoped_ptr.hpp> #include <vcl/bitmap.hxx> +#include <memory> +#include <boost/scoped_ptr.hpp> class Size; 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 2127793e703b..2cc53a382d37 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. @@ -216,7 +216,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; @@ -229,13 +229,13 @@ private: view::SlideSorterView& mrView; ::boost::scoped_ptr<PageSelector> mpPageSelector; ::boost::scoped_ptr<FocusManager> mpFocusManager; - ::boost::shared_ptr<SlotManager> mpSlotManager; + std::shared_ptr<SlotManager> mpSlotManager; ::boost::scoped_ptr<ScrollBarManager> mpScrollBarManager; - mutable ::boost::shared_ptr<CurrentSlideManager> mpCurrentSlideManager; - ::boost::shared_ptr<SelectionManager> mpSelectionManager; + mutable std::shared_ptr<CurrentSlideManager> mpCurrentSlideManager; + std::shared_ptr<SelectionManager> mpSelectionManager; ::boost::scoped_ptr<controller::Clipboard> mpClipboard; - ::boost::shared_ptr<InsertionIndicatorHandler> mpInsertionIndicatorHandler; - ::boost::shared_ptr<Animator> mpAnimator; + std::shared_ptr<InsertionIndicatorHandler> mpInsertionIndicatorHandler; + std::shared_ptr<Animator> mpAnimator; ::boost::scoped_ptr<VisibleAreaManager> mpVisibleAreaManager; // The listener listens to UNO events and thus is a UNO object. diff --git a/sd/source/ui/slidesorter/inc/controller/SlsAnimator.hxx b/sd/source/ui/slidesorter/inc/controller/SlsAnimator.hxx index 09135d9738b0..6f9fc40907bd 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,7 +97,7 @@ 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; 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 9c9404120fc6..9fc424b962c8 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; @@ -136,7 +136,7 @@ private: class PageInsertionListener; ::boost::scoped_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..774bc0d2fe77 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,17 +218,17 @@ 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; 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..1cd1db78be82 100644 --- a/sd/source/ui/slidesorter/inc/view/SlsInsertionIndicatorOverlay.hxx +++ b/sd/source/ui/slidesorter/inc/view/SlsInsertionIndicatorOverlay.hxx @@ -27,8 +27,8 @@ #include <tools/gen.hxx> #include <vcl/bitmapex.hxx> +#include <memory> #include <boost/scoped_ptr.hpp> -#include <boost/enable_shared_from_this.hpp> #include <vector> class OutputDevice; @@ -50,7 +50,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); diff --git a/sd/source/ui/slidesorter/inc/view/SlsLayouter.hxx b/sd/source/ui/slidesorter/inc/view/SlsLayouter.hxx index 15068205a5f4..f5c5565d1326 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 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..6d08ac7babea 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,10 +70,10 @@ 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; + std::shared_ptr<cache::PageCache> mpCache; + std::shared_ptr<controller::Properties> mpProperties; + std::shared_ptr<view::Theme> mpTheme; + std::shared_ptr<vcl::Font> mpPageNumberFont; ::boost::scoped_ptr<FramePainter> mpShadowPainter; ::boost::scoped_ptr<FramePainter> mpFocusBorderPainter; Bitmap maNormalBackground; 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 91db811d6baf..61769a0ca626 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..c29b28f7bb32 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,7 +180,7 @@ 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; diff --git a/sd/source/ui/slidesorter/shell/SlideSorterViewShell.cxx b/sd/source/ui/slidesorter/shell/SlideSorterViewShell.cxx index 6e82689c5aaa..ca2e0583bee3 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 697b8d478b46..c7124188487d 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..de7f06eb4f57 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: 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 a2c8e4643eba..49fa50983d69 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; |