diff options
-rw-r--r-- | codemaker/source/cppumaker/cpputype.cxx | 10 | ||||
-rw-r--r-- | codemaker/source/cppumaker/dependencies.hxx | 6 | ||||
-rw-r--r-- | cppu/qa/test_any.cxx | 6 | ||||
-rw-r--r-- | cppu/qa/test_reference.cxx | 6 | ||||
-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 |
8 files changed, 67 insertions, 29 deletions
diff --git a/codemaker/source/cppumaker/cpputype.cxx b/codemaker/source/cppumaker/cpputype.cxx index 718940596f6f..0c7be86ea24d 100644 --- a/codemaker/source/cppumaker/cpputype.cxx +++ b/codemaker/source/cppumaker/cpputype.cxx @@ -26,7 +26,6 @@ #include <vector> #include <iostream> -#include "boost/noncopyable.hpp" #include "rtl/alloc.h" #include "rtl/ref.hxx" #include "rtl/ustrbuf.hxx" @@ -146,13 +145,16 @@ bool isBootstrapType(OUString const & name) { return false; } -class CppuType: private boost::noncopyable { +class CppuType { public: CppuType( OUString const & name, rtl::Reference< TypeManager > const & typeMgr); virtual ~CppuType() {} + CppuType(const CppuType&) = delete; + const CppuType& operator=(const CppuType&) = delete; + void dump(CppuOptions const & options); bool dumpFile( @@ -1030,12 +1032,14 @@ void dumpDeprecation(FileStream & out, bool deprecated) { } } -class BaseOffset: private boost::noncopyable { +class BaseOffset { public: BaseOffset( rtl::Reference< TypeManager > const & manager, rtl::Reference< unoidl::InterfaceTypeEntity > const & entity): manager_(manager), offset_(0) { calculateBases(entity); } + BaseOffset(const BaseOffset&) = delete; + const BaseOffset& operator=(const BaseOffset&) = delete; sal_Int32 get() const { return offset_; } diff --git a/codemaker/source/cppumaker/dependencies.hxx b/codemaker/source/cppumaker/dependencies.hxx index afd902bdd491..e1513a3250cc 100644 --- a/codemaker/source/cppumaker/dependencies.hxx +++ b/codemaker/source/cppumaker/dependencies.hxx @@ -24,7 +24,6 @@ #include <map> -#include "boost/noncopyable.hpp" #include "rtl/ref.hxx" namespace rtl { class OUString; } @@ -39,7 +38,7 @@ namespace codemaker { namespace cppumaker { <p>This class is not multi-thread–safe.</p> */ -class Dependencies: private boost::noncopyable { +class Dependencies { public: /** Flags to distinguish whether or not one entity depends on another entity @@ -66,6 +65,9 @@ public: ~Dependencies(); + Dependencies(const Dependencies&) = delete; + const Dependencies& operator=(const Dependencies&) = delete; + Map const & getMap() const { return m_map; } bool hasBooleanDependency() const { return m_booleanDependency; } diff --git a/cppu/qa/test_any.cxx b/cppu/qa/test_any.cxx index 4fdd4a485edc..e173b1072f39 100644 --- a/cppu/qa/test_any.cxx +++ b/cppu/qa/test_any.cxx @@ -43,7 +43,6 @@ #include "Struct2.hpp" #include "Struct2a.hpp" #include "Struct2b.hpp" -#include "boost/noncopyable.hpp" #include "boost/type_traits/is_same.hpp" #include "com/sun/star/uno/Any.hxx" #include "com/sun/star/uno/Reference.hxx" @@ -59,10 +58,13 @@ namespace { -class Base: private boost::noncopyable { +class Base { public: Base(): m_count(0) {} + Base(const Base&) = delete; + const Base& operator=(const Base&) = delete; + void acquire() { if (osl_atomic_increment(&m_count) == SAL_MAX_INT32) { abort(); diff --git a/cppu/qa/test_reference.cxx b/cppu/qa/test_reference.cxx index 018776614166..c04b8b1e010f 100644 --- a/cppu/qa/test_reference.cxx +++ b/cppu/qa/test_reference.cxx @@ -19,7 +19,6 @@ #include <sal/types.h> -#include <boost/noncopyable.hpp> #include <cppunit/TestSuite.h> #include <cppunit/TestFixture.h> #include <cppunit/TestCase.h> @@ -39,7 +38,7 @@ using ::com::sun::star::uno::Reference; using ::com::sun::star::uno::RuntimeException; using ::com::sun::star::uno::UNO_SET_THROW; -class Foo: public Interface1, private boost::noncopyable +class Foo: public Interface1 { public: Foo() @@ -47,6 +46,9 @@ public: { } + Foo(const Foo&) = delete; + const Foo& operator=(const Foo&) = delete; + virtual Any SAL_CALL queryInterface(const Type & _type) throw (RuntimeException, std::exception) override { 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; |