summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xbin/find-unused-defines.sh2
-rw-r--r--dbaccess/source/inc/apitools.hxx3
-rw-r--r--framework/inc/macros/xinterface.hxx16
-rw-r--r--framework/inc/macros/xtypeprovider.hxx58
-rw-r--r--i18nlangtag/source/languagetag/languagetag.cxx1
-rw-r--r--i18npool/inc/cclass_unicode.hxx1
-rw-r--r--i18npool/inc/transliteration_caseignore.hxx1
-rw-r--r--include/toolkit/helper/macros.hxx16
-rw-r--r--udkapi/com/sun/star/connection/XConnectionBroadcaster.idl2
9 files changed, 2 insertions, 98 deletions
diff --git a/bin/find-unused-defines.sh b/bin/find-unused-defines.sh
index 6f31ec47393e..d143a3e3b0a7 100755
--- a/bin/find-unused-defines.sh
+++ b/bin/find-unused-defines.sh
@@ -19,9 +19,9 @@
( git grep -hP '^\w*#define\s+\w+.*\\' -- "[!e][!x][!t]*" \
&& \
git grep -hP '^\w*#define\s+\w+\s*$' -- "[!e][!x][!t]*" ) \
+ | sed -r 's/[ ]*#define[ ]+([a-zA-Z0-9_]+).*/\1/' \
| grep -v '_idl' \
| grep -vE '^INCLUDED_' \
- | sed -r 's/[ ]*#define[ ]+([a-zA-Z0-9_]+).*/\1/' \
| sort \
| uniq \
| xargs -Ixxx -n 1 -P 8 sh -c \
diff --git a/dbaccess/source/inc/apitools.hxx b/dbaccess/source/inc/apitools.hxx
index 2392b3b0998b..c2161037939e 100644
--- a/dbaccess/source/inc/apitools.hxx
+++ b/dbaccess/source/inc/apitools.hxx
@@ -182,9 +182,6 @@ public:
virtual ::com::sun::star::uno::Sequence<sal_Int8> SAL_CALL getImplementationId( ) throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE; \
static ::com::sun::star::uno::Sequence< sal_Int8 > getUnoTunnelImplementationId() \
-#define DECLARE_GETTYPES( ) \
- virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > SAL_CALL getTypes( ) throw (::com::sun::star::uno::RuntimeException, std::exception);
-
#define IMPLEMENT_IMPLEMENTATION_ID( classname ) \
::com::sun::star::uno::Sequence< sal_Int8 > classname::getUnoTunnelImplementationId() \
{ \
diff --git a/framework/inc/macros/xinterface.hxx b/framework/inc/macros/xinterface.hxx
index d32eb7caa207..2667ec3286d2 100644
--- a/framework/inc/macros/xinterface.hxx
+++ b/framework/inc/macros/xinterface.hxx
@@ -63,18 +63,6 @@ ________________________________________________________________________________
}
// private
-// implementation of XInterface::queryInterface() without any other interfaces!
-
-#define PRIVATE_DEFINE_XINTERFACE_QUERYINTERFACE_PURE( CLASS, BASECLASS ) \
- ::com::sun::star::uno::Any SAL_CALL CLASS::queryInterface( const ::com::sun::star::uno::Type& aType ) throw( ::com::sun::star::uno::RuntimeException ) \
- { \
- /* Attention: Don't use mutex or guard in this method!!! Is a method of XInterface. */ \
- /* I have no own supported interfaces ... */ \
- /* ... ask baseclass for interfaces! */ \
- return BASECLASS::queryInterface( aType ); \
- }
-
-// private
// implementation of XInterface::queryInterface() with max. 12 other interfaces!
#define PRIVATE_DEFINE_XINTERFACE_QUERYINTERFACE( CLASS, BASECLASS, INTERFACES ) \
@@ -123,10 +111,6 @@ ________________________________________________________________________________
// private
// complete implementation of XInterface for different use cases
-#define PRIVATE_DEFINE_XINTERFACE_PURE( CLASS, BASECLASS ) \
- PRIVATE_DEFINE_XINTERFACE_ACQUIRE_RELEASE( CLASS, BASECLASS ) \
- PRIVATE_DEFINE_XINTERFACE_QUERYINTERFACE_PURE( CLASS, BASECLASS )
-
#define PRIVATE_DEFINE_XINTERFACE( CLASS, BASECLASS, INTERFACES ) \
PRIVATE_DEFINE_XINTERFACE_ACQUIRE_RELEASE( CLASS, BASECLASS ) \
PRIVATE_DEFINE_XINTERFACE_QUERYINTERFACE( CLASS, BASECLASS, INTERFACES )
diff --git a/framework/inc/macros/xtypeprovider.hxx b/framework/inc/macros/xtypeprovider.hxx
index 8fb243d1bd38..f26bc980c168 100644
--- a/framework/inc/macros/xtypeprovider.hxx
+++ b/framework/inc/macros/xtypeprovider.hxx
@@ -139,56 +139,6 @@ ________________________________________________________________________________
}
// private
-// implementation of XTypeProvider::getTypes() with using max. 12 interfaces + baseclass!
-
-#define PRIVATE_DEFINE_XTYPEPROVIDER_GETTYPES_BASECLASS( CLASS, BASECLASS, TYPES ) \
- ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > SAL_CALL CLASS::getTypes() throw( ::com::sun::star::uno::RuntimeException ) \
- { \
- /* Optimize this method ! */ \
- /* We initialize a static variable only one time. */ \
- /* And we don't must use a mutex at every call! */ \
- /* For the first call; pTypeCollection is NULL - */ \
- /* for the second call pTypeCollection is different from NULL! */ \
- static ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type >* pTypeCollection = NULL; \
- if ( pTypeCollection == NULL ) \
- { \
- /* Ready for multithreading; get global mutex for first call of this method only! see before */ \
- ::osl::MutexGuard aGuard( ::osl::Mutex::getGlobalMutex() ); \
- /* Control these pointer again ... it can be, that another instance will be faster then these! */ \
- if ( pTypeCollection == NULL ) \
- { \
- /* Create static typecollection for my own interfaces! */ \
- static ::cppu::OTypeCollection aTypeCollection TYPES; \
- /* Copy all items from my list sequences and from my baseclass */ \
- /* to one result list! */ \
- ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > seqTypes1 = aTypeCollection.getTypes(); \
- ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > seqTypes2 = BASECLASS::getTypes(); \
- sal_Int32 nCount1 = seqTypes1.getLength(); \
- sal_Int32 nCount2 = seqTypes2.getLength(); \
- static ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > seqResult ( nCount1+nCount2 ); \
- sal_Int32 nSource = 0; \
- sal_Int32 nDestination= 0; \
- while( nSource<nCount1 ) \
- { \
- seqResult[nDestination] = seqTypes1[nSource]; \
- ++nSource; \
- ++nDestination; \
- } \
- nSource = 0; \
- while( nSource<nCount2 ) \
- { \
- seqResult[nDestination] = seqTypes2[nSource]; \
- ++nSource; \
- ++nDestination; \
- } \
- /* ... and set his address to static pointer! */ \
- pTypeCollection = &seqResult; \
- } \
- } \
- return *pTypeCollection; \
- }
-
-// private
// help macros to replace TYPES in getTypes() [see before]
#define PRIVATE_DEFINE_TYPE_1( TYPE1 ) \
@@ -241,10 +191,6 @@ ________________________________________________________________________________
// private
// complete implementation of XTypeProvider
-#define PRIVATE_DEFINE_XTYPEPROVIDER_PURE( CLASS ) \
- PRIVATE_DEFINE_XTYPEPROVIDER_GETIMPLEMENTATIONID( CLASS ) \
- PRIVATE_DEFINE_XTYPEPROVIDER_GETTYPES( CLASS, cppu::UnoType<com::sun::star::lang::XTypeProvider>::get())
-
#define PRIVATE_DEFINE_XTYPEPROVIDER( CLASS, TYPES ) \
PRIVATE_DEFINE_XTYPEPROVIDER_GETIMPLEMENTATIONID( CLASS ) \
PRIVATE_DEFINE_XTYPEPROVIDER_GETTYPES( CLASS, TYPES )
@@ -253,10 +199,6 @@ ________________________________________________________________________________
PRIVATE_DEFINE_XTYPEPROVIDER_GETIMPLEMENTATIONID( CLASS ) \
PRIVATE_DEFINE_XTYPEPROVIDER_GETTYPES_LARGE( CLASS, TYPES_FIRST, TYPES_SECOND )
-#define PRIVATE_DEFINE_XTYPEPROVIDER_BASECLASS( CLASS, BASECLASS, TYPES ) \
- PRIVATE_DEFINE_XTYPEPROVIDER_GETIMPLEMENTATIONID( CLASS ) \
- PRIVATE_DEFINE_XTYPEPROVIDER_GETTYPES_BASECLASS( CLASS, BASECLASS, TYPES )
-
// public
// declaration of XTypeProvider
diff --git a/i18nlangtag/source/languagetag/languagetag.cxx b/i18nlangtag/source/languagetag/languagetag.cxx
index 906c7b3cc94a..bc9b62cd2c52 100644
--- a/i18nlangtag/source/languagetag/languagetag.cxx
+++ b/i18nlangtag/source/languagetag/languagetag.cxx
@@ -26,7 +26,6 @@
#if defined(ENABLE_LIBLANGTAG)
#if LIBLANGTAG_INLINE_FIX
-#define LT_HAVE_INLINE
#endif
#include <liblangtag/langtag.h>
#else
diff --git a/i18npool/inc/cclass_unicode.hxx b/i18npool/inc/cclass_unicode.hxx
index 4c295e1b5bd8..3ff2aed9fcaf 100644
--- a/i18npool/inc/cclass_unicode.hxx
+++ b/i18npool/inc/cclass_unicode.hxx
@@ -25,7 +25,6 @@
#include <cppuhelper/implbase2.hxx>
#include <com/sun/star/lang/XServiceInfo.hpp>
-#define TRANSLITERATION_casemapping
#include <transliteration_body.hxx>
namespace com { namespace sun { namespace star { namespace uno {
diff --git a/i18npool/inc/transliteration_caseignore.hxx b/i18npool/inc/transliteration_caseignore.hxx
index 2949cabc2184..c9b655345824 100644
--- a/i18npool/inc/transliteration_caseignore.hxx
+++ b/i18npool/inc/transliteration_caseignore.hxx
@@ -19,7 +19,6 @@
#ifndef INCLUDED_I18NPOOL_INC_TRANSLITERATION_CASEIGNORE_HXX
#define INCLUDED_I18NPOOL_INC_TRANSLITERATION_CASEIGNORE_HXX
-#define TRANSLITERATION_UPPER_LOWER
#include "transliteration_body.hxx"
namespace com { namespace sun { namespace star { namespace i18n {
diff --git a/include/toolkit/helper/macros.hxx b/include/toolkit/helper/macros.hxx
index e84053e17681..f080d6d0bfbd 100644
--- a/include/toolkit/helper/macros.hxx
+++ b/include/toolkit/helper/macros.hxx
@@ -198,22 +198,6 @@ IMPL_LISTENERMULTIPLEXER_LISTENERMETHOD_BODY( ClassName, InterfaceName, MethodNa
void ClassName::MethodName( const EventType& evt ) throw(::com::sun::star::uno::RuntimeException, std::exception) \
IMPL_LISTENERMULTIPLEXER_LISTENERMETHOD_BODY( ClassName, InterfaceName, MethodName, EventType )
-
-
-#define DECLIMPL_SUPPORTS_SERVICE( ) \
- sal_Bool SAL_CALL supportsService( const OUString& rServiceName ) throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE \
- { \
- ::com::sun::star::uno::Sequence< OUString > aServiceNames( getSupportedServiceNames() ); \
- const OUString* pSupported = aServiceNames.getConstArray(); \
- const OUString* pSupportedEnd = pSupported + aServiceNames.getLength(); \
- for ( ; pSupported != pSupportedEnd; ++pSupported ) \
- if ( *pSupported == rServiceName ) \
- return sal_True; \
- return sal_False; \
- }
-
-
-
#define DECLIMPL_SERVICEINFO_DERIVED( ImplName, BaseClass, ServiceName ) \
OUString SAL_CALL getImplementationName( ) throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE { return OUString("stardiv.Toolkit." #ImplName ); } \
::com::sun::star::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE \
diff --git a/udkapi/com/sun/star/connection/XConnectionBroadcaster.idl b/udkapi/com/sun/star/connection/XConnectionBroadcaster.idl
index fce5dbfcc1c9..b60b3c5c54eb 100644
--- a/udkapi/com/sun/star/connection/XConnectionBroadcaster.idl
+++ b/udkapi/com/sun/star/connection/XConnectionBroadcaster.idl
@@ -16,7 +16,7 @@
* except in compliance with the License. You may obtain a copy of
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
-#ifndef _COM_SUN_STAR_CONNECTION_XCONNECTIONBROADCASTER_IDL__
+#ifndef _COM_SUN_STAR_CONNECTION_XCONNECTIONBROADCASTER_IDL_
#define _COM_SUN_STAR_CONNECTION_XCONNECTIONBROADCASTER_IDL_
#include <com/sun/star/io/XStreamListener.idl>