From 8c2f2e1dd77cdce9bdf63beff5a79f91adc44630 Mon Sep 17 00:00:00 2001 From: Jochen Nitschke Date: Fri, 1 Apr 2016 23:42:46 +0200 Subject: tdf#94306 replace boost::noncopyable in .. .. accessibility, avmedia, basctl, basic and bridges remove boost from module if not needed anymore Change-Id: I6177f8276766a0a7df1703e81bf1b448912df6e2 Reviewed-on: https://gerrit.libreoffice.org/23744 Tested-by: Jenkins Reviewed-by: Stephan Bergmann --- bridges/Library_cpp_uno.mk | 2 -- bridges/Library_java_uno.mk | 2 -- bridges/source/cpp_uno/shared/vtablefactory.cxx | 6 ++++-- bridges/source/jni_uno/jni_info.h | 22 +++++++++++++++------- bridges/source/jni_uno/jniunoenvironmentdata.hxx | 6 ++++-- 5 files changed, 23 insertions(+), 15 deletions(-) (limited to 'bridges') diff --git a/bridges/Library_cpp_uno.mk b/bridges/Library_cpp_uno.mk index 3206a53a6f89..0293511e40b6 100644 --- a/bridges/Library_cpp_uno.mk +++ b/bridges/Library_cpp_uno.mk @@ -184,8 +184,6 @@ endif endif -$(eval $(call gb_Library_use_external,$(gb_CPPU_ENV)_uno,boost_headers)) - $(eval $(call gb_Library_use_internal_comprehensive_api,$(gb_CPPU_ENV)_uno,\ udkapi \ )) diff --git a/bridges/Library_java_uno.mk b/bridges/Library_java_uno.mk index 758b6da5d0b3..178a008192eb 100644 --- a/bridges/Library_java_uno.mk +++ b/bridges/Library_java_uno.mk @@ -9,8 +9,6 @@ $(eval $(call gb_Library_Library,java_uno)) -$(eval $(call gb_Library_use_external,java_uno,boost_headers)) - ifeq ($(OS)$(COM),WNTGCC) ifeq ($(EXCEPTIONS),sjlj) $(eval $(call gb_Library_add_defs,java_uno,\ diff --git a/bridges/source/cpp_uno/shared/vtablefactory.cxx b/bridges/source/cpp_uno/shared/vtablefactory.cxx index 94da94d009ac..3e1564c844ef 100644 --- a/bridges/source/cpp_uno/shared/vtablefactory.cxx +++ b/bridges/source/cpp_uno/shared/vtablefactory.cxx @@ -34,7 +34,6 @@ #include "sal/types.h" #include "typelib/typedescription.hxx" -#include #include #include #include @@ -119,9 +118,12 @@ extern "C" void SAL_CALL freeExec( } class VtableFactory::GuardedBlocks: - public std::vector, private boost::noncopyable + public std::vector { public: + GuardedBlocks(const GuardedBlocks&) = delete; + const GuardedBlocks& operator=(const GuardedBlocks&) = delete; + explicit GuardedBlocks(VtableFactory const & factory): m_factory(factory), m_guarded(true) {} diff --git a/bridges/source/jni_uno/jni_info.h b/bridges/source/jni_uno/jni_info.h index 0976e467c5a4..b53cc659f2fb 100644 --- a/bridges/source/jni_uno/jni_info.h +++ b/bridges/source/jni_uno/jni_info.h @@ -22,7 +22,6 @@ #include -#include #include #include "jni_base.h" @@ -61,8 +60,11 @@ inline bool is_XInterface( typelib_TypeDescriptionReference * type ) OUString::unacquired( &type->pTypeName ) == "com.sun.star.uno.XInterface"); } -struct JNI_type_info: private boost::noncopyable +struct JNI_type_info { + JNI_type_info(const JNI_type_info&) = delete; + const JNI_type_info& operator=(const JNI_type_info&) = delete; + ::com::sun::star::uno::TypeDescription m_td; jclass m_class; @@ -106,18 +108,20 @@ private: virtual ~JNI_compound_type_info() {} }; -struct JNI_type_info_holder: private boost::noncopyable +struct JNI_type_info_holder { JNI_type_info * m_info; - inline JNI_type_info_holder() - : m_info( NULL ) - {} + + JNI_type_info_holder(const JNI_type_info_holder&) = delete; + const JNI_type_info_holder& operator=(const JNI_type_info_holder&) = delete; + + inline JNI_type_info_holder() : m_info( nullptr ) {} }; typedef ::std::unordered_map< OUString, JNI_type_info_holder, OUStringHash > t_str2type; -class JNI_info: private boost::noncopyable +class JNI_info { mutable ::osl::Mutex m_mutex; mutable t_str2type m_type_map; @@ -201,6 +205,10 @@ public: ::com::sun::star::uno::Type const & m_void_type; JNI_interface_type_info const * m_XInterface_type_info; + // noncopyable + JNI_info(const JNI_info&) = delete; + const JNI_info& operator=(const JNI_info&) = delete; + JNI_type_info const * get_type_info( JNI_context const & jni, typelib_TypeDescription * type ) const; diff --git a/bridges/source/jni_uno/jniunoenvironmentdata.hxx b/bridges/source/jni_uno/jniunoenvironmentdata.hxx index 4ca91adae994..e7eb9933e895 100644 --- a/bridges/source/jni_uno/jniunoenvironmentdata.hxx +++ b/bridges/source/jni_uno/jniunoenvironmentdata.hxx @@ -24,7 +24,6 @@ #include -#include #include #include #include @@ -34,7 +33,10 @@ namespace jni_uno { // The pContext payload of a JNI uno_Environment: -struct JniUnoEnvironmentData: boost::noncopyable { +struct JniUnoEnvironmentData { + JniUnoEnvironmentData(const JniUnoEnvironmentData&) = delete; + const JniUnoEnvironmentData& operator=(const JniUnoEnvironmentData&) = delete; + explicit JniUnoEnvironmentData( rtl::Reference const & theMachine): machine(theMachine), info(JNI_info::get_jni_info(theMachine)), -- cgit