summaryrefslogtreecommitdiff
path: root/cppu/source/uno
diff options
context:
space:
mode:
Diffstat (limited to 'cppu/source/uno')
-rw-r--r--cppu/source/uno/EnvStack.cxx6
-rw-r--r--cppu/source/uno/IdentityMapping.cxx4
-rw-r--r--cppu/source/uno/cascade_mapping.cxx4
-rw-r--r--cppu/source/uno/lbmap.cxx15
4 files changed, 29 insertions, 0 deletions
diff --git a/cppu/source/uno/EnvStack.cxx b/cppu/source/uno/EnvStack.cxx
index 71c87bec7c37..f6b11352cf14 100644
--- a/cppu/source/uno/EnvStack.cxx
+++ b/cppu/source/uno/EnvStack.cxx
@@ -33,12 +33,15 @@
using namespace com::sun::star;
+namespace {
struct oslThreadIdentifier_equal
{
bool operator()(oslThreadIdentifier s1, oslThreadIdentifier s2) const;
};
+}
+
bool oslThreadIdentifier_equal::operator()(oslThreadIdentifier s1, oslThreadIdentifier s2) const
{
bool result = s1 == s2;
@@ -46,12 +49,15 @@ bool oslThreadIdentifier_equal::operator()(oslThreadIdentifier s1, oslThreadIden
return result;
}
+namespace {
struct oslThreadIdentifier_hash
{
size_t operator()(oslThreadIdentifier s1) const;
};
+}
+
size_t oslThreadIdentifier_hash::operator()(oslThreadIdentifier s1) const
{
return s1;
diff --git a/cppu/source/uno/IdentityMapping.cxx b/cppu/source/uno/IdentityMapping.cxx
index 6b7ad09f98c6..c6dab40cefe8 100644
--- a/cppu/source/uno/IdentityMapping.cxx
+++ b/cppu/source/uno/IdentityMapping.cxx
@@ -28,6 +28,8 @@
using namespace ::com::sun::star;
+namespace {
+
struct IdentityMapping : public uno_Mapping
{
sal_Int32 m_nRef;
@@ -36,6 +38,8 @@ struct IdentityMapping : public uno_Mapping
explicit IdentityMapping(uno::Environment const & rEnv);
};
+}
+
extern "C"
{
diff --git a/cppu/source/uno/cascade_mapping.cxx b/cppu/source/uno/cascade_mapping.cxx
index 13df4d8814e7..f57f7dc0ac87 100644
--- a/cppu/source/uno/cascade_mapping.cxx
+++ b/cppu/source/uno/cascade_mapping.cxx
@@ -30,6 +30,8 @@
using namespace com::sun::star;
+namespace {
+
class MediatorMapping : public uno_Mapping
{
oslInterlockedCount m_refCount;
@@ -53,6 +55,8 @@ public:
uno_Environment * pTo);
};
+}
+
extern "C" {
static void s_acquire(uno_Mapping * mapping)
{
diff --git a/cppu/source/uno/lbmap.cxx b/cppu/source/uno/lbmap.cxx
index a97d2a0dc829..ad27087b9b02 100644
--- a/cppu/source/uno/lbmap.cxx
+++ b/cppu/source/uno/lbmap.cxx
@@ -53,6 +53,8 @@ using namespace com::sun::star::uno;
namespace cppu
{
+namespace {
+
class Mapping
{
uno_Mapping * _pMapping;
@@ -80,6 +82,8 @@ public:
{ return (_pMapping != nullptr); }
};
+}
+
inline Mapping::Mapping( uno_Mapping * pMapping )
: _pMapping( pMapping )
{
@@ -110,6 +114,7 @@ inline Mapping & Mapping::operator = ( uno_Mapping * pMapping )
return *this;
}
+namespace {
struct MappingEntry
{
@@ -134,6 +139,8 @@ struct FctPtrHash
{ return reinterpret_cast<size_t>(pKey); }
};
+}
+
typedef std::unordered_map<
OUString, MappingEntry * > t_OUString2Entry;
typedef std::unordered_map<
@@ -141,6 +148,7 @@ typedef std::unordered_map<
typedef set< uno_getMappingFunc > t_CallbackSet;
+namespace {
struct MappingsData
{
@@ -155,6 +163,8 @@ struct MappingsData
set<OUString> aNegativeLibs;
};
+}
+
static MappingsData & getMappingsData()
{
//TODO This memory is leaked; see #i63473# for when this should be
@@ -164,6 +174,8 @@ static MappingsData & getMappingsData()
return *s_p;
}
+namespace {
+
/**
* This class mediates two different mapping via uno, e.g. form any language to uno,
* then from uno to any other language.
@@ -185,6 +197,9 @@ struct uno_Mediate_Mapping : public uno_Mapping
const Mapping & rFrom2Uno_, const Mapping & rUno2To_,
const OUString & rAddPurpose );
};
+
+}
+
extern "C"
{