diff options
author | Caolán McNamara <caolanm@redhat.com> | 2012-02-29 10:08:18 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2012-02-29 10:09:45 +0000 |
commit | ab02fa6552fb098990e74f2787cf02b01c0e532b (patch) | |
tree | 028b4eaf54c72705ee6cd7bb12d477e66394a2ca /tools | |
parent | f57cd61004e5a36749f54a5e368becd756d17668 (diff) |
callcatcher: update list
Diffstat (limited to 'tools')
-rw-r--r-- | tools/inc/tools/stream.hxx | 2 | ||||
-rw-r--r-- | tools/inc/tools/unqidx.hxx | 6 | ||||
-rw-r--r-- | tools/source/memtools/unqidx.cxx | 15 | ||||
-rw-r--r-- | tools/source/stream/strmunx.cxx | 42 |
4 files changed, 4 insertions, 61 deletions
diff --git a/tools/inc/tools/stream.hxx b/tools/inc/tools/stream.hxx index 82d322aa363d..6482fdd4cc7b 100644 --- a/tools/inc/tools/stream.hxx +++ b/tools/inc/tools/stream.hxx @@ -639,9 +639,9 @@ private: SvFileStream & operator= (const SvFileStream&); sal_Bool LockRange( sal_Size nByteOffset, sal_Size nBytes ); - sal_Bool UnlockRange( sal_Size nByteOffset, sal_Size nBytes ); sal_Bool LockFile(); #ifdef WNT + sal_Bool UnlockRange( sal_Size nByteOffset, sal_Size nBytes ); sal_Bool UnlockFile(); #endif protected: diff --git a/tools/inc/tools/unqidx.hxx b/tools/inc/tools/unqidx.hxx index 715341c5dd34..1f806f9e31b1 100644 --- a/tools/inc/tools/unqidx.hxx +++ b/tools/inc/tools/unqidx.hxx @@ -46,6 +46,8 @@ private: sal_uIntPtr nUniqIndex; sal_uIntPtr nCount; + void* Seek( sal_uIntPtr nIndex ); //not implemented + public: using Container::GetCurObject; @@ -66,7 +68,6 @@ public: sal_uIntPtr GetIndex( const void* p ) const; sal_Bool IsIndexValid( sal_uIntPtr nIndex ) const; - void* Seek( sal_uIntPtr nIndex ); void* Seek( void* p ); void* First(); void* Last(); @@ -98,6 +99,7 @@ inline void UniqueIndex::Clear() #define DECLARE_UNIQUEINDEX( ClassName, Type ) \ class ClassName : private UniqueIndex \ { \ + Type Seek( sal_uIntPtr nKey ); \ public: \ using UniqueIndex::Clear; \ using UniqueIndex::Count; \ @@ -126,8 +128,6 @@ public: \ sal_uIntPtr GetIndex( const Type p ) const \ { return UniqueIndex::GetIndex( (const void*)p ); } \ \ - Type Seek( sal_uIntPtr nKey ) \ - { return (Type)UniqueIndex::Seek( nKey ); } \ Type Seek( Type p ) \ { return (Type)UniqueIndex::Seek( (void*)p ); } \ Type First() { return (Type)UniqueIndex::First(); } \ diff --git a/tools/source/memtools/unqidx.cxx b/tools/source/memtools/unqidx.cxx index 6c5dc675b68c..64e0b390d2a5 100644 --- a/tools/source/memtools/unqidx.cxx +++ b/tools/source/memtools/unqidx.cxx @@ -221,21 +221,6 @@ sal_Bool UniqueIndex::IsIndexValid( sal_uIntPtr nIndex ) const |* *************************************************************************/ -void* UniqueIndex::Seek( sal_uIntPtr nIndex ) -{ - // Index-Eintrag als aktuellen setzten, wenn er gueltig ist - if ( IsIndexValid( nIndex ) ) - return Container::Seek( nIndex-nStartIndex ); - else - return NULL; -} - -/************************************************************************* -|* -|* UniqueIndex::Seek() -|* -*************************************************************************/ - void* UniqueIndex::Seek( void* p ) { // Wird ein NULL-Pointer uebergeben, dann wurde Pointer nicht gefunden diff --git a/tools/source/stream/strmunx.cxx b/tools/source/stream/strmunx.cxx index 9eb6b3864e0a..d001c6fd4c00 100644 --- a/tools/source/stream/strmunx.cxx +++ b/tools/source/stream/strmunx.cxx @@ -605,48 +605,6 @@ sal_Bool SvFileStream::LockRange( sal_Size nByteOffset, sal_Size nBytes ) /************************************************************************* |* -|* SvFileStream::UnlockRange() -|* -*************************************************************************/ - -sal_Bool SvFileStream::UnlockRange( sal_Size nByteOffset, sal_Size nBytes ) -{ - - struct flock aflock; - aflock.l_type = F_UNLCK; - aflock.l_start = nByteOffset; - aflock.l_whence = SEEK_SET; - aflock.l_len = nBytes; - - if ( ! IsOpen() ) - return sal_False; - - InternalStreamLock::UnlockFile( nByteOffset, nByteOffset+nBytes, this ); - - if ( ! (eStreamMode & - (STREAM_SHARE_DENYALL | STREAM_SHARE_DENYREAD | STREAM_SHARE_DENYWRITE))) - return sal_True; - - // wenn File Locking ausgeschaltet, siehe SvFileStream::LockRange - if ( ! pFileLockEnvVar ) - return sal_True; - - sal_IntPtr iFileHandle; - oslFileError rc = osl_getFileOSHandle(pInstanceData->rHandle, &iFileHandle); - if (rc != osl_File_E_None) - { - SetError( ::GetSvError( rc )); - return sal_False; - } - if (fcntl((int)iFileHandle, F_SETLK, &aflock) != -1) - return sal_True; - - SetError( ::GetSvError( errno )); - return sal_False; -} - -/************************************************************************* -|* |* SvFileStream::LockFile() |* *************************************************************************/ |