summaryrefslogtreecommitdiff
path: root/framework/inc/macros
diff options
context:
space:
mode:
Diffstat (limited to 'framework/inc/macros')
-rw-r--r--framework/inc/macros/debug/memorymeasure.hxx2
-rw-r--r--framework/inc/macros/xserviceinfo.hxx27
2 files changed, 5 insertions, 24 deletions
diff --git a/framework/inc/macros/debug/memorymeasure.hxx b/framework/inc/macros/debug/memorymeasure.hxx
index 4ed702429be2..bfc5f5ff5791 100644
--- a/framework/inc/macros/debug/memorymeasure.hxx
+++ b/framework/inc/macros/debug/memorymeasure.hxx
@@ -111,7 +111,7 @@
{
::rtl::OStringBuffer sBuffer( 10000 );
- if( m_lSnapshots.size() > 0 )
+ if( !m_lSnapshots.empty() )
{
// Write informations to return buffer
::std::vector< _MemoryInfo >::const_iterator pItem1;
diff --git a/framework/inc/macros/xserviceinfo.hxx b/framework/inc/macros/xserviceinfo.hxx
index c375fe43dfab..45d72ee8bfee 100644
--- a/framework/inc/macros/xserviceinfo.hxx
+++ b/framework/inc/macros/xserviceinfo.hxx
@@ -55,7 +55,9 @@
#include <com/sun/star/uno/XComponentContext.hpp>
#include <com/sun/star/beans/XPropertySet.hpp>
#include <cppuhelper/factory.hxx>
+#include <comphelper/sequence.hxx>
#include <rtl/ustring.hxx>
+#include <rtl/logfile.hxx>
//_________________________________________________________________________________________________________________
// namespace
@@ -93,29 +95,7 @@ ________________________________________________________________________________
/*===========================================================================================================*/ \
sal_Bool SAL_CALL CLASS::supportsService( const ::rtl::OUString& sServiceName ) throw( css::uno::RuntimeException ) \
{ \
- /* Set default return value. */ \
- sal_Bool bReturn = sal_False ; \
- /* Get names of all supported servicenames. */ \
- css::uno::Sequence< ::rtl::OUString > seqServiceNames = getSupportedServiceNames(); \
- const ::rtl::OUString* pArray = seqServiceNames.getConstArray(); \
- sal_Int32 nCounter = 0; \
- sal_Int32 nLength = seqServiceNames.getLength(); \
- /* Search for right name in list. */ \
- while ( \
- ( nCounter < nLength ) && \
- ( bReturn == sal_False ) \
- ) \
- { \
- /* Is name was found, say "YES, SERVICE IS SUPPORTED." and break loop. */ \
- if ( pArray[nCounter] == sServiceName ) \
- { \
- bReturn = sal_True ; \
- } \
- /* Else step to next element in list. */ \
- ++nCounter; \
- } \
- /* Return state of search. */ \
- return bReturn; \
+ return ::comphelper::findValue(getSupportedServiceNames(), sServiceName, sal_True).getLength() != 0; \
} \
\
/*===========================================================================================================*/ \
@@ -155,6 +135,7 @@ ________________________________________________________________________________
/*===========================================================================================================*/ \
css::uno::Reference< css::uno::XInterface > SAL_CALL CLASS::impl_createInstance( const css::uno::Reference< css::lang::XMultiServiceFactory >& xServiceManager ) throw( css::uno::Exception ) \
{ \
+ RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "framework","Ocke.Janssen@sun.com",U2B(IMPLEMENTATIONNAME).getStr()); \
/* create new instance of service */ \
CLASS* pClass = new CLASS( xServiceManager ); \
/* hold it alive by increasing his ref count!!! */ \