summaryrefslogtreecommitdiff
path: root/sot
diff options
context:
space:
mode:
authorMatthias Huetsch [mhu] <matthias.huetsch@oracle.com>2011-01-24 16:50:44 +0100
committerMatthias Huetsch [mhu] <matthias.huetsch@oracle.com>2011-01-24 16:50:44 +0100
commit12abdfdfabdd35df2fb06defaed0b7715c208724 (patch)
treebced4fbe47ee52b4b09b0043bc46a69a42ea8403 /sot
parent907a2c710d830e47328ebacd81788d29f4a63c4b (diff)
parentffd600e777970df0908125da66b280e1b00dbec9 (diff)
Update from master repository (DEV300_m98).
Diffstat (limited to 'sot')
-rw-r--r--sot/inc/sot/absdev.hxx (renamed from sot/inc/absdev.hxx)0
-rw-r--r--sot/inc/sot/agg.hxx (renamed from sot/inc/agg.hxx)0
-rw-r--r--sot/inc/sot/clsids.hxx (renamed from sot/inc/clsids.hxx)0
-rw-r--r--sot/inc/sot/factory.hxx1
-rw-r--r--sot/inc/sot/filelist.hxx (renamed from sot/inc/filelist.hxx)0
-rw-r--r--sot/inc/sot/object.hxx40
-rw-r--r--sot/inc/sot/sotref.hxx8
-rw-r--r--sot/inc/sot/stg.hxx (renamed from sot/inc/stg.hxx)0
-rw-r--r--sot/inc/sot/storinfo.hxx (renamed from sot/inc/storinfo.hxx)0
-rw-r--r--sot/prj/build.lst2
-rw-r--r--sot/prj/d.lst17
-rw-r--r--sot/source/base/exchange.cxx2
-rw-r--r--sot/source/base/factory.cxx41
-rw-r--r--sot/source/base/filelist.cxx2
-rw-r--r--sot/source/base/formats.cxx4
-rw-r--r--sot/source/base/object.cxx292
-rw-r--r--sot/source/sdstor/stg.cxx4
-rw-r--r--sot/source/sdstor/stgcache.cxx2
-rw-r--r--sot/source/sdstor/stgdir.cxx2
-rw-r--r--sot/source/sdstor/stgelem.cxx2
-rw-r--r--sot/source/sdstor/stgelem.hxx2
-rw-r--r--sot/source/sdstor/stgio.cxx2
-rw-r--r--sot/source/sdstor/stgole.cxx2
-rw-r--r--sot/source/sdstor/stgole.hxx2
-rw-r--r--sot/source/sdstor/stgstrms.cxx2
-rw-r--r--sot/source/sdstor/storage.cxx4
-rw-r--r--sot/source/sdstor/storinfo.cxx4
-rw-r--r--sot/source/sdstor/ucbstorage.cxx6
-rw-r--r--sot/source/sdstor/unostorageholder.cxx2
-rw-r--r--sot/source/unoolestorage/xolesimplestorage.cxx2
-rw-r--r--sot/source/unoolestorage/xolesimplestorage.hxx2
-rw-r--r--sot/util/makefile.mk8
32 files changed, 43 insertions, 414 deletions
diff --git a/sot/inc/absdev.hxx b/sot/inc/sot/absdev.hxx
index 3d251d98e0b6..3d251d98e0b6 100644
--- a/sot/inc/absdev.hxx
+++ b/sot/inc/sot/absdev.hxx
diff --git a/sot/inc/agg.hxx b/sot/inc/sot/agg.hxx
index 2f8cc7587458..2f8cc7587458 100644
--- a/sot/inc/agg.hxx
+++ b/sot/inc/sot/agg.hxx
diff --git a/sot/inc/clsids.hxx b/sot/inc/sot/clsids.hxx
index a64df510dd07..a64df510dd07 100644
--- a/sot/inc/clsids.hxx
+++ b/sot/inc/sot/clsids.hxx
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/filelist.hxx b/sot/inc/sot/filelist.hxx
index 4c6c55534319..4c6c55534319 100644
--- a/sot/inc/filelist.hxx
+++ b/sot/inc/sot/filelist.hxx
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)
diff --git a/sot/inc/stg.hxx b/sot/inc/sot/stg.hxx
index 84373e26d596..84373e26d596 100644
--- a/sot/inc/stg.hxx
+++ b/sot/inc/sot/stg.hxx
diff --git a/sot/inc/storinfo.hxx b/sot/inc/sot/storinfo.hxx
index dab1f6d4540e..dab1f6d4540e 100644
--- a/sot/inc/storinfo.hxx
+++ b/sot/inc/sot/storinfo.hxx
diff --git a/sot/prj/build.lst b/sot/prj/build.lst
index a5ebff311e9c..9d6e785898a5 100644
--- a/sot/prj/build.lst
+++ b/sot/prj/build.lst
@@ -1,4 +1,4 @@
-to sot : tools ucbhelper unotools NULL
+to sot : LIBXSLT:libxslt tools ucbhelper unotools NULL
to sot usr1 - all sot_mkout NULL
to sot\inc nmake - all sot_inc NULL
to sot\prj get - all sot_prj NULL
diff --git a/sot/prj/d.lst b/sot/prj/d.lst
index 10bed8c9fe5e..ec3166bbea1a 100644
--- a/sot/prj/d.lst
+++ b/sot/prj/d.lst
@@ -1,20 +1,7 @@
mkdir: %_DEST%\inc%_EXT%\sot
-..\inc\clsids.hxx %_DEST%\inc%_EXT%\sot\clsids.hxx
-..\inc\sot\object.hxx %_DEST%\inc%_EXT%\sot\object.hxx
-..\inc\sot\factory.hxx %_DEST%\inc%_EXT%\sot\factory.hxx
-..\inc\sot\sotdata.hxx %_DEST%\inc%_EXT%\sot\sotdata.hxx
-..\inc\agg.hxx %_DEST%\inc%_EXT%\sot\agg.hxx
-..\inc\sot\storage.hxx %_DEST%\inc%_EXT%\sot\storage.hxx
-..\inc\storinfo.hxx %_DEST%\inc%_EXT%\sot\storinfo.hxx
-..\inc\sot\sotref.hxx %_DEST%\inc%_EXT%\sot\sotref.hxx
-..\inc\sot\exchange.hxx %_DEST%\inc%_EXT%\sot\exchange.hxx
-..\inc\sot\formats.hxx %_DEST%\inc%_EXT%\sot\formats.hxx
-..\inc\absdev.hxx %_DEST%\inc%_EXT%\sot\absdev.hxx
-..\inc\stg.hxx %_DEST%\inc%_EXT%\sot\stg.hxx
-..\inc\filelist.hxx %_DEST%\inc%_EXT%\sot\filelist.hxx
-..\inc\sot\sotdllapi.h %_DEST%\inc%_EXT%\sot\sotdllapi.h
+..\inc\sot/*.hxx %_DEST%\inc%_EXT%\sot\*.hxx
+..\inc\sot\*.h %_DEST%\inc%_EXT%\sot\*.h
-..\%__SRC%\inc\sdintern.hxx %_DEST%\inc%_EXT%\sot\sdintern.hxx
..\%__SRC%\lib\sot.lib %_DEST%\lib%_EXT%\sot.lib
..\%__SRC%\lib\lib*.so %_DEST%\lib%_EXT%
..\%__SRC%\lib\lib*.so.* %_DEST%\lib%_EXT%
diff --git a/sot/source/base/exchange.cxx b/sot/source/base/exchange.cxx
index 67c2b64f105f..d860c8b0f572 100644
--- a/sot/source/base/exchange.cxx
+++ b/sot/source/base/exchange.cxx
@@ -37,7 +37,7 @@
#include <sot/sotdata.hxx>
#include <sot/exchange.hxx>
#include <sot/formats.hxx>
-#include <clsids.hxx>
+#include <sot/clsids.hxx>
#include <rtl/instance.hxx>
#include <com/sun/star/uno/Sequence.hxx>
#include <com/sun/star/datatransfer/DataFlavor.hpp>
diff --git a/sot/source/base/factory.cxx b/sot/source/base/factory.cxx
index 4934f99e78c6..3c034a980578 100644
--- a/sot/source/base/factory.cxx
+++ b/sot/source/base/factory.cxx
@@ -36,7 +36,7 @@
#include <tools/string.hxx>
#include <sot/object.hxx>
#include <sot/sotdata.hxx>
-#include <clsids.hxx>
+#include <sot/clsids.hxx>
#include <rtl/instance.hxx>
#include <com/sun/star/datatransfer/DataFlavor.hpp>
@@ -344,45 +344,6 @@ void * SotFactory::CastAndAddRef
return pObj ? pObj->CastAndAddRef( this ) : NULL;
}
-//=========================================================================
-void * SotFactory::AggCastAndAddRef
-(
- SotObject * pObj /* Das Objekt von dem der Typ gepr"uft wird. */
-) const
-/* [Beschreibung]
-
- Ist eine Optimierung, damit die Ref-Klassen k"urzer implementiert
- werden k"onnen. pObj wird auf den Typ der Factory gecastet.
- In c++ (wenn es immer erlaubt w"are) w"urde der void * wie im
- Beispiel gebildet.
- Factory der Klasse SvPersist.
- void * p = (void *)(SvPersist *)pObj;
- Hinzu kommt noch, dass ein Objekt aus meheren c++ Objekten
- zusammengesetzt sein kann. Diese Methode sucht nach einem
- passenden Objekt.
-
- [R"uckgabewert]
-
- void *, NULL, pObj war NULL oder das Objekt war nicht vom Typ
- der Factory.
- Ansonsten wird pObj zuerst auf den Typ der Factory
- gecastet und dann auf void *.
-
- [Querverweise]
-
- <SvObject::AggCast>
-*/
-{
- void * pRet = NULL;
- if( pObj )
- {
- pRet = pObj->AggCast( this );
- if( pRet )
- pObj->AddRef();
- }
- return pRet;
-}
-
/*************************************************************************
|* SotFactory::Is()
|*
diff --git a/sot/source/base/filelist.cxx b/sot/source/base/filelist.cxx
index 4f854add304d..048f19e65bd7 100644
--- a/sot/source/base/filelist.cxx
+++ b/sot/source/base/filelist.cxx
@@ -33,7 +33,7 @@
#include<tools/string.hxx>
#include<tools/rtti.hxx>
#include<sot/exchange.hxx>
-#include<filelist.hxx>
+#include<sot/filelist.hxx>
#include <osl/thread.h>
TYPEINIT1_AUTOFACTORY( FileList, SvDataCopyStream );
diff --git a/sot/source/base/formats.cxx b/sot/source/base/formats.cxx
index baddde6e716f..58b08fb53f18 100644
--- a/sot/source/base/formats.cxx
+++ b/sot/source/base/formats.cxx
@@ -34,8 +34,8 @@
#include <sot/exchange.hxx>
#include <sot/formats.hxx>
-#include "filelist.hxx"
-#include "clsids.hxx"
+#include "sot/filelist.hxx"
+#include "sot/clsids.hxx"
#include <tools/globname.hxx>
#include <com/sun/star/datatransfer/DataFlavor.hpp>
diff --git a/sot/source/base/object.cxx b/sot/source/base/object.cxx
index 403a1c6bb61d..70792a325d31 100644
--- a/sot/source/base/object.cxx
+++ b/sot/source/base/object.cxx
@@ -33,11 +33,7 @@
#include <tools/debug.hxx>
#include <sot/object.hxx>
#include <sot/factory.hxx>
-#include <agg.hxx>
-
-/************** class SvAggregateMemberList *****************************/
-/************************************************************************/
-PRV_SV_IMPL_OWNER_LIST(SvAggregateMemberList,SvAggregate);
+#include <sot/agg.hxx>
/************** class SotObject ******************************************/
class SotObjectFactory : public SotFactory
@@ -84,8 +80,7 @@ void SotObject::TestMemberInvariant( BOOL /*bPrint*/ )
|* Beschreibung
*************************************************************************/
SotObject::SotObject()
- : pAggList ( NULL )
- , nStrongLockCount( 0 )
+ : nStrongLockCount( 0 )
, nOwnerLockCount( 0 )
, bOwner ( TRUE )
, bSVObject ( FALSE )
@@ -119,246 +114,11 @@ IUnknown * SotObject::GetInterface( const SvGlobalName & )
}
/*************************************************************************
-|* SotObject::IsSvClass()
-|*
-|* Beschreibung
-*************************************************************************/
-BOOL SotObject::IsSvObject() const
-{
- return Owner() || bSVObject;
-}
-
-/*************************************************************************
-|* SotObject::QueryDelete()
-|*
-|* Beschreibung: Bei allen aggregierten Objekte muss der RefCount auf
-|* 0 gehen, damit das Gesammt-Objekt zerstoert wird. Das
-|* zerst�ren von Teilen ist verboten. Da der Aggregator
-|* (oder Cast-Verwalter) den Zaehler der aggregierten
-|* Objekte um 1 erhoeht, muss dies bei der Berechnung
-|* des 0-RefCounts beruecksichtigt werden.
-*************************************************************************/
-BOOL SotObject::ShouldDelete()
-{
- if( !pAggList )
- return TRUE;
-
- SvAggregate & rMO = pAggList->GetObject( 0 );
- if( rMO.bMainObj )
- {
- AddRef();
- pAggList->GetObject( 0 ).pObj->ReleaseRef();
- return FALSE;
- }
-
- ULONG i;
- for( i = 1; i < pAggList->Count(); i++ )
- {
- SvAggregate & rAgg = pAggList->GetObject( i );
- // Groesser 1, wegen AddRef() bei AddInterface
- if( !rAgg.bFactory && rAgg.pObj->GetRefCount() > 1 )
- {
- // den eigenen hochzaehelen
- AddRef();
- // einen Aggregierten runterzaehlen
- rAgg.pObj->ReleaseRef();
- return FALSE;
- }
- }
- AddNextRef(); // rekursion stoppen
- for( i = pAggList->Count() -1; i > 0; i-- )
- {
- // Referenzen aufloesen
- DBG_ASSERT( !pAggList->GetObject( i ).bMainObj, "main object reference is opened" );
- RemoveInterface( i );
- }
- delete pAggList;
- pAggList = NULL;
- // und zerstoeren, dies ist unabhaengig vom RefCount
- return TRUE;
-}
-
-/*************************************************************************
-|* SotObject::QueryDelete()
-|*
-|* Beschreibung
-*************************************************************************/
-void SotObject::QueryDelete()
-{
- if( ShouldDelete() )
- SvRefBase::QueryDelete();
-}
-
-
-
-/*************************************************************************
-|* SotObject::GetAggList()
-|*
-|* Beschreibung
-*************************************************************************/
-SvAggregateMemberList & SotObject::GetAggList()
-{
- if( !pAggList )
- {
- pAggList = new SvAggregateMemberList( 2, 1 );
- pAggList->Append( SvAggregate() );
- }
- return *pAggList;
-}
-
-
-/*************************************************************************
-|* SotObject::RemoveInterface()
-|*
-|* Beschreibung
-*************************************************************************/
-void SotObject::RemoveInterface( ULONG nPos )
-{
- SvAggregate & rAgg = pAggList->GetObject( nPos );
- if( !rAgg.bFactory )
- {
- DBG_ASSERT( rAgg.pObj->pAggList, "no aggregation list" );
- DBG_ASSERT( rAgg.pObj->pAggList->GetObject( 0 ).pObj == this,
- "not owner of aggregated object" );
- // sich selbst als Cast-Verwalter austragen
- rAgg.pObj->pAggList->GetObject( 0 ) = SvAggregate();
- // Referenz aufloesen
- rAgg.pObj->ReleaseRef();
- // Aus der eigenen List austragen
- pAggList->Remove( nPos );
- }
-}
-
-/*************************************************************************
-|* SotObject::RemoveInterface()
-|*
-|* Beschreibung
-*************************************************************************/
-void SotObject::RemoveInterface( SotObject * pObjP )
-{
- DBG_ASSERT( pObjP, "null pointer" );
- DBG_ASSERT( pAggList, "no aggregation list" );
- ULONG i;
- for( i = 0; i < pAggList->Count(); i++ )
- {
- SvAggregate & rAgg = pAggList->GetObject( i );
- if( !rAgg.bFactory && pObjP == rAgg.pObj )
- RemoveInterface( i );
- }
- DBG_ASSERT( i < pAggList->Count(), "object not found" );
-}
-
-/*************************************************************************
-|* SotObject::AddInterface()
-|*
-|* Beschreibung
-*************************************************************************/
-void SotObject::AddInterface( SotObject * pObjP )
-{
- pObjP->AddRef(); // Objekt festhalten
- GetAggList();
- pAggList->Append( SvAggregate( pObjP, FALSE ) );
-
- // sich selbst als Typecast-Verwalter eintragen
- SvAggregateMemberList & rAList = pObjP->GetAggList();
- DBG_ASSERT( !rAList.GetObject( 0 ).bMainObj, "try to aggregate twice" );
- rAList[ 0 ] = SvAggregate( this, TRUE );
-}
-
-/*************************************************************************
-|* SotObject::AddInterface()
-|*
-|* Beschreibung
-*************************************************************************/
-void SotObject::AddInterface( SotFactory * pFactP )
-{
- GetAggList();
- pAggList->Append( SvAggregate( pFactP ) );
-}
-
-/*************************************************************************
-|* SotObject::CreateAggObj()
-|*
-|* Beschreibung
-*************************************************************************/
-SotObjectRef SotObject::CreateAggObj( const SotFactory * )
-{
- return SotObjectRef();
-}
-
-
-/*************************************************************************
-|* SotObject::DownAggCast()
-|*
-|* Beschreibung
-*************************************************************************/
-void * SotObject::DownAggCast( const SotFactory * pFact )
-{
- void * pCast = NULL;
- // geht den Pfad nur Richtung aggregierte Objekte
- if( pAggList )
- {
- for( ULONG i = 1; !pCast || i < pAggList->Count(); i++ )
- {
- SvAggregate & rAgg = pAggList->GetObject( i );
- if( rAgg.bFactory )
- {
- if( rAgg.pFact->Is( pFact ) )
- {
- // On-Demand erzeugen, wenn Typ gebraucht
- SotObjectRef aObj( CreateAggObj( rAgg.pFact ) );
- rAgg.bFactory = FALSE;
- rAgg.pObj = aObj;
- rAgg.pObj->AddRef();
-
- // sich selbst als Typecast-Verwalter eintragen
- SvAggregateMemberList & rAList = rAgg.pObj->GetAggList();
- DBG_ASSERT( !rAList.GetObject( 0 ).bMainObj, "try to aggregate twice" );
- rAList[ 0 ] = SvAggregate( this, TRUE );
- }
- }
- if( !rAgg.bFactory )
- {
- // muss der (void *) auf Klasse pFact sein
- pCast = rAgg.pObj->Cast( pFact );
- if( !pCast )
- pCast = rAgg.pObj->DownAggCast( pFact );
- if( pCast )
- break;
- }
- }
- }
- return pCast;
-}
-
-/*************************************************************************
-|* SotObject::AggCast()
-|*
-|* Beschreibung
-*************************************************************************/
-void * SotObject::AggCast( const SotFactory * pFact )
-{
- void * pCast = NULL;
- if( pAggList )
- {
- SvAggregate & rAgg = pAggList->GetObject( 0 );
- if( rAgg.bMainObj )
- return rAgg.pObj->AggCast( pFact );
- pCast = Cast( pFact );
- if( !pCast )
- pCast = DownAggCast( pFact );
- }
- else
- pCast = Cast( pFact );
- return pCast;
-}
-
-/*************************************************************************
|* SotObject::CastAndAddRef()
|*
|* Beschreibung
*************************************************************************/
-void * SotObject::CastAndAddRef( const SotFactory * pFact )
+void* SotObject::CastAndAddRef( const SotFactory * pFact )
{
void * pCast = Cast( pFact );
if( pCast )
@@ -366,49 +126,8 @@ void * SotObject::CastAndAddRef( const SotFactory * pFact )
return pCast;
}
-/*************************************************************************
-|* SotObject::GetMainObj()
-|*
-|* Beschreibung
-*************************************************************************/
-SotObject * SotObject::GetMainObj() const
-{
- if( pAggList )
- {
- if( pAggList->GetObject( 0 ).bMainObj )
- return pAggList->GetObject( 0 ).pObj->GetMainObj();
- }
- return (SotObject *)this;
-}
-
//=========================================================================
-USHORT SotObject::FuzzyLock
-(
- BOOL bLock, /* TRUE, lock. FALSE, unlock. */
- BOOL /*bIntern*/, /* TRUE, es handelt sich um einen internen Lock.
- FALSE, der Lock kam von aussen (Ole2, Ipc2) */
- BOOL bClose /* TRUE, Close aufrufen wenn letzte Lock */
-)
-/* [Beschreibung]
-
- Erlaubte Parameterkombinationen:
- ( TRUE, TRUE, * ) -> interner Lock.
- ( FALSE, TRUE, TRUE ) -> interner Unlock mit Close,
- wenn LockCount() == 0
- ( TRUE, FALSE, * ) -> externer Lock.
- ( FALSE, FALSE, TRUE ) -> externer Unlock mit Close,
- wenn LockCount() == 0
- ( FALSE, FALSE, FALSE ) -> externer Unlock
-
- F"ur !Owner() wird der Aufruf an das externe Objekt weitergeleitet.
- F"ur diese muss das <IOleItemContainer>-Interface zur Vef"ugung stehen.
- bIntern und bClose werden dann ignoriert.
- Wenn der LockCount auf 0 wechselt, wird <SotObject::DoClose>
- gerufen, wenn kein OwnerLock besteht.
-
- [Anmerkung]
-
-*/
+USHORT SotObject::Lock( BOOL bLock )
{
SotObjectRef xHoldAlive( this );
USHORT nRet;
@@ -423,8 +142,9 @@ USHORT SotObject::FuzzyLock
ReleaseRef();
}
- if( !nRet && bClose && !nOwnerLockCount )
+ if( !nRet && !nOwnerLockCount )
DoClose();
+
return nRet;
}
diff --git a/sot/source/sdstor/stg.cxx b/sot/source/sdstor/stg.cxx
index 1c749aa05cb8..c057b2d0aac0 100644
--- a/sot/source/sdstor/stg.cxx
+++ b/sot/source/sdstor/stg.cxx
@@ -28,7 +28,7 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_sot.hxx"
-#include <storinfo.hxx>
+#include <sot/storinfo.hxx>
#include <osl/file.hxx>
#include <tools/tempfile.hxx>
#include <tools/ownlist.hxx>
@@ -42,7 +42,7 @@
#include <tools/pstm.hxx>
#include <tools/debug.hxx>
-#include "stg.hxx"
+#include "sot/stg.hxx"
#include "stgelem.hxx"
#include "stgcache.hxx"
#include "stgstrms.hxx"
diff --git a/sot/source/sdstor/stgcache.cxx b/sot/source/sdstor/stgcache.cxx
index 88a8187ee9dd..f4461383c0ba 100644
--- a/sot/source/sdstor/stgcache.cxx
+++ b/sot/source/sdstor/stgcache.cxx
@@ -41,7 +41,7 @@
#include <osl/endian.h>
#include <tools/string.hxx>
-#include "stg.hxx"
+#include "sot/stg.hxx"
#include "stgelem.hxx"
#include "stgcache.hxx"
#include "stgstrms.hxx"
diff --git a/sot/source/sdstor/stgdir.cxx b/sot/source/sdstor/stgdir.cxx
index 039a29fd2683..8c553d0f8a32 100644
--- a/sot/source/sdstor/stgdir.cxx
+++ b/sot/source/sdstor/stgdir.cxx
@@ -30,7 +30,7 @@
#include <string.h> // memcpy()
-#include "stg.hxx"
+#include "sot/stg.hxx"
#include "stgelem.hxx"
#include "stgcache.hxx"
#include "stgstrms.hxx"
diff --git a/sot/source/sdstor/stgelem.cxx b/sot/source/sdstor/stgelem.cxx
index 46d7f1803140..b140c7fb27e2 100644
--- a/sot/source/sdstor/stgelem.cxx
+++ b/sot/source/sdstor/stgelem.cxx
@@ -32,7 +32,7 @@
#include <rtl/ustring.hxx>
#include <com/sun/star/lang/Locale.hpp>
#include <unotools/charclass.hxx>
-#include "stg.hxx"
+#include "sot/stg.hxx"
#include "stgelem.hxx"
#include "stgcache.hxx"
#include "stgstrms.hxx"
diff --git a/sot/source/sdstor/stgelem.hxx b/sot/source/sdstor/stgelem.hxx
index 7a5b7bc52b26..951d3503adbc 100644
--- a/sot/source/sdstor/stgelem.hxx
+++ b/sot/source/sdstor/stgelem.hxx
@@ -35,7 +35,7 @@
#include <tools/solar.h>
#endif
-#include <stg.hxx>
+#include <sot/stg.hxx>
class StgIo;
class SvStream;
diff --git a/sot/source/sdstor/stgio.cxx b/sot/source/sdstor/stgio.cxx
index 545a5eba9c74..f2fe58165e23 100644
--- a/sot/source/sdstor/stgio.cxx
+++ b/sot/source/sdstor/stgio.cxx
@@ -28,7 +28,7 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_sot.hxx"
-#include "stg.hxx"
+#include "sot/stg.hxx"
#include "stgelem.hxx"
#include "stgcache.hxx"
#include "stgstrms.hxx"
diff --git a/sot/source/sdstor/stgole.cxx b/sot/source/sdstor/stgole.cxx
index 148f1e87585c..0bb5887eed76 100644
--- a/sot/source/sdstor/stgole.cxx
+++ b/sot/source/sdstor/stgole.cxx
@@ -31,7 +31,7 @@
#include "rtl/string.h"
#include "rtl/string.h"
#include "stgole.hxx"
-#include "storinfo.hxx" // Read/WriteClipboardFormat()
+#include "sot/storinfo.hxx" // Read/WriteClipboardFormat()
#include <tools/debug.hxx>
#if defined(_MSC_VER) && (_MSC_VER>=1400)
diff --git a/sot/source/sdstor/stgole.hxx b/sot/source/sdstor/stgole.hxx
index 346f21035f06..a9eebe1aae68 100644
--- a/sot/source/sdstor/stgole.hxx
+++ b/sot/source/sdstor/stgole.hxx
@@ -30,7 +30,7 @@
#include <string.h> // memset()
-#include "stg.hxx"
+#include "sot/stg.hxx"
#include "stgelem.hxx"
class StgInternalStream : public SvStream
diff --git a/sot/source/sdstor/stgstrms.cxx b/sot/source/sdstor/stgstrms.cxx
index dd6ba6202bbe..840f2cf2bba8 100644
--- a/sot/source/sdstor/stgstrms.cxx
+++ b/sot/source/sdstor/stgstrms.cxx
@@ -34,7 +34,7 @@
#include <tools/tempfile.hxx>
#include <tools/debug.hxx>
-#include "stg.hxx"
+#include "sot/stg.hxx"
#include "stgelem.hxx"
#include "stgcache.hxx"
#include "stgstrms.hxx"
diff --git a/sot/source/sdstor/storage.cxx b/sot/source/sdstor/storage.cxx
index 136abb29a98e..e09c5fc864fc 100644
--- a/sot/source/sdstor/storage.cxx
+++ b/sot/source/sdstor/storage.cxx
@@ -35,8 +35,8 @@
#include <rtl/digest.h>
#include <osl/file.hxx>
-#include <stg.hxx>
-#include <storinfo.hxx>
+#include <sot/stg.hxx>
+#include <sot/storinfo.hxx>
#include <sot/storage.hxx>
#include <sot/formats.hxx>
#include <sot/exchange.hxx>
diff --git a/sot/source/sdstor/storinfo.cxx b/sot/source/sdstor/storinfo.cxx
index 2aaaadd5a151..f912dc6fc83f 100644
--- a/sot/source/sdstor/storinfo.cxx
+++ b/sot/source/sdstor/storinfo.cxx
@@ -28,8 +28,8 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_sot.hxx"
-#include <stg.hxx>
-#include <storinfo.hxx>
+#include <sot/stg.hxx>
+#include <sot/storinfo.hxx>
#include <sot/exchange.hxx>
diff --git a/sot/source/sdstor/ucbstorage.cxx b/sot/source/sdstor/ucbstorage.cxx
index ea3b656272db..4f265490a05e 100644
--- a/sot/source/sdstor/ucbstorage.cxx
+++ b/sot/source/sdstor/ucbstorage.cxx
@@ -66,12 +66,12 @@
#include <cppuhelper/implbase2.hxx>
#include <ucbhelper/commandenvironment.hxx>
-#include "stg.hxx"
-#include "storinfo.hxx"
+#include "sot/stg.hxx"
+#include "sot/storinfo.hxx"
#include <sot/storage.hxx>
#include <sot/exchange.hxx>
#include <sot/formats.hxx>
-#include "clsids.hxx"
+#include "sot/clsids.hxx"
#include "unostorageholder.hxx"
diff --git a/sot/source/sdstor/unostorageholder.cxx b/sot/source/sdstor/unostorageholder.cxx
index 55c205557648..6224925c1820 100644
--- a/sot/source/sdstor/unostorageholder.cxx
+++ b/sot/source/sdstor/unostorageholder.cxx
@@ -36,7 +36,7 @@
#include <comphelper/processfactory.hxx>
#include "unostorageholder.hxx"
-#include <storinfo.hxx>
+#include <sot/storinfo.hxx>
using namespace ::com::sun::star;
diff --git a/sot/source/unoolestorage/xolesimplestorage.cxx b/sot/source/unoolestorage/xolesimplestorage.cxx
index 1780e45c5ed6..45baf9eed4c5 100644
--- a/sot/source/unoolestorage/xolesimplestorage.cxx
+++ b/sot/source/unoolestorage/xolesimplestorage.cxx
@@ -39,7 +39,7 @@
#include <cppuhelper/exc_hlp.hxx>
-#include <storinfo.hxx>
+#include <sot/storinfo.hxx>
#include "xolesimplestorage.hxx"
diff --git a/sot/source/unoolestorage/xolesimplestorage.hxx b/sot/source/unoolestorage/xolesimplestorage.hxx
index c9f1b5c68b0a..18bd6ee64f9e 100644
--- a/sot/source/unoolestorage/xolesimplestorage.hxx
+++ b/sot/source/unoolestorage/xolesimplestorage.hxx
@@ -43,7 +43,7 @@
#include <osl/mutex.hxx>
-#include <stg.hxx>
+#include <sot/stg.hxx>
class OLESimpleStorage : public ::cppu::WeakImplHelper3
diff --git a/sot/util/makefile.mk b/sot/util/makefile.mk
index 72d17db189be..453dbddc5857 100644
--- a/sot/util/makefile.mk
+++ b/sot/util/makefile.mk
@@ -57,16 +57,16 @@ SHL1DEF= $(MISC)$/$(SHL1TARGET).def
DEF1NAME =$(SHL1TARGET)
DEF1DEPN =$(MISC)$/$(SHL1TARGET).flt \
- $(PRJ)$/inc$/absdev.hxx \
- $(PRJ)$/inc$/agg.hxx \
+ $(PRJ)$/inc$/sot/absdev.hxx \
+ $(PRJ)$/inc$/sot/agg.hxx \
$(PRJ)$/inc$/sot$/exchange.hxx \
$(PRJ)$/inc$/sot$/factory.hxx \
$(PRJ)$/inc$/sot$/object.hxx \
$(PRJ)$/inc$/sot$/sotdata.hxx \
$(PRJ)$/inc$/sot$/sotref.hxx \
- $(PRJ)$/inc$/stg.hxx \
+ $(PRJ)$/inc$/sot/stg.hxx \
$(PRJ)$/inc$/sot$/storage.hxx \
- $(PRJ)$/inc$/storinfo.hxx
+ $(PRJ)$/inc$/sot/storinfo.hxx
DEFLIB1NAME =$(TARGET)
DEF1DES =StarObjectsTools