diff options
author | Noel Grandin <noel@peralex.com> | 2015-07-03 10:29:31 +0200 |
---|---|---|
committer | Noel Grandin <noelgrandin@gmail.com> | 2015-07-03 10:46:06 +0000 |
commit | 9136f2344af88d524b6c10b6b2dfd6017bba60ec (patch) | |
tree | d9813b742356b6b0e36bd11e8a495317a5b4d5df /include | |
parent | 465489d97ab9ffa0bfee02d80eb99aad771aee3f (diff) |
expand out some sot macros
Change-Id: Ic583fe767e5f85628f8270ec740ce3e72fe56ded
Reviewed-on: https://gerrit.libreoffice.org/16722
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
Tested-by: Noel Grandin <noelgrandin@gmail.com>
Diffstat (limited to 'include')
-rw-r--r-- | include/sot/object.hxx | 69 |
1 files changed, 0 insertions, 69 deletions
diff --git a/include/sot/object.hxx b/include/sot/object.hxx index c4aa662927dd..8c208564bb47 100644 --- a/include/sot/object.hxx +++ b/include/sot/object.hxx @@ -25,72 +25,6 @@ #include <tools/ref.hxx> #include <sot/sotdllapi.h> -#define SO2_IMPL_BASIC_CLASS_DLL(ClassName,FactoryName,GlobalName) \ -SotFactory * ClassName::ClassFactory() \ -{ \ - SotFactory **ppFactory = GetFactoryAdress(); \ - if( !*ppFactory ) \ - { \ - *ppFactory = new FactoryName( GlobalName, \ - OUString( #ClassName ), ClassName::CreateInstance ); \ - } \ - return *ppFactory; \ -} \ -void * ClassName::CreateInstance( SotObject ** ppObj ) \ -{ \ - ClassName * p = new ClassName(); \ - if( ppObj ) \ - *ppObj = p; \ - return p; \ -} \ -const SotFactory * ClassName::GetSvFactory() const \ -{ \ - return ClassFactory(); \ -} \ -void * ClassName::Cast( const SotFactory * pFact ) \ -{ \ - void * pRet = NULL; \ - if( !pFact || pFact == ClassFactory() ) \ - pRet = this; \ - return pRet; \ -} - -#define SO2_IMPL_BASIC_CLASS1_DLL(ClassName,FactoryName,Super1,GlobalName)\ -SotFactory * ClassName::ClassFactory() \ -{ \ - SotFactory **ppFactory = GetFactoryAdress(); \ - if( !*ppFactory ) \ - { \ - *ppFactory = new FactoryName( GlobalName, \ - OUString( #ClassName ), ClassName::CreateInstance ); \ - (*ppFactory)->PutSuperClass( Super1::ClassFactory() ); \ - } \ - return *ppFactory; \ -} \ -void * ClassName::CreateInstance( SotObject ** ppObj ) \ -{ \ - ClassName * p = new ClassName(); \ - Super1* pSuper1 = p; \ - SotObject* pBasicObj = pSuper1; \ - if( ppObj ) \ - *ppObj = pBasicObj; \ - return p; \ -} \ -const SotFactory * ClassName::GetSvFactory() const \ -{ \ - return ClassFactory(); \ -} \ -void * ClassName::Cast( const SotFactory * pFact ) \ -{ \ - void * pRet = NULL; \ - if( !pFact || pFact == ClassFactory() ) \ - pRet = this; \ - if( !pRet ) \ - pRet = Super1::Cast( pFact ); \ - return pRet; \ -} - -struct IUnknown; class SOT_DLLPUBLIC SotObject : virtual public SvRefBase { friend class SotFactory; @@ -128,9 +62,6 @@ private: SotObject( const SotObject & ) SAL_DELETED_FUNCTION; }; -//==================class SotObjectRef====================================== -typedef tools::SvRef<SotObject> SotObjectRef; - #endif // _IFACE_HXX /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ |