boost::noncopyable->'= delete'

Change-Id: If0f898a1e912fcd2095d8ba88b2b8046596e16ea
This commit is contained in:
Caolán McNamara
2015-02-15 20:54:22 +00:00
parent a1ceacc17e
commit 01a8bda416
54 changed files with 213 additions and 156 deletions

View File

@@ -9,8 +9,6 @@
$(eval $(call gb_CppunitTest_CppunitTest,binaryurp_test-cache)) $(eval $(call gb_CppunitTest_CppunitTest,binaryurp_test-cache))
$(eval $(call gb_CppunitTest_use_external,binaryurp_test-cache,boost_headers))
$(eval $(call gb_CppunitTest_use_libraries,binaryurp_test-cache,\ $(eval $(call gb_CppunitTest_use_libraries,binaryurp_test-cache,\
sal \ sal \
$(gb_UWINAPI) \ $(gb_UWINAPI) \

View File

@@ -9,8 +9,6 @@
$(eval $(call gb_CppunitTest_CppunitTest,binaryurp_test-unmarshal)) $(eval $(call gb_CppunitTest_CppunitTest,binaryurp_test-unmarshal))
$(eval $(call gb_CppunitTest_use_external,binaryurp_test-unmarshal,boost_headers))
$(eval $(call gb_CppunitTest_use_libraries,binaryurp_test-unmarshal,\ $(eval $(call gb_CppunitTest_use_libraries,binaryurp_test-unmarshal,\
cppu \ cppu \
cppuhelper \ cppuhelper \

View File

@@ -13,8 +13,6 @@ $(eval $(call gb_Library_set_componentfile,binaryurp,binaryurp/source/binaryurp)
$(eval $(call gb_Library_use_udk_api,binaryurp)) $(eval $(call gb_Library_use_udk_api,binaryurp))
$(eval $(call gb_Library_use_external,binaryurp,boost_headers))
$(eval $(call gb_Library_use_libraries,binaryurp,\ $(eval $(call gb_Library_use_libraries,binaryurp,\
cppu \ cppu \
cppuhelper \ cppuhelper \

View File

@@ -26,7 +26,6 @@
#include <memory> #include <memory>
#include <vector> #include <vector>
#include "boost/noncopyable.hpp"
#include "com/sun/star/bridge/InvalidProtocolChangeException.hpp" #include "com/sun/star/bridge/InvalidProtocolChangeException.hpp"
#include "com/sun/star/bridge/XBridge.hpp" #include "com/sun/star/bridge/XBridge.hpp"
#include "com/sun/star/bridge/XInstanceProvider.hpp" #include "com/sun/star/bridge/XInstanceProvider.hpp"
@@ -99,7 +98,7 @@ bool isThread(salhelper::Thread * thread) {
return osl::Thread::getCurrentIdentifier() == thread->getIdentifier(); return osl::Thread::getCurrentIdentifier() == thread->getIdentifier();
} }
class AttachThread: private boost::noncopyable { class AttachThread {
public: public:
explicit AttachThread(uno_ThreadPool threadPool); explicit AttachThread(uno_ThreadPool threadPool);
@@ -108,6 +107,9 @@ public:
rtl::ByteSequence getTid() throw () { return tid_;} rtl::ByteSequence getTid() throw () { return tid_;}
private: private:
AttachThread(const AttachThread&) SAL_DELETED_FUNCTION;
AttachThread& operator=(const AttachThread&) SAL_DELETED_FUNCTION;
uno_ThreadPool threadPool_; uno_ThreadPool threadPool_;
rtl::ByteSequence tid_; rtl::ByteSequence tid_;
}; };
@@ -125,7 +127,7 @@ AttachThread::~AttachThread() {
} }
class PopOutgoingRequest: private boost::noncopyable { class PopOutgoingRequest {
public: public:
PopOutgoingRequest( PopOutgoingRequest(
OutgoingRequests & requests, rtl::ByteSequence const & tid, OutgoingRequests & requests, rtl::ByteSequence const & tid,
@@ -136,6 +138,9 @@ public:
void clear(); void clear();
private: private:
PopOutgoingRequest(const PopOutgoingRequest&) SAL_DELETED_FUNCTION;
PopOutgoingRequest& operator=(const PopOutgoingRequest&) SAL_DELETED_FUNCTION;
OutgoingRequests & requests_; OutgoingRequests & requests_;
rtl::ByteSequence tid_; rtl::ByteSequence tid_;
bool cleared_; bool cleared_;

View File

@@ -27,7 +27,6 @@
#include <map> #include <map>
#include <vector> #include <vector>
#include "boost/noncopyable.hpp"
#include "com/sun/star/bridge/XBridge.hpp" #include "com/sun/star/bridge/XBridge.hpp"
#include "com/sun/star/lang/XComponent.hpp" #include "com/sun/star/lang/XComponent.hpp"
#include "com/sun/star/uno/Reference.hxx" #include "com/sun/star/uno/Reference.hxx"
@@ -69,8 +68,7 @@ namespace binaryurp {
class Bridge: class Bridge:
public cppu::WeakImplHelper2< public cppu::WeakImplHelper2<
com::sun::star::bridge::XBridge, com::sun::star::lang::XComponent >, com::sun::star::bridge::XBridge, com::sun::star::lang::XComponent >
private boost::noncopyable
{ {
public: public:
Bridge( Bridge(
@@ -171,6 +169,9 @@ public:
bool isCurrentContextMode(); bool isCurrentContextMode();
private: private:
Bridge(const Bridge&) SAL_DELETED_FUNCTION;
Bridge& operator=(const Bridge&) SAL_DELETED_FUNCTION;
virtual ~Bridge(); virtual ~Bridge();
virtual com::sun::star::uno::Reference< com::sun::star::uno::XInterface > virtual com::sun::star::uno::Reference< com::sun::star::uno::XInterface >

View File

@@ -26,7 +26,6 @@
#include <list> #include <list>
#include <map> #include <map>
#include "boost/noncopyable.hpp"
#include "com/sun/star/bridge/XBridgeFactory2.hpp" #include "com/sun/star/bridge/XBridgeFactory2.hpp"
#include "com/sun/star/lang/XServiceInfo.hpp" #include "com/sun/star/lang/XServiceInfo.hpp"
#include "com/sun/star/uno/Exception.hpp" #include "com/sun/star/uno/Exception.hpp"
@@ -55,9 +54,7 @@ typedef
com::sun::star::bridge::XBridgeFactory2 > com::sun::star::bridge::XBridgeFactory2 >
BridgeFactoryBase; BridgeFactoryBase;
class BridgeFactory: class BridgeFactory : private cppu::BaseMutex, public BridgeFactoryBase
private cppu::BaseMutex, public BridgeFactoryBase,
private boost::noncopyable
{ {
public: public:
static com::sun::star::uno::Reference< com::sun::star::uno::XInterface > static com::sun::star::uno::Reference< com::sun::star::uno::XInterface >
@@ -78,6 +75,9 @@ public:
using BridgeFactoryBase::release; using BridgeFactoryBase::release;
private: private:
BridgeFactory(const BridgeFactory&) SAL_DELETED_FUNCTION;
BridgeFactory& operator=(const BridgeFactory&) SAL_DELETED_FUNCTION;
explicit BridgeFactory( explicit BridgeFactory(
com::sun::star::uno::Reference< com::sun::star::uno::XComponentContext > com::sun::star::uno::Reference< com::sun::star::uno::XComponentContext >
const & context); const & context);

View File

@@ -27,7 +27,6 @@
#include <map> #include <map>
#include <list> #include <list>
#include "boost/noncopyable.hpp"
#include "sal/types.h" #include "sal/types.h"
namespace binaryurp { namespace binaryurp {
@@ -38,7 +37,7 @@ enum { size = 256, ignore = 0xFFFF };
} }
template< typename T > class Cache : private boost::noncopyable { template< typename T > class Cache {
public: public:
typedef sal_uInt16 IdxType; typedef sal_uInt16 IdxType;
@@ -81,6 +80,9 @@ public:
} }
private: private:
Cache(const Cache&) SAL_DELETED_FUNCTION;
Cache& operator=(const Cache&) SAL_DELETED_FUNCTION;
typedef std::list<T> LruList; // last recently used list typedef std::list<T> LruList; // last recently used list
typedef typename LruList::iterator LruListIt; typedef typename LruList::iterator LruListIt;
struct CmpT{ bool operator()( const LruListIt& rA, const LruListIt& rB) const { return (*rA<*rB);}}; struct CmpT{ bool operator()( const LruListIt& rA, const LruListIt& rB) const { return (*rA<*rB);}};

View File

@@ -24,13 +24,15 @@
#include <vector> #include <vector>
#include "boost/noncopyable.hpp"
#include "binaryany.hxx" #include "binaryany.hxx"
namespace binaryurp { namespace binaryurp {
struct IncomingReply: private boost::noncopyable { struct IncomingReply {
private:
IncomingReply(const IncomingReply&) SAL_DELETED_FUNCTION;
IncomingReply& operator=(const IncomingReply&) SAL_DELETED_FUNCTION;
public:
IncomingReply( IncomingReply(
bool theException, BinaryAny const & theReturnValue, bool theException, BinaryAny const & theReturnValue,
std::vector< BinaryAny > const & theOutArguments): std::vector< BinaryAny > const & theOutArguments):

View File

@@ -22,7 +22,6 @@
#include <list> #include <list>
#include <vector> #include <vector>
#include "boost/noncopyable.hpp"
#include "com/sun/star/bridge/XInstanceProvider.hpp" #include "com/sun/star/bridge/XInstanceProvider.hpp"
#include "cppuhelper/exc_hlp.hxx" #include "cppuhelper/exc_hlp.hxx"
#include "rtl/byteseq.hxx" #include "rtl/byteseq.hxx"

View File

@@ -24,7 +24,6 @@
#include <vector> #include <vector>
#include "boost/noncopyable.hpp"
#include "rtl/byteseq.hxx" #include "rtl/byteseq.hxx"
#include "rtl/ref.hxx" #include "rtl/ref.hxx"
#include "rtl/ustring.hxx" #include "rtl/ustring.hxx"
@@ -39,7 +38,10 @@ namespace binaryurp {
namespace binaryurp { namespace binaryurp {
class IncomingRequest: private boost::noncopyable { class IncomingRequest {
private:
IncomingRequest(const IncomingRequest&) SAL_DELETED_FUNCTION;
IncomingRequest& operator=(const IncomingRequest&) SAL_DELETED_FUNCTION;
public: public:
IncomingRequest( IncomingRequest(
rtl::Reference< Bridge > const & bridge, rtl::ByteSequence const & tid, rtl::Reference< Bridge > const & bridge, rtl::ByteSequence const & tid,

View File

@@ -22,7 +22,6 @@
#include <cassert> #include <cassert>
#include <vector> #include <vector>
#include "boost/noncopyable.hpp"
#include "com/sun/star/uno/Reference.hxx" #include "com/sun/star/uno/Reference.hxx"
#include "com/sun/star/uno/RuntimeException.hpp" #include "com/sun/star/uno/RuntimeException.hpp"
#include "com/sun/star/uno/Sequence.hxx" #include "com/sun/star/uno/Sequence.hxx"

View File

@@ -24,7 +24,6 @@
#include <vector> #include <vector>
#include "boost/noncopyable.hpp"
#include "rtl/byteseq.hxx" #include "rtl/byteseq.hxx"
#include "rtl/ref.hxx" #include "rtl/ref.hxx"
#include "rtl/ustring.hxx" #include "rtl/ustring.hxx"
@@ -39,7 +38,7 @@ namespace binaryurp {
namespace binaryurp { namespace binaryurp {
class Marshal: private boost::noncopyable { class Marshal {
public: public:
Marshal(rtl::Reference< Bridge > const & bridge, WriterState & state); Marshal(rtl::Reference< Bridge > const & bridge, WriterState & state);
@@ -69,6 +68,9 @@ public:
std::vector< unsigned char > * buffer, rtl::ByteSequence const & tid); std::vector< unsigned char > * buffer, rtl::ByteSequence const & tid);
private: private:
Marshal(const Marshal&) SAL_DELETED_FUNCTION;
Marshal& operator=(const Marshal&) SAL_DELETED_FUNCTION;
void writeValue( void writeValue(
std::vector< unsigned char > * buffer, std::vector< unsigned char > * buffer,
com::sun::star::uno::TypeDescription const & type, void const * value); com::sun::star::uno::TypeDescription const & type, void const * value);

View File

@@ -25,7 +25,6 @@
#include <map> #include <map>
#include <vector> #include <vector>
#include "boost/noncopyable.hpp"
#include "osl/mutex.hxx" #include "osl/mutex.hxx"
namespace binaryurp { struct OutgoingRequest; } namespace binaryurp { struct OutgoingRequest; }
@@ -33,7 +32,7 @@ namespace rtl { class ByteSequence; }
namespace binaryurp { namespace binaryurp {
class OutgoingRequests: private boost::noncopyable { class OutgoingRequests {
public: public:
OutgoingRequests(); OutgoingRequests();
@@ -46,6 +45,9 @@ public:
void pop(rtl::ByteSequence const & tid) throw (); void pop(rtl::ByteSequence const & tid) throw ();
private: private:
OutgoingRequests(const OutgoingRequests&) SAL_DELETED_FUNCTION;
OutgoingRequests& operator=(const OutgoingRequests&) SAL_DELETED_FUNCTION;
typedef std::map< rtl::ByteSequence, std::vector< OutgoingRequest > > Map; typedef std::map< rtl::ByteSequence, std::vector< OutgoingRequest > > Map;
osl::Mutex mutex_; osl::Mutex mutex_;

View File

@@ -22,7 +22,6 @@
#include "sal/config.h" #include "sal/config.h"
#include "boost/noncopyable.hpp"
#include "osl/interlck.h" #include "osl/interlck.h"
#include "rtl/ref.hxx" #include "rtl/ref.hxx"
#include "rtl/ustring.hxx" #include "rtl/ustring.hxx"
@@ -38,7 +37,7 @@ namespace com { namespace sun { namespace star { namespace uno {
namespace binaryurp { namespace binaryurp {
class Proxy: public uno_Interface, private boost::noncopyable { class Proxy: public uno_Interface {
public: public:
Proxy( Proxy(
rtl::Reference< Bridge > const & bridge, OUString const & oid, rtl::Reference< Bridge > const & bridge, OUString const & oid,
@@ -64,6 +63,9 @@ public:
OUString * oid); OUString * oid);
private: private:
Proxy(const Proxy&) SAL_DELETED_FUNCTION;
Proxy& operator=(const Proxy&) SAL_DELETED_FUNCTION;
~Proxy(); ~Proxy();
void do_dispatch_throw( void do_dispatch_throw(

View File

@@ -22,7 +22,6 @@
#include "sal/config.h" #include "sal/config.h"
#include "boost/noncopyable.hpp"
#include "rtl/byteseq.hxx" #include "rtl/byteseq.hxx"
#include "rtl/ustring.hxx" #include "rtl/ustring.hxx"
#include "typelib/typedescription.hxx" #include "typelib/typedescription.hxx"
@@ -31,11 +30,15 @@
namespace binaryurp { namespace binaryurp {
struct ReaderState: private boost::noncopyable { struct ReaderState {
private:
ReaderState(const ReaderState&) SAL_DELETED_FUNCTION;
ReaderState& operator=(const ReaderState&) SAL_DELETED_FUNCTION;
public:
ReaderState() {}
com::sun::star::uno::TypeDescription typeCache[cache::size]; com::sun::star::uno::TypeDescription typeCache[cache::size];
OUString oidCache[cache::size]; OUString oidCache[cache::size];
rtl::ByteSequence tidCache[cache::size]; rtl::ByteSequence tidCache[cache::size];
}; };

View File

@@ -24,7 +24,6 @@
#include <new> #include <new>
#include <vector> #include <vector>
#include "boost/noncopyable.hpp"
#include "com/sun/star/io/IOException.hpp" #include "com/sun/star/io/IOException.hpp"
#include "com/sun/star/uno/Reference.hxx" #include "com/sun/star/uno/Reference.hxx"
#include "com/sun/star/uno/RuntimeException.hpp" #include "com/sun/star/uno/RuntimeException.hpp"

View File

@@ -24,7 +24,6 @@
#include <vector> #include <vector>
#include "boost/noncopyable.hpp"
#include "com/sun/star/uno/Sequence.hxx" #include "com/sun/star/uno/Sequence.hxx"
#include "rtl/ref.hxx" #include "rtl/ref.hxx"
#include "sal/types.h" #include "sal/types.h"
@@ -41,7 +40,7 @@ namespace com { namespace sun { namespace star { namespace uno {
namespace binaryurp { namespace binaryurp {
class Unmarshal: private boost::noncopyable { class Unmarshal {
public: public:
Unmarshal( Unmarshal(
rtl::Reference< Bridge > const & bridge, ReaderState & state, rtl::Reference< Bridge > const & bridge, ReaderState & state,
@@ -66,6 +65,9 @@ public:
void done() const; void done() const;
private: private:
Unmarshal(const Unmarshal&) SAL_DELETED_FUNCTION;
Unmarshal& operator=(const Unmarshal&) SAL_DELETED_FUNCTION;
void check(sal_Int32 size) const; void check(sal_Int32 size) const;
sal_uInt32 readCompressed(); sal_uInt32 readCompressed();

View File

@@ -22,7 +22,6 @@
#include "sal/config.h" #include "sal/config.h"
#include "boost/noncopyable.hpp"
#include "rtl/byteseq.hxx" #include "rtl/byteseq.hxx"
#include "rtl/ustring.hxx" #include "rtl/ustring.hxx"
#include "typelib/typedescription.hxx" #include "typelib/typedescription.hxx"
@@ -31,7 +30,11 @@
namespace binaryurp { namespace binaryurp {
struct WriterState: private boost::noncopyable { struct WriterState {
private:
WriterState(const WriterState&) SAL_DELETED_FUNCTION;
WriterState& operator=(const WriterState&) SAL_DELETED_FUNCTION;
public:
WriterState(): WriterState():
typeCache(cache::size), oidCache(cache::size), tidCache(cache::size) {} typeCache(cache::size), oidCache(cache::size), tidCache(cache::size) {}

View File

@@ -20,7 +20,6 @@
#include <boost/current_function.hpp> #include <boost/current_function.hpp>
#include <boost/noncopyable.hpp> #include <boost/noncopyable.hpp>
#include <boost/scoped_array.hpp> #include <boost/scoped_array.hpp>
#include <boost/scoped_ptr.hpp>
#include <boost/shared_ptr.hpp> #include <boost/shared_ptr.hpp>
#include <cassert> #include <cassert>
#include <com/sun/star/accessibility/AccessibleEventId.hpp> #include <com/sun/star/accessibility/AccessibleEventId.hpp>

View File

@@ -23,7 +23,7 @@
#include <osl/diagnose.h> #include <osl/diagnose.h>
#include <boost/scoped_ptr.hpp> #include <memory>
using namespace ::comphelper; using namespace ::comphelper;
using namespace ::com::sun::star; using namespace ::com::sun::star;
@@ -55,9 +55,9 @@ void SAL_CALL ChainablePropertySet::setPropertyValue( const OUString& rPropertyN
throw(UnknownPropertyException, PropertyVetoException, IllegalArgumentException, WrappedTargetException, RuntimeException, std::exception) throw(UnknownPropertyException, PropertyVetoException, IllegalArgumentException, WrappedTargetException, RuntimeException, std::exception)
{ {
// acquire mutex in c-tor and releases it in the d-tor (exception safe!). // acquire mutex in c-tor and releases it in the d-tor (exception safe!).
boost::scoped_ptr< osl::Guard< comphelper::SolarMutex > > pMutexGuard; std::unique_ptr< osl::Guard< comphelper::SolarMutex > > xMutexGuard;
if (mpMutex) if (mpMutex)
pMutexGuard.reset( new osl::Guard< comphelper::SolarMutex >(mpMutex) ); xMutexGuard.reset( new osl::Guard< comphelper::SolarMutex >(mpMutex) );
PropertyInfoHash::const_iterator aIter = mpInfo->maMap.find ( rPropertyName ); PropertyInfoHash::const_iterator aIter = mpInfo->maMap.find ( rPropertyName );
@@ -73,9 +73,9 @@ Any SAL_CALL ChainablePropertySet::getPropertyValue( const OUString& rPropertyNa
throw(UnknownPropertyException, WrappedTargetException, RuntimeException, std::exception) throw(UnknownPropertyException, WrappedTargetException, RuntimeException, std::exception)
{ {
// acquire mutex in c-tor and releases it in the d-tor (exception safe!). // acquire mutex in c-tor and releases it in the d-tor (exception safe!).
boost::scoped_ptr< osl::Guard< comphelper::SolarMutex > > pMutexGuard; std::unique_ptr< osl::Guard< comphelper::SolarMutex > > xMutexGuard;
if (mpMutex) if (mpMutex)
pMutexGuard.reset( new osl::Guard< comphelper::SolarMutex >(mpMutex) ); xMutexGuard.reset( new osl::Guard< comphelper::SolarMutex >(mpMutex) );
PropertyInfoHash::const_iterator aIter = mpInfo->maMap.find ( rPropertyName ); PropertyInfoHash::const_iterator aIter = mpInfo->maMap.find ( rPropertyName );
@@ -120,9 +120,9 @@ void SAL_CALL ChainablePropertySet::setPropertyValues(const Sequence< OUString >
WrappedTargetException, RuntimeException, std::exception) WrappedTargetException, RuntimeException, std::exception)
{ {
// acquire mutex in c-tor and releases it in the d-tor (exception safe!). // acquire mutex in c-tor and releases it in the d-tor (exception safe!).
boost::scoped_ptr< osl::Guard< comphelper::SolarMutex > > pMutexGuard; std::unique_ptr< osl::Guard< comphelper::SolarMutex > > xMutexGuard;
if (mpMutex) if (mpMutex)
pMutexGuard.reset( new osl::Guard< comphelper::SolarMutex >(mpMutex) ); xMutexGuard.reset( new osl::Guard< comphelper::SolarMutex >(mpMutex) );
const sal_Int32 nCount = rPropertyNames.getLength(); const sal_Int32 nCount = rPropertyNames.getLength();
@@ -154,9 +154,9 @@ Sequence< Any > SAL_CALL ChainablePropertySet::getPropertyValues(const Sequence<
throw (RuntimeException, std::exception) throw (RuntimeException, std::exception)
{ {
// acquire mutex in c-tor and releases it in the d-tor (exception safe!). // acquire mutex in c-tor and releases it in the d-tor (exception safe!).
boost::scoped_ptr< osl::Guard< comphelper::SolarMutex > > pMutexGuard; std::unique_ptr< osl::Guard< comphelper::SolarMutex > > xMutexGuard;
if (mpMutex) if (mpMutex)
pMutexGuard.reset( new osl::Guard< comphelper::SolarMutex >(mpMutex) ); xMutexGuard.reset( new osl::Guard< comphelper::SolarMutex >(mpMutex) );
const sal_Int32 nCount = rPropertyNames.getLength(); const sal_Int32 nCount = rPropertyNames.getLength();

View File

@@ -26,28 +26,26 @@
#include <osl/diagnose.h> #include <osl/diagnose.h>
#include <boost/scoped_ptr.hpp> #include <memory>
class AutoOGuardArray class AutoOGuardArray
{ {
boost::scoped_ptr< osl::Guard< comphelper::SolarMutex > > * mpGuardArray; std::unique_ptr< osl::Guard< comphelper::SolarMutex > > * mpGuardArray;
public: public:
AutoOGuardArray( sal_Int32 nNumElements ); AutoOGuardArray( sal_Int32 nNumElements );
~AutoOGuardArray(); ~AutoOGuardArray();
boost::scoped_ptr< osl::Guard< comphelper::SolarMutex > > & operator[] ( sal_Int32 i ) { return mpGuardArray[i]; } std::unique_ptr< osl::Guard< comphelper::SolarMutex > > & operator[] ( sal_Int32 i ) { return mpGuardArray[i]; }
}; };
AutoOGuardArray::AutoOGuardArray( sal_Int32 nNumElements ) : mpGuardArray(new boost::scoped_ptr< osl::Guard< comphelper::SolarMutex > >[nNumElements]) AutoOGuardArray::AutoOGuardArray( sal_Int32 nNumElements ) : mpGuardArray(new std::unique_ptr< osl::Guard< comphelper::SolarMutex > >[nNumElements])
{ {
} }
AutoOGuardArray::~AutoOGuardArray() AutoOGuardArray::~AutoOGuardArray()
{ {
//!! release scoped_ptr's and thus the mutexes locks //!! release unique_ptr's and thus the mutexes locks
delete [] mpGuardArray; delete [] mpGuardArray;
} }
@@ -106,9 +104,9 @@ void SAL_CALL MasterPropertySet::setPropertyValue( const OUString& rPropertyName
throw(UnknownPropertyException, PropertyVetoException, IllegalArgumentException, WrappedTargetException, RuntimeException, std::exception) throw(UnknownPropertyException, PropertyVetoException, IllegalArgumentException, WrappedTargetException, RuntimeException, std::exception)
{ {
// acquire mutex in c-tor and releases it in the d-tor (exception safe!). // acquire mutex in c-tor and releases it in the d-tor (exception safe!).
boost::scoped_ptr< osl::Guard< comphelper::SolarMutex > > pMutexGuard; std::unique_ptr< osl::Guard< comphelper::SolarMutex > > xMutexGuard;
if (mpMutex) if (mpMutex)
pMutexGuard.reset( new osl::Guard< comphelper::SolarMutex >(mpMutex) ); xMutexGuard.reset( new osl::Guard< comphelper::SolarMutex >(mpMutex) );
PropertyDataHash::const_iterator aIter = mpInfo->maMap.find ( rPropertyName ); PropertyDataHash::const_iterator aIter = mpInfo->maMap.find ( rPropertyName );
@@ -126,9 +124,9 @@ void SAL_CALL MasterPropertySet::setPropertyValue( const OUString& rPropertyName
ChainablePropertySet * pSlave = maSlaveMap [ (*aIter).second->mnMapId ]->mpSlave; ChainablePropertySet * pSlave = maSlaveMap [ (*aIter).second->mnMapId ]->mpSlave;
// acquire mutex in c-tor and releases it in the d-tor (exception safe!). // acquire mutex in c-tor and releases it in the d-tor (exception safe!).
boost::scoped_ptr< osl::Guard< comphelper::SolarMutex > > pMutexGuard2; std::unique_ptr< osl::Guard< comphelper::SolarMutex > > xMutexGuard2;
if (pSlave->mpMutex) if (pSlave->mpMutex)
pMutexGuard2.reset( new osl::Guard< comphelper::SolarMutex >(pSlave->mpMutex) ); xMutexGuard2.reset( new osl::Guard< comphelper::SolarMutex >(pSlave->mpMutex) );
pSlave->_preSetValues(); pSlave->_preSetValues();
pSlave->_setSingleValue( *((*aIter).second->mpInfo), rValue ); pSlave->_setSingleValue( *((*aIter).second->mpInfo), rValue );
@@ -140,9 +138,9 @@ Any SAL_CALL MasterPropertySet::getPropertyValue( const OUString& rPropertyName
throw(UnknownPropertyException, WrappedTargetException, RuntimeException, std::exception) throw(UnknownPropertyException, WrappedTargetException, RuntimeException, std::exception)
{ {
// acquire mutex in c-tor and releases it in the d-tor (exception safe!). // acquire mutex in c-tor and releases it in the d-tor (exception safe!).
boost::scoped_ptr< osl::Guard< comphelper::SolarMutex > > pMutexGuard; std::unique_ptr< osl::Guard< comphelper::SolarMutex > > xMutexGuard;
if (mpMutex) if (mpMutex)
pMutexGuard.reset( new osl::Guard< comphelper::SolarMutex >(mpMutex) ); xMutexGuard.reset( new osl::Guard< comphelper::SolarMutex >(mpMutex) );
PropertyDataHash::const_iterator aIter = mpInfo->maMap.find ( rPropertyName ); PropertyDataHash::const_iterator aIter = mpInfo->maMap.find ( rPropertyName );
@@ -161,9 +159,9 @@ Any SAL_CALL MasterPropertySet::getPropertyValue( const OUString& rPropertyName
ChainablePropertySet * pSlave = maSlaveMap [ (*aIter).second->mnMapId ]->mpSlave; ChainablePropertySet * pSlave = maSlaveMap [ (*aIter).second->mnMapId ]->mpSlave;
// acquire mutex in c-tor and releases it in the d-tor (exception safe!). // acquire mutex in c-tor and releases it in the d-tor (exception safe!).
boost::scoped_ptr< osl::Guard< comphelper::SolarMutex > > pMutexGuard2; std::unique_ptr< osl::Guard< comphelper::SolarMutex > > xMutexGuard2;
if (pSlave->mpMutex) if (pSlave->mpMutex)
pMutexGuard2.reset( new osl::Guard< comphelper::SolarMutex >(pSlave->mpMutex) ); xMutexGuard2.reset( new osl::Guard< comphelper::SolarMutex >(pSlave->mpMutex) );
pSlave->_preGetValues(); pSlave->_preGetValues();
pSlave->_getSingleValue( *((*aIter).second->mpInfo), aAny ); pSlave->_getSingleValue( *((*aIter).second->mpInfo), aAny );
@@ -201,9 +199,9 @@ void SAL_CALL MasterPropertySet::setPropertyValues( const Sequence< OUString >&
throw(PropertyVetoException, IllegalArgumentException, WrappedTargetException, RuntimeException, std::exception) throw(PropertyVetoException, IllegalArgumentException, WrappedTargetException, RuntimeException, std::exception)
{ {
// acquire mutex in c-tor and releases it in the d-tor (exception safe!). // acquire mutex in c-tor and releases it in the d-tor (exception safe!).
boost::scoped_ptr< osl::Guard< comphelper::SolarMutex > > pMutexGuard; std::unique_ptr< osl::Guard< comphelper::SolarMutex > > xMutexGuard;
if (mpMutex) if (mpMutex)
pMutexGuard.reset( new osl::Guard< comphelper::SolarMutex >(mpMutex) ); xMutexGuard.reset( new osl::Guard< comphelper::SolarMutex >(mpMutex) );
const sal_Int32 nCount = aPropertyNames.getLength(); const sal_Int32 nCount = aPropertyNames.getLength();
@@ -218,9 +216,9 @@ void SAL_CALL MasterPropertySet::setPropertyValues( const Sequence< OUString >&
const OUString * pString = aPropertyNames.getConstArray(); const OUString * pString = aPropertyNames.getConstArray();
PropertyDataHash::const_iterator aEnd = mpInfo->maMap.end(), aIter; PropertyDataHash::const_iterator aEnd = mpInfo->maMap.end(), aIter;
//!! have a scoped_ptr to an array of OGuards in order to have the //!! have a unique_ptr to an array of OGuards in order to have the
//!! allocated memory properly freed (exception safe!). //!! allocated memory properly freed (exception safe!).
//!! Since the array itself has scoped_ptrs as members we have to use a //!! Since the array itself has unique_ptrs as members we have to use a
//!! helper class 'AutoOGuardArray' in order to have //!! helper class 'AutoOGuardArray' in order to have
//!! the acquired locks properly released. //!! the acquired locks properly released.
AutoOGuardArray aOGuardArray( nCount ); AutoOGuardArray aOGuardArray( nCount );
@@ -267,9 +265,9 @@ Sequence< Any > SAL_CALL MasterPropertySet::getPropertyValues( const Sequence< O
throw(RuntimeException, std::exception) throw(RuntimeException, std::exception)
{ {
// acquire mutex in c-tor and releases it in the d-tor (exception safe!). // acquire mutex in c-tor and releases it in the d-tor (exception safe!).
boost::scoped_ptr< osl::Guard< comphelper::SolarMutex > > pMutexGuard; std::unique_ptr< osl::Guard< comphelper::SolarMutex > > xMutexGuard;
if (mpMutex) if (mpMutex)
pMutexGuard.reset( new osl::Guard< comphelper::SolarMutex >(mpMutex) ); xMutexGuard.reset( new osl::Guard< comphelper::SolarMutex >(mpMutex) );
const sal_Int32 nCount = aPropertyNames.getLength(); const sal_Int32 nCount = aPropertyNames.getLength();
@@ -283,9 +281,9 @@ Sequence< Any > SAL_CALL MasterPropertySet::getPropertyValues( const Sequence< O
const OUString * pString = aPropertyNames.getConstArray(); const OUString * pString = aPropertyNames.getConstArray();
PropertyDataHash::const_iterator aEnd = mpInfo->maMap.end(), aIter; PropertyDataHash::const_iterator aEnd = mpInfo->maMap.end(), aIter;
//!! have an scoped_ptr to an array of OGuards in order to have the //!! have an unique_ptr to an array of OGuards in order to have the
//!! allocated memory properly freed (exception safe!). //!! allocated memory properly freed (exception safe!).
//!! Since the array itself has scoped_ptrs as members we have to use a //!! Since the array itself has unique_ptrs as members we have to use a
//!! helper class 'AutoOGuardArray' in order to have //!! helper class 'AutoOGuardArray' in order to have
//!! the acquired locks properly released. //!! the acquired locks properly released.
AutoOGuardArray aOGuardArray( nCount ); AutoOGuardArray aOGuardArray( nCount );
@@ -368,9 +366,9 @@ PropertyState SAL_CALL MasterPropertySet::getPropertyState( const OUString& Prop
ChainablePropertySet * pSlave = maSlaveMap [ (*aIter).second->mnMapId ]->mpSlave; ChainablePropertySet * pSlave = maSlaveMap [ (*aIter).second->mnMapId ]->mpSlave;
// acquire mutex in c-tor and releases it in the d-tor (exception safe!). // acquire mutex in c-tor and releases it in the d-tor (exception safe!).
boost::scoped_ptr< osl::Guard< comphelper::SolarMutex > > pMutexGuard; std::unique_ptr< osl::Guard< comphelper::SolarMutex > > xMutexGuard;
if (pSlave->mpMutex) if (pSlave->mpMutex)
pMutexGuard.reset( new osl::Guard< comphelper::SolarMutex >(pSlave->mpMutex) ); xMutexGuard.reset( new osl::Guard< comphelper::SolarMutex >(pSlave->mpMutex) );
pSlave->_preGetPropertyState(); pSlave->_preGetPropertyState();
pSlave->_getPropertyState( *((*aIter).second->mpInfo), aState ); pSlave->_getPropertyState( *((*aIter).second->mpInfo), aState );

View File

@@ -48,6 +48,5 @@ $(eval $(call gb_CppunitTest_use_components,configmgr_unit,\
)) ))
$(eval $(call gb_CppunitTest_use_externals,configmgr_unit,\ $(eval $(call gb_CppunitTest_use_externals,configmgr_unit,\
boost_headers \
icu_headers \ icu_headers \
)) ))

View File

@@ -46,8 +46,6 @@ $(eval $(call gb_Library_add_exception_objects,configmgr, \
configmgr/source/xmldata \ configmgr/source/xmldata \
)) ))
$(eval $(call gb_Library_use_external,configmgr,boost_headers))
$(eval $(call gb_Library_use_sdk_api,configmgr)) $(eval $(call gb_Library_use_sdk_api,configmgr))
$(eval $(call gb_Library_use_libraries,configmgr, \ $(eval $(call gb_Library_use_libraries,configmgr, \

View File

@@ -15,7 +15,6 @@
*/ */
#include <algorithm> #include <algorithm>
#include <boost/noncopyable.hpp>
#include <cassert> #include <cassert>
#include <climits> #include <climits>
#include <com/sun/star/beans/NamedValue.hpp> #include <com/sun/star/beans/NamedValue.hpp>

View File

@@ -28,7 +28,6 @@
#include <vector> #include <vector>
#include "config_map.hxx" #include "config_map.hxx"
#include <boost/noncopyable.hpp>
#include <com/sun/star/beans/PropertyVetoException.hpp> #include <com/sun/star/beans/PropertyVetoException.hpp>
#include <com/sun/star/beans/UnknownPropertyException.hpp> #include <com/sun/star/beans/UnknownPropertyException.hpp>
#include <com/sun/star/beans/XExactName.hpp> #include <com/sun/star/beans/XExactName.hpp>
@@ -109,8 +108,7 @@ class Access:
public com::sun::star::beans::XMultiHierarchicalPropertySet, public com::sun::star::beans::XMultiHierarchicalPropertySet,
public com::sun::star::beans::XHierarchicalPropertySetInfo, public com::sun::star::beans::XHierarchicalPropertySetInfo,
public com::sun::star::container::XNameContainer, public com::sun::star::container::XNameContainer,
public com::sun::star::lang::XSingleServiceFactory, public com::sun::star::lang::XSingleServiceFactory
private boost::noncopyable
{ {
public: public:
oslInterlockedCount acquireCounting(); oslInterlockedCount acquireCounting();
@@ -476,6 +474,9 @@ protected:
bool isDisposed() const { return disposed_;} bool isDisposed() const { return disposed_;}
private: private:
Access(const Access&) SAL_DELETED_FUNCTION;
Access& operator=(const Access&) SAL_DELETED_FUNCTION;
struct ModifiedChild { struct ModifiedChild {
rtl::Reference< ChildAccess > child; rtl::Reference< ChildAccess > child;
bool directlyModified; bool directlyModified;

View File

@@ -24,7 +24,6 @@
#include <vector> #include <vector>
#include <boost/noncopyable.hpp>
#include <com/sun/star/beans/PropertyChangeEvent.hpp> #include <com/sun/star/beans/PropertyChangeEvent.hpp>
#include <com/sun/star/container/ContainerEvent.hpp> #include <com/sun/star/container/ContainerEvent.hpp>
#include <com/sun/star/lang/EventObject.hpp> #include <com/sun/star/lang/EventObject.hpp>
@@ -44,8 +43,10 @@ namespace com { namespace sun { namespace star {
namespace configmgr { namespace configmgr {
class Broadcaster: private boost::noncopyable { class Broadcaster {
public: public:
Broadcaster() {}
void addDisposeNotification( void addDisposeNotification(
com::sun::star::uno::Reference< com::sun::star::lang::XEventListener > com::sun::star::uno::Reference< com::sun::star::lang::XEventListener >
const & listener, const & listener,
@@ -85,6 +86,9 @@ public:
void send(); void send();
private: private:
Broadcaster(const Broadcaster&) SAL_DELETED_FUNCTION;
Broadcaster& operator=(const Broadcaster&) SAL_DELETED_FUNCTION;
struct DisposeNotification { struct DisposeNotification {
com::sun::star::uno::Reference< com::sun::star::lang::XEventListener > com::sun::star::uno::Reference< com::sun::star::lang::XEventListener >
listener; listener;

View File

@@ -23,9 +23,9 @@
#include <sal/config.h> #include <sal/config.h>
#include <map> #include <map>
#include <memory>
#include <set> #include <set>
#include <boost/noncopyable.hpp>
#include <com/sun/star/beans/Optional.hpp> #include <com/sun/star/beans/Optional.hpp>
#include <com/sun/star/uno/Reference.hxx> #include <com/sun/star/uno/Reference.hxx>
#include <rtl/ref.hxx> #include <rtl/ref.hxx>
@@ -50,7 +50,7 @@ class Node;
class Partial; class Partial;
class RootAccess; class RootAccess;
class Components: private boost::noncopyable { class Components {
public: public:
static Components & getSingleton( static Components & getSingleton(
com::sun::star::uno::Reference< com::sun::star::uno::XComponentContext > com::sun::star::uno::Reference< com::sun::star::uno::XComponentContext >
@@ -105,6 +105,9 @@ public:
getExternalValue(OUString const & descriptor); getExternalValue(OUString const & descriptor);
private: private:
Components(const Components&) SAL_DELETED_FUNCTION;
Components& operator=(const Components&) SAL_DELETED_FUNCTION;
typedef void FileParser( typedef void FileParser(
OUString const &, int, Data &, Partial const *, Modifications *, OUString const &, int, Data &, Partial const *, Modifications *,
Additions *); Additions *);

View File

@@ -23,7 +23,6 @@
#include <memory> #include <memory>
#include <vector> #include <vector>
#include <boost/noncopyable.hpp>
#include <com/sun/star/beans/NamedValue.hpp> #include <com/sun/star/beans/NamedValue.hpp>
#include <com/sun/star/beans/PropertyValue.hpp> #include <com/sun/star/beans/PropertyValue.hpp>
#include <com/sun/star/configuration/theDefaultProvider.hpp> #include <com/sun/star/configuration/theDefaultProvider.hpp>
@@ -89,7 +88,7 @@ typedef
ServiceBase; ServiceBase;
class Service: class Service:
private cppu::BaseMutex, public ServiceBase, private boost::noncopyable private cppu::BaseMutex, public ServiceBase
{ {
public: public:
Service( Service(
@@ -111,6 +110,9 @@ public:
} }
private: private:
Service(const Service&) SAL_DELETED_FUNCTION;
Service& operator=(const Service&) SAL_DELETED_FUNCTION;
virtual ~Service() {} virtual ~Service() {}
virtual void SAL_CALL disposing() SAL_OVERRIDE { flushModifications(); } virtual void SAL_CALL disposing() SAL_OVERRIDE { flushModifications(); }
@@ -368,13 +370,15 @@ void Service::flushModifications() const {
class Factory: class Factory:
public cppu::WeakImplHelper2< public cppu::WeakImplHelper2<
css::lang::XSingleComponentFactory, css::lang::XServiceInfo >, css::lang::XSingleComponentFactory, css::lang::XServiceInfo >
private boost::noncopyable
{ {
public: public:
Factory() {} Factory() {}
private: private:
Factory(const Factory&) SAL_DELETED_FUNCTION;
Factory& operator=(const Factory&) SAL_DELETED_FUNCTION;
virtual ~Factory() {} virtual ~Factory() {}
virtual css::uno::Reference< css::uno::XInterface > SAL_CALL virtual css::uno::Reference< css::uno::XInterface > SAL_CALL

View File

@@ -21,7 +21,6 @@
#include <cassert> #include <cassert>
#include <boost/noncopyable.hpp>
#include <com/sun/star/beans/NamedValue.hpp> #include <com/sun/star/beans/NamedValue.hpp>
#include <com/sun/star/beans/Property.hpp> #include <com/sun/star/beans/Property.hpp>
#include <com/sun/star/beans/XProperty.hpp> #include <com/sun/star/beans/XProperty.hpp>
@@ -71,13 +70,15 @@ namespace {
class Service: class Service:
public cppu::WeakImplHelper3< public cppu::WeakImplHelper3<
css::lang::XServiceInfo, css::registry::XSimpleRegistry, css::lang::XServiceInfo, css::registry::XSimpleRegistry,
css::util::XFlushable >, css::util::XFlushable >
private boost::noncopyable
{ {
public: public:
Service(css::uno::Reference< css::uno::XComponentContext > const & context); Service(css::uno::Reference< css::uno::XComponentContext > const & context);
private: private:
Service(const Service&) SAL_DELETED_FUNCTION;
Service& operator=(const Service&) SAL_DELETED_FUNCTION;
virtual ~Service() {} virtual ~Service() {}
virtual OUString SAL_CALL getImplementationName() virtual OUString SAL_CALL getImplementationName()
@@ -151,14 +152,16 @@ private:
}; };
class RegistryKey: class RegistryKey:
public cppu::WeakImplHelper1< css::registry::XRegistryKey >, public cppu::WeakImplHelper1< css::registry::XRegistryKey >
private boost::noncopyable
{ {
public: public:
RegistryKey(Service & service, css::uno::Any const & value): RegistryKey(Service & service, css::uno::Any const & value):
service_(service), value_(value) {} service_(service), value_(value) {}
private: private:
RegistryKey(const RegistryKey&) SAL_DELETED_FUNCTION;
RegistryKey& operator=(const RegistryKey&) SAL_DELETED_FUNCTION;
virtual ~RegistryKey() {} virtual ~RegistryKey() {}
virtual OUString SAL_CALL getKeyName() virtual OUString SAL_CALL getKeyName()

View File

@@ -26,7 +26,6 @@
#include "config_map.hxx" #include "config_map.hxx"
#include <vector> #include <vector>
#include <boost/noncopyable.hpp>
#include <rtl/ref.hxx> #include <rtl/ref.hxx>
#include <rtl/ustring.hxx> #include <rtl/ustring.hxx>
#include <sal/types.h> #include <sal/types.h>
@@ -41,7 +40,7 @@ namespace configmgr {
class Node; class Node;
struct Data: private boost::noncopyable { struct Data {
enum { NO_LAYER = INT_MAX }; enum { NO_LAYER = INT_MAX };
struct ExtensionXcu: public salhelper::SimpleReferenceObject { struct ExtensionXcu: public salhelper::SimpleReferenceObject {
@@ -86,6 +85,9 @@ struct Data: private boost::noncopyable {
OUString const & url); OUString const & url);
private: private:
Data(const Data&) SAL_DELETED_FUNCTION;
Data& operator=(const Data&) SAL_DELETED_FUNCTION;
typedef config_map< rtl::Reference< ExtensionXcu > > typedef config_map< rtl::Reference< ExtensionXcu > >
ExtensionXcuAdditions; ExtensionXcuAdditions;

View File

@@ -22,18 +22,17 @@
#include <sal/config.h> #include <sal/config.h>
#include <boost/unordered_map.hpp> #include <unordered_map>
#include <boost/noncopyable.hpp>
#include "path.hxx" #include "path.hxx"
namespace configmgr { namespace configmgr {
class Modifications: private boost::noncopyable { class Modifications {
public: public:
struct Node { struct Node {
typedef boost::unordered_map<OUString, Node, OUStringHash> Children; typedef std::unordered_map<OUString, Node, OUStringHash> Children;
Children children; Children children;
}; };
@@ -49,6 +48,9 @@ public:
Node const & getRoot() const { return root_;} Node const & getRoot() const { return root_;}
private: private:
Modifications(const Modifications&) SAL_DELETED_FUNCTION;
Modifications& operator=(const Modifications&) SAL_DELETED_FUNCTION;
Node root_; Node root_;
}; };

View File

@@ -22,17 +22,15 @@
#include <sal/config.h> #include <sal/config.h>
#include <boost/unordered_map.hpp>
#include <set> #include <set>
#include <unordered_map>
#include <boost/noncopyable.hpp>
#include "path.hxx" #include "path.hxx"
#include <rtl/ustring.hxx> #include <rtl/ustring.hxx>
namespace configmgr { namespace configmgr {
class Partial: private boost::noncopyable { class Partial {
public: public:
enum Containment { CONTAINS_NOT, CONTAINS_SUBNODES, CONTAINS_NODE }; enum Containment { CONTAINS_NOT, CONTAINS_SUBNODES, CONTAINS_NODE };
@@ -45,8 +43,11 @@ public:
Containment contains(Path const & path) const; Containment contains(Path const & path) const;
private: private:
Partial(const Partial&) SAL_DELETED_FUNCTION;
Partial& operator=(const Partial&) SAL_DELETED_FUNCTION;
struct Node { struct Node {
typedef boost::unordered_map< OUString, Node, OUStringHash > Children; typedef std::unordered_map< OUString, Node, OUStringHash > Children;
Node(): startInclude(false) {} Node(): startInclude(false) {}
void clear() { startInclude=false; children.clear(); } void clear() { startInclude=false; children.clear(); }

View File

@@ -9,7 +9,6 @@
#include <sal/config.h> #include <sal/config.h>
#include <boost/noncopyable.hpp>
#include <com/sun/star/container/NoSuchElementException.hpp> #include <com/sun/star/container/NoSuchElementException.hpp>
#include <com/sun/star/container/XHierarchicalNameAccess.hpp> #include <com/sun/star/container/XHierarchicalNameAccess.hpp>
#include <com/sun/star/lang/IllegalArgumentException.hpp> #include <com/sun/star/lang/IllegalArgumentException.hpp>
@@ -44,8 +43,7 @@ namespace {
class Service: class Service:
public cppu::WeakImplHelper3< public cppu::WeakImplHelper3<
css::lang::XServiceInfo, css::lang::XInitialization, css::lang::XServiceInfo, css::lang::XInitialization,
css::container::XHierarchicalNameAccess >, css::container::XHierarchicalNameAccess >
private boost::noncopyable
{ {
public: public:
explicit Service( explicit Service(
@@ -53,6 +51,9 @@ public:
context_(context) {} context_(context) {}
private: private:
Service(const Service&) SAL_DELETED_FUNCTION;
Service& operator=(const Service&) SAL_DELETED_FUNCTION;
virtual ~Service() {} virtual ~Service() {}
virtual OUString SAL_CALL getImplementationName() virtual OUString SAL_CALL getImplementationName()

View File

@@ -9,7 +9,6 @@
#include <sal/config.h> #include <sal/config.h>
#include <boost/noncopyable.hpp>
#include <com/sun/star/configuration/XReadWriteAccess.hpp> #include <com/sun/star/configuration/XReadWriteAccess.hpp>
#include <com/sun/star/container/NoSuchElementException.hpp> #include <com/sun/star/container/NoSuchElementException.hpp>
#include <com/sun/star/lang/IllegalArgumentException.hpp> #include <com/sun/star/lang/IllegalArgumentException.hpp>
@@ -46,8 +45,7 @@ namespace {
class Service: class Service:
public cppu::WeakImplHelper3< public cppu::WeakImplHelper3<
css::lang::XServiceInfo, css::lang::XInitialization, css::lang::XServiceInfo, css::lang::XInitialization,
css::configuration::XReadWriteAccess >, css::configuration::XReadWriteAccess >
private boost::noncopyable
{ {
public: public:
explicit Service( explicit Service(
@@ -55,6 +53,9 @@ public:
context_(context) {} context_(context) {}
private: private:
Service(const Service&) SAL_DELETED_FUNCTION;
Service& operator=(const Service&) SAL_DELETED_FUNCTION;
virtual ~Service() {} virtual ~Service() {}
virtual OUString SAL_CALL getImplementationName() virtual OUString SAL_CALL getImplementationName()

View File

@@ -23,7 +23,6 @@
#include <memory> #include <memory>
#include <set> #include <set>
#include <boost/noncopyable.hpp>
#include <com/sun/star/configuration/XUpdate.hpp> #include <com/sun/star/configuration/XUpdate.hpp>
#include <com/sun/star/uno/Reference.hxx> #include <com/sun/star/uno/Reference.hxx>
#include <com/sun/star/uno/RuntimeException.hpp> #include <com/sun/star/uno/RuntimeException.hpp>
@@ -58,8 +57,7 @@ std::set< OUString > seqToSet(
} }
class Service: class Service:
public cppu::WeakImplHelper1< css::configuration::XUpdate >, public cppu::WeakImplHelper1< css::configuration::XUpdate >
private boost::noncopyable
{ {
public: public:
Service(css::uno::Reference< css::uno::XComponentContext > const context): Service(css::uno::Reference< css::uno::XComponentContext > const context):
@@ -70,6 +68,9 @@ public:
} }
private: private:
Service(const Service&) SAL_DELETED_FUNCTION;
Service& operator=(const Service&) SAL_DELETED_FUNCTION;
virtual ~Service() {} virtual ~Service() {}
virtual void SAL_CALL insertExtensionXcsFile( virtual void SAL_CALL insertExtensionXcsFile(

View File

@@ -25,7 +25,6 @@
#include <set> #include <set>
#include <vector> #include <vector>
#include <boost/noncopyable.hpp>
#include <rtl/ref.hxx> #include <rtl/ref.hxx>
#include <rtl/string.hxx> #include <rtl/string.hxx>
#include <rtl/ustring.hxx> #include <rtl/ustring.hxx>
@@ -43,7 +42,7 @@ namespace configmgr {
class Node; class Node;
class ValueParser: private boost::noncopyable { class ValueParser {
public: public:
ValueParser(int layer); ValueParser(int layer);
@@ -69,6 +68,9 @@ public:
OString separator_; OString separator_;
private: private:
ValueParser(const ValueParser&) SAL_DELETED_FUNCTION;
ValueParser& operator=(const ValueParser&) SAL_DELETED_FUNCTION;
template< typename T > com::sun::star::uno::Any convertItems(); template< typename T > com::sun::star::uno::Any convertItems();
enum State { STATE_TEXT, STATE_TEXT_UNICODE, STATE_IT, STATE_IT_UNICODE }; enum State { STATE_TEXT, STATE_TEXT_UNICODE, STATE_IT, STATE_IT_UNICODE };

View File

@@ -21,7 +21,6 @@
#include <cassert> #include <cassert>
#include <boost/noncopyable.hpp>
#include <com/sun/star/uno/Any.hxx> #include <com/sun/star/uno/Any.hxx>
#include <com/sun/star/uno/Reference.hxx> #include <com/sun/star/uno/Reference.hxx>
#include <com/sun/star/uno/RuntimeException.hpp> #include <com/sun/star/uno/RuntimeException.hpp>
@@ -74,7 +73,7 @@ OString convertToUtf8(
return s; return s;
} }
struct TempFile: public boost::noncopyable { struct TempFile {
OUString url; OUString url;
oslFileHandle handle; oslFileHandle handle;
bool closed; bool closed;
@@ -82,6 +81,9 @@ struct TempFile: public boost::noncopyable {
TempFile(): handle(0), closed(false) {} TempFile(): handle(0), closed(false) {}
~TempFile(); ~TempFile();
private:
TempFile(const TempFile&) SAL_DELETED_FUNCTION;
TempFile& operator=(const TempFile&) SAL_DELETED_FUNCTION;
}; };
TempFile::~TempFile() { TempFile::~TempFile() {

View File

@@ -22,7 +22,6 @@
#ifndef INCLUDED_UNOTOOLS_CHARCLASS_HXX #ifndef INCLUDED_UNOTOOLS_CHARCLASS_HXX
#define INCLUDED_UNOTOOLS_CHARCLASS_HXX #define INCLUDED_UNOTOOLS_CHARCLASS_HXX
#include <boost/noncopyable.hpp>
#include <i18nlangtag/languagetag.hxx> #include <i18nlangtag/languagetag.hxx>
#include <com/sun/star/i18n/KCharacterType.hpp> #include <com/sun/star/i18n/KCharacterType.hpp>
#include <com/sun/star/i18n/KParseTokens.hpp> #include <com/sun/star/i18n/KParseTokens.hpp>
@@ -64,12 +63,15 @@ const sal_Int32 nCharClassNumericTypeMask =
::com::sun::star::i18n::KCharacterType::PRINTABLE | ::com::sun::star::i18n::KCharacterType::PRINTABLE |
::com::sun::star::i18n::KCharacterType::BASE_FORM; ::com::sun::star::i18n::KCharacterType::BASE_FORM;
class UNOTOOLS_DLLPUBLIC CharClass : private boost::noncopyable class UNOTOOLS_DLLPUBLIC CharClass
{ {
LanguageTag maLanguageTag; LanguageTag maLanguageTag;
::com::sun::star::uno::Reference< ::com::sun::star::i18n::XCharacterClassification > xCC; ::com::sun::star::uno::Reference< ::com::sun::star::i18n::XCharacterClassification > xCC;
mutable ::osl::Mutex aMutex; mutable ::osl::Mutex aMutex;
CharClass(const CharClass&) SAL_DELETED_FUNCTION;
CharClass& operator=(const CharClass&) SAL_DELETED_FUNCTION;
public: public:
/// Preferred ctor with service manager specified /// Preferred ctor with service manager specified
CharClass( CharClass(

View File

@@ -24,7 +24,6 @@
#include <list> #include <list>
#include <boost/noncopyable.hpp>
#include <com/sun/star/uno/Reference.hxx> #include <com/sun/star/uno/Reference.hxx>
#include <sal/types.h> #include <sal/types.h>
#include <unotools/unotoolsdllapi.h> #include <unotools/unotoolsdllapi.h>
@@ -36,7 +35,7 @@ namespace utl { class ConfigItem; }
namespace utl { namespace utl {
class UNOTOOLS_DLLPUBLIC ConfigManager: private boost::noncopyable { class UNOTOOLS_DLLPUBLIC ConfigManager {
public: public:
static OUString getAboutBoxProductVersion(); static OUString getAboutBoxProductVersion();
@@ -75,6 +74,10 @@ public:
SAL_DLLPRIVATE void registerConfigItem(utl::ConfigItem * item); SAL_DLLPRIVATE void registerConfigItem(utl::ConfigItem * item);
private: private:
ConfigManager(const ConfigManager&) SAL_DELETED_FUNCTION;
ConfigManager& operator=(const ConfigManager&) SAL_DELETED_FUNCTION;
void doStoreConfigItems(); void doStoreConfigItems();
std::list< ConfigItem * > items_; std::list< ConfigItem * > items_;

View File

@@ -20,7 +20,6 @@
#ifndef INCLUDED_UNOTOOLS_LOCALEDATAWRAPPER_HXX #ifndef INCLUDED_UNOTOOLS_LOCALEDATAWRAPPER_HXX
#define INCLUDED_UNOTOOLS_LOCALEDATAWRAPPER_HXX #define INCLUDED_UNOTOOLS_LOCALEDATAWRAPPER_HXX
#include <boost/noncopyable.hpp>
#include <com/sun/star/i18n/XLocaleData4.hpp> #include <com/sun/star/i18n/XLocaleData4.hpp>
#include <com/sun/star/i18n/LocaleItem.hpp> #include <com/sun/star/i18n/LocaleItem.hpp>
#include <com/sun/star/i18n/reservedWords.hpp> #include <com/sun/star/i18n/reservedWords.hpp>
@@ -50,7 +49,7 @@ enum MeasurementSystem {
MEASURE_US MEASURE_US
}; };
class UNOTOOLS_DLLPUBLIC LocaleDataWrapper : private boost::noncopyable class UNOTOOLS_DLLPUBLIC LocaleDataWrapper
{ {
static sal_uInt8 nLocaleDataChecking; // 0:=dontknow, 1:=yes, 2:=no static sal_uInt8 nLocaleDataChecking; // 0:=dontknow, 1:=yes, 2:=no
@@ -344,6 +343,9 @@ public:
static void outputCheckMessage( const OUString& rMsg ); static void outputCheckMessage( const OUString& rMsg );
static void outputCheckMessage( const char* pStr); static void outputCheckMessage( const char* pStr);
LocaleDataWrapper(const LocaleDataWrapper&) SAL_DELETED_FUNCTION;
LocaleDataWrapper& operator=(const LocaleDataWrapper&) SAL_DELETED_FUNCTION;
private: private:
const ::com::sun::star::lang::Locale & getMyLocale() const; const ::com::sun::star::lang::Locale & getMyLocale() const;

View File

@@ -36,6 +36,7 @@
#include <comphelper/servicehelper.hxx> #include <comphelper/servicehelper.hxx>
#include <boost/numeric/conversion/cast.hpp> #include <boost/numeric/conversion/cast.hpp>
#include <boost/utility.hpp>
#include <string.h> #include <string.h>

View File

@@ -9,8 +9,6 @@
$(eval $(call gb_CppunitTest_CppunitTest,unotools_fontdefs)) $(eval $(call gb_CppunitTest_CppunitTest,unotools_fontdefs))
$(eval $(call gb_CppunitTest_use_external,unotools_fontdefs,boost_headers))
$(eval $(call gb_CppunitTest_use_api,unotools_fontdefs, \ $(eval $(call gb_CppunitTest_use_api,unotools_fontdefs, \
offapi \ offapi \
udkapi \ udkapi \

View File

@@ -11,8 +11,6 @@
# utl is the name of the library as it is found in Repository.mk # utl is the name of the library as it is found in Repository.mk
$(eval $(call gb_Library_Library,utl)) $(eval $(call gb_Library_Library,utl))
$(eval $(call gb_Library_use_external,utl,boost_headers))
$(eval $(call gb_Library_use_custom_headers,utl,\ $(eval $(call gb_Library_use_custom_headers,utl,\
officecfg/registry \ officecfg/registry \
)) ))

View File

@@ -15,7 +15,6 @@
*/ */
#include <algorithm> #include <algorithm>
#include <boost/noncopyable.hpp>
#include <cassert> #include <cassert>
#include <com/sun/star/awt/XRequestCallback.hpp> #include <com/sun/star/awt/XRequestCallback.hpp>
#include <com/sun/star/beans/NamedValue.hpp> #include <com/sun/star/beans/NamedValue.hpp>

View File

@@ -21,7 +21,6 @@
#include <list> #include <list>
#include <boost/noncopyable.hpp>
#include <com/sun/star/beans/NamedValue.hpp> #include <com/sun/star/beans/NamedValue.hpp>
#include <com/sun/star/container/XHierarchicalNameAccess.hpp> #include <com/sun/star/container/XHierarchicalNameAccess.hpp>
#include <com/sun/star/configuration/theDefaultProvider.hpp> #include <com/sun/star/configuration/theDefaultProvider.hpp>
@@ -39,7 +38,7 @@
namespace { namespace {
class RegisterConfigItemHelper: private boost::noncopyable { class RegisterConfigItemHelper {
public: public:
RegisterConfigItemHelper( RegisterConfigItemHelper(
utl::ConfigManager & manager, utl::ConfigItem & item): utl::ConfigManager & manager, utl::ConfigItem & item):
@@ -59,6 +58,9 @@ public:
private: private:
utl::ConfigManager & manager_; utl::ConfigManager & manager_;
utl::ConfigItem * item_; utl::ConfigItem * item_;
RegisterConfigItemHelper(const RegisterConfigItemHelper&) SAL_DELETED_FUNCTION;
RegisterConfigItemHelper& operator=(const RegisterConfigItemHelper&) SAL_DELETED_FUNCTION;
}; };
css::uno::Reference< css::lang::XMultiServiceFactory > css::uno::Reference< css::lang::XMultiServiceFactory >

View File

@@ -19,7 +19,6 @@
#include <sal/config.h> #include <sal/config.h>
#include <boost/noncopyable.hpp>
#include <com/sun/star/lang/Locale.hpp> #include <com/sun/star/lang/Locale.hpp>
#include <com/sun/star/lang/XMultiServiceFactory.hpp> #include <com/sun/star/lang/XMultiServiceFactory.hpp>
#include <com/sun/star/lang/XSingleServiceFactory.hpp> #include <com/sun/star/lang/XSingleServiceFactory.hpp>
@@ -142,7 +141,7 @@ SvtLinguOptions::SvtLinguOptions()
{ {
} }
class SvtLinguConfigItem: public utl::ConfigItem, private boost::noncopyable class SvtLinguConfigItem : public utl::ConfigItem
{ {
SvtLinguOptions aOpt; SvtLinguOptions aOpt;
@@ -151,6 +150,9 @@ class SvtLinguConfigItem: public utl::ConfigItem, private boost::noncopyable
bool LoadOptions( const uno::Sequence< OUString > &rProperyNames ); bool LoadOptions( const uno::Sequence< OUString > &rProperyNames );
bool SaveOptions( const uno::Sequence< OUString > &rProperyNames ); bool SaveOptions( const uno::Sequence< OUString > &rProperyNames );
SvtLinguConfigItem(const SvtLinguConfigItem&) SAL_DELETED_FUNCTION;
SvtLinguConfigItem& operator=(const SvtLinguConfigItem&) SAL_DELETED_FUNCTION;
public: public:
SvtLinguConfigItem(); SvtLinguConfigItem();
virtual ~SvtLinguConfigItem(); virtual ~SvtLinguConfigItem();

View File

@@ -19,7 +19,6 @@
#include <sal/config.h> #include <sal/config.h>
#include <boost/noncopyable.hpp>
#include <unotools/searchopt.hxx> #include <unotools/searchopt.hxx>
#include <tools/debug.hxx> #include <tools/debug.hxx>
#include <unotools/configitem.hxx> #include <unotools/configitem.hxx>
@@ -36,11 +35,14 @@ using namespace com::sun::star::i18n;
#define MAX_FLAGS_OFFSET 27 #define MAX_FLAGS_OFFSET 27
class SvtSearchOptions_Impl: public ConfigItem, private boost::noncopyable class SvtSearchOptions_Impl : public ConfigItem
{ {
sal_Int32 nFlags; sal_Int32 nFlags;
bool bModified; bool bModified;
SvtSearchOptions_Impl(const SvtSearchOptions_Impl&) SAL_DELETED_FUNCTION;
SvtSearchOptions_Impl& operator=(const SvtSearchOptions_Impl&) SAL_DELETED_FUNCTION;
protected: protected:
bool IsModified() const { return bModified; } bool IsModified() const { return bModified; }
using ConfigItem::SetModified; using ConfigItem::SetModified;

View File

@@ -18,8 +18,6 @@
*/ */
#include <unotools/componentresmodule.hxx> #include <unotools/componentresmodule.hxx>
#include <boost/noncopyable.hpp>
#include <tools/resmgr.hxx> #include <tools/resmgr.hxx>
#include <osl/diagnose.h> #include <osl/diagnose.h>
#include <rtl/strbuf.hxx> #include <rtl/strbuf.hxx>
@@ -33,13 +31,16 @@ namespace utl
not threadsafe! not threadsafe!
*/ */
class OComponentResModuleImpl: private boost::noncopyable class OComponentResModuleImpl
{ {
private: private:
ResMgr* m_pResources; ResMgr* m_pResources;
bool m_bInitialized; bool m_bInitialized;
OString m_sResFilePrefix; OString m_sResFilePrefix;
OComponentResModuleImpl(const OComponentResModuleImpl&) SAL_DELETED_FUNCTION;
OComponentResModuleImpl& operator=(const OComponentResModuleImpl&) SAL_DELETED_FUNCTION;
public: public:
OComponentResModuleImpl( const OString& _rResFilePrefix ) OComponentResModuleImpl( const OString& _rResFilePrefix )
:m_pResources( NULL ) :m_pResources( NULL )

View File

@@ -20,7 +20,6 @@
#include <sal/config.h> #include <sal/config.h>
#include <osl/diagnose.h> #include <osl/diagnose.h>
#include <boost/noncopyable.hpp>
#include <unotools/sharedunocomponent.hxx> #include <unotools/sharedunocomponent.hxx>
#include <com/sun/star/lang/XComponent.hpp> #include <com/sun/star/lang/XComponent.hpp>
#include <com/sun/star/util/XCloseable.hpp> #include <com/sun/star/util/XCloseable.hpp>
@@ -67,12 +66,14 @@ namespace utl
typedef ::cppu::WeakImplHelper1 < XCloseListener typedef ::cppu::WeakImplHelper1 < XCloseListener
> CloseableComponentImpl_Base; > CloseableComponentImpl_Base;
class CloseableComponentImpl: class CloseableComponentImpl : public CloseableComponentImpl_Base
public CloseableComponentImpl_Base, private boost::noncopyable
{ {
private: private:
Reference< XCloseable > m_xCloseable; Reference< XCloseable > m_xCloseable;
CloseableComponentImpl(const CloseableComponentImpl&) SAL_DELETED_FUNCTION;
CloseableComponentImpl& operator=(const CloseableComponentImpl&) SAL_DELETED_FUNCTION;
public: public:
CloseableComponentImpl( const Reference< XInterface >& _rxComponent ); CloseableComponentImpl( const Reference< XInterface >& _rxComponent );

View File

@@ -35,7 +35,7 @@ namespace com { namespace sun { namespace star { namespace container {
} } } } } } } }
class BitmapEx; class BitmapEx;
class ImplImageTree: private boost::noncopyable { class ImplImageTree {
public: public:
ImplImageTree(); ImplImageTree();
@@ -57,6 +57,9 @@ public:
css::uno::Reference< css::container::XNameAccess > getNameAccess(); css::uno::Reference< css::container::XNameAccess > getNameAccess();
private: private:
ImplImageTree(const ImplImageTree&) SAL_DELETED_FUNCTION;
ImplImageTree& operator=(const ImplImageTree&) SAL_DELETED_FUNCTION;
typedef std::unordered_map<OUString, std::pair<bool, BitmapEx>, OUStringHash> IconCache; typedef std::unordered_map<OUString, std::pair<bool, BitmapEx>, OUStringHash> IconCache;
typedef std::unordered_map<OUString, OUString, OUStringHash> IconLinkHash; typedef std::unordered_map<OUString, OUString, OUStringHash> IconLinkHash;

View File

@@ -22,7 +22,6 @@
#include <sal/config.h> #include <sal/config.h>
#include <boost/noncopyable.hpp>
#include <com/sun/star/uno/Reference.hxx> #include <com/sun/star/uno/Reference.hxx>
#include <cppuhelper/weakref.hxx> #include <cppuhelper/weakref.hxx>
#include <list> #include <list>
@@ -198,8 +197,11 @@ struct ImplAccessibleInfos
enum AlwaysInputMode { AlwaysInputNone = 0, AlwaysInputEnabled = 1, AlwaysInputDisabled =2 }; enum AlwaysInputMode { AlwaysInputNone = 0, AlwaysInputEnabled = 1, AlwaysInputDisabled =2 };
class WindowImpl: private boost::noncopyable class WindowImpl
{ {
private:
WindowImpl(const WindowImpl&) SAL_DELETED_FUNCTION;
WindowImpl& operator=(const WindowImpl&) SAL_DELETED_FUNCTION;
public: public:
WindowImpl( WindowType ); WindowImpl( WindowType );
~WindowImpl(); ~WindowImpl();

View File

@@ -23,12 +23,14 @@
#include <rtl/ustring.hxx> #include <rtl/ustring.hxx>
#include <vcl/textdata.hxx> #include <vcl/textdata.hxx>
#include <vcl/txtattr.hxx> #include <vcl/txtattr.hxx>
#include <boost/noncopyable.hpp>
#include <boost/ptr_container/ptr_vector.hpp> #include <boost/ptr_container/ptr_vector.hpp>
class TextCharAttribList : boost::noncopyable class TextCharAttribList
{ {
private: private:
TextCharAttribList(const TextCharAttribList&) SAL_DELETED_FUNCTION;
TextCharAttribList& operator=(const TextCharAttribList&) SAL_DELETED_FUNCTION;
typedef boost::ptr_vector<TextCharAttrib> TextCharAttribs; typedef boost::ptr_vector<TextCharAttrib> TextCharAttribs;
TextCharAttribs maAttribs; TextCharAttribs maAttribs;
bool mbHasEmptyAttribs; bool mbHasEmptyAttribs;

View File

@@ -20,8 +20,6 @@
#include <stdlib.h> #include <stdlib.h>
#include <stdio.h> #include <stdio.h>
#include <boost/noncopyable.hpp>
#include <comphelper/string.hxx> #include <comphelper/string.hxx>
#include "vcl/ppdparser.hxx" #include "vcl/ppdparser.hxx"
#include "vcl/strhelper.hxx" #include "vcl/strhelper.hxx"
@@ -269,13 +267,17 @@ namespace
struct thePPDCache : public rtl::Static<PPDCache, thePPDCache> {}; struct thePPDCache : public rtl::Static<PPDCache, thePPDCache> {};
} }
class PPDDecompressStream: private boost::noncopyable class PPDDecompressStream
{ {
private:
PPDDecompressStream(const PPDDecompressStream&) SAL_DELETED_FUNCTION;
PPDDecompressStream& operator=(const PPDDecompressStream&) SAL_DELETED_FUNCTION;
SvFileStream* mpFileStream; SvFileStream* mpFileStream;
SvMemoryStream* mpMemStream; SvMemoryStream* mpMemStream;
OUString maFileName; OUString maFileName;
public: public:
PPDDecompressStream( const OUString& rFile ); PPDDecompressStream( const OUString& rFile );
~PPDDecompressStream(); ~PPDDecompressStream();

View File

@@ -10,8 +10,6 @@
#ifndef INCLUDED_VCL_UNX_GTK_INC_GTKPRINTWRAPPER_HXX #ifndef INCLUDED_VCL_UNX_GTK_INC_GTKPRINTWRAPPER_HXX
#define INCLUDED_VCL_UNX_GTK_INC_GTKPRINTWRAPPER_HXX #define INCLUDED_VCL_UNX_GTK_INC_GTKPRINTWRAPPER_HXX
#include <boost/noncopyable.hpp>
#include <gtk/gtk.h> #include <gtk/gtk.h>
#if defined ENABLE_GTK_PRINT || GTK_CHECK_VERSION(3,0,0) #if defined ENABLE_GTK_PRINT || GTK_CHECK_VERSION(3,0,0)
@@ -23,9 +21,8 @@
#include <gtk/gtkprintunixdialog.h> #include <gtk/gtkprintunixdialog.h>
#endif #endif
#if !GTK_CHECK_VERSION(3,0,0)
#include <osl/module.hxx> #include <osl/module.hxx>
#endif #include <sal/types.h>
#endif #endif
@@ -34,8 +31,11 @@ namespace vcl
namespace unx namespace unx
{ {
class GtkPrintWrapper : private boost::noncopyable class GtkPrintWrapper
{ {
private:
GtkPrintWrapper(const GtkPrintWrapper&) SAL_DELETED_FUNCTION;
GtkPrintWrapper& operator=(const GtkPrintWrapper&) SAL_DELETED_FUNCTION;
#if defined ENABLE_GTK_PRINT || GTK_CHECK_VERSION(3,0,0) #if defined ENABLE_GTK_PRINT || GTK_CHECK_VERSION(3,0,0)
public: public:
GtkPrintWrapper(); GtkPrintWrapper();