cid#1560051 Missing move assignment operator
Change-Id: Ie59d391cd68f9d90fd8ac99a81ba8b997221165a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/161716 Tested-by: Caolán McNamara <caolan.mcnamara@collabora.com> Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
This commit is contained in:
@@ -48,24 +48,33 @@ namespace comphelper
|
||||
const Reference< XLogger >& getLogger() const { return m_xLogger; }
|
||||
};
|
||||
|
||||
EventLogger_Impl::EventLogger_Impl( const Reference< XComponentContext >& _rxContext, const OUString& _rLoggerName )
|
||||
:m_aContext( _rxContext )
|
||||
namespace
|
||||
{
|
||||
try
|
||||
Reference<XLogger> createLogger(const Reference<XComponentContext>& rxContext, const OUString& rLoggerName)
|
||||
{
|
||||
Reference< XLoggerPool > xPool( LoggerPool::get( m_aContext ) );
|
||||
if ( !_rLoggerName.isEmpty() )
|
||||
m_xLogger = xPool->getNamedLogger( _rLoggerName );
|
||||
else
|
||||
m_xLogger = xPool->getDefaultLogger();
|
||||
}
|
||||
catch( const Exception& )
|
||||
{
|
||||
TOOLS_WARN_EXCEPTION(
|
||||
"comphelper", "EventLogger_Impl::impl_createLogger_nothrow: caught an exception!" );
|
||||
try
|
||||
{
|
||||
Reference<XLoggerPool> xPool(LoggerPool::get(rxContext));
|
||||
if (!rLoggerName.isEmpty())
|
||||
return xPool->getNamedLogger(rLoggerName);
|
||||
else
|
||||
return xPool->getDefaultLogger();
|
||||
}
|
||||
catch( const Exception& )
|
||||
{
|
||||
TOOLS_WARN_EXCEPTION(
|
||||
"comphelper", "EventLogger_Impl::impl_createLogger_nothrow: caught an exception!" );
|
||||
}
|
||||
return Reference<XLogger>();
|
||||
}
|
||||
}
|
||||
|
||||
EventLogger_Impl::EventLogger_Impl(const Reference< XComponentContext >& _rxContext, const OUString& rLoggerName)
|
||||
: m_aContext(_rxContext)
|
||||
, m_xLogger(createLogger(_rxContext, rLoggerName))
|
||||
{
|
||||
}
|
||||
|
||||
EventLogger::EventLogger( const Reference< XComponentContext >& _rxContext, const char* _pAsciiLoggerName )
|
||||
:m_pImpl( std::make_shared<EventLogger_Impl>( _rxContext, OUString::createFromAscii( _pAsciiLoggerName ) ) )
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user