diff options
Diffstat (limited to 'stoc')
-rw-r--r-- | stoc/source/corereflection/crcomp.cxx | 3 | ||||
-rw-r--r-- | stoc/source/corereflection/crenum.cxx | 3 | ||||
-rw-r--r-- | stoc/source/corereflection/criface.cxx | 6 | ||||
-rw-r--r-- | stoc/source/implementationregistration/mergekeys.cxx | 5 | ||||
-rw-r--r-- | stoc/source/invocation/invocation.cxx | 8 | ||||
-rw-r--r-- | stoc/source/invocation_adapterfactory/iafactory.cxx | 8 | ||||
-rw-r--r-- | stoc/source/javaloader/javaloader.cxx | 4 | ||||
-rw-r--r-- | stoc/source/namingservice/namingservice.cxx | 2 | ||||
-rw-r--r-- | stoc/source/security/permissions.cxx | 9 | ||||
-rw-r--r-- | stoc/source/typeconv/convert.cxx | 3 |
10 files changed, 51 insertions, 0 deletions
diff --git a/stoc/source/corereflection/crcomp.cxx b/stoc/source/corereflection/crcomp.cxx index 0e05a88192fb..a42ee6742f92 100644 --- a/stoc/source/corereflection/crcomp.cxx +++ b/stoc/source/corereflection/crcomp.cxx @@ -33,6 +33,7 @@ using namespace css::uno; namespace stoc_corefl { +namespace { class IdlCompFieldImpl : public IdlMemberImpl @@ -70,6 +71,8 @@ public: virtual void SAL_CALL set( Any & rObj, const Any & rValue ) override; }; +} + // XInterface Any IdlCompFieldImpl::queryInterface( const Type & rType ) diff --git a/stoc/source/corereflection/crenum.cxx b/stoc/source/corereflection/crenum.cxx index bbe3fa3e800e..a225a2b63f25 100644 --- a/stoc/source/corereflection/crenum.cxx +++ b/stoc/source/corereflection/crenum.cxx @@ -31,6 +31,7 @@ using namespace css::uno; namespace stoc_corefl { +namespace { class IdlEnumFieldImpl : public IdlMemberImpl @@ -67,6 +68,8 @@ public: virtual void SAL_CALL set( Any & rObj, const Any & rValue ) override; }; +} + // XInterface Any IdlEnumFieldImpl::queryInterface( const Type & rType ) diff --git a/stoc/source/corereflection/criface.cxx b/stoc/source/corereflection/criface.cxx index 8dd7d55e7fd7..f958994d7b1d 100644 --- a/stoc/source/corereflection/criface.cxx +++ b/stoc/source/corereflection/criface.cxx @@ -55,6 +55,7 @@ std::size_t multipleOf16(std::size_t n) { namespace stoc_corefl { +namespace { class IdlAttributeFieldImpl : public IdlMemberImpl @@ -95,6 +96,8 @@ private: uno_Any * exception, Reference< XInterface > const & context) const; }; +} + // XInterface Any IdlAttributeFieldImpl::queryInterface( const Type & rType ) @@ -313,6 +316,7 @@ void IdlAttributeFieldImpl::checkException( cppu::throwException(e); } +namespace { class IdlInterfaceMethodImpl : public IdlMemberImpl @@ -352,6 +356,8 @@ public: virtual Any SAL_CALL invoke( const Any & rObj, Sequence< Any > & rArgs ) override; }; +} + // XInterface Any IdlInterfaceMethodImpl::queryInterface( const Type & rType ) diff --git a/stoc/source/implementationregistration/mergekeys.cxx b/stoc/source/implementationregistration/mergekeys.cxx index 0fddd887d732..1a8f8fcce8c4 100644 --- a/stoc/source/implementationregistration/mergekeys.cxx +++ b/stoc/source/implementationregistration/mergekeys.cxx @@ -33,6 +33,8 @@ using namespace ::com::sun::star; namespace stoc_impreg { +namespace { + struct Link { OUString const m_name; @@ -43,6 +45,9 @@ struct Link , m_target( target ) {} }; + +} + typedef ::std::vector< Link > t_links; diff --git a/stoc/source/invocation/invocation.cxx b/stoc/source/invocation/invocation.cxx index 0969578620db..d70ed15cc2b8 100644 --- a/stoc/source/invocation/invocation.cxx +++ b/stoc/source/invocation/invocation.cxx @@ -81,6 +81,7 @@ static Reference<XIdlClass> TypeToIdlClass( const Type& rType, const Reference< return xRefl->forName( rType.getTypeName() ); } +namespace { class Invocation_Impl : public OWeakObject @@ -214,6 +215,7 @@ private: bool const mbFromOLE; }; +} Invocation_Impl::Invocation_Impl ( @@ -694,6 +696,7 @@ Any Invocation_Impl::invoke( const OUString& FunctionName, const Sequence<Any>& throw aExc; } +namespace { // Struct to optimize sorting struct MemberItem @@ -708,6 +711,8 @@ struct MemberItem sal_Int32 nIndex; }; +} + // Implementation of getting name or info // String sequence will be filled when pStringSeq != NULL // Info sequence will be filled when pInfoSeq != NULL @@ -1004,6 +1009,7 @@ Sequence< sal_Int8 > SAL_CALL Invocation_Impl::getImplementationId( ) return css::uno::Sequence<sal_Int8>(); } +namespace { class InvocationService : public WeakImplHelper< XSingleServiceFactory, XServiceInfo > @@ -1028,6 +1034,8 @@ private: Reference<XIdlReflection> xCoreReflection; }; +} + InvocationService::InvocationService( const Reference<XComponentContext> & xCtx ) : mxCtx( xCtx ) , mxSMgr( xCtx->getServiceManager() ) diff --git a/stoc/source/invocation_adapterfactory/iafactory.cxx b/stoc/source/invocation_adapterfactory/iafactory.cxx index 4a8c716dbeb4..4aecc1899c69 100644 --- a/stoc/source/invocation_adapterfactory/iafactory.cxx +++ b/stoc/source/invocation_adapterfactory/iafactory.cxx @@ -68,14 +68,20 @@ static OUString invadp_getImplementationName() return IMPLNAME; } +namespace { + struct hash_ptr { size_t operator() ( void * p ) const { return reinterpret_cast<size_t>(p); } }; + +} + typedef std::unordered_set< void *, hash_ptr > t_ptr_set; typedef std::unordered_map< void *, t_ptr_set, hash_ptr > t_ptr_map; +namespace { class FactoryImpl : public ::cppu::WeakImplHelper< lang::XServiceInfo, @@ -161,6 +167,8 @@ struct AdapterImpl AdapterImpl & operator= (const AdapterImpl &) = delete; }; +} + inline AdapterImpl::~AdapterImpl() { for ( size_t nPos = m_vInterfaces.size(); nPos--; ) diff --git a/stoc/source/javaloader/javaloader.cxx b/stoc/source/javaloader/javaloader.cxx index 4af288f737b8..274de5c79990 100644 --- a/stoc/source/javaloader/javaloader.cxx +++ b/stoc/source/javaloader/javaloader.cxx @@ -76,6 +76,8 @@ static OUString loader_getImplementationName() return "com.sun.star.comp.stoc.JavaComponentLoader"; } +namespace { + class JavaComponentLoader : public WeakImplHelper<XImplementationLoader, XServiceInfo> { css::uno::Reference<XComponentContext> m_xComponentContext; @@ -111,6 +113,8 @@ public: const OUString& implementationLoaderUrl, const OUString& locationUrl) override; }; +} + const css::uno::Reference<XImplementationLoader> & JavaComponentLoader::getJavaLoader() { MutexGuard aGuard(getInitMutex()); diff --git a/stoc/source/namingservice/namingservice.cxx b/stoc/source/namingservice/namingservice.cxx index 8b35ec58b3c5..6e613f11fd7d 100644 --- a/stoc/source/namingservice/namingservice.cxx +++ b/stoc/source/namingservice/namingservice.cxx @@ -57,6 +57,7 @@ static OUString ns_getImplementationName() typedef std::unordered_map< OUString, Reference<XInterface > > HashMap_OWString_Interface; +namespace { class NamingService_Impl : public WeakImplHelper < XServiceInfo, XNamingService > @@ -76,6 +77,7 @@ public: virtual void SAL_CALL revokeObject( const OUString& Name ) override; }; +} static Reference<XInterface> NamingService_Impl_create( SAL_UNUSED_PARAMETER const Reference<XComponentContext> & ) diff --git a/stoc/source/security/permissions.cxx b/stoc/source/security/permissions.cxx index 9568602c1fb4..ed05614bb2a0 100644 --- a/stoc/source/security/permissions.cxx +++ b/stoc/source/security/permissions.cxx @@ -96,6 +96,7 @@ static OUString makeStrings( return buf.makeStringAndClear(); } +namespace { class SocketPermission : public Permission { @@ -120,6 +121,8 @@ public: virtual OUString toString() const override; }; +} + char const * SocketPermission::s_actions [] = { "accept", "connect", "listen", "resolve", nullptr }; SocketPermission::SocketPermission( @@ -263,6 +266,7 @@ OUString SocketPermission::toString() const return buf.makeStringAndClear(); } +namespace { class FilePermission : public Permission { @@ -280,6 +284,8 @@ public: virtual OUString toString() const override; }; +} + char const * FilePermission::s_actions [] = { "read", "write", "execute", "delete", nullptr }; static OUString const & getWorkingDir() @@ -406,6 +412,7 @@ OUString FilePermission::toString() const return buf.makeStringAndClear(); } +namespace { class RuntimePermission : public Permission { @@ -422,6 +429,8 @@ public: virtual OUString toString() const override; }; +} + bool RuntimePermission::implies( Permission const & perm ) const { // check type diff --git a/stoc/source/typeconv/convert.cxx b/stoc/source/typeconv/convert.cxx index b74a3d1a5714..37d6c63e3d4b 100644 --- a/stoc/source/typeconv/convert.cxx +++ b/stoc/source/typeconv/convert.cxx @@ -208,6 +208,7 @@ static bool getHyperValue( sal_Int64 & rnVal, const OUString & rStr ) return false; } +namespace { class TypeConverter_Impl : public WeakImplHelper< XTypeConverter, XServiceInfo > { @@ -231,6 +232,8 @@ public: virtual Any SAL_CALL convertToSimpleType( const Any& aFrom, TypeClass aDestinationType ) override; }; +} + TypeConverter_Impl::TypeConverter_Impl() {} // XServiceInfo |