Remove visual noise from cppuhelper

Change-Id: If23a1aa19949f91f900d55ff9e1d5039378d7277
Reviewed-on: https://gerrit.libreoffice.org/8248
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
This commit is contained in:
Alexander Wilms 2014-02-25 18:02:27 +01:00 committed by Caolán McNamara
parent a67c2a12bc
commit 518b75326a
11 changed files with 74 additions and 74 deletions

View file

@ -36,9 +36,9 @@ using ::rtl::OUStringToOString;
namespace cppu
{
// ----------------------------------------------------
// class OComponentHelper
// ----------------------------------------------------
OComponentHelper::OComponentHelper( Mutex & rMutex ) SAL_THROW(())
: rBHelper( rMutex )

View file

@ -284,7 +284,7 @@ static inline void try_dispose( Reference< lang::XComponent > const & xComp )
}
}
//==================================================================================================
class DisposingForwarder
: public WeakImplHelper1< lang::XEventListener >
@ -324,13 +324,13 @@ void DisposingForwarder::disposing( lang::EventObject const & )
m_xTarget.clear();
}
//==================================================================================================
struct MutexHolder
{
protected:
Mutex m_mutex;
};
//==================================================================================================
class ComponentContext
: private MutexHolder
@ -806,7 +806,7 @@ ComponentContext::ComponentContext(
}
//##################################################################################################
extern "C" { static void s_createComponentContext_v(va_list * pParam)
{
ContextEntry_Init const * pEntries = va_arg(*pParam, ContextEntry_Init const *);

View file

@ -40,7 +40,7 @@ namespace
using cppuhelper::detail::XExceptionThrower;
//==============================================================================
struct ExceptionThrower : public uno_Interface, XExceptionThrower
{
inline ExceptionThrower();
@ -183,7 +183,7 @@ class theExceptionThrower : public rtl::Static<ExceptionThrower, theExceptionThr
namespace cppu
{
//==============================================================================
void SAL_CALL throwException( Any const & exc ) SAL_THROW( (Exception) )
{
if (exc.getValueTypeClass() != TypeClass_EXCEPTION)
@ -211,7 +211,7 @@ void SAL_CALL throwException( Any const & exc ) SAL_THROW( (Exception) )
xThrower->throwException( exc );
}
//==============================================================================
Any SAL_CALL getCaughtException()
{
Mapping cpp2uno(Environment::getCurrent(), Environment(UNO_LB_UNO));

View file

@ -1033,7 +1033,7 @@ Reference<XSingleServiceFactory > SAL_CALL createOneInstanceRegistryFactory(
rServiceManager, rImplementationName, rImplementationKey, true );
}
//##################################################################################################
Reference< lang::XSingleComponentFactory > SAL_CALL createSingleComponentFactory(
ComponentFactoryFunc fptr,
OUString const & rImplementationName,

View file

@ -41,7 +41,7 @@ namespace
namespace cppu
{
//==================================================================================================
Mutex & SAL_CALL getImplHelperInitMutex(void) SAL_THROW(())
{
return theImplHelperInitMutex::get();
@ -191,9 +191,9 @@ Any ClassData::query( const Type & rType, lang::XTypeProvider * pBase ) SAL_THRO
return Any();
}
//##################################################################################################
//##################################################################################################
//##################################################################################################
// WeakComponentImplHelperBase

View file

@ -209,7 +209,7 @@ static inline void * __queryDeepNoXInterface(
}
// ImplHelper
//==================================================================================================
Any SAL_CALL ImplHelper_query(
Type const & rType, class_data * cd, void * that )
SAL_THROW( (RuntimeException) )
@ -234,7 +234,7 @@ Any SAL_CALL ImplHelper_query(
}
return Any( &p, pTDR );
}
//==================================================================================================
Any SAL_CALL ImplHelper_queryNoXInterface(
Type const & rType, class_data * cd, void * that )
SAL_THROW( (RuntimeException) )
@ -252,7 +252,7 @@ Any SAL_CALL ImplHelper_queryNoXInterface(
return Any();
}
}
//==================================================================================================
Sequence< sal_Int8 > SAL_CALL ImplHelper_getImplementationId( class_data * cd )
SAL_THROW( (RuntimeException) )
{
@ -273,7 +273,7 @@ Sequence< sal_Int8 > SAL_CALL ImplHelper_getImplementationId( class_data * cd )
::rtl_byte_sequence_constructFromArray( &seq, cd->m_id, 16 );
return Sequence< sal_Int8 >( seq, SAL_NO_ACQUIRE );
}
//==================================================================================================
Sequence< Type > SAL_CALL ImplHelper_getTypes(
class_data * cd )
SAL_THROW( (RuntimeException) )
@ -283,7 +283,7 @@ Sequence< Type > SAL_CALL ImplHelper_getTypes(
__fillTypes( pTypes, cd );
return types;
}
//==================================================================================================
Sequence< Type > SAL_CALL ImplInhHelper_getTypes(
class_data * cd, Sequence< Type > const & rAddTypes )
SAL_THROW( (RuntimeException) )
@ -303,7 +303,7 @@ Sequence< Type > SAL_CALL ImplInhHelper_getTypes(
}
// WeakImplHelper
//==================================================================================================
Any SAL_CALL WeakImplHelper_query(
Type const & rType, class_data * cd, void * that, OWeakObject * pBase )
SAL_THROW( (RuntimeException) )
@ -322,7 +322,7 @@ Any SAL_CALL WeakImplHelper_query(
}
return pBase->OWeakObject::queryInterface( rType );
}
//==================================================================================================
Sequence< Type > SAL_CALL WeakImplHelper_getTypes(
class_data * cd )
SAL_THROW( (RuntimeException) )
@ -336,7 +336,7 @@ Sequence< Type > SAL_CALL WeakImplHelper_getTypes(
}
// WeakAggImplHelper
//==================================================================================================
Any SAL_CALL WeakAggImplHelper_queryAgg(
Type const & rType, class_data * cd, void * that, OWeakAggObject * pBase )
SAL_THROW( (RuntimeException) )
@ -355,7 +355,7 @@ Any SAL_CALL WeakAggImplHelper_queryAgg(
}
return pBase->OWeakAggObject::queryAggregation( rType );
}
//==================================================================================================
Sequence< Type > SAL_CALL WeakAggImplHelper_getTypes(
class_data * cd )
SAL_THROW( (RuntimeException) )
@ -370,7 +370,7 @@ Sequence< Type > SAL_CALL WeakAggImplHelper_getTypes(
}
// WeakComponentImplHelper
//==================================================================================================
Any SAL_CALL WeakComponentImplHelper_query(
Type const & rType, class_data * cd, void * that, WeakComponentImplHelperBase * pBase )
SAL_THROW( (RuntimeException) )
@ -389,7 +389,7 @@ Any SAL_CALL WeakComponentImplHelper_query(
}
return pBase->WeakComponentImplHelperBase::queryInterface( rType );
}
//==================================================================================================
Sequence< Type > SAL_CALL WeakComponentImplHelper_getTypes(
class_data * cd )
SAL_THROW( (RuntimeException) )
@ -404,7 +404,7 @@ Sequence< Type > SAL_CALL WeakComponentImplHelper_getTypes(
}
// WeakAggComponentImplHelper
//==================================================================================================
Any SAL_CALL WeakAggComponentImplHelper_queryAgg(
Type const & rType, class_data * cd, void * that, WeakAggComponentImplHelperBase * pBase )
SAL_THROW( (RuntimeException) )
@ -423,7 +423,7 @@ Any SAL_CALL WeakAggComponentImplHelper_queryAgg(
}
return pBase->WeakAggComponentImplHelperBase::queryAggregation( rType );
}
//==================================================================================================
Sequence< Type > SAL_CALL WeakAggComponentImplHelper_getTypes(
class_data * cd )
SAL_THROW( (RuntimeException) )

View file

@ -179,7 +179,7 @@ OUString Bootstrap_MacroExpander::expandMacros( OUString const & exp )
return cppuhelper::detail::expandMacros( exp );
}
//==================================================================================================
Reference< XInterface > SAL_CALL service_create(
SAL_UNUSED_PARAMETER Reference< XComponentContext > const & )
SAL_THROW( (RuntimeException) )

View file

@ -130,9 +130,9 @@ sal_Bool OPropertySetHelperInfo_Impl::hasPropertyByName( const OUString & Proper
return pR != NULL;
}
// ----------------------------------------------------
// class PropertySetHelper_Impl
// ----------------------------------------------------
class OPropertySetHelper::Impl {
public:
@ -155,9 +155,9 @@ public:
};
// ----------------------------------------------------
// class PropertySetHelper
// ----------------------------------------------------
OPropertySetHelper::OPropertySetHelper(
OBroadcastHelper & rBHelper_ ) SAL_THROW(())
: rBHelper( rBHelper_ ),
@ -1032,9 +1032,9 @@ void OPropertySetHelper2::enableChangeListenerNotification( sal_Bool bEnable )
m_pReserved->m_bFireEvents = bEnable;
}
//========================================================================
//== OPropertyArrayHelper ================================================
//========================================================================
extern "C" {
@ -1096,13 +1096,13 @@ OPropertyArrayHelper::OPropertyArrayHelper(
init( bSorted );
}
//========================================================================
sal_Int32 OPropertyArrayHelper::getCount() const
{
return aInfos.getLength();
}
//========================================================================
sal_Bool OPropertyArrayHelper::fillPropertyMembersByHandle
(
OUString * pPropName,
@ -1141,13 +1141,13 @@ sal_Bool OPropertyArrayHelper::fillPropertyMembersByHandle
return sal_False;
}
//========================================================================
Sequence< Property > OPropertyArrayHelper::getProperties(void)
{
return aInfos;
}
//========================================================================
Property OPropertyArrayHelper::getPropertyByName(const OUString& aPropertyName)
throw (UnknownPropertyException)
{
@ -1161,7 +1161,7 @@ Property OPropertyArrayHelper::getPropertyByName(const OUString& aPropertyName)
return *pR;
}
//========================================================================
sal_Bool OPropertyArrayHelper::hasPropertyByName(const OUString& aPropertyName)
{
Property * pR;
@ -1171,7 +1171,7 @@ sal_Bool OPropertyArrayHelper::hasPropertyByName(const OUString& aPropertyName)
return pR != NULL;
}
//========================================================================
sal_Int32 OPropertyArrayHelper::getHandleByName( const OUString & rPropName )
{
Property * pR;
@ -1181,7 +1181,7 @@ sal_Int32 OPropertyArrayHelper::getHandleByName( const OUString & rPropName )
return pR ? pR->Handle : -1;
}
//========================================================================
sal_Int32 OPropertyArrayHelper::fillHandles( sal_Int32 * pHandles, const Sequence< OUString > & rPropNames )
{
sal_Int32 nHitCount = 0;

View file

@ -64,7 +64,7 @@ static typelib_TypeDescription * createCTD(
Reference< container::XHierarchicalNameAccess > const & access,
const Reference< XTypeDescription > & xType );
//==================================================================================================
inline static typelib_TypeDescription * createCTD(
const Reference< XCompoundTypeDescription > & xType )
{
@ -121,7 +121,7 @@ inline static typelib_TypeDescription * createCTD(
}
return pRet;
}
//==================================================================================================
inline static typelib_TypeDescription * createCTD(
Reference< container::XHierarchicalNameAccess > const & access,
const Reference< XStructTypeDescription > & xType )
@ -197,7 +197,7 @@ inline static typelib_TypeDescription * createCTD(
}
return pRet;
}
//==================================================================================================
inline static typelib_TypeDescription * createCTD(
const Reference< XInterfaceAttributeTypeDescription2 > & xAttribute )
{
@ -235,7 +235,7 @@ inline static typelib_TypeDescription * createCTD(
}
return pRet;
}
//==================================================================================================
static typelib_TypeDescription * createCTD(
const Reference< XInterfaceMethodTypeDescription > & xMethod )
{
@ -306,7 +306,7 @@ static typelib_TypeDescription * createCTD(
}
return pRet;
}
//==================================================================================================
inline static typelib_TypeDescription * createCTD(
Reference< container::XHierarchicalNameAccess > const & access,
const Reference< XInterfaceTypeDescription2 > & xType )
@ -372,7 +372,7 @@ inline static typelib_TypeDescription * createCTD(
}
return pRet;
}
//==================================================================================================
inline static typelib_TypeDescription * createCTD( const Reference< XEnumTypeDescription > & xType )
{
typelib_TypeDescription * pRet = 0;
@ -391,7 +391,7 @@ inline static typelib_TypeDescription * createCTD( const Reference< XEnumTypeDes
}
return pRet;
}
//==================================================================================================
inline static typelib_TypeDescription * createCTD(
Reference< container::XHierarchicalNameAccess > const & access,
const Reference< XIndirectTypeDescription > & xType )
@ -418,7 +418,7 @@ inline static typelib_TypeDescription * createCTD(
return pRet;
}
//==================================================================================================
static typelib_TypeDescription * createCTD(
Reference< container::XHierarchicalNameAccess > const & access,
const Reference< XTypeDescription > & xType )
@ -562,7 +562,7 @@ static typelib_TypeDescription * createCTD(
}
//==================================================================================================
extern "C"
{
static void SAL_CALL typelib_callback(
@ -611,7 +611,7 @@ static void SAL_CALL typelib_callback(
}
}
//==================================================================================================
class EventListenerImpl
: public WeakImplHelper1< lang::XEventListener >
{
@ -639,7 +639,7 @@ void EventListenerImpl::disposing( lang::EventObject const & rEvt )
::typelib_typedescription_revokeCallback( m_xTDMgr.get(), typelib_callback );
}
//==================================================================================================
sal_Bool SAL_CALL installTypeDescriptionManager(
Reference< container::XHierarchicalNameAccess > const & xTDMgr_c )
SAL_THROW(())

View file

@ -73,7 +73,7 @@ static OUString impl1_getImplementationName()
return OUString("com.sun.star.comp.bootstrap.TestComponent1");
}
//==================================================================================================
class ServiceImpl0
: public WeakImplHelper2< lang::XServiceInfo, lang::XInitialization >
{
@ -147,7 +147,7 @@ sal_Bool ServiceImpl0::supportsService( const OUString & rServiceName )
return cppu::supportsService(this, rServiceName);
}
//==================================================================================================
class ServiceImpl1 : public ServiceImpl0
{
public:
@ -172,14 +172,14 @@ Sequence< OUString > ServiceImpl1::getSupportedServiceNames()
return impl1_getSupportedServiceNames();
}
//==================================================================================================
static Reference< XInterface > SAL_CALL ServiceImpl0_create(
Reference< XComponentContext > const & xContext )
SAL_THROW( (Exception) )
{
return (OWeakObject *)new ServiceImpl0( xContext );
}
//==================================================================================================
static Reference< XInterface > SAL_CALL ServiceImpl1_create(
Reference< XComponentContext > const & xContext )
SAL_THROW( (Exception) )
@ -207,14 +207,14 @@ static const struct ImplementationEntry g_entries[] =
// component exports
extern "C"
{
//==================================================================================================
sal_Bool SAL_CALL component_writeInfo(
void * pServiceManager, void * pRegistryKey )
{
return component_writeInfoHelper(
pServiceManager, pRegistryKey, g_entries );
}
//==================================================================================================
SAL_DLLPUBLIC_EXPORT void * SAL_CALL component_getFactory(
const sal_Char * pImplName, void * pServiceManager, void * pRegistryKey )
{
@ -224,9 +224,9 @@ SAL_DLLPUBLIC_EXPORT void * SAL_CALL component_getFactory(
}
//##################################################################################################
//##################################################################################################
//##################################################################################################
SAL_IMPLEMENT_MAIN()
{

View file

@ -77,7 +77,7 @@ using ::rtl::OUString;
using ::rtl::OUStringToOString;
using ::rtl::OString;
//==================================================================================================
struct TestImpl : public ImplHelper4< CA, DBA, FE, G >
{
sal_Int32 nRef;
@ -115,7 +115,7 @@ struct TestImpl : public ImplHelper4< CA, DBA, FE, G >
{ return OUString("g"); }
};
//==================================================================================================
struct TestWeakAggImpl : public WeakAggImplHelper4< CA, DBA, FE, G >
{
virtual ~TestWeakAggImpl()
@ -144,7 +144,7 @@ struct TestWeakAggImpl : public WeakAggImplHelper4< CA, DBA, FE, G >
{ return OUString("g"); }
};
//==================================================================================================
struct TestWeakImpl : public WeakImplHelper4< CA, DBA, FE, G >
{
TestWeakImpl() {}
@ -188,7 +188,7 @@ protected:
TestWeakImpl(int, int, int, int, int, int, int = 0) {}
};
//==================================================================================================
struct TestWeakComponentImpl : public WeakComponentImplHelper4< CA, DBA, FE, G >
{
Mutex m;
@ -224,7 +224,7 @@ struct TestWeakComponentImpl : public WeakComponentImplHelper4< CA, DBA, FE, G >
{ return OUString("g"); }
};
//==================================================================================================
struct TestWeakAggComponentImpl : public WeakAggComponentImplHelper4< CA, DBA, FE, G >
{
Mutex m;
@ -260,7 +260,7 @@ struct TestWeakAggComponentImpl : public WeakAggComponentImplHelper4< CA, DBA, F
{ return OUString("g"); }
};
//==================================================================================================
struct TestImplInh : public ImplInheritanceHelper2< TestWeakImpl, H, I >
{
TestImplInh() {}
@ -294,7 +294,7 @@ struct TestImplInh : public ImplInheritanceHelper2< TestWeakImpl, H, I >
{ return OUString("i"); }
};
//==================================================================================================
struct TestAggImplInh : public AggImplInheritanceHelper2< TestWeakAggImpl, H, I >
{
virtual ~TestAggImplInh()
@ -321,7 +321,7 @@ static bool isIn( Sequence< Type > const & rTypes, char const * name )
return false;
}
//==================================================================================================
static void dotest( const Reference< XInterface > & xOriginal )
{
Reference< lang::XTypeProvider > xTP( xOriginal, UNO_QUERY );
@ -419,7 +419,7 @@ void throw_one(
}
//==================================================================================================
void test_ImplHelper( const Reference< lang::XMultiServiceFactory > & /*xSF*/ )
{
Reference< XInterface > xImpl( (lang::XTypeProvider *)new TestImpl() );
@ -432,7 +432,7 @@ void test_ImplHelper( const Reference< lang::XMultiServiceFactory > & /*xSF*/ )
Reference< lang::XTypeProvider > xTP4( xWeakComponentImpl, UNO_QUERY );
Reference< XInterface > xWeakAggComponentImpl( (OWeakObject *)new TestWeakAggComponentImpl() );
Reference< lang::XTypeProvider > xTP5( xWeakAggComponentImpl, UNO_QUERY );
//
OSL_ASSERT(
xTP1->getImplementationId() != xTP2->getImplementationId() &&
xTP1->getImplementationId() != xTP3->getImplementationId() &&
@ -444,7 +444,7 @@ void test_ImplHelper( const Reference< lang::XMultiServiceFactory > & /*xSF*/ )
xTP3->getImplementationId() != xTP4->getImplementationId() &&
xTP3->getImplementationId() != xTP5->getImplementationId() &&
xTP4->getImplementationId() != xTP5->getImplementationId() );
//
dotest( xImpl );
dotest( xWeakImpl );
@ -468,7 +468,7 @@ void test_ImplHelper( const Reference< lang::XMultiServiceFactory > & /*xSF*/ )
OSL_ASSERT( xH->h() == "h2" );
OSL_ASSERT( xI->i() == "i2" );
//
OSL_ASSERT(
xTP6->getImplementationId() != xTP1->getImplementationId() &&
xTP6->getImplementationId() != xTP2->getImplementationId() &&
@ -481,7 +481,7 @@ void test_ImplHelper( const Reference< lang::XMultiServiceFactory > & /*xSF*/ )
xTP7->getImplementationId() != xTP3->getImplementationId() &&
xTP7->getImplementationId() != xTP4->getImplementationId() &&
xTP7->getImplementationId() != xTP5->getImplementationId() );
//
bool exc_succ = false;
lang::IllegalAccessException exc(