Revert "callcatcher: Remove unused code"
This reverts commit bbad7057b2
.
This commit is contained in:
@@ -127,6 +127,7 @@ class TOOLS_DLLPUBLIC SvPersistBaseMemberList : public SuperSvPersistBaseMemberL
|
||||
{
|
||||
public:
|
||||
SvPersistBaseMemberList();
|
||||
SvPersistBaseMemberList(sal_uInt16 nInitSz, sal_uInt16 nResize );
|
||||
|
||||
void WriteObjects( SvPersistStream &, sal_Bool bOnlyStreamedObj = sal_False ) const;
|
||||
TOOLS_DLLPUBLIC friend SvPersistStream& operator << (SvPersistStream &, const SvPersistBaseMemberList &);
|
||||
@@ -216,6 +217,8 @@ public:
|
||||
|
||||
SvPersistStream( SvClassManager &, SvStream * pStream,
|
||||
sal_uInt32 nStartIdx = 1 );
|
||||
SvPersistStream( SvClassManager &, SvStream * pStream,
|
||||
const SvPersistStream & rPersStm );
|
||||
~SvPersistStream();
|
||||
|
||||
void SetStream( SvStream * pStream );
|
||||
@@ -244,6 +247,8 @@ public:
|
||||
// gespeichert werden.
|
||||
friend SvStream& operator >> ( SvStream &, SvPersistStream & );
|
||||
friend SvStream& operator << ( SvStream &, SvPersistStream & );
|
||||
sal_uIntPtr InsertObj( SvPersistBase * );
|
||||
sal_uIntPtr RemoveObj( SvPersistBase * );
|
||||
};
|
||||
|
||||
#endif // _PSTM_HXX
|
||||
|
@@ -651,6 +651,7 @@ public:
|
||||
sal_Bool LockRange( sal_Size nByteOffset, sal_Size nBytes );
|
||||
sal_Bool UnlockRange( sal_Size nByteOffset, sal_Size nBytes );
|
||||
sal_Bool LockFile();
|
||||
sal_Bool UnlockFile();
|
||||
|
||||
void Open( const String& rFileName, StreamMode eOpenMode );
|
||||
void Close();
|
||||
|
@@ -40,6 +40,7 @@ public:
|
||||
{ nTop = nRight = nBottom = nLeft = 0; }
|
||||
SvBorder( const Size & rSz )
|
||||
{ nTop = nBottom = rSz.Height(); nRight = nLeft = rSz.Width(); }
|
||||
SvBorder( const Rectangle & rOuter, const Rectangle & rInner );
|
||||
SvBorder( long nLeftP, long nTopP, long nRightP, long nBottomP )
|
||||
{ nLeft = nLeftP; nTop = nTopP; nRight = nRightP; nBottom = nBottomP; }
|
||||
sal_Bool operator == ( const SvBorder & rObj ) const
|
||||
|
@@ -30,6 +30,24 @@
|
||||
#include <tools/svborder.hxx>
|
||||
#include <osl/diagnose.h>
|
||||
|
||||
SvBorder::SvBorder( const Rectangle & rOuter, const Rectangle & rInner )
|
||||
{
|
||||
Rectangle aOuter( rOuter );
|
||||
aOuter.Justify();
|
||||
Rectangle aInner( rInner );
|
||||
if( aInner.IsEmpty() )
|
||||
aInner = Rectangle( aOuter.Center(), aOuter.Center() );
|
||||
else
|
||||
aInner.Justify();
|
||||
|
||||
OSL_ENSURE( aOuter.IsInside( aInner ),
|
||||
"SvBorder::SvBorder: sal_False == aOuter.IsInside( aInner )" );
|
||||
nTop = aInner.Top() - aOuter.Top();
|
||||
nRight = aOuter.Right() - aInner.Right();
|
||||
nBottom = aOuter.Bottom() - aInner.Bottom();
|
||||
nLeft = aInner.Left() - aOuter.Left();
|
||||
}
|
||||
|
||||
Rectangle & operator += ( Rectangle & rRect, const SvBorder & rBorder )
|
||||
{
|
||||
// wegen Empty-Rect, GetSize muss als erstes gerufen werden
|
||||
|
@@ -62,6 +62,9 @@ TYPEINIT0( SvRttiBase );
|
||||
/****************** SvPersistBaseMemberList ******************************/
|
||||
|
||||
SvPersistBaseMemberList::SvPersistBaseMemberList(){}
|
||||
SvPersistBaseMemberList::SvPersistBaseMemberList(
|
||||
sal_uInt16 nInitSz, sal_uInt16 nResize )
|
||||
: SuperSvPersistBaseMemberList( nInitSz, nResize ){}
|
||||
|
||||
#define PERSIST_LIST_VER (sal_uInt8)0
|
||||
#define PERSIST_LIST_DBGUTIL (sal_uInt8)0x80
|
||||
@@ -196,6 +199,44 @@ SvPersistStream::SvPersistStream
|
||||
}
|
||||
}
|
||||
|
||||
//=========================================================================
|
||||
SvPersistStream::SvPersistStream
|
||||
(
|
||||
SvClassManager & rMgr, /* Alle Factorys, deren Objekt geladen und
|
||||
gespeichert werdn k"onnen */
|
||||
SvStream * pStream, /* Dieser Stream wird als Medium genommen, auf
|
||||
dem der PersistStream arbeitet */
|
||||
const SvPersistStream & rPersStm
|
||||
/* Wenn PersistStream's verschachtelt werden,
|
||||
dann ist dies der Parent-Stream. */
|
||||
)
|
||||
: rClassMgr( rMgr )
|
||||
, pStm( pStream )
|
||||
// Bereiche nicht ueberschneiden, deshalb nur groessere Indexe
|
||||
, aPUIdx( rPersStm.GetCurMaxIndex() +1 )
|
||||
, nStartIdx( rPersStm.GetCurMaxIndex() +1 )
|
||||
, pRefStm( &rPersStm )
|
||||
, nFlags( 0 )
|
||||
/* [Beschreibung]
|
||||
|
||||
Der Konstruktor der Klasse SvPersistStream. Die Objekte rMgr und
|
||||
pStream d"urfen nicht ver"andert werden, solange sie in einem
|
||||
SvPersistStream eingesetzt sind. Eine Aussnahme gibt es f"ur
|
||||
pStream (siehe <SvPersistStream::SetStream>).
|
||||
Durch diesen Konstruktor wird eine Hierarchiebildung unterst"utzt.
|
||||
Alle Objekte aus einer Hierarchie m"ussen erst geladen werden,
|
||||
wenn das erste aus dieser Hierarchie benutzt werden soll.
|
||||
*/
|
||||
{
|
||||
bIsWritable = sal_True;
|
||||
if( pStm )
|
||||
{
|
||||
SetVersion( pStm->GetVersion() );
|
||||
SetError( pStm->GetError() );
|
||||
SyncSvStream( pStm->Tell() );
|
||||
}
|
||||
}
|
||||
|
||||
//=========================================================================
|
||||
SvPersistStream::~SvPersistStream()
|
||||
/* [Beschreibung]
|
||||
@@ -862,4 +903,21 @@ SvStream& operator >>
|
||||
return rStm;
|
||||
}
|
||||
|
||||
//=========================================================================
|
||||
sal_uIntPtr SvPersistStream::InsertObj( SvPersistBase * pObj )
|
||||
{
|
||||
sal_uIntPtr nId = aPUIdx.Insert( pObj );
|
||||
aPTable.Insert( (sal_uIntPtr)pObj, (void *)nId );
|
||||
return nId;
|
||||
}
|
||||
|
||||
//=========================================================================
|
||||
sal_uIntPtr SvPersistStream::RemoveObj( SvPersistBase * pObj )
|
||||
{
|
||||
sal_uIntPtr nIdx = GetIndex( pObj );
|
||||
aPUIdx.Remove( nIdx );
|
||||
aPTable.Remove( (sal_uIntPtr)pObj );
|
||||
return nIdx;
|
||||
}
|
||||
|
||||
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|
||||
|
@@ -590,6 +590,17 @@ sal_Bool SvFileStream::LockFile()
|
||||
return LockRange( 0UL, 0UL );
|
||||
}
|
||||
|
||||
/*************************************************************************
|
||||
|*
|
||||
|* SvFileStream::UnlockFile()
|
||||
|*
|
||||
*************************************************************************/
|
||||
|
||||
sal_Bool SvFileStream::UnlockFile()
|
||||
{
|
||||
return UnlockRange( 0UL, 0UL );
|
||||
}
|
||||
|
||||
/*************************************************************************
|
||||
|*
|
||||
|* SvFileStream::Open()
|
||||
|
Reference in New Issue
Block a user