diff options
Diffstat (limited to 'cppuhelper/source')
-rw-r--r-- | cppuhelper/source/servicemanager.cxx | 24 | ||||
-rw-r--r-- | cppuhelper/source/servicemanager.hxx | 23 | ||||
-rw-r--r-- | cppuhelper/source/typemanager.cxx | 6 | ||||
-rw-r--r-- | cppuhelper/source/weak.cxx | 15 |
4 files changed, 48 insertions, 20 deletions
diff --git a/cppuhelper/source/servicemanager.cxx b/cppuhelper/source/servicemanager.cxx index fe761fe9689f..cd4d817db7bb 100644 --- a/cppuhelper/source/servicemanager.cxx +++ b/cppuhelper/source/servicemanager.cxx @@ -13,7 +13,6 @@ #include <cassert> #include <vector> -#include <boost/noncopyable.hpp> #include <com/sun/star/beans/NamedValue.hpp> #include <com/sun/star/beans/PropertyAttribute.hpp> #include <com/sun/star/container/ElementExistException.hpp> @@ -105,13 +104,16 @@ void removeFromImplementationMap( // For simplicity, this code keeps throwing // css::registry::InvalidRegistryException for invalid XML rdbs (even though // that does not fit the exception's name): -class Parser: private boost::noncopyable { +class Parser { public: Parser( rtl::OUString const & uri, css::uno::Reference< css::uno::XComponentContext > const & alienContext, cppuhelper::ServiceManager::Data * data); + Parser(const Parser&) = delete; + const Parser& operator=(const Parser&) = delete; + private: void handleComponent(); @@ -438,13 +440,15 @@ rtl::OUString Parser::getNameAttribute() { } class ContentEnumeration: - public cppu::WeakImplHelper1< css::container::XEnumeration >, - private boost::noncopyable + public cppu::WeakImplHelper1< css::container::XEnumeration > { public: explicit ContentEnumeration(std::vector< css::uno::Any > const & factories): factories_(factories), iterator_(factories_.begin()) {} + ContentEnumeration(const ContentEnumeration&) = delete; + const ContentEnumeration& operator=(const ContentEnumeration&) = delete; + private: virtual ~ContentEnumeration() {} @@ -490,8 +494,7 @@ css::beans::Property getDefaultContextProperty() { } class SingletonFactory: - public cppu::WeakImplHelper1<css::lang::XSingleComponentFactory>, - private boost::noncopyable + public cppu::WeakImplHelper1<css::lang::XSingleComponentFactory> { public: SingletonFactory( @@ -502,6 +505,9 @@ public: manager_(manager), implementation_(implementation) { assert(manager.is()); assert(implementation.get() != nullptr); } + SingletonFactory(const SingletonFactory&) = delete; + const SingletonFactory& operator=(const SingletonFactory&) = delete; + private: virtual ~SingletonFactory() {} @@ -544,8 +550,7 @@ SingletonFactory::createInstanceWithArgumentsAndContext( class ImplementationWrapper: public cppu::WeakImplHelper3< css::lang::XSingleComponentFactory, css::lang::XSingleServiceFactory, - css::lang::XServiceInfo >, - private boost::noncopyable + css::lang::XServiceInfo > { public: ImplementationWrapper( @@ -556,6 +561,9 @@ public: manager_(manager), implementation_(implementation) { assert(manager.is()); assert(implementation.get() != nullptr); } + ImplementationWrapper(const ImplementationWrapper&) = delete; + const ImplementationWrapper& operator=(const ImplementationWrapper&) = delete; + private: virtual ~ImplementationWrapper() {} diff --git a/cppuhelper/source/servicemanager.hxx b/cppuhelper/source/servicemanager.hxx index 9a01006e8f27..1b9cfdb02449 100644 --- a/cppuhelper/source/servicemanager.hxx +++ b/cppuhelper/source/servicemanager.hxx @@ -17,7 +17,6 @@ #include <memory> #include <vector> -#include <boost/noncopyable.hpp> #include <com/sun/star/beans/XPropertySet.hpp> #include <com/sun/star/beans/XPropertySetInfo.hpp> #include <com/sun/star/container/XContentEnumerationAccess.hpp> @@ -60,12 +59,15 @@ typedef cppu::WeakComponentImplHelper< ServiceManagerBase; class ServiceManager: - private cppu::BaseMutex, public ServiceManagerBase, - private boost::noncopyable + private cppu::BaseMutex, public ServiceManagerBase { public: - struct Data: private boost::noncopyable { - struct ImplementationInfo: private boost::noncopyable { + struct Data { + Data() = default; + Data(const Data&) = delete; + const Data& operator=(const Data&) = delete; + + struct ImplementationInfo { ImplementationInfo( rtl::OUString const & theName, rtl::OUString const & theLoader, rtl::OUString const & theUri, @@ -84,6 +86,9 @@ public: explicit ImplementationInfo(rtl::OUString const & theName): name(theName) {} + ImplementationInfo(const ImplementationInfo&) = delete; + const ImplementationInfo& operator=(const ImplementationInfo&) = delete; + rtl::OUString const name; rtl::OUString const loader; rtl::OUString const uri; @@ -97,7 +102,7 @@ public: std::vector< rtl::OUString > singletons; }; - struct Implementation: private boost::noncopyable { + struct Implementation { Implementation( rtl::OUString const & name, rtl::OUString const & loader, rtl::OUString const & uri, rtl::OUString const & environment, @@ -126,6 +131,9 @@ public: component(theComponent), status(STATUS_LOADED), dispose(true) { assert(theFactory1.is() || theFactory2.is()); } + Implementation(const Implementation&) = delete; + const Implementation& operator=(const Implementation&) = delete; + css::uno::Reference<css::uno::XInterface> createInstance( css::uno::Reference<css::uno::XComponentContext> const & context, @@ -180,6 +188,9 @@ public: ServiceManager(): ServiceManagerBase(m_aMutex) {} + ServiceManager(const ServiceManager&) = delete; + const ServiceManager& operator=(const ServiceManager&) = delete; + using ServiceManagerBase::acquire; using ServiceManagerBase::release; diff --git a/cppuhelper/source/typemanager.cxx b/cppuhelper/source/typemanager.cxx index 12a88dc2006a..85ed6dc96c78 100644 --- a/cppuhelper/source/typemanager.cxx +++ b/cppuhelper/source/typemanager.cxx @@ -17,7 +17,6 @@ #include <stack> #include <vector> -#include <boost/noncopyable.hpp> #include <com/sun/star/container/ElementExistException.hpp> #include <com/sun/star/container/NoSuchElementException.hpp> #include <com/sun/star/lang/IllegalArgumentException.hpp> @@ -845,12 +844,15 @@ MethodDescription::getExceptions() throw (css::uno::RuntimeException, std::excep return s; } -class BaseOffset: private boost::noncopyable { +class BaseOffset { public: explicit BaseOffset( css::uno::Reference< css::reflection::XInterfaceTypeDescription2 > const & description); + BaseOffset(const BaseOffset&) = delete; + const BaseOffset& operator=(const BaseOffset&) = delete; + sal_Int32 get() const { return offset_; } private: diff --git a/cppuhelper/source/weak.cxx b/cppuhelper/source/weak.cxx index 1b30df65c095..aa940affa26d 100644 --- a/cppuhelper/source/weak.cxx +++ b/cppuhelper/source/weak.cxx @@ -19,7 +19,6 @@ #include <sal/config.h> -#include <boost/noncopyable.hpp> #include <osl/mutex.hxx> #include <cppuhelper/weakagg.hxx> #include <cppuhelper/interfacecontainer.hxx> @@ -45,7 +44,7 @@ inline static Mutex & getWeakMutex() //-- OWeakConnectionPoint ---------------------------------------------------- -class OWeakConnectionPoint: public XAdapter, private boost::noncopyable +class OWeakConnectionPoint: public XAdapter { public: /** @@ -55,7 +54,11 @@ public: : m_aRefCount( 0 ) , m_pObject(pObj) , m_aReferences( getWeakMutex() ) - {} + {} + + // noncopyable + OWeakConnectionPoint(const OWeakConnectionPoint&) = delete; + const OWeakConnectionPoint& operator=(const OWeakConnectionPoint&) = delete; // XInterface Any SAL_CALL queryInterface( const Type & rType ) throw(css::uno::RuntimeException, std::exception) override; @@ -315,12 +318,16 @@ namespace uno //-- OWeakRefListener ----------------------------------------------------- -class OWeakRefListener: public XReference, private boost::noncopyable +class OWeakRefListener: public XReference { public: explicit OWeakRefListener(const Reference< XInterface >& xInt); virtual ~OWeakRefListener(); + // noncopyable + OWeakRefListener(const OWeakRefListener&) = delete; + const OWeakRefListener& operator=(const OWeakRefListener&) = delete; + // XInterface Any SAL_CALL queryInterface( const Type & rType ) throw(RuntimeException, std::exception) override; void SAL_CALL acquire() throw() override; |