[Libreoffice-commits] core.git: cppuhelper/source cppuhelper/test
Alexander Wilms
f.alexander.wilms at gmail.com
Thu Feb 27 04:43:21 PST 2014
cppuhelper/source/component.cxx | 4 ++--
cppuhelper/source/component_context.cxx | 8 ++++----
cppuhelper/source/exc_thrower.cxx | 6 +++---
cppuhelper/source/factory.cxx | 2 +-
cppuhelper/source/implbase.cxx | 8 ++++----
cppuhelper/source/implbase_ex.cxx | 26 +++++++++++++-------------
cppuhelper/source/macro_expander.cxx | 2 +-
cppuhelper/source/propshlp.cxx | 26 +++++++++++++-------------
cppuhelper/source/tdmgr.cxx | 22 +++++++++++-----------
cppuhelper/test/cfg_test.cxx | 18 +++++++++---------
cppuhelper/test/testimplhelper.cxx | 26 +++++++++++++-------------
11 files changed, 74 insertions(+), 74 deletions(-)
New commits:
commit 518b75326a83166a24b9d3c1b31ce63189f60c7f
Author: Alexander Wilms <f.alexander.wilms at gmail.com>
Date: Tue Feb 25 18:02:27 2014 +0100
Remove visual noise from cppuhelper
Change-Id: If23a1aa19949f91f900d55ff9e1d5039378d7277
Reviewed-on: https://gerrit.libreoffice.org/8248
Reviewed-by: Caolán McNamara <caolanm at redhat.com>
Tested-by: Caolán McNamara <caolanm at redhat.com>
diff --git a/cppuhelper/source/component.cxx b/cppuhelper/source/component.cxx
index 9ce2cc4..0975b8d 100644
--- a/cppuhelper/source/component.cxx
+++ b/cppuhelper/source/component.cxx
@@ -36,9 +36,9 @@ using ::rtl::OUStringToOString;
namespace cppu
{
-// ----------------------------------------------------
+
// class OComponentHelper
-// ----------------------------------------------------
+
OComponentHelper::OComponentHelper( Mutex & rMutex ) SAL_THROW(())
: rBHelper( rMutex )
diff --git a/cppuhelper/source/component_context.cxx b/cppuhelper/source/component_context.cxx
index 7892b69..1e54448 100644
--- a/cppuhelper/source/component_context.cxx
+++ b/cppuhelper/source/component_context.cxx
@@ -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 *);
diff --git a/cppuhelper/source/exc_thrower.cxx b/cppuhelper/source/exc_thrower.cxx
index 4cc2d93..2807487 100644
--- a/cppuhelper/source/exc_thrower.cxx
+++ b/cppuhelper/source/exc_thrower.cxx
@@ -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));
diff --git a/cppuhelper/source/factory.cxx b/cppuhelper/source/factory.cxx
index 40c1259..9751074 100644
--- a/cppuhelper/source/factory.cxx
+++ b/cppuhelper/source/factory.cxx
@@ -1033,7 +1033,7 @@ Reference<XSingleServiceFactory > SAL_CALL createOneInstanceRegistryFactory(
rServiceManager, rImplementationName, rImplementationKey, true );
}
-//##################################################################################################
+
Reference< lang::XSingleComponentFactory > SAL_CALL createSingleComponentFactory(
ComponentFactoryFunc fptr,
OUString const & rImplementationName,
diff --git a/cppuhelper/source/implbase.cxx b/cppuhelper/source/implbase.cxx
index dbd11f9..9ed1ddf 100644
--- a/cppuhelper/source/implbase.cxx
+++ b/cppuhelper/source/implbase.cxx
@@ -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
diff --git a/cppuhelper/source/implbase_ex.cxx b/cppuhelper/source/implbase_ex.cxx
index e7a01ad..97dbaa2 100644
--- a/cppuhelper/source/implbase_ex.cxx
+++ b/cppuhelper/source/implbase_ex.cxx
@@ -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) )
diff --git a/cppuhelper/source/macro_expander.cxx b/cppuhelper/source/macro_expander.cxx
index d9bd346..4bb7aa9 100644
--- a/cppuhelper/source/macro_expander.cxx
+++ b/cppuhelper/source/macro_expander.cxx
@@ -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) )
diff --git a/cppuhelper/source/propshlp.cxx b/cppuhelper/source/propshlp.cxx
index 49a98ffe..4340708 100644
--- a/cppuhelper/source/propshlp.cxx
+++ b/cppuhelper/source/propshlp.cxx
@@ -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;
diff --git a/cppuhelper/source/tdmgr.cxx b/cppuhelper/source/tdmgr.cxx
index 5ff8190..69dc920 100644
--- a/cppuhelper/source/tdmgr.cxx
+++ b/cppuhelper/source/tdmgr.cxx
@@ -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(())
diff --git a/cppuhelper/test/cfg_test.cxx b/cppuhelper/test/cfg_test.cxx
index b3eec0a..aaa5bed 100644
--- a/cppuhelper/test/cfg_test.cxx
+++ b/cppuhelper/test/cfg_test.cxx
@@ -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()
{
diff --git a/cppuhelper/test/testimplhelper.cxx b/cppuhelper/test/testimplhelper.cxx
index 37c6c3f..0f359e3 100644
--- a/cppuhelper/test/testimplhelper.cxx
+++ b/cppuhelper/test/testimplhelper.cxx
@@ -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(
More information about the Libreoffice-commits
mailing list