summaryrefslogtreecommitdiffstats
path: root/io
diff options
context:
space:
mode:
Diffstat (limited to 'io')
-rw-r--r--io/source/TextInputStream/TextInputStream.cxx4
-rw-r--r--io/source/TextOutputStream/TextOutputStream.cxx4
-rw-r--r--io/source/acceptor/acc_pipe.cxx2
-rw-r--r--io/source/acceptor/acc_socket.cxx7
-rw-r--r--io/source/acceptor/acceptor.cxx7
-rw-r--r--io/source/connector/connector.cxx4
-rw-r--r--io/source/connector/ctr_socket.cxx4
-rw-r--r--io/source/stm/odata.cxx18
-rw-r--r--io/source/stm/omark.cxx7
-rw-r--r--io/source/stm/opipe.cxx3
-rw-r--r--io/source/stm/opump.cxx4
11 files changed, 64 insertions, 0 deletions
diff --git a/io/source/TextInputStream/TextInputStream.cxx b/io/source/TextInputStream/TextInputStream.cxx
index d90f30976ec8..fc860b1063b1 100644
--- a/io/source/TextInputStream/TextInputStream.cxx
+++ b/io/source/TextInputStream/TextInputStream.cxx
@@ -55,6 +55,8 @@ namespace io_TextInputStream
#define INITIAL_UNICODE_BUFFER_CAPACITY 0x100
#define READ_BYTE_COUNT 0x100
+namespace {
+
class OTextInputStream : public WeakImplHelper< XTextInputStream2, XServiceInfo >
{
Reference< XInputStream > mxStream;
@@ -105,6 +107,8 @@ public:
virtual sal_Bool SAL_CALL supportsService(const OUString& ServiceName) override;
};
+}
+
OTextInputStream::OTextInputStream()
: mbEncodingInitialized(false)
, mConvText2Unicode(nullptr)
diff --git a/io/source/TextOutputStream/TextOutputStream.cxx b/io/source/TextOutputStream/TextOutputStream.cxx
index 22fab1f01bd0..5f39c8afbb5e 100644
--- a/io/source/TextOutputStream/TextOutputStream.cxx
+++ b/io/source/TextOutputStream/TextOutputStream.cxx
@@ -47,6 +47,8 @@ namespace io_TextOutputStream
// Implementation XTextOutputStream
+namespace {
+
class OTextOutputStream : public WeakImplHelper< XTextOutputStream2, XServiceInfo >
{
Reference< XOutputStream > mxStream;
@@ -83,6 +85,8 @@ public:
virtual sal_Bool SAL_CALL supportsService(const OUString& ServiceName) override;
};
+}
+
OTextOutputStream::OTextOutputStream()
: mbEncodingInitialized(false)
, mConvUnicode2Text(nullptr)
diff --git a/io/source/acceptor/acc_pipe.cxx b/io/source/acceptor/acc_pipe.cxx
index ad9ce09a20cb..b06b0aa678bc 100644
--- a/io/source/acceptor/acc_pipe.cxx
+++ b/io/source/acceptor/acc_pipe.cxx
@@ -37,6 +37,7 @@ using namespace ::com::sun::star::io;
namespace io_acceptor
{
+ namespace {
class PipeConnection :
public WeakImplHelper< XConnection >
@@ -55,6 +56,7 @@ namespace io_acceptor
OUString m_sDescription;
};
+ }
PipeConnection::PipeConnection( const OUString &sConnectionDescription) :
m_nStatus( 0 ),
diff --git a/io/source/acceptor/acc_socket.cxx b/io/source/acceptor/acc_socket.cxx
index a72179ecb356..9700cd566bb8 100644
--- a/io/source/acceptor/acc_socket.cxx
+++ b/io/source/acceptor/acc_socket.cxx
@@ -41,6 +41,7 @@ namespace io_acceptor {
typedef std::unordered_set< css::uno::Reference< css::io::XStreamListener> >
XStreamListener_hash_set;
+ namespace {
class SocketConnection : public ::cppu::WeakImplHelper<
css::connection::XConnection,
@@ -75,6 +76,8 @@ namespace io_acceptor {
XStreamListener_hash_set _listeners;
};
+ }
+
template<class T>
static void notifyListeners(SocketConnection * pCon, bool * notified, T t)
{
@@ -98,6 +101,8 @@ namespace io_acceptor {
xStreamListener->started();
}
+ namespace {
+
struct callError {
const Any & any;
@@ -106,6 +111,8 @@ namespace io_acceptor {
void operator () (const Reference<XStreamListener>& xStreamListener);
};
+ }
+
callError::callError(const Any & aAny)
: any(aAny)
{
diff --git a/io/source/acceptor/acceptor.cxx b/io/source/acceptor/acceptor.cxx
index 217c23b9a845..d1f2bb54bf40 100644
--- a/io/source/acceptor/acceptor.cxx
+++ b/io/source/acceptor/acceptor.cxx
@@ -46,6 +46,8 @@ using namespace ::com::sun::star::connection;
namespace io_acceptor
{
+ namespace {
+
class OAcceptor : public WeakImplHelper< XAcceptor, XServiceInfo >
{
public:
@@ -73,6 +75,7 @@ namespace io_acceptor
Reference<XAcceptor> _xAcceptor;
};
+ }
OAcceptor::OAcceptor( const Reference< XComponentContext > & xCtx )
: m_bInAccept( false )
@@ -85,6 +88,8 @@ namespace io_acceptor
m_pPipe.reset();
}
+ namespace {
+
struct BeingInAccept
{
/// @throws AlreadyAcceptingException
@@ -102,6 +107,8 @@ namespace io_acceptor
bool *m_pFlag;
};
+ }
+
Reference< XConnection > OAcceptor::accept( const OUString &sConnectionDescription )
{
// if there is a thread already accepting in this object, throw an exception.
diff --git a/io/source/connector/connector.cxx b/io/source/connector/connector.cxx
index c21a34d17eac..0f4792f3aa8e 100644
--- a/io/source/connector/connector.cxx
+++ b/io/source/connector/connector.cxx
@@ -45,6 +45,8 @@ using namespace ::com::sun::star::connection;
namespace stoc_connector
{
+ namespace {
+
class OConnector : public WeakImplHelper< XConnector, XServiceInfo >
{
Reference< XMultiComponentFactory > _xSMgr;
@@ -62,6 +64,8 @@ namespace stoc_connector
virtual sal_Bool SAL_CALL supportsService(const OUString& ServiceName) override;
};
+ }
+
OConnector::OConnector(const Reference< XComponentContext > &xCtx)
: _xSMgr( xCtx->getServiceManager() )
, _xCtx( xCtx )
diff --git a/io/source/connector/ctr_socket.cxx b/io/source/connector/ctr_socket.cxx
index ada34a6e2016..164cd4f6f31c 100644
--- a/io/source/connector/ctr_socket.cxx
+++ b/io/source/connector/ctr_socket.cxx
@@ -53,6 +53,8 @@ namespace stoc_connector {
xStreamListener->started();
}
+ namespace {
+
struct callError {
const Any & any;
@@ -61,6 +63,8 @@ namespace stoc_connector {
void operator () (const Reference<XStreamListener>& xStreamListener);
};
+ }
+
callError::callError(const Any & aAny)
: any(aAny)
{
diff --git a/io/source/stm/odata.cxx b/io/source/stm/odata.cxx
index 0c1dd29f9bb1..6ffd12c89387 100644
--- a/io/source/stm/odata.cxx
+++ b/io/source/stm/odata.cxx
@@ -49,6 +49,8 @@ using namespace ::com::sun::star::lang;
namespace io_stm {
+namespace {
+
class ODataInputStream :
public WeakImplHelper <
XDataInputStream,
@@ -106,6 +108,8 @@ protected:
bool m_bValidStream;
};
+}
+
// XInputStream
sal_Int32 ODataInputStream::readBytes(Sequence< sal_Int8 >& aData, sal_Int32 nBytesToRead)
{
@@ -428,6 +432,7 @@ Sequence<OUString> ODataInputStream_getSupportedServiceNames()
return aRet;
}
+namespace {
class ODataOutputStream :
public WeakImplHelper <
@@ -480,6 +485,8 @@ protected:
bool m_bValidStream;
};
+}
+
// XOutputStream
void ODataOutputStream::writeBytes(const Sequence< sal_Int8 >& aData)
{
@@ -732,6 +739,7 @@ Sequence<OUString> ODataOutputStream_getSupportedServiceNames()
return aRet;
}
+namespace {
struct equalObjectContainer_Impl
{
@@ -751,6 +759,8 @@ struct hashObjectContainer_Impl
}
};
+}
+
typedef std::unordered_map
<
Reference< XInterface >,
@@ -759,6 +769,8 @@ typedef std::unordered_map
equalObjectContainer_Impl
> ObjectContainer_Impl;
+namespace {
+
class OObjectOutputStream:
public ImplInheritanceHelper<
ODataOutputStream, /* parent */
@@ -827,6 +839,8 @@ private:
bool m_bValidMarkable;
};
+}
+
void OObjectOutputStream::writeObject( const Reference< XPersistObject > & xPObj )
{
@@ -998,6 +1012,8 @@ Sequence< OUString > OObjectOutputStream::getSupportedServiceNames()
return OObjectOutputStream_getSupportedServiceNames();
}
+namespace {
+
class OObjectInputStream:
public ImplInheritanceHelper<
ODataInputStream, /* parent */
@@ -1073,6 +1089,8 @@ private:
};
+}
+
Reference< XPersistObject > OObjectInputStream::readObject()
{
// check if chain contains a XMarkableStream
diff --git a/io/source/stm/omark.cxx b/io/source/stm/omark.cxx
index 19191e4a957b..7623392b4277 100644
--- a/io/source/stm/omark.cxx
+++ b/io/source/stm/omark.cxx
@@ -52,6 +52,8 @@ using namespace ::com::sun::star::lang;
namespace io_stm {
+namespace {
+
/***********************
*
* OMarkableOutputStream.
@@ -122,6 +124,8 @@ private:
Mutex m_mutex;
};
+}
+
OMarkableOutputStream::OMarkableOutputStream( )
: m_bValidStream(false)
, m_pBuffer( new MemRingBuffer )
@@ -386,6 +390,7 @@ Sequence<OUString> OMarkableOutputStream_getSupportedServiceNames()
// XMarkableInputStream
+namespace {
class OMarkableInputStream :
public WeakImplHelper
@@ -448,6 +453,8 @@ private:
Mutex m_mutex;
};
+}
+
OMarkableInputStream::OMarkableInputStream()
: m_bValidStream(false)
, m_nCurrentPos(0)
diff --git a/io/source/stm/opipe.cxx b/io/source/stm/opipe.cxx
index 4815a69bc862..07331472d5e5 100644
--- a/io/source/stm/opipe.cxx
+++ b/io/source/stm/opipe.cxx
@@ -52,6 +52,8 @@ namespace com::sun::star::uno { class XComponentContext; }
namespace io_stm{
+namespace {
+
class OPipeImpl :
public WeakImplHelper< XPipe , XConnectable , XServiceInfo >
{
@@ -98,6 +100,7 @@ private:
std::unique_ptr<MemFIFO> m_pFIFO;
};
+}
OPipeImpl::OPipeImpl()
: m_nBytesToSkip(0 )
diff --git a/io/source/stm/opump.cxx b/io/source/stm/opump.cxx
index fc6ba14c8488..29f09bdd3e81 100644
--- a/io/source/stm/opump.cxx
+++ b/io/source/stm/opump.cxx
@@ -46,6 +46,8 @@ using namespace com::sun::star::io;
namespace io_stm {
+ namespace {
+
class Pump : public WeakImplHelper<
XActiveDataSource, XActiveDataSink, XActiveDataControl, XConnectable, XServiceInfo >
{
@@ -98,6 +100,8 @@ namespace io_stm {
virtual sal_Bool SAL_CALL supportsService(const OUString& ServiceName) override;
};
+ }
+
Pump::Pump() : m_aThread( nullptr ),
m_cnt( m_aMutex ),
m_closeFired( false )