Kaydet (Commit) efac5fa0 authored tarafından Noel Grandin's avatar Noel Grandin Kaydeden (comit) Noel Grandin

remove some unused defines

Change-Id: Ib2d50e8c29ccbc5ffcb52cdff4ae3eaae9a62188
Reviewed-on: https://gerrit.libreoffice.org/17332Reviewed-by: 's avatarNoel Grandin <noelgrandin@gmail.com>
Tested-by: 's avatarNoel Grandin <noelgrandin@gmail.com>
üst afbf4661
...@@ -6,6 +6,8 @@ ...@@ -6,6 +6,8 @@
END { END {
tmp = substr(y, 0, index(y, ":")-1) tmp = substr(y, 0, index(y, ":")-1)
if (x==1) print "sed -i '/[[:space:]]" p1 "[[:space:]]/d' " tmp if (x==1) print "sed -i '/[[:space:]]" p1 "[[:space:]]/d' " tmp
# mark these as potential places to inline a constant
if (x==2) print "#inline " p1 " " tmp
} }
......
...@@ -10,17 +10,16 @@ ...@@ -10,17 +10,16 @@
# Algorithm Detail: # Algorithm Detail:
# (1) find #defines, excluding the externals folder # (1) find #defines, excluding the externals folder
# (2) extract just the constant name from the search results # (2) extract just the constant name from the search results
# (3) trim blank lines # (3) sort and uniq the results, mostly so I have an idea how far along the process is
# (4) sort the results, mostly so I have an idea how far along the process is # (4) for each result:
# (5) for each result: # (5) grep for the constant
# (6) grep for the constant # (6) use awk to to check if only one match for a given constant was found
# (7) use awk to to check if only one match for a given constant was found # (7) if so, generate a sed command to remove the #define
# (8) if so, generate a sed command to remove the #define
# #
git grep -P '^#define\s+\w+\s+\w' -- "[!e][!x][!t]*" \ git grep -hP '^#define\s+\w+.*\\' -- "[!e][!x][!t]*" \
| cut -s -d ' ' -f 2 \ | sed -r 's/#define[ ]+([a-zA-Z0-9_]+).*/\1/' \
| sed '/^$/d' \
| sort \ | sort \
| uniq \
| xargs -Ixxx sh -c \ | xargs -Ixxx sh -c \
"git grep -w 'xxx' | awk -f bin/find-unused-defines.awk -v p1=xxx && echo \"xxx\" 1>&2" "git grep -w 'xxx' | awk -f bin/find-unused-defines.awk -v p1=xxx && echo \"xxx\" 1>&2"
......
...@@ -21,7 +21,4 @@ Version settings ...@@ -21,7 +21,4 @@ Version settings
LIBO_VERSION_STRINGIFY(LIBO_VERSION_MICRO) "." \ LIBO_VERSION_STRINGIFY(LIBO_VERSION_MICRO) "." \
LIBO_VERSION_STRINGIFY(LIBO_VERSION_PATCH) LIBO_VERSION_STRINGIFY(LIBO_VERSION_PATCH)
#define LIBO_VERSION_ENCODED_IN_32BITS \
((LIBO_VERSION_MAJOR << 24) | (LIBO_VERSION_MINOR << 16) | (LIBO_VERSION_MICRO << 8) | LIBO_VERSION_PATCH)
#endif #endif
...@@ -188,13 +188,6 @@ static nsresult insertPABDescription() ...@@ -188,13 +188,6 @@ static nsresult insertPABDescription()
#define NS_RDF_CONTRACTID "@mozilla.org/rdf" #define NS_RDF_CONTRACTID "@mozilla.org/rdf"
#define NS_RDF_DATASOURCE_CONTRACTID NS_RDF_CONTRACTID "/datasource;1" #define NS_RDF_DATASOURCE_CONTRACTID NS_RDF_CONTRACTID "/datasource;1"
#define NS_RDF_DATASOURCE_CONTRACTID_PREFIX NS_RDF_DATASOURCE_CONTRACTID "?name=" #define NS_RDF_DATASOURCE_CONTRACTID_PREFIX NS_RDF_DATASOURCE_CONTRACTID "?name="
#define NS_ABDIRECTORYDATASOURCE_CONTRACTID \
NS_RDF_DATASOURCE_CONTRACTID_PREFIX "addressdirectory"
#define NS_ABDIRECTORYDATASOURCE_CID \
{ /* 0A79186D-F754-11d2-A2DA-001083003D0C */ \
0xa79186d, 0xf754, 0x11d2, \
{0xa2, 0xda, 0x0, 0x10, 0x83, 0x0, 0x3d, 0xc} \
}
// Case where we get a parent uri, and need to list its children. // Case where we get a parent uri, and need to list its children.
......
...@@ -160,12 +160,6 @@ public: ...@@ -160,12 +160,6 @@ public:
IMPLEMENT_SERVICE_INFO_SUPPORTS(classname) \ IMPLEMENT_SERVICE_INFO_SUPPORTS(classname) \
IMPLEMENT_SERVICE_INFO_GETSUPPORTED1(classname, serviceasciiname) \ IMPLEMENT_SERVICE_INFO_GETSUPPORTED1(classname, serviceasciiname) \
#define IMPLEMENT_SERVICE_INFO1_STATIC(classname, implasciiname, serviceasciiname) \
IMPLEMENT_SERVICE_INFO_IMPLNAME_STATIC(classname, implasciiname) \
IMPLEMENT_SERVICE_INFO_SUPPORTS(classname) \
IMPLEMENT_SERVICE_INFO_GETSUPPORTED1_STATIC(classname, serviceasciiname) \
IMPLEMENT_SERVICE_INFO_CREATE_STATIC(classname) \
#define IMPLEMENT_SERVICE_INFO2(classname, implasciiname, serviceasciiname1, serviceasciiname2) \ #define IMPLEMENT_SERVICE_INFO2(classname, implasciiname, serviceasciiname1, serviceasciiname2) \
IMPLEMENT_SERVICE_INFO_IMPLNAME(classname, implasciiname) \ IMPLEMENT_SERVICE_INFO_IMPLNAME(classname, implasciiname) \
IMPLEMENT_SERVICE_INFO_SUPPORTS(classname) \ IMPLEMENT_SERVICE_INFO_SUPPORTS(classname) \
...@@ -182,14 +176,6 @@ public: ...@@ -182,14 +176,6 @@ public:
IMPLEMENT_SERVICE_INFO_SUPPORTS(classname) \ IMPLEMENT_SERVICE_INFO_SUPPORTS(classname) \
IMPLEMENT_SERVICE_INFO_GETSUPPORTED3(classname, serviceasciiname1, serviceasciiname2, serviceasciiname3) \ IMPLEMENT_SERVICE_INFO_GETSUPPORTED3(classname, serviceasciiname1, serviceasciiname2, serviceasciiname3) \
#define IMPLEMENT_SERVICE_INFO1_ABSTRACT(classname, serviceasciiname) \
IMPLEMENT_SERVICE_INFO_SUPPORTS(classname) \
IMPLEMENT_SERVICE_INFO_GETSUPPORTED1(classname, serviceasciiname) \
#define IMPLEMENT_SERVICE_INFO2_ABSTRACT(classname, serviceasciiname1, serviceasciiname2) \
IMPLEMENT_SERVICE_INFO_SUPPORTS(classname) \
IMPLEMENT_SERVICE_INFO_GETSUPPORTED2(classname, serviceasciiname1, serviceasciiname2) \
// XTypeProvider helpers // XTypeProvider helpers
#define DECLARE_IMPLEMENTATION_ID( ) \ #define DECLARE_IMPLEMENTATION_ID( ) \
...@@ -199,10 +185,6 @@ public: ...@@ -199,10 +185,6 @@ public:
#define DECLARE_GETTYPES( ) \ #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); virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > SAL_CALL getTypes( ) throw (::com::sun::star::uno::RuntimeException, std::exception);
#define DECLARE_TYPEPROVIDER( ) \
DECLARE_GETTYPES( ) \
DECLARE_IMPLEMENTATION_ID( )
#define IMPLEMENT_IMPLEMENTATION_ID( classname ) \ #define IMPLEMENT_IMPLEMENTATION_ID( classname ) \
::com::sun::star::uno::Sequence< sal_Int8 > classname::getUnoTunnelImplementationId() \ ::com::sun::star::uno::Sequence< sal_Int8 > classname::getUnoTunnelImplementationId() \
{ \ { \
...@@ -242,14 +224,6 @@ public: ...@@ -242,14 +224,6 @@ public:
); \ ); \
} }
#define IMPLEMENT_TYPEPROVIDER2( classname, baseclass1, baseclass2 ) \
IMPLEMENT_IMPLEMENTATION_ID( classname) \
IMPLEMENT_GETTYPES2( classname, baseclass1, baseclass2 )
#define IMPLEMENT_TYPEPROVIDER3( classname, baseclass1, baseclass2, baseclass3 ) \
IMPLEMENT_IMPLEMENTATION_ID( classname) \
IMPLEMENT_GETTYPES3(classname, baseclass1, baseclass2, baseclass3 )
// helper for declaring/implementing classes based on the OPropertyContainer and an OPropertyArrayUsageHelper // helper for declaring/implementing classes based on the OPropertyContainer and an OPropertyArrayUsageHelper
#define DECLARE_PROPERTYCONTAINER_DEFAULTS( ) \ #define DECLARE_PROPERTYCONTAINER_DEFAULTS( ) \
virtual ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySetInfo> SAL_CALL getPropertySetInfo() throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE; \ virtual ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySetInfo> SAL_CALL getPropertySetInfo() throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE; \
...@@ -293,33 +267,21 @@ public: ...@@ -293,33 +267,21 @@ public:
#define DECL_PROP0_BOOL(varname) \ #define DECL_PROP0_BOOL(varname) \
DECL_PROP_IMPL(varname, cppu::UnoType<bool>::get()) 0) DECL_PROP_IMPL(varname, cppu::UnoType<bool>::get()) 0)
#define DECL_PROP0_IFACE(varname, iface) \
DECL_PROP_IMPL(varname, cppu::UnoType<iface>::get()) 0)
#define DECL_PROP1(varname, type, attrib1) \ #define DECL_PROP1(varname, type, attrib1) \
DECL_PROP_IMPL(varname, cppu::UnoType<type>::get()) ::com::sun::star::beans::PropertyAttribute::attrib1) DECL_PROP_IMPL(varname, cppu::UnoType<type>::get()) ::com::sun::star::beans::PropertyAttribute::attrib1)
#define DECL_PROP1_BOOL(varname, attrib1) \ #define DECL_PROP1_BOOL(varname, attrib1) \
DECL_PROP_IMPL(varname, cppu::UnoType<bool>::get()) ::com::sun::star::beans::PropertyAttribute::attrib1) DECL_PROP_IMPL(varname, cppu::UnoType<bool>::get()) ::com::sun::star::beans::PropertyAttribute::attrib1)
#define DECL_PROP1_IFACE(varname, iface, attrib1) \
DECL_PROP_IMPL(varname, cppu::UnoType<iface>::get()) ::com::sun::star::beans::PropertyAttribute::attrib1)
#define DECL_PROP2_IFACE(varname, iface, attrib1, attrib2) \ #define DECL_PROP2_IFACE(varname, iface, attrib1, attrib2) \
DECL_PROP_IMPL(varname, cppu::UnoType<iface>::get()) ::com::sun::star::beans::PropertyAttribute::attrib1 | ::com::sun::star::beans::PropertyAttribute::attrib2) DECL_PROP_IMPL(varname, cppu::UnoType<iface>::get()) ::com::sun::star::beans::PropertyAttribute::attrib1 | ::com::sun::star::beans::PropertyAttribute::attrib2)
#define DECL_PROP2(varname, type, attrib1, attrib2) \ #define DECL_PROP2(varname, type, attrib1, attrib2) \
DECL_PROP_IMPL(varname, cppu::UnoType<type>::get()) ::com::sun::star::beans::PropertyAttribute::attrib1 | ::com::sun::star::beans::PropertyAttribute::attrib2) DECL_PROP_IMPL(varname, cppu::UnoType<type>::get()) ::com::sun::star::beans::PropertyAttribute::attrib1 | ::com::sun::star::beans::PropertyAttribute::attrib2)
#define DECL_PROP2_BOOL(varname, attrib1, attrib2) \
DECL_PROP_IMPL(varname, cppu::UnoType<bool>::get()) ::com::sun::star::beans::PropertyAttribute::attrib1 | ::com::sun::star::beans::PropertyAttribute::attrib2)
#define DECL_PROP3(varname, type, attrib1, attrib2, attrib3) \ #define DECL_PROP3(varname, type, attrib1, attrib2, attrib3) \
DECL_PROP_IMPL(varname, cppu::UnoType<type>::get()) ::com::sun::star::beans::PropertyAttribute::attrib1 | ::com::sun::star::beans::PropertyAttribute::attrib2 | ::com::sun::star::beans::PropertyAttribute::attrib3) DECL_PROP_IMPL(varname, cppu::UnoType<type>::get()) ::com::sun::star::beans::PropertyAttribute::attrib1 | ::com::sun::star::beans::PropertyAttribute::attrib2 | ::com::sun::star::beans::PropertyAttribute::attrib3)
#define DECL_PROP3_BOOL(varname, attrib1, attrib2, attrib3) \
DECL_PROP_IMPL(varname, cppu::UnoType<bool>::get()) ::com::sun::star::beans::PropertyAttribute::attrib1 | ::com::sun::star::beans::PropertyAttribute::attrib2 | ::com::sun::star::beans::PropertyAttribute::attrib3)
#define END_PROPERTY_SEQUENCE() \ #define END_PROPERTY_SEQUENCE() \
OSL_ENSURE(nPos == aDescriptor.getLength(), "forgot to adjust the count ?"); \ OSL_ENSURE(nPos == aDescriptor.getLength(), "forgot to adjust the count ?"); \
......
...@@ -155,14 +155,6 @@ public: ...@@ -155,14 +155,6 @@ public:
// === some property types require special handling // === some property types require special handling
// === such as interfaces // === such as interfaces
#define DECL_IFACE_PROP0(varname, type) \
DECL_IFACE_PROP_IMPL(varname, type) 0)
#define DECL_IFACE_PROP1(varname, type, attrib1) \
DECL_IFACE_PROP_IMPL(varname, type) css::beans::PropertyAttribute::attrib1)
#define DECL_IFACE_PROP2(varname, type, attrib1, attrib2) \ #define DECL_IFACE_PROP2(varname, type, attrib1, attrib2) \
DECL_IFACE_PROP_IMPL(varname, type) com::sun::star::beans::PropertyAttribute::attrib1 | com::sun::star::beans::PropertyAttribute::attrib2) DECL_IFACE_PROP_IMPL(varname, type) com::sun::star::beans::PropertyAttribute::attrib1 | com::sun::star::beans::PropertyAttribute::attrib2)
...@@ -176,10 +168,6 @@ public: ...@@ -176,10 +168,6 @@ public:
// === or Boolean properties // === or Boolean properties
#define DECL_BOOL_PROP0(varname) \
DECL_BOOL_PROP_IMPL(varname) 0)
#define DECL_BOOL_PROP1(varname, attrib1) \ #define DECL_BOOL_PROP1(varname, attrib1) \
DECL_BOOL_PROP_IMPL(varname) com::sun::star::beans::PropertyAttribute::attrib1) DECL_BOOL_PROP_IMPL(varname) com::sun::star::beans::PropertyAttribute::attrib1)
...@@ -198,10 +186,6 @@ public: ...@@ -198,10 +186,6 @@ public:
#define REGISTER_PROP_1( prop, member, attrib1 ) \
registerProperty( PROPERTY_##prop, PROPERTY_ID_##prop, PropertyAttribute::attrib1, \
&member, cppu::UnoType<decltype(member)>::get() );
#define REGISTER_PROP_2( prop, member, attrib1, attrib2 ) \ #define REGISTER_PROP_2( prop, member, attrib1, attrib2 ) \
registerProperty( PROPERTY_##prop, PROPERTY_ID_##prop, PropertyAttribute::attrib1 | PropertyAttribute::attrib2, \ registerProperty( PROPERTY_##prop, PROPERTY_ID_##prop, PropertyAttribute::attrib1 | PropertyAttribute::attrib2, \
&member, cppu::UnoType<decltype(member)>::get() ); &member, cppu::UnoType<decltype(member)>::get() );
...@@ -211,10 +195,6 @@ public: ...@@ -211,10 +195,6 @@ public:
&member, cppu::UnoType<decltype(member)>::get() ); &member, cppu::UnoType<decltype(member)>::get() );
#define REGISTER_VOID_PROP_1( prop, memberAny, type, attrib1 ) \
registerMayBeVoidProperty( PROPERTY_##prop, PROPERTY_ID_##prop, PropertyAttribute::MAYBEVOID | PropertyAttribute::attrib1, \
&memberAny, cppu::UnoType<type>::get() );
#define REGISTER_VOID_PROP_2( prop, memberAny, type, attrib1, attrib2 ) \ #define REGISTER_VOID_PROP_2( prop, memberAny, type, attrib1, attrib2 ) \
registerMayBeVoidProperty( PROPERTY_##prop, PROPERTY_ID_##prop, PropertyAttribute::MAYBEVOID | PropertyAttribute::attrib1 | PropertyAttribute::attrib2, \ registerMayBeVoidProperty( PROPERTY_##prop, PROPERTY_ID_##prop, PropertyAttribute::MAYBEVOID | PropertyAttribute::attrib1 | PropertyAttribute::attrib2, \
&memberAny, cppu::UnoType<type>::get() ); &memberAny, cppu::UnoType<type>::get() );
......
...@@ -67,18 +67,6 @@ ...@@ -67,18 +67,6 @@
* StarWriter/Web * StarWriter/Web
*/ */
/* 4.0 */
#define SO3_SWWEB_CLASSID_40 \
0xf0caa840, 0x7821, 0x11d0, 0xa4, 0xa7, 0x0, \
0xa0, 0x24, 0x9d, 0x57, 0xb1
/* 5.0 */
#define SO3_SWWEB_CLASSID_50 \
0xc20cf9d2, 0x85ae, 0x11d1, 0xaa, 0xb4, 0x0, \
0x60, 0x97, 0xda, 0x56, 0x1a
/* 6.0, 7, 8 */ /* 6.0, 7, 8 */
#define SO3_SWWEB_CLASSID_60 \ #define SO3_SWWEB_CLASSID_60 \
...@@ -93,18 +81,6 @@ ...@@ -93,18 +81,6 @@
* Globaldokument * Globaldokument
*/ */
/* 4.0 */
#define SO3_SWGLOB_CLASSID_40 \
0x340ac970, 0xe30d, 0x11d0, 0xa5, 0x3f, 0x0, \
0xa0, 0x24, 0x9d, 0x57, 0xb1
/* 5.0 */
#define SO3_SWGLOB_CLASSID_50 \
0xc20cf9d3, 0x85ae, 0x11d1, 0xaa, 0xb4, 0x0, \
0x60, 0x97, 0xda, 0x56, 0x1a
/* 6.0, 7, 8 */ /* 6.0, 7, 8 */
#define SO3_SWGLOB_CLASSID_60 \ #define SO3_SWGLOB_CLASSID_60 \
...@@ -286,31 +262,6 @@ ...@@ -286,31 +262,6 @@
0x80243D39, 0x6741, 0x46C5, 0x92, 0x6E, 0x06, \ 0x80243D39, 0x6741, 0x46C5, 0x92, 0x6E, 0x06, \
0x91, 0x64, 0xFF, 0x87, 0xBB 0x91, 0x64, 0xFF, 0x87, 0xBB
/****************************************************
* StarImage
****************************************************/
/* 3.0 */
#define SO3_SIM_CLASSID_30 \
0xEA60C941L, 0x2C6C, 0x101C, 0x8E, 0x2C, 0x00, \
0x00, 0x1B, 0x4C, 0xC7, 0x11
/* 4.0 */
#define SO3_SIM_CLASSID_40 \
0x447BB8A0L, 0x41FB, 0x11D0, 0x89, 0xCA, 0x00, \
0x80, 0x29, 0xE4, 0xB0, 0xB1
/* 5.0 */
#define SO3_SIM_CLASSID_50 \
0x65c68d00L, 0x85de, 0x11d1, 0x89, 0xd0, 0x00, \
0x80, 0x29, 0xe4, 0xb0, 0xb1
/* aktuell */
/*************************************************** /***************************************************
* StarMath * StarMath
***************************************************/ ***************************************************/
...@@ -379,11 +330,6 @@ ...@@ -379,11 +330,6 @@
0xd7896d52, 0xb7af, 0x4820, \ 0xd7896d52, 0xb7af, 0x4820, \
0x9d, 0xfe, 0xd4, 0x04, 0xd0, 0x15, 0x96, 0x0f 0x9d, 0xfe, 0xd4, 0x04, 0xd0, 0x15, 0x96, 0x0f
#define SO3_RPT_SCH_CLASSID_90 \
0x80243d39, 0x6741, 0x46c5, \
0x92, 0x6e, 0x06, 0x91, 0x64, 0xff, 0x87, 0xbb
#endif #endif
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
...@@ -91,17 +91,6 @@ typedef unsigned short LanguageType; ...@@ -91,17 +91,6 @@ typedef unsigned short LanguageType;
#define LANGUAGE_MASK_PRIMARY 0x03ff #define LANGUAGE_MASK_PRIMARY 0x03ff
#ifdef __cplusplus
/* Please use the methods provided in mslangid.hxx for type-safety! */
#else
#define MSLANGID_MAKELANGID( nSubLangId, nPriLangId ) \
(((nSubLangId) << 10) | (nPriLangId))
#define MSLANGID_GETPRIMARYLANGUAGE( nLangID ) \
((nLangID) & LANGUAGE_MASK_PRIMARY)
#define MSLANGID_GETSUBLANGUAGE( nLangID ) \
(((nLangID) & ~LANGUAGE_MASK_PRIMARY) >> 10)
#endif
#define LANGUAGE_DONTKNOW 0x03FF /* yes, the mask */ #define LANGUAGE_DONTKNOW 0x03FF /* yes, the mask */
#define LANGUAGE_NONE 0x00FF #define LANGUAGE_NONE 0x00FF
......
...@@ -275,23 +275,6 @@ IMPL_LISTENERMULTIPLEXER_LISTENERMETHOD_BODY( ClassName, InterfaceName, MethodNa ...@@ -275,23 +275,6 @@ IMPL_LISTENERMULTIPLEXER_LISTENERMETHOD_BODY( ClassName, InterfaceName, MethodNa
return aNames; \ return aNames; \
} \ } \
#define DECLIMPL_SERVICEINFO( ImplName, 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 \
{ \
::com::sun::star::uno::Sequence< OUString > aNames( 1 ); \
aNames[ 0 ] = OUString::createFromAscii( ServiceName ); \
return aNames; \
} \
DECLIMPL_SUPPORTS_SERVICE( )
#endif // INCLUDED_TOOLKIT_HELPER_MACROS_HXX #endif // INCLUDED_TOOLKIT_HELPER_MACROS_HXX
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
...@@ -125,26 +125,6 @@ ...@@ -125,26 +125,6 @@
return; \ return; \
} }
/** asserts a given condition (in debug mode), and continues the most-inner
loop if the condition is not met
*/
#define ENSURE_OR_CONTINUE( c, m ) \
if ( !(c) ) \
{ \
OSL_ENSURE( false, m ); \
continue; \
}
/** asserts a given condition (in debug mode), and continues the most-inner
loop if the condition is not met
*/
#define ENSURE_OR_BREAK( c, m ) \
if ( !(c) ) \
{ \
OSL_ENSURE( false, m ); \
break; \
}
#endif #endif
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
...@@ -39,13 +39,6 @@ typedef void* (*TypeId)(); ...@@ -39,13 +39,6 @@ typedef void* (*TypeId)();
virtual TypeId Type() const SAL_OVERRIDE; \ virtual TypeId Type() const SAL_OVERRIDE; \
virtual bool IsA( TypeId aSameOrSuperType ) const SAL_OVERRIDE virtual bool IsA( TypeId aSameOrSuperType ) const SAL_OVERRIDE
#define TYPEINFO_VISIBILITY(visibility) \
visibility static void* CreateType(); \
visibility static TypeId StaticType(); \
visibility static bool IsOf( TypeId aSameOrSuperType ); \
visibility virtual TypeId Type() const; \
visibility virtual bool IsA( TypeId aSameOrSuperType ) const
#define TYPEINFO_VISIBILITY_OVERRIDE(visibility) \ #define TYPEINFO_VISIBILITY_OVERRIDE(visibility) \
visibility static void* CreateType(); \ visibility static void* CreateType(); \
visibility static TypeId StaticType(); \ visibility static TypeId StaticType(); \
......
...@@ -61,12 +61,6 @@ namespace o3tl ...@@ -61,12 +61,6 @@ namespace o3tl
template<> struct typed_flags<StreamMode> : is_typed_flags<StreamMode, 0x0f1f> {}; template<> struct typed_flags<StreamMode> : is_typed_flags<StreamMode, 0x0f1f> {};
} }
#define STREAM_READWRITEBITS (StreamMode::READ | StreamMode::WRITE | \
StreamMode::NOCREATE | StreamMode::TRUNC)
#define STREAM_SHAREBITS (StreamMode::SHARE_DENYNONE | StreamMode::SHARE_DENYREAD |\
StreamMode::SHARE_DENYWRITE | StreamMode::SHARE_DENYALL)
#define STREAM_READWRITE (StreamMode::READ | StreamMode::WRITE) #define STREAM_READWRITE (StreamMode::READ | StreamMode::WRITE)
#define STREAM_SHARE_DENYREADWRITE (StreamMode::SHARE_DENYREAD | StreamMode::SHARE_DENYWRITE) #define STREAM_SHARE_DENYREADWRITE (StreamMode::SHARE_DENYREAD | StreamMode::SHARE_DENYWRITE)
......
...@@ -38,16 +38,8 @@ G_BEGIN_DECLS ...@@ -38,16 +38,8 @@ G_BEGIN_DECLS
#define EMPATHY_FT_HANDLER(obj) \ #define EMPATHY_FT_HANDLER(obj) \
(G_TYPE_CHECK_INSTANCE_CAST ((obj), \ (G_TYPE_CHECK_INSTANCE_CAST ((obj), \
EMPATHY_TYPE_FT_HANDLER, EmpathyFTHandler)) EMPATHY_TYPE_FT_HANDLER, EmpathyFTHandler))
#define EMPATHY_FT_HANDLER_CLASS(klass) \
(G_TYPE_CHECK_CLASS_CAST ((klass), \
EMPATHY_TYPE_FT_HANDLER, EmpathyFTHandlerClass))
#define EMPATHY_IS_FT_HANDLER(obj) \ #define EMPATHY_IS_FT_HANDLER(obj) \
(G_TYPE_CHECK_INSTANCE_TYPE ((obj), EMPATHY_TYPE_FT_HANDLER)) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), EMPATHY_TYPE_FT_HANDLER))
#define EMPATHY_IS_FT_HANDLER_CLASS(klass) \
(G_TYPE_CHECK_CLASS_TYPE ((klass), EMPATHY_TYPE_FT_HANDLER))
#define EMPATHY_FT_HANDLER_GET_CLASS(obj) \
(G_TYPE_INSTANCE_GET_CLASS ((obj), \
EMPATHY_TYPE_FT_HANDLER, EmpathyFTHandlerClass))
typedef struct _EmpathyFTHandlerPriv EmpathyFTHandlerPriv; typedef struct _EmpathyFTHandlerPriv EmpathyFTHandlerPriv;
......
...@@ -112,45 +112,6 @@ GETTYPES_IMPL_START( Class ) \ ...@@ -112,45 +112,6 @@ GETTYPES_IMPL_START( Class ) \
CPPU_TYPE_REF( I5 ) \ CPPU_TYPE_REF( I5 ) \
GETTYPES_IMPL_END GETTYPES_IMPL_END
// 6 interfaces supported
#define XTYPEPROVIDER_IMPL_6( Class, I1,I2,I3,I4,I5,I6 ) \
XTYPEPROVIDER_COMMON_IMPL( Class ) \
GETTYPES_IMPL_START( Class ) \
CPPU_TYPE_REF( I1 ), \
CPPU_TYPE_REF( I2 ), \
CPPU_TYPE_REF( I3 ), \
CPPU_TYPE_REF( I4 ), \
CPPU_TYPE_REF( I5 ), \
CPPU_TYPE_REF( I6 ) \
GETTYPES_IMPL_END
// 7 interfaces supported
#define XTYPEPROVIDER_IMPL_7( Class, I1,I2,I3,I4,I5,I6,I7 ) \
XTYPEPROVIDER_COMMON_IMPL( Class ) \
GETTYPES_IMPL_START( Class ) \
CPPU_TYPE_REF( I1 ), \
CPPU_TYPE_REF( I2 ), \
CPPU_TYPE_REF( I3 ), \
CPPU_TYPE_REF( I4 ), \
CPPU_TYPE_REF( I5 ), \
CPPU_TYPE_REF( I6 ), \
CPPU_TYPE_REF( I7 ) \
GETTYPES_IMPL_END
// 8 interfaces supported
#define XTYPEPROVIDER_IMPL_8( Class, I1,I2,I3,I4,I5,I6,I7,I8 ) \
XTYPEPROVIDER_COMMON_IMPL( Class ) \
GETTYPES_IMPL_START( Class ) \
CPPU_TYPE_REF( I1 ), \
CPPU_TYPE_REF( I2 ), \
CPPU_TYPE_REF( I3 ), \
CPPU_TYPE_REF( I4 ), \
CPPU_TYPE_REF( I5 ), \
CPPU_TYPE_REF( I6 ), \
CPPU_TYPE_REF( I7 ), \
CPPU_TYPE_REF( I8 ) \
GETTYPES_IMPL_END
// 9 interfaces supported // 9 interfaces supported
#define XTYPEPROVIDER_IMPL_9( Class, I1,I2,I3,I4,I5,I6,I7,I8,I9 ) \ #define XTYPEPROVIDER_IMPL_9( Class, I1,I2,I3,I4,I5,I6,I7,I8,I9 ) \
XTYPEPROVIDER_COMMON_IMPL( Class ) \ XTYPEPROVIDER_COMMON_IMPL( Class ) \
...@@ -299,14 +260,6 @@ Class::getSupportedServiceNames_Static() \ ...@@ -299,14 +260,6 @@ Class::getSupportedServiceNames_Static() \
// Service with service factory. // Service with service factory.
// Own implementation of getSupportedServiceNames_Static().
#define XSERVICEINFO_IMPL_0( Class, ImplName ) \
XSERVICEINFO_COMMOM_IMPL( Class, ImplName ) \
XSERVICEINFO_CREATE_INSTANCE_IMPL( Class ) \
\
com::sun::star::uno::Sequence< OUString > \
Class::getSupportedServiceNames_Static()
// Own implementation of getSupportedServiceNames_Static(). // Own implementation of getSupportedServiceNames_Static().
#define XSERVICEINFO_IMPL_0_CTX( Class, ImplName ) \ #define XSERVICEINFO_IMPL_0_CTX( Class, ImplName ) \
XSERVICEINFO_COMMOM_IMPL( Class, ImplName ) \ XSERVICEINFO_COMMOM_IMPL( Class, ImplName ) \
......
...@@ -55,12 +55,6 @@ ...@@ -55,12 +55,6 @@
// Everything else is not a surrogate: 0x000 -- 0xD7FF, 0xE000 -- 0xFFFF // Everything else is not a surrogate: 0x000 -- 0xD7FF, 0xE000 -- 0xFFFF
// N = (H - 0xD800) * 0x400 + 0x10000 + (L - 0xDC00)
// I wonder whether we could somehow assert that H is a high surrogate
// and L is a low surrogate
#define SURROGATE_TO_UCS4(h, l) (((uint32_t(h) & 0x03FF) << 10) + \
(uint32_t(l) & 0x03FF) + PLANE1_BASE)
// Extract surrogates from a UCS4 char // Extract surrogates from a UCS4 char
// Reference: the Unicode standard 4.0, section 3.9 // Reference: the Unicode standard 4.0, section 3.9
// Since (c - 0x10000) >> 10 == (c >> 10) - 0x0080 and // Since (c - 0x10000) >> 10 == (c >> 10) - 0x0080 and
......
...@@ -103,10 +103,6 @@ ...@@ -103,10 +103,6 @@
TXT_FILE_BODY; \ TXT_FILE_BODY; \
Styles = (PACKED) Styles = (PACKED)
#define ARCHIVE_TXT_FILE_BODY \
TXT_FILE_BODY; \
Styles = (ARCHIVE)
#ifdef WITH_HELPPACK_INTEGRATION #ifdef WITH_HELPPACK_INTEGRATION
#define FILELIST_TXT_FILE_BODY_HELPPACK \ #define FILELIST_TXT_FILE_BODY_HELPPACK \
TXT_FILE_BODY; \ TXT_FILE_BODY; \
...@@ -196,15 +192,6 @@ End ...@@ -196,15 +192,6 @@ End
Styles = (PACKED); \ Styles = (PACKED); \
End End
#define STD_FONTWIN_FILE(id,name,fontname) \
File id \
TXT_FILE_BODY; \
Dir = gid_Dir_Fonts_Truetype; \
Styles = (PACKED,FONT,DONT_DELETE,FONT_WARN_IF_EXISTS); \
Name = STRING(name) ; \
NetDir = gid_Dir_Winfonts; \
End
#ifdef UNX #ifdef UNX
#define STD_FONT_FILELIST(id,name) \ #define STD_FONT_FILELIST(id,name) \
File id \ File id \
...@@ -241,14 +228,6 @@ End ...@@ -241,14 +228,6 @@ End
Styles = (PACKED); \ Styles = (PACKED); \
End End
#define STD_PY_FILE(id,name) \
File id \
PACKED_TXT_FILE_BODY; \
Dir = GID_DIR_PY; \
Name = name; \
End
#define CONDITIONAL_MODULE_ENTRY(name,modid) \ #define CONDITIONAL_MODULE_ENTRY(name,modid) \
Module gid_Module_Root_Reg_##name \ Module gid_Module_Root_Reg_##name \
ParentID = modid; \ ParentID = modid; \
...@@ -377,16 +356,6 @@ End ...@@ -377,16 +356,6 @@ End
Styles = (); \ Styles = (); \
End End
#define REGISTRY_ENTRY_KINDMAP(name, modid, key) \
RegistryItem CONCAT2(gid_Regitem_Software_Manufacturer_Productname_Productversion_Explorer_KindMap_,name) \
ParentID = PREDEFINED_HKEY_LOCAL_MACHINE; \
ModuleID = modid; \
ComponentCondition = STRING(VersionNT >= 600); \
Subkey = STRING(SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\KindMap); \
Name = STRING(CONCAT2(.,key)); \
Value = STRING(document); \
End
#define CONDITIONAL_REGISTER_DOC_EXTENSION(name,modid,key,cond,disp_name,icon_id,app,default,doc_type) \ #define CONDITIONAL_REGISTER_DOC_EXTENSION(name,modid,key,cond,disp_name,icon_id,app,default,doc_type) \
CONDITIONAL_MODULE_ENTRY(name,modid) \ CONDITIONAL_MODULE_ENTRY(name,modid) \
REGISTRY_ENTRY_OPEN_WITH(name,cond,doc_type,modid,key) \ REGISTRY_ENTRY_OPEN_WITH(name,cond,doc_type,modid,key) \
......
...@@ -76,14 +76,6 @@ ...@@ -76,14 +76,6 @@
Text [ en-US ] = "Page ~Layout" ; \ Text [ en-US ] = "Page ~Layout" ; \
}; };
#define MN_MODIFY_SLIDE \
MenuItem\
{\
Identifier = SID_MODIFYPAGE ; \
HelpId = CMD_SID_MODIFYPAGE ; \
Text [ en-US ] = "Slide ~Layout" ; \
};
#define MN_FORMAT_PAGE \ #define MN_FORMAT_PAGE \
MenuItem\ MenuItem\
{\ {\
......
...@@ -429,14 +429,6 @@ ...@@ -429,14 +429,6 @@
AutoCheck = TRUE ; \ AutoCheck = TRUE ; \
}; };
#define TBI_SOLID_CREATE \
ToolBoxItem\
{\
Identifier = SID_SOLID_CREATE ; \
HelpID = SID_SOLID_CREATE ; \
AutoCheck = TRUE ; \
};
#define TBI_LEAVE_ALL_GROUPS \ #define TBI_LEAVE_ALL_GROUPS \
ToolBoxItem\ ToolBoxItem\
{\ {\
......
...@@ -258,9 +258,6 @@ enum ...@@ -258,9 +258,6 @@ enum
kDebugInterruptDepthMask = 0x00FF0000 kDebugInterruptDepthMask = 0x00FF0000
}; };
#define DebugExtractTaskLevelInterruptLevel( LEVEL ) \
( ( ( LEVEL ) &kDebugInterruptLevelMask ) >> kDebugInterruptLevelShift )
#define DebugExtractTaskLevelInterruptDepth( LEVEL ) \ #define DebugExtractTaskLevelInterruptDepth( LEVEL ) \
( ( ( LEVEL ) &kDebugInterruptDepthMask ) >> kDebugInterruptDepthShift ) ( ( ( LEVEL ) &kDebugInterruptDepthMask ) >> kDebugInterruptDepthShift )
......
...@@ -181,20 +181,6 @@ struct SfxItemPool_Impl ...@@ -181,20 +181,6 @@ struct SfxItemPool_Impl
} \ } \
} }
#define CHECK_FILEFORMAT_RELEASE( rStream, nTag, pPointer ) \
{ sal_uInt16 nFileTag; \
rStream.ReadUInt16( nFileTag ); \
if ( nTag != nFileTag ) \
{ \
OSL_FAIL( #nTag ); /*! s.u. */ \
/*! Set error code and evaluate! */ \
(rStream).SetError(SVSTREAM_FILEFORMAT_ERROR); \
pImp->bStreaming = false; \
delete pPointer; \
return rStream; \
} \
}
#define CHECK_FILEFORMAT2( rStream, nTag1, nTag2 ) \ #define CHECK_FILEFORMAT2( rStream, nTag1, nTag2 ) \
{ sal_uInt16 nFileTag; \ { sal_uInt16 nFileTag; \
rStream.ReadUInt16( nFileTag ); \ rStream.ReadUInt16( nFileTag ); \
......
...@@ -243,11 +243,6 @@ ...@@ -243,11 +243,6 @@
Command = ".uno:Paste" ; \ Command = ".uno:Paste" ; \
Text [ en-US ] = "~Paste" ; \ Text [ en-US ] = "~Paste" ; \
#define ITEM_EDIT_IMAP \
Identifier = SID_IMAP ; \
Command = ".uno:ImageMapDialog" ; \
Text [ en-US ] = "ImageMap" ; \
#define ITEM_EXTERNAL_EDIT \ #define ITEM_EXTERNAL_EDIT \
Identifier = SID_EXTERNAL_EDIT ; \ Identifier = SID_EXTERNAL_EDIT ; \
Command = ".uno:ExternalEdit" ; \ Command = ".uno:ExternalEdit" ; \
...@@ -408,32 +403,11 @@ ...@@ -408,32 +403,11 @@
Toolbar-IDs Toolbar-IDs
------------------------------------------------------------------------*/ ------------------------------------------------------------------------*/
#define ITEM_TOOLBAR_TEMPLATE_APPLY \
Identifier = SID_STYLE_APPLY ; \
Command = ".uno:StyleApply" ; \
#define ITEM_TOOLBAR_ATTR_CHAR_COLOR \ #define ITEM_TOOLBAR_ATTR_CHAR_COLOR \
Identifier = SID_ATTR_CHAR_COLOR ; \ Identifier = SID_ATTR_CHAR_COLOR ; \
Command = ".uno:Color" ; \ Command = ".uno:Color" ; \
DropDown = TRUE ; DropDown = TRUE ;
#define ITEM_TOOLBAR_BACKGROUND_COLOR \
Identifier = SID_BACKGROUND_COLOR ; \
Command = ".uno:BackgroundColor" ; \
DropDown = TRUE ;
#define ITEM_TOOLBAR_ATTR_BORDER \
Identifier = SID_ATTR_BORDER ; \
Command = ".uno:BorderStyle" ; \
#define ITEM_TOOLBAR_FRAME_LINESTYLE \
Identifier = SID_FRAME_LINESTYLE ; \
Command = ".uno:LineStyle" ; \
#define ITEM_TOOLBAR_FRAME_LINECOLOR \
Identifier = SID_FRAME_LINECOLOR ; \
Command = ".uno:FrameLineColor" ; \
#define ITEM_TOOLBAR_ATTR_LINEEND_STYLE \ #define ITEM_TOOLBAR_ATTR_LINEEND_STYLE \
Identifier = SID_ATTR_LINEEND_STYLE ; \ Identifier = SID_ATTR_LINEEND_STYLE ; \
Command = ".uno:LineEndStyle" ; \ Command = ".uno:LineEndStyle" ; \
......
...@@ -54,7 +54,7 @@ UcbContentProviderProxyFactory::~UcbContentProviderProxyFactory() ...@@ -54,7 +54,7 @@ UcbContentProviderProxyFactory::~UcbContentProviderProxyFactory()
XSERVICEINFO_IMPL_1( UcbContentProviderProxyFactory, XSERVICEINFO_IMPL_1( UcbContentProviderProxyFactory,
OUString( "com.sun.star.comp.ucb.UcbContentProviderProxyFactory" ), OUString( "com.sun.star.comp.ucb.UcbContentProviderProxyFactory" ),
PROVIDER_FACTORY_SERVICE_NAME ); "com.sun.star.ucb.ContentProviderProxyFactory" );
...@@ -185,8 +185,7 @@ Sequence< Type > SAL_CALL UcbContentProviderProxy::getTypes() ...@@ -185,8 +185,7 @@ Sequence< Type > SAL_CALL UcbContentProviderProxy::getTypes()
XSERVICEINFO_NOFACTORY_IMPL_1( UcbContentProviderProxy, XSERVICEINFO_NOFACTORY_IMPL_1( UcbContentProviderProxy,
OUString( "com.sun.star.comp.ucb.UcbContentProviderProxy" ), OUString( "com.sun.star.comp.ucb.UcbContentProviderProxy" ),
PROVIDER_PROXY_SERVICE_NAME ); "com.sun.star.ucb.ContentProviderProxy" );
// XContentProvider methods. // XContentProvider methods.
......
...@@ -34,12 +34,6 @@ ...@@ -34,12 +34,6 @@
#define PROVIDER_FACTORY_SERVICE_NAME \
"com.sun.star.ucb.ContentProviderProxyFactory"
#define PROVIDER_PROXY_SERVICE_NAME \
"com.sun.star.ucb.ContentProviderProxy"
// class UcbContentProviderProxyFactory. // class UcbContentProviderProxyFactory.
......
...@@ -417,9 +417,9 @@ uno::Sequence< OUString > SAL_CALL Content::getSupportedServiceNames() ...@@ -417,9 +417,9 @@ uno::Sequence< OUString > SAL_CALL Content::getSupportedServiceNames()
{ {
uno::Sequence< OUString > aSNS( 1 ); uno::Sequence< OUString > aSNS( 1 );
if ( isFolder() ) if ( isFolder() )
aSNS.getArray()[ 0 ] = PACKAGE_FOLDER_CONTENT_SERVICE_NAME; aSNS.getArray()[ 0 ] = "com.sun.star.ucb.PackageFolderContent";
else else
aSNS.getArray()[ 0 ] = PACKAGE_STREAM_CONTENT_SERVICE_NAME; aSNS.getArray()[ 0 ] = "com.sun.star.ucb.PackageStreamContent";
return aSNS; return aSNS;
} }
......
...@@ -59,14 +59,6 @@ namespace package_ucp ...@@ -59,14 +59,6 @@ namespace package_ucp
// UNO service name for the content.
#define PACKAGE_FOLDER_CONTENT_SERVICE_NAME \
"com.sun.star.ucb.PackageFolderContent"
#define PACKAGE_STREAM_CONTENT_SERVICE_NAME \
"com.sun.star.ucb.PackageStreamContent"
struct ContentProperties struct ContentProperties
{ {
OUString aTitle; // Title OUString aTitle; // Title
......
...@@ -18,14 +18,8 @@ G_BEGIN_DECLS ...@@ -18,14 +18,8 @@ G_BEGIN_DECLS
#define G_TYPE_LO_ACTION_GROUP (g_lo_action_group_get_type ()) #define G_TYPE_LO_ACTION_GROUP (g_lo_action_group_get_type ())
#define G_LO_ACTION_GROUP(inst) (G_TYPE_CHECK_INSTANCE_CAST ((inst), \ #define G_LO_ACTION_GROUP(inst) (G_TYPE_CHECK_INSTANCE_CAST ((inst), \
G_TYPE_LO_ACTION_GROUP, GLOActionGroup)) G_TYPE_LO_ACTION_GROUP, GLOActionGroup))
#define G_LO_ACTION_GROUP_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), \
G_TYPE_LO_ACTION_GROUP, GLOActionGroupClass))
#define G_IS_LO_ACTION_GROUP(inst) (G_TYPE_CHECK_INSTANCE_TYPE ((inst), \ #define G_IS_LO_ACTION_GROUP(inst) (G_TYPE_CHECK_INSTANCE_TYPE ((inst), \
G_TYPE_LO_ACTION_GROUP)) G_TYPE_LO_ACTION_GROUP))
#define G_IS_LO_ACTION_GROUP_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), \
G_TYPE_LO_ACTION_GROUP))
#define G_LO_ACTION_GROUP_GET_CLASS(inst) (G_TYPE_INSTANCE_GET_CLASS ((inst), \
G_TYPE_LO_ACTION_GROUP, GLOActionGroupClass))
typedef struct _GLOActionGroupPrivate GLOActionGroupPrivate; typedef struct _GLOActionGroupPrivate GLOActionGroupPrivate;
typedef struct _GLOActionGroupClass GLOActionGroupClass; typedef struct _GLOActionGroupClass GLOActionGroupClass;
......
...@@ -78,13 +78,4 @@ ...@@ -78,13 +78,4 @@
#define SIZEOF(object) ((size_t) sizeof(object)) #define SIZEOF(object) ((size_t) sizeof(object))
/*
* The modules that use fread() and fwrite() always invoke them through
* these macros. On some systems you may need to twiddle the argument casts.
* CAUTION: argument order is different from underlying functions!
*/
#define JFREAD(file,buf,sizeofbuf) \
((size_t) fread((void *) (buf), (size_t) 1, (size_t) (sizeofbuf), (file)))
#define JFWRITE(file,buf,sizeofbuf) \
((size_t) fwrite((const void *) (buf), (size_t) 1, (size_t) (sizeofbuf), (file)))
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment