summaryrefslogtreecommitdiff
path: root/comphelper
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2017-04-27 11:28:29 +0100
committerCaolán McNamara <caolanm@redhat.com>2017-04-27 13:29:58 +0100
commit8efb852024336b455a9d078c675645e01589afdc (patch)
treed217d093e93ee5155196a1a22fd7fd04f89ae719 /comphelper
parent99f0165c8b634a69e9d7bf633256b7d62aab60d8 (diff)
another name for a nonlocalized string is a string
Change-Id: Ic4ff92720edd1c10dd6d5eff026e79cb02990005
Diffstat (limited to 'comphelper')
-rw-r--r--comphelper/source/misc/logging.cxx66
1 files changed, 0 insertions, 66 deletions
diff --git a/comphelper/source/misc/logging.cxx b/comphelper/source/misc/logging.cxx
index ed6a79c0c5f6..4f88ce3d17ef 100644
--- a/comphelper/source/misc/logging.cxx
+++ b/comphelper/source/misc/logging.cxx
@@ -191,51 +191,6 @@ namespace comphelper
}
};
-
- bool lcl_loadBundle_nothrow( Reference< XComponentContext > const & _rContext, ResourceBasedEventLogger_Data& _rLoggerData )
- {
- if ( _rLoggerData.bBundleLoaded )
- return _rLoggerData.xBundle.is();
-
- // no matter what happens below, don't attempt creation ever again
- _rLoggerData.bBundleLoaded = true;
-
- try
- {
- Reference< XResourceBundleLoader > xLoader(
- css::resource::OfficeResourceLoader::get(
- _rContext ) );
- _rLoggerData.xBundle.set( xLoader->loadBundle_Default( _rLoggerData.sBundleBaseName ), UNO_QUERY_THROW );
- }
- catch( const Exception& e )
- {
- (void)e;
- OSL_FAIL( "lcl_loadBundle_nothrow: caught an exception!" );
- }
-
- return _rLoggerData.xBundle.is();
- }
-
-
- OUString lcl_loadString_nothrow( const Reference< XResourceBundle >& _rxBundle, const sal_Int32 _nMessageResID )
- {
- OSL_PRECOND( _rxBundle.is(), "lcl_loadString_nothrow: this will crash!" );
- OUString sMessage;
- try
- {
- OUStringBuffer aBuffer;
- aBuffer.append( "string:" );
- aBuffer.append( _nMessageResID );
- OSL_VERIFY( _rxBundle->getDirectElement( aBuffer.makeStringAndClear() ) >>= sMessage );
- }
- catch( const Exception& e )
- {
- (void)e;
- OSL_FAIL( "lcl_loadString_nothrow: caught an exception!" );
- }
- return sMessage;
- }
-
ResourceBasedEventLogger::ResourceBasedEventLogger( const Reference< XComponentContext >& _rxContext, const sal_Char* _pResourceBundleBaseName,
const sal_Char* _pAsciiLoggerName )
:EventLogger( _rxContext, _pAsciiLoggerName )
@@ -243,27 +198,6 @@ namespace comphelper
{
m_pData->sBundleBaseName = OUString::createFromAscii( _pResourceBundleBaseName );
}
-
-
- OUString ResourceBasedEventLogger::impl_loadStringMessage_nothrow( const sal_Int32 _nMessageResID ) const
- {
- OUString sMessage;
- if ( lcl_loadBundle_nothrow( m_pImpl->getContext(), *m_pData ) )
- sMessage = lcl_loadString_nothrow( m_pData->xBundle, _nMessageResID );
- if ( sMessage.isEmpty() )
- {
- OUStringBuffer aBuffer;
- aBuffer.append( "<invalid event resource: '" );
- aBuffer.append( m_pData->sBundleBaseName );
- aBuffer.append( ":" );
- aBuffer.append( _nMessageResID );
- aBuffer.append( "'>" );
- sMessage = aBuffer.makeStringAndClear();
- }
- return sMessage;
- }
-
-
} // namespace comphelper