summaryrefslogtreecommitdiff
path: root/comphelper
diff options
context:
space:
mode:
Diffstat (limited to 'comphelper')
-rw-r--r--comphelper/qa/container/comphelper_ifcontainer.cxx4
-rw-r--r--comphelper/source/compare/AnyCompareFactory.cxx4
-rw-r--r--comphelper/source/container/IndexedPropertyValuesContainer.cxx4
-rw-r--r--comphelper/source/container/NamedPropertyValuesContainer.cxx4
-rw-r--r--comphelper/source/container/enumerablemap.cxx20
-rw-r--r--comphelper/source/container/namecontainer.cxx4
-rw-r--r--comphelper/source/eventattachermgr/eventattachermgr.cxx2
-rw-r--r--comphelper/source/misc/anycompare.cxx3
-rw-r--r--comphelper/source/misc/asyncnotification.cxx11
-rw-r--r--comphelper/source/misc/docpasswordrequest.cxx2
-rw-r--r--comphelper/source/misc/random.cxx4
-rw-r--r--comphelper/source/misc/threadpool.cxx4
-rw-r--r--comphelper/source/property/MasterPropertySet.cxx4
-rw-r--r--comphelper/source/property/genericpropertyset.cxx3
-rw-r--r--comphelper/source/streaming/memorystream.cxx4
-rw-r--r--comphelper/source/xml/ofopxmlhelper.cxx3
16 files changed, 76 insertions, 4 deletions
diff --git a/comphelper/qa/container/comphelper_ifcontainer.cxx b/comphelper/qa/container/comphelper_ifcontainer.cxx
index 8bd9bf75f660..4d28c496fe2e 100644
--- a/comphelper/qa/container/comphelper_ifcontainer.cxx
+++ b/comphelper/qa/container/comphelper_ifcontainer.cxx
@@ -31,6 +31,8 @@ using namespace com::sun::star;
using namespace com::sun::star::uno;
using namespace com::sun::star::lang;
+namespace {
+
struct ContainerStats {
int m_nAlive;
int m_nDisposed;
@@ -50,6 +52,8 @@ public:
}
};
+}
+
namespace comphelper_ifcontainer
{
static const int nTests = 10;
diff --git a/comphelper/source/compare/AnyCompareFactory.cxx b/comphelper/source/compare/AnyCompareFactory.cxx
index e4cec19feeed..7a31f10f1f71 100644
--- a/comphelper/source/compare/AnyCompareFactory.cxx
+++ b/comphelper/source/compare/AnyCompareFactory.cxx
@@ -31,6 +31,8 @@ using namespace com::sun::star::ucb;
using namespace com::sun::star::lang;
using namespace com::sun::star::i18n;
+namespace {
+
class AnyCompare : public ::cppu::WeakImplHelper< XAnyCompare >
{
Reference< XCollator > m_xCollator;
@@ -68,6 +70,8 @@ public:
virtual Sequence< OUString > SAL_CALL getSupportedServiceNames( ) override;
};
+}
+
sal_Int16 SAL_CALL AnyCompare::compare( const Any& any1, const Any& any2 )
{
sal_Int16 aResult = 0;
diff --git a/comphelper/source/container/IndexedPropertyValuesContainer.cxx b/comphelper/source/container/IndexedPropertyValuesContainer.cxx
index 0053cc8e4374..ecd1c2dbb2f8 100644
--- a/comphelper/source/container/IndexedPropertyValuesContainer.cxx
+++ b/comphelper/source/container/IndexedPropertyValuesContainer.cxx
@@ -34,6 +34,8 @@ using namespace com::sun::star;
typedef std::vector < uno::Sequence< beans::PropertyValue > > IndexedPropertyValues;
+namespace {
+
class IndexedPropertyValuesContainer : public cppu::WeakImplHelper< container::XIndexContainer, lang::XServiceInfo >
{
public:
@@ -63,6 +65,8 @@ private:
IndexedPropertyValues maProperties;
};
+}
+
IndexedPropertyValuesContainer::IndexedPropertyValuesContainer() throw()
{
}
diff --git a/comphelper/source/container/NamedPropertyValuesContainer.cxx b/comphelper/source/container/NamedPropertyValuesContainer.cxx
index 13b8f855866f..79a7d714b5e6 100644
--- a/comphelper/source/container/NamedPropertyValuesContainer.cxx
+++ b/comphelper/source/container/NamedPropertyValuesContainer.cxx
@@ -32,6 +32,8 @@ using namespace com::sun::star;
typedef std::map< OUString, uno::Sequence<beans::PropertyValue> > NamedPropertyValues;
+namespace {
+
class NamedPropertyValuesContainer : public cppu::WeakImplHelper< container::XNameContainer, lang::XServiceInfo >
{
public:
@@ -62,6 +64,8 @@ private:
NamedPropertyValues maProperties;
};
+}
+
NamedPropertyValuesContainer::NamedPropertyValuesContainer() throw()
{
}
diff --git a/comphelper/source/container/enumerablemap.cxx b/comphelper/source/container/enumerablemap.cxx
index bee5d03963b2..f9e5cfa8989a 100644
--- a/comphelper/source/container/enumerablemap.cxx
+++ b/comphelper/source/container/enumerablemap.cxx
@@ -76,9 +76,16 @@ namespace comphelper
using ::com::sun::star::uno::TypeDescription;
using ::com::sun::star::lang::DisposedException;
+ namespace {
+
class MapEnumerator;
+ }
+
typedef std::map< Any, Any, LessPredicateAdapter > KeyedValues;
+
+ namespace {
+
struct MapData
{
Type m_aKeyType;
@@ -106,6 +113,7 @@ namespace comphelper
MapData& operator=( const MapData& _source ) = delete;
};
+ }
static void lcl_registerMapModificationListener( MapData& _mapData, MapEnumerator& _listener )
{
@@ -141,6 +149,8 @@ namespace comphelper
, XServiceInfo
> Map_IFace;
+ namespace {
+
class EnumerableMap: public Map_IFace, public ComponentBase
{
protected:
@@ -194,15 +204,11 @@ namespace comphelper
MapData m_aData;
};
- namespace {
-
enum EnumerationType
{
eKeys, eValues, eBoth
};
- }
-
class MapEnumerator final
{
public:
@@ -249,6 +255,8 @@ namespace comphelper
bool m_disposed;
};
+ }
+
static void lcl_notifyMapDataListeners_nothrow( const MapData& _mapData )
{
for ( MapEnumerator* loop : _mapData.m_aModListeners )
@@ -259,6 +267,9 @@ namespace comphelper
typedef ::cppu::WeakImplHelper < XEnumeration
> MapEnumeration_Base;
+
+ namespace {
+
class MapEnumeration :public ComponentBase
,public MapEnumeration_Base
{
@@ -294,6 +305,7 @@ namespace comphelper
MapEnumerator m_aEnumerator;
};
+ }
EnumerableMap::EnumerableMap()
:Map_IFace( m_aMutex )
diff --git a/comphelper/source/container/namecontainer.cxx b/comphelper/source/container/namecontainer.cxx
index 0f905fac9124..bed257ca50c7 100644
--- a/comphelper/source/container/namecontainer.cxx
+++ b/comphelper/source/container/namecontainer.cxx
@@ -31,6 +31,8 @@ typedef std::map<OUString, css::uno::Any> SvGenericNameContainerMapImpl;
namespace comphelper
{
+ namespace {
+
/** this is the base helper class for NameContainer that's also declared in this header. */
class NameContainer : public ::cppu::WeakImplHelper< css::container::XNameContainer >
{
@@ -58,6 +60,8 @@ namespace comphelper
const css::uno::Type maType;
osl::Mutex maMutex;
};
+
+ }
}
using namespace ::comphelper;
diff --git a/comphelper/source/eventattachermgr/eventattachermgr.cxx b/comphelper/source/eventattachermgr/eventattachermgr.cxx
index 209d0ac6deb6..6651c6033bb6 100644
--- a/comphelper/source/eventattachermgr/eventattachermgr.cxx
+++ b/comphelper/source/eventattachermgr/eventattachermgr.cxx
@@ -62,6 +62,7 @@ using namespace osl;
namespace comphelper
{
+namespace {
struct AttachedObject_Impl
{
@@ -149,6 +150,7 @@ public:
virtual void SAL_CALL disposing(const EventObject& Source) override;
};
+}
AttacherAllListener_Impl::AttacherAllListener_Impl
(
diff --git a/comphelper/source/misc/anycompare.cxx b/comphelper/source/misc/anycompare.cxx
index f4d2a8b5d260..bb77544c957e 100644
--- a/comphelper/source/misc/anycompare.cxx
+++ b/comphelper/source/misc/anycompare.cxx
@@ -49,6 +49,8 @@ namespace comphelper
using ::com::sun::star::util::Time;
using ::com::sun::star::util::DateTime;
+ namespace {
+
class DatePredicateLess : public IKeyPredicateLess
{
public:
@@ -158,6 +160,7 @@ namespace comphelper
}
};
+ }
std::unique_ptr< IKeyPredicateLess > getStandardLessPredicate( Type const & i_type, Reference< XCollator > const & i_collator )
{
diff --git a/comphelper/source/misc/asyncnotification.cxx b/comphelper/source/misc/asyncnotification.cxx
index c73bd22cf163..a360b7207fe4 100644
--- a/comphelper/source/misc/asyncnotification.cxx
+++ b/comphelper/source/misc/asyncnotification.cxx
@@ -38,6 +38,8 @@ namespace comphelper
{
}
+ namespace {
+
struct ProcessableEvent
{
AnyEventRef aEvent;
@@ -54,9 +56,11 @@ namespace comphelper
}
};
+ }
typedef std::deque< ProcessableEvent > EventQueue;
+ namespace {
struct EqualProcessor
{
@@ -69,6 +73,8 @@ namespace comphelper
}
};
+ }
+
struct EventNotifierImpl
{
::osl::Mutex aMutex;
@@ -178,7 +184,12 @@ namespace comphelper
return AsyncEventNotifierBase::terminate();
}
+ namespace {
+
struct theNotifiersMutex : public rtl::Static<osl::Mutex, theNotifiersMutex> {};
+
+ }
+
static std::vector<std::weak_ptr<AsyncEventNotifierAutoJoin>> g_Notifiers;
void JoinAsyncEventNotifiers()
diff --git a/comphelper/source/misc/docpasswordrequest.cxx b/comphelper/source/misc/docpasswordrequest.cxx
index e1092df36f0b..56644d4d6e59 100644
--- a/comphelper/source/misc/docpasswordrequest.cxx
+++ b/comphelper/source/misc/docpasswordrequest.cxx
@@ -41,6 +41,7 @@ using ::com::sun::star::task::XInteractionPassword2;
namespace comphelper {
+namespace {
class AbortContinuation : public ::cppu::WeakImplHelper< XInteractionAbort >
{
@@ -48,6 +49,7 @@ public:
virtual void SAL_CALL select() override {}
};
+}
class PasswordContinuation : public ::cppu::WeakImplHelper< XInteractionPassword2 >
{
diff --git a/comphelper/source/misc/random.cxx b/comphelper/source/misc/random.cxx
index ddc970efe321..f001b06195d6 100644
--- a/comphelper/source/misc/random.cxx
+++ b/comphelper/source/misc/random.cxx
@@ -38,6 +38,8 @@ namespace rng
// http://en.wikipedia.org/wiki/Mersenne_twister
#define STD_RNG_ALGO std::mt19937
+namespace {
+
struct RandomNumberGenerator
{
std::mutex mutex;
@@ -77,6 +79,8 @@ struct RandomNumberGenerator
class theRandomNumberGenerator : public rtl::Static<RandomNumberGenerator, theRandomNumberGenerator> {};
+}
+
// uniform ints [a,b] distribution
int uniform_int_distribution(int a, int b)
{
diff --git a/comphelper/source/misc/threadpool.cxx b/comphelper/source/misc/threadpool.cxx
index 95b6f2dff091..9b1991b7f3a1 100644
--- a/comphelper/source/misc/threadpool.cxx
+++ b/comphelper/source/misc/threadpool.cxx
@@ -105,6 +105,8 @@ ThreadPool::~ThreadPool()
assert(maTasks.empty());
}
+namespace {
+
struct ThreadPoolStatic : public rtl::StaticWithInit< std::shared_ptr< ThreadPool >,
ThreadPoolStatic >
{
@@ -114,6 +116,8 @@ struct ThreadPoolStatic : public rtl::StaticWithInit< std::shared_ptr< ThreadPoo
};
};
+}
+
ThreadPool& ThreadPool::getSharedOptimalPool()
{
return *ThreadPoolStatic::get();
diff --git a/comphelper/source/property/MasterPropertySet.cxx b/comphelper/source/property/MasterPropertySet.cxx
index 61e6f84ecdd5..82f9d85d7525 100644
--- a/comphelper/source/property/MasterPropertySet.cxx
+++ b/comphelper/source/property/MasterPropertySet.cxx
@@ -28,6 +28,8 @@
#include <memory>
#include <vector>
+namespace {
+
class AutoOGuardArray
{
std::vector<std::unique_ptr< osl::Guard< comphelper::SolarMutex > >> maGuardArray;
@@ -38,6 +40,8 @@ public:
std::unique_ptr< osl::Guard< comphelper::SolarMutex > > & operator[] ( sal_Int32 i ) { return maGuardArray[i]; }
};
+}
+
AutoOGuardArray::AutoOGuardArray( sal_Int32 nNumElements ) : maGuardArray(nNumElements)
{
}
diff --git a/comphelper/source/property/genericpropertyset.cxx b/comphelper/source/property/genericpropertyset.cxx
index b5414b5c52d8..72cec45e2992 100644
--- a/comphelper/source/property/genericpropertyset.cxx
+++ b/comphelper/source/property/genericpropertyset.cxx
@@ -42,6 +42,8 @@ using namespace ::com::sun::star::lang;
namespace comphelper
{
+ namespace {
+
struct IMPL_GenericPropertySet_MutexContainer
{
Mutex maMutex;
@@ -84,6 +86,7 @@ namespace comphelper
virtual void SAL_CALL removePropertyChangeListener( const OUString& aPropertyName, const css::uno::Reference< css::beans::XPropertyChangeListener >& aListener ) override;
};
+ }
}
diff --git a/comphelper/source/streaming/memorystream.cxx b/comphelper/source/streaming/memorystream.cxx
index 8d120989eec6..940c9012f149 100644
--- a/comphelper/source/streaming/memorystream.cxx
+++ b/comphelper/source/streaming/memorystream.cxx
@@ -45,6 +45,8 @@ using namespace ::osl;
namespace comphelper
{
+namespace {
+
class UNOMemoryStream : public WeakImplHelper<XServiceInfo, XStream, XSeekableInputStream, XOutputStream, XTruncate>
{
public:
@@ -84,6 +86,8 @@ private:
sal_Int32 mnCursor;
};
+}
+
UNOMemoryStream::UNOMemoryStream()
: mnCursor(0)
{
diff --git a/comphelper/source/xml/ofopxmlhelper.cxx b/comphelper/source/xml/ofopxmlhelper.cxx
index 21f097531363..46785b35cbba 100644
--- a/comphelper/source/xml/ofopxmlhelper.cxx
+++ b/comphelper/source/xml/ofopxmlhelper.cxx
@@ -39,6 +39,8 @@ using namespace ::com::sun::star;
namespace comphelper {
+namespace {
+
// this helper class is designed to allow to parse ContentType- and Relationship-related information from OfficeOpenXML format
class OFOPXMLHelper_Impl
: public cppu::WeakImplHelper< css::xml::sax::XDocumentHandler >
@@ -65,6 +67,7 @@ public:
virtual void SAL_CALL setDocumentLocator( const css::uno::Reference< css::xml::sax::XLocator >& xLocator ) override;
};
+}
namespace OFOPXMLHelper {