diff options
author | Caolán McNamara <caolanm@redhat.com> | 2012-03-16 15:31:10 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2012-03-20 12:57:31 +0000 |
commit | 0a14f36501e2e0ce8373464dc1655fdb1e9550b6 (patch) | |
tree | e175547213c8528499845a78064fd44a714f0ee9 | |
parent | 00f32691bfcbfbecc824e65e60a506b0035f9643 (diff) |
split macros to elide unneeded methods
-rw-r--r-- | framework/inc/macros/xserviceinfo.hxx | 10 | ||||
-rw-r--r-- | framework/inc/tabwin/tabwindow.hxx | 2 | ||||
-rw-r--r-- | framework/source/tabwin/tabwindow.cxx | 2 | ||||
-rw-r--r-- | sc/source/ui/unoobj/scdetect.cxx | 2 | ||||
-rw-r--r-- | sc/source/ui/unoobj/scdetect.hxx | 2 | ||||
-rw-r--r-- | sd/source/ui/unoidl/sddetect.cxx | 2 | ||||
-rw-r--r-- | sd/source/ui/unoidl/sddetect.hxx | 2 | ||||
-rw-r--r-- | sfx2/inc/sfx2/sfxuno.hxx | 23 | ||||
-rw-r--r-- | starmath/source/smdetect.cxx | 2 | ||||
-rw-r--r-- | starmath/source/smdetect.hxx | 2 | ||||
-rw-r--r-- | svl/source/filerec/filerec.cxx | 2 | ||||
-rw-r--r-- | sw/source/ui/uno/swdetect.cxx | 2 | ||||
-rw-r--r-- | sw/source/ui/uno/swdetect.hxx | 2 | ||||
-rwxr-xr-x | unusedcode.easy | 5 |
14 files changed, 34 insertions, 26 deletions
diff --git a/framework/inc/macros/xserviceinfo.hxx b/framework/inc/macros/xserviceinfo.hxx index f031a37ff8b4..5eadc5a2b655 100644 --- a/framework/inc/macros/xserviceinfo.hxx +++ b/framework/inc/macros/xserviceinfo.hxx @@ -207,7 +207,8 @@ ________________________________________________________________________________ // public // declaration of XServiceInfo and helper functions //***************************************************************************************************************** -#define DECLARE_XSERVICEINFO \ + +#define DECLARE_XSERVICEINFO_NOFACTORY \ /* interface XServiceInfo */ \ virtual ::rtl::OUString SAL_CALL getImplementationName ( ) throw( css::uno::RuntimeException ); \ virtual sal_Bool SAL_CALL supportsService ( const ::rtl::OUString& sServiceName ) throw( css::uno::RuntimeException ); \ @@ -215,11 +216,14 @@ ________________________________________________________________________________ /* Helper for XServiceInfo */ \ static css::uno::Sequence< ::rtl::OUString > SAL_CALL impl_getStaticSupportedServiceNames( ); \ static ::rtl::OUString SAL_CALL impl_getStaticImplementationName ( ); \ + /* Helper for initialization of service by using own reference! */ \ + virtual void SAL_CALL impl_initService ( ); \ + +#define DECLARE_XSERVICEINFO \ + DECLARE_XSERVICEINFO_NOFACTORY \ /* Helper for registry */ \ static css::uno::Reference< css::uno::XInterface > SAL_CALL impl_createInstance ( const css::uno::Reference< css::lang::XMultiServiceFactory >& xServiceManager ) throw( css::uno::Exception ); \ static css::uno::Reference< css::lang::XSingleServiceFactory > SAL_CALL impl_createFactory ( const css::uno::Reference< css::lang::XMultiServiceFactory >& xServiceManager ); \ - /* Helper for initialization of service by using own reference! */ \ - virtual void SAL_CALL impl_initService ( ); \ //***************************************************************************************************************** // public diff --git a/framework/inc/tabwin/tabwindow.hxx b/framework/inc/tabwin/tabwindow.hxx index bbad1e22a51a..0cfe4507c048 100644 --- a/framework/inc/tabwin/tabwindow.hxx +++ b/framework/inc/tabwin/tabwindow.hxx @@ -85,7 +85,7 @@ class TabWindow : public ::com::sun::star::lang::XTypeProvider , // XInterface, XTypeProvider, XServiceInfo FWK_DECLARE_XINTERFACE - DECLARE_XSERVICEINFO + DECLARE_XSERVICEINFO_NOFACTORY FWK_DECLARE_XTYPEPROVIDER using ::cppu::OPropertySetHelper::disposing; diff --git a/framework/source/tabwin/tabwindow.cxx b/framework/source/tabwin/tabwindow.cxx index d496c092b7cc..337c6e707c2a 100644 --- a/framework/source/tabwin/tabwindow.cxx +++ b/framework/source/tabwin/tabwindow.cxx @@ -94,7 +94,7 @@ DEFINE_XTYPEPROVIDER_11 ( TabWindow css::beans::XPropertySet ) -DEFINE_XSERVICEINFO_MULTISERVICE ( TabWindow , +PRIVATE_DEFINE_XSERVICEINFO_BASE ( TabWindow , ::cppu::OWeakObject , SERVICENAME_TABWINDOW , IMPLEMENTATIONNAME_TABWINDOW diff --git a/sc/source/ui/unoobj/scdetect.cxx b/sc/source/ui/unoobj/scdetect.cxx index c1f279590564..25f169678186 100644 --- a/sc/source/ui/unoobj/scdetect.cxx +++ b/sc/source/ui/unoobj/scdetect.cxx @@ -866,8 +866,6 @@ static sal_Bool lcl_MayBeDBase( SvStream& rStream ) return aTypeName; } -SFX_IMPL_SINGLEFACTORY( ScFilterDetect ) - /* XServiceInfo */ rtl::OUString SAL_CALL ScFilterDetect::getImplementationName() throw( UNORUNTIMEEXCEPTION ) { diff --git a/sc/source/ui/unoobj/scdetect.hxx b/sc/source/ui/unoobj/scdetect.hxx index 0ad2d2cd8e8e..2713d7a28f5d 100644 --- a/sc/source/ui/unoobj/scdetect.hxx +++ b/sc/source/ui/unoobj/scdetect.hxx @@ -82,7 +82,7 @@ public: ScFilterDetect( const REFERENCE < ::com::sun::star::lang::XMultiServiceFactory >& xFactory ); virtual ~ScFilterDetect(); - SFX_DECL_XSERVICEINFO + SFX_DECL_XSERVICEINFO_NOFACTORY //---------------------------------------------------------------------------------- // XExtendedFilterDetect diff --git a/sd/source/ui/unoidl/sddetect.cxx b/sd/source/ui/unoidl/sddetect.cxx index 87b113d654a0..5260ede7846b 100644 --- a/sd/source/ui/unoidl/sddetect.cxx +++ b/sd/source/ui/unoidl/sddetect.cxx @@ -486,8 +486,6 @@ SdFilterDetect::~SdFilterDetect() return aTypeName; } -SFX_IMPL_SINGLEFACTORY( SdFilterDetect ) - /* XServiceInfo */ rtl::OUString SAL_CALL SdFilterDetect::getImplementationName() throw( UNORUNTIMEEXCEPTION ) { diff --git a/sd/source/ui/unoidl/sddetect.hxx b/sd/source/ui/unoidl/sddetect.hxx index 1ff570f8370d..96fb6579e841 100644 --- a/sd/source/ui/unoidl/sddetect.hxx +++ b/sd/source/ui/unoidl/sddetect.hxx @@ -82,7 +82,7 @@ public: SdFilterDetect( const REFERENCE < ::com::sun::star::lang::XMultiServiceFactory >& xFactory ); virtual ~SdFilterDetect(); - SFX_DECL_XSERVICEINFO + SFX_DECL_XSERVICEINFO_NOFACTORY //---------------------------------------------------------------------------------- // XExtendedFilterDetect diff --git a/sfx2/inc/sfx2/sfxuno.hxx b/sfx2/inc/sfx2/sfxuno.hxx index d9614d212a76..fa57a38a8db4 100644 --- a/sfx2/inc/sfx2/sfxuno.hxx +++ b/sfx2/inc/sfx2/sfxuno.hxx @@ -141,6 +141,7 @@ bool GetEncryptionData_Impl( const SfxItemSet* pSet, ::com::sun::star::uno::Sequ #define SFX_DECL_XINTERFACE_XTYPEPROVIDER \ SFX_DECL_XINTERFACE \ SFX_DECL_XTYPEPROVIDER + //************************************************************************************************************************ // declaration of XInterface::queryInterface() // XInterface::aquire() @@ -153,9 +154,8 @@ bool GetEncryptionData_Impl( const SfxItemSet* pSet, ::com::sun::star::uno::Sequ // static xxx::impl_getStaticSupportedServiceNames() // static xxx::impl_getStaticImplementationName() // static xxx::impl_createInstance() -// static xxx::impl_createFactory() //************************************************************************************************************************ -#define SFX_DECL_XSERVICEINFO \ +#define SFX_DECL_XSERVICEINFO_NOFACTORY \ /* XServiceInfo */ \ virtual rtl::OUString SAL_CALL getImplementationName() throw( UNORUNTIMEEXCEPTION ); \ virtual sal_Bool SAL_CALL supportsService( const rtl::OUString& sServiceName ) throw( UNORUNTIMEEXCEPTION ); \ @@ -166,7 +166,24 @@ bool GetEncryptionData_Impl( const SfxItemSet* pSet, ::com::sun::star::uno::Sequ static rtl::OUString impl_getStaticImplementationName(); \ \ /* Helper for registry */ \ - static UNOREFERENCE< UNOXINTERFACE > SAL_CALL impl_createInstance( const UNOREFERENCE< UNOXMULTISERVICEFACTORY >& xServiceManager ) throw( UNOEXCEPTION );\ + static UNOREFERENCE< UNOXINTERFACE > SAL_CALL impl_createInstance( const UNOREFERENCE< UNOXMULTISERVICEFACTORY >& xServiceManager ) throw( UNOEXCEPTION ); + +//************************************************************************************************************************ +// declaration of XInterface::queryInterface() +// XInterface::aquire() +// XInterface::release() +// XTypeProvider::getTypes() +// XTypeProvider::getImplementationId() +// XServiceInfo::getImplementationName() +// XServiceInfo::supportsService() +// XServiceInfo::getSupportedServiceNames() +// static xxx::impl_getStaticSupportedServiceNames() +// static xxx::impl_getStaticImplementationName() +// static xxx::impl_createInstance() +// static xxx::impl_createFactory() +//************************************************************************************************************************ +#define SFX_DECL_XSERVICEINFO \ + SFX_DECL_XSERVICEINFO_NOFACTORY \ static UNOREFERENCE< UNOXSINGLESERVICEFACTORY > impl_createFactory( const UNOREFERENCE< UNOXMULTISERVICEFACTORY >& xServiceManager ); #define SFX_DECL_XINTERFACE_XTYPEPROVIDER_XSERVICEINFO \ diff --git a/starmath/source/smdetect.cxx b/starmath/source/smdetect.cxx index dfe37e9470b1..42be1f70fb88 100644 --- a/starmath/source/smdetect.cxx +++ b/starmath/source/smdetect.cxx @@ -417,8 +417,6 @@ SmFilterDetect::~SmFilterDetect() return aTypeName; } -SFX_IMPL_SINGLEFACTORY( SmFilterDetect ) - /* XServiceInfo */ rtl::OUString SAL_CALL SmFilterDetect::getImplementationName() throw( UNORUNTIMEEXCEPTION ) { diff --git a/starmath/source/smdetect.hxx b/starmath/source/smdetect.hxx index 609694e9b8ff..1d20f6abcaa3 100644 --- a/starmath/source/smdetect.hxx +++ b/starmath/source/smdetect.hxx @@ -83,7 +83,7 @@ public: SmFilterDetect( const REFERENCE < ::com::sun::star::lang::XMultiServiceFactory >& xFactory ); virtual ~SmFilterDetect(); - SFX_DECL_XSERVICEINFO + SFX_DECL_XSERVICEINFO_NOFACTORY //---------------------------------------------------------------------------------- // XExtendedFilterDetect diff --git a/svl/source/filerec/filerec.cxx b/svl/source/filerec/filerec.cxx index df5468e54149..2c810eddab98 100644 --- a/svl/source/filerec/filerec.cxx +++ b/svl/source/filerec/filerec.cxx @@ -483,7 +483,7 @@ void SfxMultiVarRecordWriter::FlushContent_Impl() { // Versions-Kennung und Positions-Offset des aktuellen Contents merken; // das Positions-Offset ist relativ zur Startposition des ersten Contents - assert(_aContentOfs.size() == _nContentCount-1); + assert(_aContentOfs.size() == static_cast<size_t>(_nContentCount)-1); _aContentOfs.resize(_nContentCount-1); _aContentOfs.push_back( SFX_REC_CONTENT_HEADER(_nContentVer,_nStartPos,_nContentStartPos)); diff --git a/sw/source/ui/uno/swdetect.cxx b/sw/source/ui/uno/swdetect.cxx index 0dda7601a289..ff9af042063e 100644 --- a/sw/source/ui/uno/swdetect.cxx +++ b/sw/source/ui/uno/swdetect.cxx @@ -423,8 +423,6 @@ SwFilterDetect::~SwFilterDetect() return aTypeName; } -SFX_IMPL_SINGLEFACTORY( SwFilterDetect ) - /* XServiceInfo */ rtl::OUString SAL_CALL SwFilterDetect::getImplementationName() throw( UNORUNTIMEEXCEPTION ) { diff --git a/sw/source/ui/uno/swdetect.hxx b/sw/source/ui/uno/swdetect.hxx index 0ece0dcaa1fc..d68615e19548 100644 --- a/sw/source/ui/uno/swdetect.hxx +++ b/sw/source/ui/uno/swdetect.hxx @@ -84,7 +84,7 @@ public: SwFilterDetect( const REFERENCE < ::com::sun::star::lang::XMultiServiceFactory >& xFactory ); virtual ~SwFilterDetect(); - SFX_DECL_XSERVICEINFO + SFX_DECL_XSERVICEINFO_NOFACTORY //---------------------------------------------------------------------------------- // XExtendedFilterDetect diff --git a/unusedcode.easy b/unusedcode.easy index 94b2111957b5..521e03f80608 100755 --- a/unusedcode.easy +++ b/unusedcode.easy @@ -74,7 +74,6 @@ ScDBCollection::AnonDBs::erase(boost::void_ptr_iterator<__gnu_debug::_Safe_itera ScDBCollection::AnonDBs::size() const ScDPLabelData::ScDPLabelData(rtl::OUString const&, short, bool) ScDocRowHeightUpdater::TabRanges::TabRanges() -ScFilterDetect::impl_createFactory(com::sun::star::uno::Reference<com::sun::star::lang::XMultiServiceFactory> const&) ScHTMLColOffset::Insert(ScHTMLColOffset const*, unsigned short, unsigned short) ScHTMLColOffset::Insert(unsigned long const&, unsigned short&) ScHTMLColOffset::Insert(unsigned long const*, unsigned short) @@ -112,7 +111,6 @@ ScVbaWorksheet::ScVbaWorksheet(com::sun::star::uno::Reference<ooo::vba::XHelperI ScaList::Insert(void*, unsigned int) ScrollBarBox::ScrollBarBox(Window*, ResId const&) ScrollableWindow::MakeVisible(Rectangle const&, unsigned char) -SdFilterDetect::impl_createFactory(com::sun::star::uno::Reference<com::sun::star::lang::XMultiServiceFactory> const&) SectReprArr::Insert(SectRepr* const&, unsigned short&) SectReprArr::Insert(SectRepr* const*, unsigned short) SectReprArr::Insert(SectReprArr const*, unsigned short, unsigned short) @@ -134,7 +132,6 @@ SfxRecordingFloatWrapper_Impl::GetChildWindowId() Slider::SetRangeMax(long) Slider::SetRangeMin(long) Slider::Slider(Window*, ResId const&) -SmFilterDetect::impl_createFactory(com::sun::star::uno::Reference<com::sun::star::lang::XMultiServiceFactory> const&) SotStorage::GetProperty(String const&, String const&, com::sun::star::uno::Any&) SpanStyleManager::get(WPXString const&) const SpinButton::SpinButton(Window*, ResId const&) @@ -226,7 +223,6 @@ SwDestroyList::Insert(SwDestroyList const*, unsigned short, unsigned short) SwDestroyList::Insert(SwSectionFrm* const&, unsigned short&) SwDestroyList::Insert(SwSectionFrm* const*, unsigned short) SwDestroyList::Remove(SwSectionFrm* const&, unsigned short) -SwFilterDetect::impl_createFactory(com::sun::star::uno::Reference<com::sun::star::lang::XMultiServiceFactory> const&) SwFldDataOnlyDlgWrapper::GetChildWindowId() SwGlblDocContents::Insert(SwGlblDocContent* const&, unsigned short&) SwGlblDocContents::Insert(SwGlblDocContent* const*, unsigned short) @@ -870,7 +866,6 @@ formula::EditBox::EditBox(Window*, long) formula::FormulaListBox::FormulaListBox(Window*, long) formula::FormulaTokenArray::AddBad(unsigned short const*) formula::FormulaTokenIterator::First() -framework::TabWindow::impl_createFactory(com::sun::star::uno::Reference<com::sun::star::lang::XMultiServiceFactory> const&) jfw_plugin::VendorBase::createInstance() jfw_plugin::VendorBase::getJavaExePaths(int*) nullcanvas::CanvasFont::getFontMatrix() const |