From 79f23856aa5f8a9c28d1650d5f02559e6a5fbddb Mon Sep 17 00:00:00 2001 From: Mikhail Voytenko Date: Mon, 3 Jan 2011 13:40:23 +0100 Subject: fwk162: #i115902# review usage of SfxObjectShellRef, SfxObjecShellLock; remove unused some methods --- sot/inc/sot/factory.hxx | 1 - sot/inc/sot/object.hxx | 40 ++++------------------------------------ sot/inc/sot/sotref.hxx | 8 +------- 3 files changed, 5 insertions(+), 44 deletions(-) (limited to 'sot/inc') diff --git a/sot/inc/sot/factory.hxx b/sot/inc/sot/factory.hxx index 08dd21a88aa5..7b7feb0e9ebe 100644 --- a/sot/inc/sot/factory.hxx +++ b/sot/inc/sot/factory.hxx @@ -73,7 +73,6 @@ public: void PutSuperClass( const SotFactory * ); virtual void * CreateInstance( SotObject ** ppObj = NULL ) const; void * CastAndAddRef( SotObject * ) const; - void * AggCastAndAddRef( SotObject * ) const; BOOL Is( const SotFactory * pSuperClass ) const; const SotFactory * GetSuper( USHORT nPos ) const diff --git a/sot/inc/sot/object.hxx b/sot/inc/sot/object.hxx index db2ac3b30ffc..563c90d89a54 100644 --- a/sot/inc/sot/object.hxx +++ b/sot/inc/sot/object.hxx @@ -381,22 +381,17 @@ SotFactory * ClassName::pFactory = NULL; \ #pragma warning(disable: 4250) #endif -class SvAggregateMemberList; struct IUnknown; class SOT_DLLPUBLIC SotObject : virtual public SvRefBase { friend class SotFactory; friend class SvObject; - SvAggregateMemberList * pAggList; // fuer Aggregation, erstes ist das MainObj USHORT nStrongLockCount; USHORT nOwnerLockCount; BOOL bOwner:1, bSVObject:1, // Ist Proxy, dann TRUE wenn andere Seite SV ist bInClose:1; // TRUE, im DoClose - void * DownAggCast( const SotFactory * pFact ); - void RemoveInterface( ULONG ); - void RemoveInterface( SotObject * ); #if defined (GCC) && (defined (C281) || defined (C290) || defined (C291)) public: #else @@ -414,25 +409,10 @@ public: virtual IUnknown * GetInterface( const SvGlobalName & ); BOOL Owner() const { return bOwner; } - BOOL IsSvObject() const; - - // Methoden fuer die Aggregation (siehe OLE2-Spec) - BOOL ShouldDelete(); - virtual void QueryDelete(); - SvAggregateMemberList & GetAggList(); - void AddInterface( SotObject * ); - void AddInterface( SotFactory * ); - virtual SotObjectRef CreateAggObj( const SotFactory * ); - void * AggCast( const SotFactory * pFact ); - void * CastAndAddRef( const SotFactory * pFact ); - SotObject * GetMainObj() const; - - // !!! Read the Manual !!! - virtual USHORT FuzzyLock( BOOL bLock, BOOL bIntern, BOOL bClose ); - void Lock( BOOL bLock ) - { - FuzzyLock( bLock, TRUE, TRUE ); - } + + void* CastAndAddRef( const SotFactory * pFact ); + + USHORT Lock( BOOL bLock ); // affects nStrongLockCount USHORT GetOwnerLockCount() const { return nOwnerLockCount; } USHORT GetStrongLockCount() const { return nStrongLockCount; } @@ -450,18 +430,6 @@ private: //==================class SotObjectRef====================================== SV_IMPL_REF(SotObject) -inline SotObjectRef::SotObjectRef( SotObject * pObjP, SvCastEnum ) -{ - if( pObjP ) - { - pObj = (SotObject *)pObjP->AggCast( SotObject::ClassFactory() ); - if( pObj ) - pObj->AddRef(); - } - else - pObj = NULL; -} - //==================class SotObject*List==================================== SV_DECL_REF_LIST(SotObject,SotObject*) SV_IMPL_REF_LIST(SotObject,SotObject*) diff --git a/sot/inc/sot/sotref.hxx b/sot/inc/sot/sotref.hxx index ae03032e286e..a6728627ef2c 100644 --- a/sot/inc/sot/sotref.hxx +++ b/sot/inc/sot/sotref.hxx @@ -33,14 +33,12 @@ #endif //======================================================================== -enum SvCastEnum { SV_AGGREGATION_CAST }; #ifndef SVT_DECL_SOTOBJECT_DEFINED #define SVT_DECL_SOTOBJECT_DEFINED class SotObject; class SotObjectRef { PRV_SV_DECL_REF(SotObject) - inline SotObjectRef( SotObject * pObjP, SvCastEnum ); }; #endif @@ -52,7 +50,6 @@ class ClassName##Ref \ PRV_SV_DECL_REF(ClassName) \ inline ClassName##Ref( const SotObjectRef & ); \ inline ClassName##Ref( SotObject * pObjP ); \ - inline ClassName##Ref( SotObject * pObjP, SvCastEnum ); \ }; #define SO2_IMPL_REF(ClassName) \ @@ -64,12 +61,9 @@ inline ClassName##Ref::ClassName##Ref( const SotObjectRef & r ) \ inline ClassName##Ref::ClassName##Ref( SotObject * pObjP ) \ { \ pObj = (ClassName *)ClassName::ClassFactory()->CastAndAddRef( pObjP );\ -} \ -inline ClassName##Ref::ClassName##Ref( SotObject * pObjP, SvCastEnum ) \ -{ \ - pObj = (ClassName *)ClassName::ClassFactory()->AggCastAndAddRef( pObjP );\ } + #define SO2_DECL_IMPL_REF(ClassName) \ SO2_DECL_REF(ClassName) \ SO2_IMPL_REF(ClassName) -- cgit