summaryrefslogtreecommitdiff
path: root/vos
diff options
context:
space:
mode:
Diffstat (limited to 'vos')
-rw-r--r--vos/inc/vos/conditn.hxx20
-rw-r--r--vos/inc/vos/connectn.hxx2
-rw-r--r--vos/inc/vos/diagnose.hxx12
-rw-r--r--vos/inc/vos/execabl.hxx16
-rw-r--r--vos/inc/vos/istream.hxx20
-rw-r--r--vos/inc/vos/macros.hxx72
-rw-r--r--vos/inc/vos/module.hxx2
-rw-r--r--vos/inc/vos/mutex.hxx38
-rw-r--r--vos/inc/vos/object.hxx34
-rw-r--r--vos/inc/vos/pipe.hxx2
-rw-r--r--vos/inc/vos/process.hxx2
-rw-r--r--vos/inc/vos/ref.hxx18
-rw-r--r--vos/inc/vos/ref.inl30
-rw-r--r--vos/inc/vos/refernce.hxx18
-rw-r--r--vos/inc/vos/refobj.hxx12
-rw-r--r--vos/inc/vos/refobj.inl2
-rw-r--r--vos/inc/vos/runnable.hxx12
-rw-r--r--vos/inc/vos/security.hxx2
-rw-r--r--vos/inc/vos/signal.hxx12
-rw-r--r--vos/inc/vos/socket.hxx2
-rw-r--r--vos/inc/vos/stream.hxx122
-rw-r--r--vos/inc/vos/thread.hxx48
-rw-r--r--vos/inc/vos/timer.hxx40
-rw-r--r--vos/inc/vos/types.hxx6
-rw-r--r--vos/inc/vos/xception.hxx12
-rw-r--r--vos/source/conditn.cxx2
-rw-r--r--vos/source/dllentry.cxx12
-rw-r--r--vos/source/module.cxx14
-rw-r--r--vos/source/mutex.cxx14
-rw-r--r--vos/source/object.cxx8
-rw-r--r--vos/source/pipe.cxx70
-rw-r--r--vos/source/process.cxx66
-rw-r--r--vos/source/refernce.cxx14
-rw-r--r--vos/source/security.cxx20
-rw-r--r--vos/source/signal.cxx10
-rw-r--r--vos/source/socket.cxx312
-rw-r--r--vos/source/stream.cxx10
-rw-r--r--vos/source/thread.cxx70
-rw-r--r--vos/source/timer.cxx94
-rw-r--r--vos/source/xception.cxx8
40 files changed, 640 insertions, 640 deletions
diff --git a/vos/inc/vos/conditn.hxx b/vos/inc/vos/conditn.hxx
index 884ef85c91d6..a8df6308e2d3 100644
--- a/vos/inc/vos/conditn.hxx
+++ b/vos/inc/vos/conditn.hxx
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -30,16 +30,16 @@
#define _VOS_CONDITN_HXX_
#ifndef _OSL_CONDITN_H_
-# include <osl/conditn.h>
+# include <osl/conditn.h>
#endif
#include <osl/time.h>
-# include <vos/object.hxx>
+# include <vos/object.hxx>
namespace vos
{
/** ICondition
-
+
Interface for a thread-spanning condition. If a condition-object
is created, its initial condition is False. You can check the
condition nonblocking with "check()" or wait for it to become set
@@ -55,9 +55,9 @@ public:
ICondition() { }
virtual ~ICondition() { }
-
-
-
+
+
+
enum TResult
{
result_ok = osl_cond_result_ok,
@@ -90,7 +90,7 @@ public:
/** OCondition
-
+
Implements the ICondition interface.
@author Bernd Hofner
@@ -128,11 +128,11 @@ public:
protected:
- oslCondition m_Condition;
+ oslCondition m_Condition;
};
}
-#endif // _VOS_CONDITN_HXX_
+#endif // _VOS_CONDITN_HXX_
diff --git a/vos/inc/vos/connectn.hxx b/vos/inc/vos/connectn.hxx
index 803ab56b92f0..764faab88f28 100644
--- a/vos/inc/vos/connectn.hxx
+++ b/vos/inc/vos/connectn.hxx
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
diff --git a/vos/inc/vos/diagnose.hxx b/vos/inc/vos/diagnose.hxx
index a037c9517ec4..907e201f0edf 100644
--- a/vos/inc/vos/diagnose.hxx
+++ b/vos/inc/vos/diagnose.hxx
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -41,15 +41,15 @@
#define VOS_THIS_FILE __FILE__
-#define VOS_DEBUG_ONLY(s) _OSL_DEBUG_ONLY(s)
+#define VOS_DEBUG_ONLY(s) _OSL_DEBUG_ONLY(s)
#define VOS_TRACE _OSL_TRACE
-#define VOS_ASSERT(c) _OSL_ASSERT(c, VOS_THIS_FILE, __LINE__)
-#define VOS_VERIFY(c) OSL_VERIFY(c)
+#define VOS_ASSERT(c) _OSL_ASSERT(c, VOS_THIS_FILE, __LINE__)
+#define VOS_VERIFY(c) OSL_VERIFY(c)
#define VOS_ENSHURE(c, m) _OSL_ENSURE(c, VOS_THIS_FILE, __LINE__, m)
#define VOS_ENSURE(c, m) _OSL_ENSURE(c, VOS_THIS_FILE, __LINE__, m)
-#define VOS_PRECOND(c, m) VOS_ENSHURE(c, m)
-#define VOS_POSTCOND(c, m) VOS_ENSHURE(c, m)
+#define VOS_PRECOND(c, m) VOS_ENSHURE(c, m)
+#define VOS_POSTCOND(c, m) VOS_ENSHURE(c, m)
#endif /* _VOS_DIAGNOSE_H_ */
diff --git a/vos/inc/vos/execabl.hxx b/vos/inc/vos/execabl.hxx
index 04e0ef837b02..64510afeba6b 100644
--- a/vos/inc/vos/execabl.hxx
+++ b/vos/inc/vos/execabl.hxx
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -29,11 +29,11 @@
#ifndef _VOS_EXECABL_HXX_
#define _VOS_EXECABL_HXX_
-# include <vos/types.hxx>
-# include <vos/refernce.hxx>
+# include <vos/types.hxx>
+# include <vos/refernce.hxx>
namespace vos
-{
+{
/** IExecutable
@@ -50,7 +50,7 @@ namespace vos
@version 0.1
*/
-class IExecutable : public NAMESPACE_VOS(IReference)
+class IExecutable : public NAMESPACE_VOS(IReference)
{
public:
@@ -64,7 +64,7 @@ public:
you should provide here a means to unblock cleanly.
@Return False if you are not able to unblock the
thread.
-
+
*/
virtual sal_Bool SAL_CALL unblock()= 0;
@@ -80,11 +80,11 @@ public:
/** OExecutable
- added default impl. of IReferenceCounter
+ added default impl. of IReferenceCounter
*/
class OExecutable : public NAMESPACE_VOS(IExecutable),
public NAMESPACE_VOS(OReference)
-
+
{
public:
diff --git a/vos/inc/vos/istream.hxx b/vos/inc/vos/istream.hxx
index 9aacf2829226..30ec52496ec1 100644
--- a/vos/inc/vos/istream.hxx
+++ b/vos/inc/vos/istream.hxx
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -29,10 +29,10 @@
#define _VOS_ISTREAM_HXX_
#include "sal/types.h"
-# include <vos/types.hxx>
+# include <vos/types.hxx>
namespace vos
-{
+{
/** Interface for a stream of data, on that you can read and write blocks of bytes.
*/
@@ -42,15 +42,15 @@ public:
IStream() { }
virtual ~IStream() { }
-
-
+
+
/** Retrieve n bytes from the stream and copy them into pBuffer.
@param pBuffer receives the read data.
@param n the number of bytes to read. pBuffer must be large enough
to hold the n bytes!
@return the number of read bytes
*/
- virtual sal_Int32 SAL_CALL read(void* pBuffer,
+ virtual sal_Int32 SAL_CALL read(void* pBuffer,
sal_uInt32 n) const= 0;
/** Write n bytes from pBuffer to the stream.
@@ -58,16 +58,16 @@ public:
@param n the number of bytes to write.
@return the number of written bytes
*/
- virtual sal_Int32 SAL_CALL write(const void* pBuffer,
+ virtual sal_Int32 SAL_CALL write(const void* pBuffer,
sal_uInt32 n)= 0;
-
+
/** Checks if stream is closed for further reading.
@return True is stream has ended (e.g. was closed).
*/
virtual sal_Bool SAL_CALL isEof() const = 0;
};
-}
+}
-#endif // _VOS_ISTREAM_HXX_
+#endif // _VOS_ISTREAM_HXX_
diff --git a/vos/inc/vos/macros.hxx b/vos/inc/vos/macros.hxx
index ca1b750d67f4..91b858e931b8 100644
--- a/vos/inc/vos/macros.hxx
+++ b/vos/inc/vos/macros.hxx
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -36,114 +36,114 @@
// Macro definitions
#ifndef VOS_CAST
-# define VOS_CAST(type,value) (*((type*)&(value)))
-#endif
+# define VOS_CAST(type,value) (*((type*)&(value)))
+#endif
#ifndef VOS_UNUSED
-# define VOS_UNUSED(x) (x=x)
+# define VOS_UNUSED(x) (x=x)
#endif
#ifndef VOS_FOREVER
-# define VOS_FOREVER for(;;)
+# define VOS_FOREVER for(;;)
#endif
#ifndef VOS_MAX
-# define VOS_MAX(a,b) (((a) > (b)) ? (a) : (b))
+# define VOS_MAX(a,b) (((a) > (b)) ? (a) : (b))
#endif
#ifndef VOS_MIN
-# define VOS_MIN(a,b) (((a) < (b)) ? (a) : (b))
+# define VOS_MIN(a,b) (((a) < (b)) ? (a) : (b))
#endif
#ifndef VOS_ABS
-# define VOS_ABS(a) (((a) < 0) ? (-(a)) : (a))
+# define VOS_ABS(a) (((a) < 0) ? (-(a)) : (a))
#endif
#ifndef VOS_SIGN
-# define VOS_SIGN(a) ( ((a) < 0) ? (-1) : (((a) > 0) ? (1) : (0)) )
+# define VOS_SIGN(a) ( ((a) < 0) ? (-1) : (((a) > 0) ? (1) : (0)) )
#endif
#ifndef VOS_BOUND
-# define VOS_BOUND(x,l,h) ((x) <= (l) ? (l) : ((x) >= (h) ? (h) : (x)))
+# define VOS_BOUND(x,l,h) ((x) <= (l) ? (l) : ((x) >= (h) ? (h) : (x)))
#endif
#ifndef VOS_SWAP
-# define VOS_SWAP(a,b) ((a) ^= (b) ^= (a) ^= (b))
+# define VOS_SWAP(a,b) ((a) ^= (b) ^= (a) ^= (b))
#endif
#ifndef VOS_BYTEBOUND
-# define VOS_BYTEBOUND(a) (((a) + 7) / 8)
+# define VOS_BYTEBOUND(a) (((a) + 7) / 8)
#endif
#ifndef VOS_WORDBOUND
-# define VOS_WORDBOUND(a) ((((a) + 15) / 16) * 2)
+# define VOS_WORDBOUND(a) ((((a) + 15) / 16) * 2)
#endif
#ifndef VOS_DWORDBOUND
-# define VOS_DWORDBOUND(a) ((((a) + 31) / 32) * 4)
+# define VOS_DWORDBOUND(a) ((((a) + 31) / 32) * 4)
#endif
#ifndef VOS_MAKEDWORD
-# define VOS_MAKEDWORD(wl, wh) ((sal_uInt32)((wl) & 0xFFFF) | (((sal_uInt32)(wh) & 0xFFFF) << 16))
+# define VOS_MAKEDWORD(wl, wh) ((sal_uInt32)((wl) & 0xFFFF) | (((sal_uInt32)(wh) & 0xFFFF) << 16))
#endif
#ifndef VOS_LOWORD
-# define VOS_LOWORD(d) ((sal_uInt16)((sal_uInt32)(d) & 0xFFFF))
+# define VOS_LOWORD(d) ((sal_uInt16)((sal_uInt32)(d) & 0xFFFF))
#endif
#ifndef VOS_HIWORD
-# define VOS_HIWORD(d) ((sal_uInt16)(((sal_uInt32)(d) >> 16) & 0xFFFF))
+# define VOS_HIWORD(d) ((sal_uInt16)(((sal_uInt32)(d) >> 16) & 0xFFFF))
#endif
#ifndef VOS_MAKEWORD
-# define VOS_MAKEWORD(bl, bh) ((sal_uInt16)((bl) & 0xFF) | (((sal_uInt16)(bh) & 0xFF) << 8))
+# define VOS_MAKEWORD(bl, bh) ((sal_uInt16)((bl) & 0xFF) | (((sal_uInt16)(bh) & 0xFF) << 8))
#endif
#ifndef VOS_LOBYTE
-# define VOS_LOBYTE(w) ((sal_uInt8)((sal_uInt16)(w) & 0xFF))
+# define VOS_LOBYTE(w) ((sal_uInt8)((sal_uInt16)(w) & 0xFF))
#endif
#ifndef VOS_HIBYTE
-# define VOS_HIBYTE(w) ((sal_uInt8)(((sal_uInt16)(w) >> 8) & 0xFF))
+# define VOS_HIBYTE(w) ((sal_uInt8)(((sal_uInt16)(w) >> 8) & 0xFF))
#endif
#ifndef VOS_MAKEBYTE
-# define VOS_MAKEBYTE(nl, nh) ((sal_uInt8)(((nl) & 0x0F) | (((nh) & 0x0F) << 4)))
+# define VOS_MAKEBYTE(nl, nh) ((sal_uInt8)(((nl) & 0x0F) | (((nh) & 0x0F) << 4)))
#endif
#ifndef VOS_LONIBBLE
-# define VOS_LONIBBLE(b) ((sal_uInt8)((b) & 0x0F))
+# define VOS_LONIBBLE(b) ((sal_uInt8)((b) & 0x0F))
#endif
#ifndef VOS_HINIBBLE
-# define VOS_HINIBBLE(b) ((sal_uInt8)(((b) >> 4) & 0x0F))
+# define VOS_HINIBBLE(b) ((sal_uInt8)(((b) >> 4) & 0x0F))
#endif
#ifndef VOS_SWAPWORD
-# define VOS_SWAPWORD(w) VOS_MAKEWORD(VOS_HIBYTE(w),VOS_LOBYTE(w))
+# define VOS_SWAPWORD(w) VOS_MAKEWORD(VOS_HIBYTE(w),VOS_LOBYTE(w))
#endif
#ifndef VOS_SWAPDWORD
-# define VOS_SWAPDWORD(d) VOS_MAKEDWORD(VOS_SWAPWORD(VOS_HIWORD(d)),VOS_SWAPWORD(VOS_LOWORD(d)))
+# define VOS_SWAPDWORD(d) VOS_MAKEDWORD(VOS_SWAPWORD(VOS_HIWORD(d)),VOS_SWAPWORD(VOS_LOWORD(d)))
#endif
#ifdef OSL_BIGENDIAN
#ifndef VOS_NETWORD
-# define VOS_NETWORD(w) (sal_uInt16)(w)
+# define VOS_NETWORD(w) (sal_uInt16)(w)
#endif
#ifndef VOS_NETDWORD
-# define VOS_NETDWORD(d) (sal_uInt32)(d)
+# define VOS_NETDWORD(d) (sal_uInt32)(d)
#endif
#else // OSL_LITENDIAN
#ifndef VOS_NETWORD
-# define VOS_NETWORD(w) VOS_MAKEWORD(VOS_HIBYTE(w),VOS_LOBYTE(w))
+# define VOS_NETWORD(w) VOS_MAKEWORD(VOS_HIBYTE(w),VOS_LOBYTE(w))
#endif
#ifndef VOS_NETDWORD
-# define VOS_NETDWORD(d) VOS_MAKEDWORD(VOS_NETWORD(VOS_HIWORD(d)),VOS_NETWORD(VOS_LOWORD(d)))
+# define VOS_NETDWORD(d) VOS_MAKEDWORD(VOS_NETWORD(VOS_HIWORD(d)),VOS_NETWORD(VOS_LOWORD(d)))
#endif
#endif // OSL_BIGENDIAN
#ifdef _OSL_MEMSEG
-# define VOS_MAKEPTR(base, off) ((void _far *)VOS_MAKEDWORD((off), (base)))
-# define VOS_BASEOF(ptr) VOS_HIWORD(ptr)
-# define VOS_OFSTOF(ptr) VOS_LOWORD(ptr)
+# define VOS_MAKEPTR(base, off) ((void _far *)VOS_MAKEDWORD((off), (base)))
+# define VOS_BASEOF(ptr) VOS_HIWORD(ptr)
+# define VOS_OFSTOF(ptr) VOS_LOWORD(ptr)
#else
-# define VOS_MAKEPTR(base, off) ((void *)((base) + (off)))
-# define VOS_BASEOF(ptr) (ptr)
-# define VOS_OFSTOF(ptr) 0
+# define VOS_MAKEPTR(base, off) ((void *)((base) + (off)))
+# define VOS_BASEOF(ptr) (ptr)
+# define VOS_OFSTOF(ptr) 0
#endif
#ifndef VOS_FIELDOFFSET
-# define VOS_FIELDOFFSET(type, field) ((sal_Int32)(&((type *)1)->field) - 1)
+# define VOS_FIELDOFFSET(type, field) ((sal_Int32)(&((type *)1)->field) - 1)
#endif
// def. for arbitrary namespace
diff --git a/vos/inc/vos/module.hxx b/vos/inc/vos/module.hxx
index d70cc101e4fc..83881039ada2 100644
--- a/vos/inc/vos/module.hxx
+++ b/vos/inc/vos/module.hxx
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
diff --git a/vos/inc/vos/mutex.hxx b/vos/inc/vos/mutex.hxx
index 6336e23bd0f7..98a2adcaba67 100644
--- a/vos/inc/vos/mutex.hxx
+++ b/vos/inc/vos/mutex.hxx
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -28,12 +28,12 @@
#ifndef _VOS_MUTEX_HXX_
#define _VOS_MUTEX_HXX_
-# include <vos/types.hxx>
-# include <vos/object.hxx>
-# include <osl/mutex.h>
+# include <vos/types.hxx>
+# include <vos/object.hxx>
+# include <osl/mutex.h>
namespace vos
-{
+{
/** IMutex interface
@@ -47,7 +47,7 @@ class IMutex
public:
/// Blocks if Mutex is already in use
- virtual void SAL_CALL acquire()= 0;
+ virtual void SAL_CALL acquire()= 0;
// Tries to get the mutex without blocking.
virtual sal_Bool SAL_CALL tryToAcquire()= 0;
@@ -58,7 +58,7 @@ public:
protected:
IMutex() { }
virtual ~IMutex() { }
-
+
};
// ----------------------------------------------------------
@@ -77,12 +77,12 @@ public:
static IMutex& SAL_CALL getGlobalMutex();
/// Creates mutex
- OMutex();
- /// Implicitly destroys mutex
- virtual ~OMutex();
-
+ OMutex();
+ /// Implicitly destroys mutex
+ virtual ~OMutex();
+
/// Blocks if Mutex is already in use
- virtual void SAL_CALL acquire();
+ virtual void SAL_CALL acquire();
/** Tries to get the mutex without blocking.
@return True if mutex could be obtained, otherwise False
@@ -93,12 +93,12 @@ public:
virtual void SAL_CALL release();
protected:
- oslMutex m_Impl;
+ oslMutex m_Impl;
private:
// disable copy/assignment
- OMutex(const OMutex&);
- OMutex& SAL_CALL operator= (const OMutex&);
+ OMutex(const OMutex&);
+ OMutex& SAL_CALL operator= (const OMutex&);
};
// *********************************************************************************
@@ -115,10 +115,10 @@ class OGuard
const OGuard& operator = ( const OGuard& );
public:
/** Acquires mutex
- @param pMutex pointer to mutex which is to be acquired */
+ @param pMutex pointer to mutex which is to be acquired */
OGuard(IMutex* pMutex)
: m_rMutex( *pMutex )
- { // only for compatible reasons
+ { // only for compatible reasons
m_rMutex.acquire();
}
OGuard(IMutex & rMutex)
@@ -148,7 +148,7 @@ class OClearableGuard
const OClearableGuard& operator = ( const OClearableGuard& );
public:
/** Acquires mutex
- @param pMutex pointer to mutex which is to be acquired */
+ @param pMutex pointer to mutex which is to be acquired */
OClearableGuard(IMutex & rMutex)
: m_pMutex( &rMutex )
{
@@ -175,7 +175,7 @@ protected:
IMutex* m_pMutex;
};
-}
+}
#endif //_VOS_MUTEX_HXX_
diff --git a/vos/inc/vos/object.hxx b/vos/inc/vos/object.hxx
index 6108280cf382..75576401bb83 100644
--- a/vos/inc/vos/object.hxx
+++ b/vos/inc/vos/object.hxx
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -29,11 +29,11 @@
#ifndef _VOS_OBJECT_HXX_
#define _VOS_OBJECT_HXX_
-# include <vos/types.hxx>
-# include <vos/macros.hxx>
+# include <vos/types.hxx>
+# include <vos/macros.hxx>
namespace vos
-{
+{
// ***************************************
// Object super class
@@ -59,19 +59,19 @@ public:
// compiler errors instead of unexpected behaviour if you pass objects
// by value or assign objects.
private:
- OObject(const OObject& objectSrc); // no implementation
- void SAL_CALL operator=(const OObject& objectSrc); // no implementation
+ OObject(const OObject& objectSrc); // no implementation
+ void SAL_CALL operator=(const OObject& objectSrc); // no implementation
public:
virtual ~OObject();
public:
- /** Define private new and delete operator because of compiler bug,
+ /** Define private new and delete operator because of compiler bug,
when allocating and deleteing a exported class
*/
- void* SAL_CALL operator new(size_t size);
- void* SAL_CALL operator new(size_t size, void* p);
+ void* SAL_CALL operator new(::size_t size);
+ void* SAL_CALL operator new(::size_t size, void* p);
void SAL_CALL operator delete(void* p);
@@ -99,11 +99,11 @@ public:
struct OCreateParam
{
sal_uInt32 m_Size;
- void* m_pParam;
+ void* m_pParam;
///
OCreateParam(void *pParam)
- {
+ {
m_Size = sizeof(OCreateParam);
m_pParam = pParam;
}
@@ -116,17 +116,17 @@ struct OClassInfo
///
const sal_Char *m_pClassName;
///
- sal_Int32 m_nObjectSize;
+ sal_Int32 m_nObjectSize;
/// schema number of the loaded class
- sal_uInt32 m_wSchema;
+ sal_uInt32 m_wSchema;
///
- OObject* (SAL_CALL * m_pfnCreateObject)(const OCreateParam&); // NULL => abstract class
+ OObject* (SAL_CALL * m_pfnCreateObject)(const OCreateParam&); // NULL => abstract class
/// linked list of registered classes
const OClassInfo* m_pBaseClass;
/// linked list of registered classes
- const OClassInfo* m_pNextClass;
+ const OClassInfo* m_pNextClass;
///
OObject* SAL_CALL createObject(const OCreateParam& rParam) const;
@@ -140,7 +140,7 @@ struct OClassInfo
///
OClassInfo(const sal_Char *pClassName, sal_Int32 ObjectSize,
const OClassInfo* pBaseClass = NULL, sal_uInt32 Schema = (sal_uInt32)-1,
- OObject* (SAL_CALL * fnCreateObject)(const OCreateParam&) = NULL);
+ OObject* (SAL_CALL * fnCreateObject)(const OCreateParam&) = NULL);
};
// *****************************************************************
@@ -165,7 +165,7 @@ struct VOS_CLASSINIT
{ return (VOS_CLASSINFO(class_name)); } \
const VOS_NAMESPACE(OClassInfo, vos)& SAL_CALL class_name::classInfo() \
{ return (__ClassInfo__); }
-
+
#define VOS_DECLARE_CLASSINFO(class_name) \
public: \
static const VOS_NAMESPACE(VOS_CLASSINIT, vos) __ClassInit__; \
diff --git a/vos/inc/vos/pipe.hxx b/vos/inc/vos/pipe.hxx
index e9b1145a36ee..7e1d3efee720 100644
--- a/vos/inc/vos/pipe.hxx
+++ b/vos/inc/vos/pipe.hxx
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
diff --git a/vos/inc/vos/process.hxx b/vos/inc/vos/process.hxx
index e41a050acaa0..49db41928d81 100644
--- a/vos/inc/vos/process.hxx
+++ b/vos/inc/vos/process.hxx
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
diff --git a/vos/inc/vos/ref.hxx b/vos/inc/vos/ref.hxx
index 7b68bc43f09f..6d005bd2c6e7 100644
--- a/vos/inc/vos/ref.hxx
+++ b/vos/inc/vos/ref.hxx
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -32,24 +32,24 @@
/**
ORef<T>
- template type to implement handle/body behaviour
+ template type to implement handle/body behaviour
with reference-counting.
Note that the template-type T MUST implement IReferenceCounter.
*/
-# include <vos/refernce.hxx>
+# include <vos/refernce.hxx>
#ifndef _VOS_DIAGNOSE_HXX_
-# include <vos/diagnose.hxx>
+# include <vos/diagnose.hxx>
#endif
namespace vos
-{
+{
template <class T>
-class ORef
+class ORef
{
public:
@@ -123,7 +123,7 @@ public:
*/
T* SAL_CALL operator->() const;
- /** Gives access to the handles body.
+ /** Gives access to the handles body.
*/
T& SAL_CALL getBody() const;
@@ -137,7 +137,7 @@ public:
does not point to a valid body).
*/
sal_Bool SAL_CALL isEmpty() const;
-
+
/** Returns True is the body is "full" (the handle
does point to a valid body).
*/
@@ -177,7 +177,7 @@ protected:
// include template implementation
#include <vos/ref.inl>
-}
+}
#endif // _VOS_REF_HXX_
diff --git a/vos/inc/vos/ref.inl b/vos/inc/vos/ref.inl
index 48ccf19ea80e..f6c0fb0a3682 100644
--- a/vos/inc/vos/ref.inl
+++ b/vos/inc/vos/ref.inl
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -33,13 +33,13 @@
#endif
template <class T>
-inline ORef<T>::ORef()
+inline ORef<T>::ORef()
{
m_refBody= 0;
}
template <class T>
-inline ORef<T>::ORef(T* pBody)
+inline ORef<T>::ORef(T* pBody)
{
m_refBody= pBody;
@@ -48,7 +48,7 @@ inline ORef<T>::ORef(T* pBody)
}
template <class T>
-inline ORef<T>::ORef(const ORef<T>& handle)
+inline ORef<T>::ORef(const ORef<T>& handle)
{
m_refBody= handle.m_refBody;
@@ -57,30 +57,30 @@ inline ORef<T>::ORef(const ORef<T>& handle)
}
template <class T>
-inline ORef<T>::~ORef()
+inline ORef<T>::~ORef()
{
if (m_refBody)
CAST_TO_IREFERENCE(m_refBody)->release();
}
template <class T>
-inline ORef<T>& ORef<T>::operator= (const ORef<T>& handle)
+inline ORef<T>& ORef<T>::operator= (const ORef<T>& handle)
{
- if (m_refBody)
+ if (m_refBody)
CAST_TO_IREFERENCE(m_refBody)->release();
m_refBody= handle.m_refBody;
-
+
if (m_refBody)
CAST_TO_IREFERENCE(m_refBody)->acquire();
-
+
return *this;
}
template <class T>
-inline void ORef<T>::bind(T* pBody)
+inline void ORef<T>::bind(T* pBody)
{
- if (m_refBody)
+ if (m_refBody)
CAST_TO_IREFERENCE(m_refBody)->release();
m_refBody= pBody;
@@ -90,7 +90,7 @@ inline void ORef<T>::bind(T* pBody)
}
template <class T>
-inline ORef<T>& ORef<T>::unbind()
+inline ORef<T>& ORef<T>::unbind()
{
if (m_refBody)
{
@@ -101,7 +101,7 @@ inline ORef<T>& ORef<T>::unbind()
}
template <class T>
-inline void ORef<T>::operator= (T* pBody)
+inline void ORef<T>::operator= (T* pBody)
{
bind(pBody);
}
@@ -114,14 +114,14 @@ inline T& ORef<T>::operator() () const
}
template <class T>
-inline T& ORef<T>::operator* () const
+inline T& ORef<T>::operator* () const
{
VOS_PRECOND(m_refBody, "ORef::operator*: can't deref nil body!");
return *m_refBody;
}
template <class T>
-inline T* ORef<T>::operator->() const
+inline T* ORef<T>::operator->() const
{
VOS_PRECOND(m_refBody, "ORef::operator->: nil body!");
return m_refBody;
diff --git a/vos/inc/vos/refernce.hxx b/vos/inc/vos/refernce.hxx
index 25f0f39eb0f3..8d7c3448de08 100644
--- a/vos/inc/vos/refernce.hxx
+++ b/vos/inc/vos/refernce.hxx
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -28,9 +28,9 @@
#ifndef _VOS_REFERNCE_HXX_
#define _VOS_REFERNCE_HXX_
-# include <vos/types.hxx>
-# include <osl/interlck.h>
-# include <vos/object.hxx>
+# include <vos/types.hxx>
+# include <osl/interlck.h>
+# include <vos/object.hxx>
namespace vos
{
@@ -43,7 +43,7 @@ public:
IReference() { }
virtual ~IReference() { }
-
+
typedef oslInterlockedCount RefCount;
virtual RefCount SAL_CALL acquire()=0;
@@ -60,14 +60,14 @@ public:
ORefCount() { m_RefCount = 0; }
ORefCount(RefCount n) { m_RefCount = n; }
virtual ~ORefCount();
-
+
RefCount SAL_CALL acquire() { return (osl_incrementInterlockedCount(&m_RefCount)); };
RefCount SAL_CALL release() { return (osl_decrementInterlockedCount(&m_RefCount)); };
- RefCount SAL_CALL operator++() { return acquire(); }
+ RefCount SAL_CALL operator++() { return acquire(); }
// don't implement the postfix operator, it won't function this way!
- RefCount SAL_CALL operator--() { return release(); }
+ RefCount SAL_CALL operator--() { return release(); }
// don't implement the postfix operator, it won't function this way!
RefCount SAL_CALL referenced() const
@@ -105,5 +105,5 @@ private:
}
-#endif // _VOS_REFERNCE_HXX_
+#endif // _VOS_REFERNCE_HXX_
diff --git a/vos/inc/vos/refobj.hxx b/vos/inc/vos/refobj.hxx
index a79d45c9bd0c..7a6a3de8c3f1 100644
--- a/vos/inc/vos/refobj.hxx
+++ b/vos/inc/vos/refobj.hxx
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -36,9 +36,9 @@
with reference-counting.
*/
-# include <vos/refernce.hxx>
+# include <vos/refernce.hxx>
#ifndef _VOS_DIAGNOSE_HXX_
-# include <vos/diagnose.hxx>
+# include <vos/diagnose.hxx>
#endif
namespace vos
@@ -49,7 +49,7 @@ class ORefObj : public IReference
{
public:
ORefObj(const T& Obj);
-
+
inline ~ORefObj();
virtual RefCount SAL_CALL acquire()
@@ -67,11 +67,11 @@ public:
T& SAL_CALL operator() ();
const T& SAL_CALL operator() () const;
- const T& SAL_CALL getObj() const;
+ const T& SAL_CALL getObj() const;
T& SAL_CALL getObj();
protected:
- T m_Obj;
+ T m_Obj;
ORefCount m_RefCount;
private:
diff --git a/vos/inc/vos/refobj.inl b/vos/inc/vos/refobj.inl
index 78b4e0f2808d..3d1700fcdff2 100644
--- a/vos/inc/vos/refobj.inl
+++ b/vos/inc/vos/refobj.inl
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
diff --git a/vos/inc/vos/runnable.hxx b/vos/inc/vos/runnable.hxx
index d577181b2398..be2ba07093ab 100644
--- a/vos/inc/vos/runnable.hxx
+++ b/vos/inc/vos/runnable.hxx
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -28,11 +28,11 @@
#ifndef _VOS_RUNNABLE_HXX_
#define _VOS_RUNNABLE_HXX_
-# include <vos/types.hxx>
-# include <vos/refernce.hxx>
+# include <vos/types.hxx>
+# include <vos/refernce.hxx>
namespace vos
-{
+{
/** IRunnable
@@ -51,8 +51,8 @@ public:
IRunnable() { }
virtual ~IRunnable() { }
-
-
+
+
/** overload to implement your functionality.
*/
virtual void SAL_CALL run()= 0;
diff --git a/vos/inc/vos/security.hxx b/vos/inc/vos/security.hxx
index 6f0766bc4b24..2103be94e2f6 100644
--- a/vos/inc/vos/security.hxx
+++ b/vos/inc/vos/security.hxx
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
diff --git a/vos/inc/vos/signal.hxx b/vos/inc/vos/signal.hxx
index ea9db4850490..efbf7ff87f9a 100644
--- a/vos/inc/vos/signal.hxx
+++ b/vos/inc/vos/signal.hxx
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -29,9 +29,9 @@
#ifndef _VOS_SIGNAL_HXX_
#define _VOS_SIGNAL_HXX_
-# include <vos/types.hxx>
-# include <vos/object.hxx>
-# include <osl/signal.h>
+# include <vos/types.hxx>
+# include <vos/object.hxx>
+# include <osl/signal.h>
namespace vos
{
@@ -73,8 +73,8 @@ public:
typedef oslSignalInfo TSignalInfo;
- /// Constructor
- OSignalHandler();
+ /// Constructor
+ OSignalHandler();
/// Destructor kills thread if neccessary
virtual ~OSignalHandler();
diff --git a/vos/inc/vos/socket.hxx b/vos/inc/vos/socket.hxx
index cfd51fbb069b..005df5089305 100644
--- a/vos/inc/vos/socket.hxx
+++ b/vos/inc/vos/socket.hxx
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
diff --git a/vos/inc/vos/stream.hxx b/vos/inc/vos/stream.hxx
index 5e25aa1d103a..04aa454bfc61 100644
--- a/vos/inc/vos/stream.hxx
+++ b/vos/inc/vos/stream.hxx
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -28,12 +28,12 @@
#ifndef _VOS_STREAM_HXX_
#define _VOS_STREAM_HXX_
-# include <vos/types.hxx>
-# include <vos/object.hxx>
-# include <vos/istream.hxx>
+# include <vos/types.hxx>
+# include <vos/object.hxx>
+# include <vos/istream.hxx>
namespace vos
-{
+{
/** Adds seeking capabilities to IStream
*/
@@ -45,7 +45,7 @@ public:
typedef sal_Int32 Offset;
public:
-
+
///
virtual sal_Bool SAL_CALL seekTo(Offset position) const = 0;
@@ -54,7 +54,7 @@ public:
///
virtual sal_Bool SAL_CALL seekToEnd() const = 0;
-
+
///
virtual sal_Bool SAL_CALL changeSize(sal_uInt32 new_size) = 0;
@@ -65,17 +65,17 @@ public:
///
virtual Offset SAL_CALL getOffset() const = 0;
-
+
protected:
IPositionableStream() { }
virtual ~IPositionableStream() { }
-
+
};
/** Implements IPositionableStream
*/
-class OStream : public NAMESPACE_VOS(OObject),
+class OStream : public NAMESPACE_VOS(OObject),
public NAMESPACE_VOS(IPositionableStream)
{
VOS_DECLARE_CLASSINFO(VOS_NAMESPACE(OStream, vos));
@@ -83,7 +83,7 @@ class OStream : public NAMESPACE_VOS(OObject),
public:
///
- OStream(IPositionableStream& rStream);
+ OStream(IPositionableStream& rStream);
///
virtual ~OStream ();
@@ -94,8 +94,8 @@ public:
virtual sal_Int32 SAL_CALL read(void* pbuffer, sal_uInt32 n) const;
///
- sal_Int32 SAL_CALL read(IPositionableStream::Offset offset,
- void* pbuffer,
+ sal_Int32 SAL_CALL read(IPositionableStream::Offset offset,
+ void* pbuffer,
sal_uInt32 n) const;
///
@@ -109,15 +109,15 @@ public:
///
inline sal_Bool SAL_CALL read(sal_uInt8& value) const;
-
+
// ----------------- Write operations ------------------------
///
virtual sal_Int32 SAL_CALL write(const void* pbuffer, sal_uInt32 n);
///
- sal_Int32 SAL_CALL write(IPositionableStream::Offset offset,
- const void* pbuffer,
+ sal_Int32 SAL_CALL write(IPositionableStream::Offset offset,
+ const void* pbuffer,
sal_uInt32 n);
///
inline sal_Bool SAL_CALL write(sal_Int32 value);
@@ -133,7 +133,7 @@ public:
///
sal_Bool SAL_CALL append(void* pbuffer, sal_uInt32 n); // Write at the end of the Stream.
-
+
// ------------- Positioning and sizing operations ----------
///
@@ -149,15 +149,15 @@ public:
///
virtual sal_Bool SAL_CALL seekRelative(IPositionableStream::Offset change) const;
-
+
///
virtual sal_Bool SAL_CALL changeSize(sal_uInt32 new_size);
-
+
///
- virtual sal_uInt32 SAL_CALL getSize() const;
+ virtual sal_uInt32 SAL_CALL getSize() const;
///
- virtual sal_Bool SAL_CALL isEof() const;
+ virtual sal_Bool SAL_CALL isEof() const;
///
virtual IPositionableStream::Offset SAL_CALL getOffset() const;
@@ -223,62 +223,62 @@ inline sal_Bool OStream::seekToBegin() const
}
inline const OStream& operator>> (OStream& rStream, sal_Int32& value)
-{
- rStream.read(value);
-
- return (rStream);
+{
+ rStream.read(value);
+
+ return (rStream);
}
-
+
inline const OStream& operator>> (OStream& rStream, sal_Int16& value)
-{
- rStream.read(value);
-
- return (rStream);
+{
+ rStream.read(value);
+
+ return (rStream);
}
-
+
inline const OStream& operator>> (OStream& rStream, sal_uInt8& value)
-{
- rStream.read(value);
-
- return (rStream);
+{
+ rStream.read(value);
+
+ return (rStream);
}
-
+
inline const OStream& operator>> (OStream& rStream, sal_Char& value)
-{
- rStream.read(value);
-
- return (rStream);
+{
+ rStream.read(value);
+
+ return (rStream);
}
-
+
inline OStream& operator<< (OStream& rStream, sal_Int32 value)
-{
- rStream.write(value);
-
- return (rStream);
+{
+ rStream.write(value);
+
+ return (rStream);
}
-
+
inline OStream& operator<< (OStream& rStream, sal_Int16 value)
-{
- rStream.write(value);
-
- return (rStream);
+{
+ rStream.write(value);
+
+ return (rStream);
}
-
+
inline OStream& operator<< (OStream& rStream, sal_uInt8 value)
-{
- rStream.write(value);
-
- return (rStream);
+{
+ rStream.write(value);
+
+ return (rStream);
}
-
+
inline OStream& operator<< (OStream& rStream, sal_Char value)
-{
- rStream.write(value);
-
- return (rStream);
+{
+ rStream.write(value);
+
+ return (rStream);
}
-}
+}
#endif // _VOS_STREAM_HXX_
diff --git a/vos/inc/vos/thread.hxx b/vos/inc/vos/thread.hxx
index 16f64c0e0812..a6f2d06a839a 100644
--- a/vos/inc/vos/thread.hxx
+++ b/vos/inc/vos/thread.hxx
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -28,11 +28,11 @@
#ifndef _VOS_THREAD_HXX_
#define _VOS_THREAD_HXX_
-# include <vos/types.hxx>
-# include <vos/object.hxx>
-# include <osl/thread.h>
-# include <osl/conditn.h>
-# include <vos/runnable.hxx>
+# include <vos/types.hxx>
+# include <vos/object.hxx>
+# include <osl/thread.h>
+# include <osl/conditn.h>
+# include <vos/runnable.hxx>
#include <osl/time.h>
@@ -58,7 +58,7 @@ class OThread : public NAMESPACE_VOS(IRunnable),
{
VOS_DECLARE_CLASSINFO(VOS_NAMESPACE(OThread, vos));
-
+
oslCondition m_aCondition;
public:
@@ -74,22 +74,22 @@ public:
TPriority_Unknown = osl_Thread_PriorityUnknown
};
- /**
+ /**
*/
- enum TThreadSleep
- {
+ enum TThreadSleep
+ {
TSleep_Normal,
TSleep_Cancel,
TSleep_Pending,
TSleep_Active,
TSleep_Error,
- TSleep_Unknown
+ TSleep_Unknown
};
typedef oslThreadIdentifier TThreadIdentifier;
- /// Constructor
- OThread();
+ /// Constructor
+ OThread();
/// Destructor kills thread if neccessary
virtual ~OThread();
@@ -124,7 +124,7 @@ public:
/// Check if thread is running.
sal_Bool SAL_CALL isRunning();
- /** Change thread priority.
+ /** Change thread priority.
The valid priority levels are:
<ul>
<li>ThreadPriorityHighest,
@@ -136,7 +136,7 @@ public:
*/
void SAL_CALL setPriority(TThreadPriority Priority);
- /** Query thread priority.
+ /** Query thread priority.
Valid return values are:
<ul>
<li>ThreadPriorityHighest,
@@ -158,9 +158,9 @@ public:
*/
TThreadSleep SAL_CALL sleep(const TimeValue& Delay);
- /** Awake the sleeping thread.
- @returns False if at least one of the handles is invalid
- or the thread is not sleeping.
+ /** Awake the sleeping thread.
+ @returns False if at least one of the handles is invalid
+ or the thread is not sleeping.
*/
sal_Bool SAL_CALL awake();
@@ -171,7 +171,7 @@ public:
*/
static void SAL_CALL wait(const TimeValue& Delay);
- /** Reschedules threads.
+ /** Reschedules threads.
Call within your loop if you
want other threads offer some processing time.
This method is static, so it might be used by the
@@ -191,7 +191,7 @@ protected:
*/
virtual sal_Bool SAL_CALL schedule();
- /** Called when run() is done.
+ /** Called when run() is done.
You might want to override it to do some cleanup.
*/
virtual void SAL_CALL onTerminated();
@@ -208,10 +208,10 @@ class OThreadData : public NAMESPACE_VOS(OObject)
VOS_DECLARE_CLASSINFO(VOS_NAMESPACE(OThreadData, vos));
public:
- /// Create a thread specific local data key
- OThreadData( oslThreadKeyCallbackFunction = 0 );
+ /// Create a thread specific local data key
+ OThreadData( oslThreadKeyCallbackFunction = 0 );
- /// Destroy a thread specific local data key
+ /// Destroy a thread specific local data key
virtual ~OThreadData();
/** Set the data associated with the data key.
@@ -220,7 +220,7 @@ public:
sal_Bool SAL_CALL setData(void *pData);
/** Get the data associated with the data key.
- @returns The data asscoitaed with the data key or
+ @returns The data asscoitaed with the data key or
NULL if no data was set
*/
void* SAL_CALL getData();
diff --git a/vos/inc/vos/timer.hxx b/vos/inc/vos/timer.hxx
index 4605092ec2f0..0fdaee8a8c00 100644
--- a/vos/inc/vos/timer.hxx
+++ b/vos/inc/vos/timer.hxx
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -29,13 +29,13 @@
#ifndef _VOS_TIMER_HXX_
#define _VOS_TIMER_HXX_
-# include <vos/refernce.hxx>
-# include <vos/mutex.hxx>
-# include <osl/time.h>
+# include <vos/refernce.hxx>
+# include <vos/mutex.hxx>
+# include <osl/time.h>
namespace vos
-{
+{
/////////////////////////////////////////////////////////////////////////////
//
@@ -60,11 +60,11 @@ struct TTimeValue : public TimeValue
TTimeValue(const TimeValue& rTimeValue)
{ Seconds = rTimeValue.Seconds; Nanosec = rTimeValue.Nanosec; }
- void SAL_CALL normalize();
+ void SAL_CALL normalize();
- void SAL_CALL addTime(const TTimeValue& Delta);
+ void SAL_CALL addTime(const TTimeValue& Delta);
- sal_Bool SAL_CALL isEmpty() const;
+ sal_Bool SAL_CALL isEmpty() const;
};
inline void TTimeValue::normalize()
@@ -73,7 +73,7 @@ inline void TTimeValue::normalize()
{
Seconds += Nanosec / 1000000000;
Nanosec %= 1000000000;
- }
+ }
}
inline TTimeValue::TTimeValue(sal_uInt32 Secs, sal_uInt32 Nano)
@@ -119,7 +119,7 @@ inline sal_Bool operator>(const TTimeValue& rTimeA, const TTimeValue& rTimeB)
inline sal_Bool operator==(const TTimeValue& rTimeA, const TTimeValue& rTimeB)
{
- return ((rTimeA.Seconds == rTimeB.Seconds) &&
+ return ((rTimeA.Seconds == rTimeB.Seconds) &&
(rTimeA.Nanosec == rTimeB.Nanosec));
}
@@ -150,21 +150,21 @@ public:
/// abort timer prematurely.
void SAL_CALL stop();
/// returns <code> sal_True </code> if timer is running.
- sal_Bool SAL_CALL isTicking() const;
+ sal_Bool SAL_CALL isTicking() const;
/// is the timer expired?
- sal_Bool SAL_CALL isExpired() const;
+ sal_Bool SAL_CALL isExpired() const;
/// does <code> pTimer </code> expires before us?
sal_Bool SAL_CALL expiresBefore(const OTimer* pTimer) const;
/// set the absolute time when the timer should fire
- void SAL_CALL setAbsoluteTime(const TTimeValue& Time);
+ void SAL_CALL setAbsoluteTime(const TTimeValue& Time);
/// set the time to fire to 'now' + <code> Remaining </code>
- void SAL_CALL setRemainingTime(const TTimeValue& Remaining);
+ void SAL_CALL setRemainingTime(const TTimeValue& Remaining);
/// set the time to fire to 'now' + <code> Remaining </code> with repeat interveal <code> Repeat </code>
- void SAL_CALL setRemainingTime(const TTimeValue& Remaining, const TTimeValue& Repeat);
+ void SAL_CALL setRemainingTime(const TTimeValue& Remaining, const TTimeValue& Repeat);
/// adds <code> Time </code> to the 'fire time'
- void SAL_CALL addTime(const TTimeValue& Time);
+ void SAL_CALL addTime(const TTimeValue& Time);
/// returns the remaining time before timer expiration relative to now
- TTimeValue SAL_CALL getRemainingTime() const;
+ TTimeValue SAL_CALL getRemainingTime() const;
protected:
@@ -180,7 +180,7 @@ protected:
/// holds the time interveal of successive exparations
TTimeValue m_RepeatDelta;
/// Pointer to the next timer (to fire)
- OTimer* m_pNext;
+ OTimer* m_pNext;
private:
@@ -188,11 +188,11 @@ private:
OTimer(const OTimer& rTimer);
/// assignment operator disabled
void SAL_CALL operator=(const OTimer& rTimer);
-
+
friend class OTimerManager;
};
-}
+}
#endif //_VOS_TIMER_HXX_
diff --git a/vos/inc/vos/types.hxx b/vos/inc/vos/types.hxx
index c68f04e44d96..4a535bea0509 100644
--- a/vos/inc/vos/types.hxx
+++ b/vos/inc/vos/types.hxx
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -32,8 +32,8 @@
/* disable some warnings for MS-C */
#ifdef _MSC_VER
-# pragma warning (disable : 4786) // 4786: truncated names (longer 255 chars)
-# pragma warning (disable : 4355) // 4355: this used in initializer-list
+# pragma warning (disable : 4786) // 4786: truncated names (longer 255 chars)
+# pragma warning (disable : 4355) // 4355: this used in initializer-list
#endif
#endif //_VOS_TYPES_HXX_
diff --git a/vos/inc/vos/xception.hxx b/vos/inc/vos/xception.hxx
index fff67cf4a9c6..fa571b54b6c0 100644
--- a/vos/inc/vos/xception.hxx
+++ b/vos/inc/vos/xception.hxx
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -48,13 +48,13 @@ namespace vos
#define THROW_AGAIN throw;
#define THROW( Constructor ) throw Constructor;
-/*
- * declaration of the exceptions that may be thrown by a function
- * (e.g.) void myfunction(sal_Int32 a) throw ( std::bad_alloc );
+/*
+ * declaration of the exceptions that may be thrown by a function
+ * (e.g.) void myfunction(sal_Int32 a) throw ( std::bad_alloc );
* is not fully supported by all compilers
*/
-#define THROWS( ARG ) throw ARG
+#define THROWS( ARG ) throw ARG
/*
* just a base class for further exceptions
@@ -69,7 +69,7 @@ public:
OException() {}
OException( const OException & ) : OObject() {}
- OException& SAL_CALL operator=(const OException&)
+ OException& SAL_CALL operator=(const OException&)
{ return *this; }
};
diff --git a/vos/source/conditn.cxx b/vos/source/conditn.cxx
index f6acc4bb7fab..8ba109b55593 100644
--- a/vos/source/conditn.cxx
+++ b/vos/source/conditn.cxx
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
diff --git a/vos/source/dllentry.cxx b/vos/source/dllentry.cxx
index d25de20bfb9f..6d288780385a 100644
--- a/vos/source/dllentry.cxx
+++ b/vos/source/dllentry.cxx
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -37,13 +37,13 @@ sal_Int32 CALLBACK LibMain(HINSTANCE hinst, WORD wDataSeg, WORD cbHeap, LPSTR lp
HGLOBAL hgblClassStruct;
LPWNDCLASS lpClassStruct;
static HINSTANCE hinstLib = NULL;
-
+
/* Has the library been initialized yet? */
if (hinstLib == NULL)
{
- WORD wVersionRequested;
- WSADATA wsaData;
- sal_Int32 error;
+ WORD wVersionRequested;
+ WSADATA wsaData;
+ sal_Int32 error;
wVersionRequested = 0x0101;
@@ -57,6 +57,6 @@ sal_Int32 CALLBACK LibMain(HINSTANCE hinst, WORD wDataSeg, WORD cbHeap, LPSTR lp
return (hinstLib ? TRUE : FALSE); /* return TRUE = success; FALSE = fail */
}
-
+
#endif
diff --git a/vos/source/module.cxx b/vos/source/module.cxx
index 23b916d2b1f9..25d0c4819d0d 100644
--- a/vos/source/module.cxx
+++ b/vos/source/module.cxx
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -40,7 +40,7 @@ OModule::OModule()
:m_Module(0)
{
}
-
+
OModule::OModule(const rtl::OUString& ustrModuleName, sal_Int32 nRtldMode) : m_Module(0)
{
if (ustrModuleName)
@@ -56,11 +56,11 @@ OModule::~OModule()
sal_Bool OModule::load(const rtl::OUString& ustrModuleName, sal_Int32 nRtldMode)
{
VOS_ASSERT(ustrModuleName);
-
+
unload();
-
+
m_Module = osl_loadModule( ustrModuleName.pData, nRtldMode );
-
+
return (m_Module != 0);
}
@@ -74,8 +74,8 @@ void OModule::unload()
}
sal_Bool OModule::isLoaded()
-{
- return m_Module != NULL;
+{
+ return m_Module != NULL;
}
void *OModule::getSymbol(const rtl::OUString& strSymbolName)
diff --git a/vos/source/mutex.cxx b/vos/source/mutex.cxx
index d8cefb92028f..e2f2a71ecb14 100644
--- a/vos/source/mutex.cxx
+++ b/vos/source/mutex.cxx
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -41,30 +41,30 @@ VOS_IMPLEMENT_CLASSINFO(VOS_CLASSNAME(OMutex, vos), VOS_NAMESPACE(OMutex, vos),
IMutex& OMutex::getGlobalMutex()
{
static OMutex theGlobalMutex;
-
+
return theGlobalMutex;
}
-OMutex::OMutex()
+OMutex::OMutex()
{
m_Impl= osl_createMutex();
}
-OMutex::~OMutex()
+OMutex::~OMutex()
{
osl_destroyMutex(m_Impl);
}
-
+
void OMutex::acquire()
{
osl_acquireMutex(m_Impl);
}
-sal_Bool OMutex::tryToAcquire()
+sal_Bool OMutex::tryToAcquire()
{
return osl_tryToAcquireMutex(m_Impl);
}
-
+
void OMutex::release()
{
osl_releaseMutex(m_Impl);
diff --git a/vos/source/object.cxx b/vos/source/object.cxx
index 8761c7e4daed..bc210b1957c1 100644
--- a/vos/source/object.cxx
+++ b/vos/source/object.cxx
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -100,7 +100,7 @@ OClassInfo::OClassInfo(const sal_Char *pClassName, sal_Int32 ObjectSize,
{
m_pClassName = pClassName;
m_nObjectSize = ObjectSize;
- m_wSchema = Schema;
+ m_wSchema = Schema;
m_pfnCreateObject = fnCreateObject;
@@ -141,7 +141,7 @@ const OClassInfo* OClassInfo::getClassInfo(const sal_Char* pClassName)
VOS_ASSERT(pClassName != NULL);
const OClassInfo* pClass = &VOS_CLASSINFO(VOS_NAMESPACE(OObject, vos));
-
+
while (pClass != NULL)
{
if (strcmp(pClassName, pClass->m_pClassName) == 0)
@@ -158,7 +158,7 @@ VOS_CLASSINIT::VOS_CLASSINIT(register OClassInfo* pNewClass)
VOS_ASSERT(pNewClass != NULL);
OClassInfo* pClassRoot = (OClassInfo*)&VOS_CLASSINFO(VOS_NAMESPACE(OObject, vos));
-
+
pNewClass->m_pNextClass = pClassRoot->m_pNextClass;
pClassRoot->m_pNextClass = pNewClass;
diff --git a/vos/source/pipe.cxx b/vos/source/pipe.cxx
index a7d8e655414d..b8c296500865 100644
--- a/vos/source/pipe.cxx
+++ b/vos/source/pipe.cxx
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -35,8 +35,8 @@ using namespace vos;
// Pipe
-VOS_IMPLEMENT_CLASSINFO(VOS_CLASSNAME(OPipe, vos),
- VOS_NAMESPACE(OPipe, vos),
+VOS_IMPLEMENT_CLASSINFO(VOS_CLASSNAME(OPipe, vos),
+ VOS_NAMESPACE(OPipe, vos),
VOS_NAMESPACE(OObject, vos), 0);
/*****************************************************************************/
@@ -53,11 +53,11 @@ OPipe::OPipe()
OPipe::OPipe( const rtl::OUString& strName, TPipeOption Options)
{
- m_pPipeRef =
- new PipeRef( osl_createPipe(strName.pData,
- (oslPipeOptions)Options,
+ m_pPipeRef =
+ new PipeRef( osl_createPipe(strName.pData,
+ (oslPipeOptions)Options,
NULL) );
-
+
VOS_POSTCOND(m_pPipeRef != 0, "OPipe(): new failed.\n");
VOS_POSTCOND((*m_pPipeRef)(), "OPipe(): creation of pipe failed!\n");
}
@@ -70,11 +70,11 @@ OPipe::OPipe( const rtl::OUString& strName,
TPipeOption Options,
const OSecurity& rSecurity)
{
- m_pPipeRef=
- new PipeRef(osl_createPipe(strName.pData,
- (oslPipeOptions)Options,
+ m_pPipeRef=
+ new PipeRef(osl_createPipe(strName.pData,
+ (oslPipeOptions)Options,
(oslSecurity)rSecurity));
-
+
VOS_POSTCOND(m_pPipeRef != 0, "OPipe(): new failed.\n");
VOS_POSTCOND((*m_pPipeRef)(), "OPipe(): creation of pipe failed!\n");
}
@@ -85,7 +85,7 @@ OPipe::OPipe( const rtl::OUString& strName,
OPipe::OPipe(const OPipe& pipe) :
OReference(), OObject()
{
-
+
VOS_ASSERT(pipe.m_pPipeRef != 0);
m_pPipeRef= pipe.m_pPipeRef;
@@ -123,9 +123,9 @@ sal_Bool OPipe::create( const rtl::OUString& strName, TPipeOption Options )
m_pPipeRef= 0;
}
- m_pPipeRef=
- new PipeRef(osl_createPipe(strName.pData,
- (oslPipeOptions)Options,
+ m_pPipeRef=
+ new PipeRef(osl_createPipe(strName.pData,
+ (oslPipeOptions)Options,
NULL));
VOS_POSTCOND(m_pPipeRef != 0, "OPipe(): new failed.\n");
@@ -138,7 +138,7 @@ sal_Bool OPipe::create( const rtl::OUString& strName, TPipeOption Options )
/*****************************************************************************/
sal_Bool OPipe::create( const rtl::OUString& strName,
TPipeOption Options,
- const NAMESPACE_VOS(OSecurity)& rSecurity )
+ const NAMESPACE_VOS(OSecurity)& rSecurity )
{
// if this was a valid pipe, decrease reference
if ((m_pPipeRef) && (m_pPipeRef->release() == 0))
@@ -148,9 +148,9 @@ sal_Bool OPipe::create( const rtl::OUString& strName,
m_pPipeRef= 0;
}
- m_pPipeRef=
- new PipeRef(osl_createPipe(strName.pData,
- (oslPipeOptions)Options,
+ m_pPipeRef=
+ new PipeRef(osl_createPipe(strName.pData,
+ (oslPipeOptions)Options,
(oslSecurity)rSecurity));
VOS_POSTCOND(m_pPipeRef != 0, "OPipe(): new failed.\n");
@@ -206,7 +206,7 @@ sal_Bool OPipe::isValid() const
/*****************************************************************************/
void OPipe::close()
{
- if (m_pPipeRef && (m_pPipeRef->release() == 0))
+ if (m_pPipeRef && (m_pPipeRef->release() == 0))
{
osl_releasePipe((*m_pPipeRef)());
delete m_pPipeRef;
@@ -222,7 +222,7 @@ OPipe::TPipeError OPipe::accept(OStreamPipe& Connection)
if ( isValid() )
{
Connection = osl_acceptPipe((*m_pPipeRef)());
-
+
if(Connection.isValid())
return E_None;
}
@@ -236,8 +236,8 @@ OPipe::TPipeError OPipe::accept(OStreamPipe& Connection)
sal_Int32 OPipe::recv(void* pBuffer, sal_uInt32 BytesToRead)
{
if ( isValid() )
- return osl_receivePipe((*m_pPipeRef)(),
- pBuffer,
+ return osl_receivePipe((*m_pPipeRef)(),
+ pBuffer,
BytesToRead);
else
return -1;
@@ -250,8 +250,8 @@ sal_Int32 OPipe::recv(void* pBuffer, sal_uInt32 BytesToRead)
sal_Int32 OPipe::send(const void* pBuffer, sal_uInt32 BytesToSend)
{
if ( isValid() )
- return osl_sendPipe((*m_pPipeRef)(),
- pBuffer,
+ return osl_sendPipe((*m_pPipeRef)(),
+ pBuffer,
BytesToSend);
else
return -1;
@@ -270,8 +270,8 @@ OPipe::TPipeError OPipe::getError() const
-VOS_IMPLEMENT_CLASSINFO(VOS_CLASSNAME(OStreamPipe, vos),
- VOS_NAMESPACE(OStreamPipe, vos),
+VOS_IMPLEMENT_CLASSINFO(VOS_CLASSNAME(OStreamPipe, vos),
+ VOS_NAMESPACE(OStreamPipe, vos),
VOS_NAMESPACE(OPipe, vos), 0);
@@ -353,11 +353,11 @@ sal_Int32 OStreamPipe::read(void* pBuffer, sal_uInt32 n) const
/* loop until all desired bytes were read or an error occured */
sal_Int32 BytesRead= 0;
sal_Int32 BytesToRead= n;
- while (BytesToRead > 0)
+ while (BytesToRead > 0)
{
sal_Int32 RetVal;
- RetVal= osl_receivePipe((*m_pPipeRef)(),
- pBuffer,
+ RetVal= osl_receivePipe((*m_pPipeRef)(),
+ pBuffer,
BytesToRead);
/* error occured? */
@@ -371,7 +371,7 @@ sal_Int32 OStreamPipe::read(void* pBuffer, sal_uInt32 n) const
pBuffer= (sal_Char*)pBuffer + RetVal;
}
- return BytesRead;
+ return BytesRead;
}
/*****************************************************************************/
@@ -384,12 +384,12 @@ sal_Int32 OStreamPipe::write(const void* pBuffer, sal_uInt32 n)
/* loop until all desired bytes were send or an error occured */
sal_Int32 BytesSend= 0;
sal_Int32 BytesToSend= n;
- while (BytesToSend > 0)
+ while (BytesToSend > 0)
{
sal_Int32 RetVal;
- RetVal= osl_sendPipe((*m_pPipeRef)(),
- pBuffer,
+ RetVal= osl_sendPipe((*m_pPipeRef)(),
+ pBuffer,
BytesToSend);
/* error occured? */
@@ -403,7 +403,7 @@ sal_Int32 OStreamPipe::write(const void* pBuffer, sal_uInt32 n)
pBuffer= (sal_Char*)pBuffer + RetVal;
}
- return BytesSend;
+ return BytesSend;
}
sal_Bool OStreamPipe::isEof() const
diff --git a/vos/source/process.cxx b/vos/source/process.cxx
index 71c8729d9023..6a13a8dd8908 100644
--- a/vos/source/process.cxx
+++ b/vos/source/process.cxx
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -35,8 +35,8 @@
#include "vos/diagnose.hxx"
#include <osl/file.hxx>
-#define MAX_RESOURCES 100
-#define MAX_ARGS 100
+#define MAX_RESOURCES 100
+#define MAX_ARGS 100
#define MAX_ENVIROMENTS 100
using namespace vos;
@@ -48,7 +48,7 @@ OArgumentList::OArgumentList() :
n_Args(0),
m_aVec(0)
{
- // empty
+ // empty
}
OArgumentList::OArgumentList( sal_uInt32 nArgs, const ::rtl::OUString* aArgument1, ... ) :
@@ -58,7 +58,7 @@ OArgumentList::OArgumentList( sal_uInt32 nArgs, const ::rtl::OUString* aArgument
std::va_list pArgs;
sal_uInt32 i = 0;
const rtl::OUString* aArgument;
-
+
va_start ( pArgs, aArgument1 );
aArgument = aArgument1;
@@ -87,10 +87,10 @@ OArgumentList::OArgumentList( const rtl::OUString aArgumentList[], sal_uInt32 nA
OArgumentList::OArgumentList( const OArgumentList& rOther ) : n_Args( rOther.n_Args )
{
m_aVec = new rtl_uString* [n_Args];
-
+
sal_uInt32 i;
for ( i = 0; i < n_Args; ++i )
- {
+ {
m_aVec[i] = rOther.m_aVec[i];
rtl_uString_acquire( m_aVec[i] );
}
@@ -144,7 +144,7 @@ OEnvironment::OEnvironment( sal_Int32 nVars, const ::rtl::OUString* aArgument1,
std::va_list pArgs;
sal_Int32 i = 0;
const rtl::OUString* aArgument;
-
+
va_start ( pArgs, aArgument1 );
aArgument = aArgument1;
@@ -167,13 +167,13 @@ OEnvironment::OEnvironment( const ::rtl::OUString aVariableList[], sal_Int32 nVa
for( sal_Int32 i = 0; i < n_Vars; ++ i ) {
m_aVec[i] = aVariableList[i].pData;
rtl_uString_acquire( m_aVec[i] );
- }
+ }
}
OEnvironment::OEnvironment( const OEnvironment& rOther ) : n_Vars( rOther.n_Vars )
{
m_aVec = new rtl_uString* [n_Vars];
-
+
sal_Int32 i;
for ( i = 0; i < n_Vars; ++i )
{
@@ -194,7 +194,7 @@ OEnvironment& OEnvironment::operator=( const OEnvironment& rOther )
n_Vars = rOther.n_Vars;
m_aVec = new rtl_uString* [n_Vars];
- for ( i = 0; i < n_Vars; ++i )
+ for ( i = 0; i < n_Vars; ++i )
{
m_aVec[i] = rOther.m_aVec[i];
rtl_uString_acquire( m_aVec[i] );
@@ -272,10 +272,10 @@ OProcess::TProcessError OProcess::execute(TProcessOption Options,
const OArgumentList& aArgumentList,
const OEnvironment& aEnvironment )
{
- return ((TProcessError)osl_executeProcess(m_strImageName.pData,
+ return ((TProcessError)osl_executeProcess(m_strImageName.pData,
aArgumentList.m_aVec,
aArgumentList.n_Args,
- Options,
+ Options,
0,
m_strDirectory.pData,
aEnvironment.m_aVec,
@@ -289,10 +289,10 @@ OProcess::TProcessError OProcess::execute( TProcessOption Options,
const OArgumentList& aArgumentList,
const OEnvironment& aEnvironment )
{
- return ((TProcessError)osl_executeProcess(m_strImageName.pData,
+ return ((TProcessError)osl_executeProcess(m_strImageName.pData,
aArgumentList.m_aVec,
aArgumentList.n_Args,
- Options,
+ Options,
Security,
m_strDirectory.pData,
aEnvironment.m_aVec,
@@ -323,7 +323,7 @@ OProcess::TProcessError OProcess::join()
/*
-OProcess::TProcessError OProcess::searchPath(const sal_Char* Name, sal_Char *Buffer, sal_uInt32 Max,
+OProcess::TProcessError OProcess::searchPath(const sal_Char* Name, sal_Char *Buffer, sal_uInt32 Max,
const sal_Char* Path, sal_Char Separator)
{
return (TProcessError)osl_searchPath(Name, Path, Separator, Buffer, Max);
@@ -335,7 +335,7 @@ OProcess::TProcessError OProcess::searchPath(const sal_Char* Name, sal_Char *Buf
VOS_IMPLEMENT_CLASSINFO(
VOS_CLASSNAME(OStartupInfo, vos),
- VOS_NAMESPACE(OStartupInfo, vos),
+ VOS_NAMESPACE(OStartupInfo, vos),
VOS_NAMESPACE(OObject, vos), 0);
OStartupInfo::OStartupInfo()
@@ -377,28 +377,28 @@ OStartupInfo::TStartupError OStartupInfo::getEnvironment(const rtl::OUString& st
//
namespace vos
-{
+{
class OExtCommandLineImpl
{
void init();
-
+
::std::vector< ::rtl::OUString > aExtArgVector;
sal_uInt32 m_nArgCount;
-
+
public:
-
+
OExtCommandLineImpl();
~OExtCommandLineImpl();
sal_uInt32 SAL_CALL getCommandArgCount();
-
+
sal_Bool SAL_CALL getCommandArg(sal_uInt32 nArg, ::rtl::OUString& strCommandArg);
};
-
+
}
-OExtCommandLineImpl::OExtCommandLineImpl()
+OExtCommandLineImpl::OExtCommandLineImpl()
: m_nArgCount(0)
{
init();
@@ -406,7 +406,7 @@ OExtCommandLineImpl::OExtCommandLineImpl()
OExtCommandLineImpl::~OExtCommandLineImpl()
{
-
+
}
@@ -416,7 +416,7 @@ sal_uInt32 SAL_CALL OExtCommandLineImpl::getCommandArgCount()
}
-sal_Bool SAL_CALL OExtCommandLineImpl::getCommandArg(sal_uInt32 nArg, ::rtl::OUString& strCommandArg)
+sal_Bool SAL_CALL OExtCommandLineImpl::getCommandArg(sal_uInt32 nArg, ::rtl::OUString& strCommandArg)
{
if ( nArg >= m_nArgCount )
{
@@ -439,7 +439,7 @@ void OExtCommandLineImpl::init()
{
::rtl::OUString aString;
aStartInfo.getCommandArg(nIndex,aString);
-
+
if ( aString[0] == (sal_Unicode) '@' )
{
::rtl::OUString aFileName = aString.copy(1);
@@ -483,9 +483,9 @@ void OExtCommandLineImpl::init()
// OExtCommandLine
//
-namespace
-{
- struct lclMutex : public rtl::Static< NAMESPACE_VOS(OMutex), lclMutex > {};
+namespace
+{
+ struct lclMutex : public rtl::Static< NAMESPACE_VOS(OMutex), lclMutex > {};
}
OExtCommandLineImpl* OExtCommandLine::pExtImpl=0;
@@ -501,7 +501,7 @@ OExtCommandLine::OExtCommandLine()
OGuard Guard(lclMutex::get());
if ( pExtImpl == NULL )
- {
+ {
pExtImpl = new OExtCommandLineImpl;
}
}
@@ -509,7 +509,7 @@ OExtCommandLine::OExtCommandLine()
OExtCommandLine::~OExtCommandLine()
{
-
+
}
sal_uInt32 SAL_CALL OExtCommandLine::getCommandArgCount()
@@ -518,7 +518,7 @@ sal_uInt32 SAL_CALL OExtCommandLine::getCommandArgCount()
}
-sal_Bool SAL_CALL OExtCommandLine::getCommandArg(sal_uInt32 nArg, ::rtl::OUString& strCommandArg)
+sal_Bool SAL_CALL OExtCommandLine::getCommandArg(sal_uInt32 nArg, ::rtl::OUString& strCommandArg)
{
return pExtImpl->getCommandArg(nArg,strCommandArg);
}
diff --git a/vos/source/refernce.cxx b/vos/source/refernce.cxx
index ff21c1acb13e..ca2b2709cb40 100644
--- a/vos/source/refernce.cxx
+++ b/vos/source/refernce.cxx
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -35,29 +35,29 @@ using namespace vos;
ORefCount::~ORefCount()
{
-
+
}
-OReference::OReference()
+OReference::OReference()
{
}
-OReference::~OReference()
+OReference::~OReference()
{
VOS_ASSERT(m_RefCount.referenced() == 0);
}
-IReference::RefCount OReference::acquire()
+IReference::RefCount OReference::acquire()
{
return (m_RefCount.acquire());
}
-IReference::RefCount OReference::release()
+IReference::RefCount OReference::release()
{
RefCount Count = m_RefCount.release();
- if (Count == 0)
+ if (Count == 0)
delete this;
return (Count);
diff --git a/vos/source/security.cxx b/vos/source/security.cxx
index b4fdc8e8d6a3..1cb2b41e7f51 100644
--- a/vos/source/security.cxx
+++ b/vos/source/security.cxx
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -50,10 +50,10 @@ sal_Bool OSecurity::logonUser(const rtl::OUString& strName,
const rtl::OUString& strPasswd)
{
osl_freeSecurityHandle(m_oslSecurity);
-
+
m_oslSecurity = NULL;
-
- return (osl_loginUser( strName.pData, strPasswd.pData, &m_oslSecurity)
+
+ return (osl_loginUser( strName.pData, strPasswd.pData, &m_oslSecurity)
== osl_Security_E_None);
}
@@ -63,10 +63,10 @@ sal_Bool OSecurity::logonUser( const rtl::OUString& strName,
const rtl::OUString& strFileServer )
{
osl_freeSecurityHandle(m_oslSecurity);
-
+
m_oslSecurity = NULL;
-
- return (osl_loginUserOnFileServer(strName.pData, strPasswd.pData, strFileServer.pData, &m_oslSecurity)
+
+ return (osl_loginUserOnFileServer(strName.pData, strPasswd.pData, strFileServer.pData, &m_oslSecurity)
== osl_Security_E_None);
}
@@ -74,7 +74,7 @@ sal_Bool OSecurity::logonUser( const rtl::OUString& strName,
sal_Bool OSecurity::getUserIdent( rtl::OUString& strIdent) const
{
VOS_ASSERT(m_oslSecurity);
-
+
return osl_getUserIdent( m_oslSecurity, &strIdent.pData );
}
@@ -90,7 +90,7 @@ sal_Bool OSecurity::getUserName( rtl::OUString& strName ) const
sal_Bool OSecurity::getHomeDir( rtl::OUString& strDirectory) const
{
VOS_ASSERT(m_oslSecurity);
-
+
return osl_getHomeDir(m_oslSecurity, &strDirectory.pData );
}
@@ -98,7 +98,7 @@ sal_Bool OSecurity::getHomeDir( rtl::OUString& strDirectory) const
sal_Bool OSecurity::getConfigDir( rtl::OUString& strDirectory ) const
{
VOS_ASSERT(m_oslSecurity);
-
+
return osl_getConfigDir( m_oslSecurity, &strDirectory.pData );
}
diff --git a/vos/source/signal.cxx b/vos/source/signal.cxx
index 1f879f8b225c..0d073cd90778 100644
--- a/vos/source/signal.cxx
+++ b/vos/source/signal.cxx
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -43,16 +43,16 @@ oslSignalAction vos::signalHandlerFunction_impl(
/////////////////////////////////////////////////////////////////////////////
// Thread class
-VOS_IMPLEMENT_CLASSINFO(VOS_CLASSNAME(OSignalHandler, vos),
- VOS_NAMESPACE(OSignalHandler, vos),
+VOS_IMPLEMENT_CLASSINFO(VOS_CLASSNAME(OSignalHandler, vos),
+ VOS_NAMESPACE(OSignalHandler, vos),
VOS_NAMESPACE(OObject, vos), 0);
-OSignalHandler::OSignalHandler()
+OSignalHandler::OSignalHandler()
{
m_hHandler = osl_addSignalHandler(signalHandlerFunction_impl, this);
}
-OSignalHandler::~OSignalHandler()
+OSignalHandler::~OSignalHandler()
{
osl_removeSignalHandler(m_hHandler);
}
diff --git a/vos/source/socket.cxx b/vos/source/socket.cxx
index c32faf17a4a5..af033429f062 100644
--- a/vos/source/socket.cxx
+++ b/vos/source/socket.cxx
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -36,8 +36,8 @@
using namespace vos;
-VOS_IMPLEMENT_CLASSINFO(VOS_CLASSNAME(OSocketAddr, vos),
- VOS_NAMESPACE(OSocketAddr, vos),
+VOS_IMPLEMENT_CLASSINFO(VOS_CLASSNAME(OSocketAddr, vos),
+ VOS_NAMESPACE(OSocketAddr, vos),
VOS_NAMESPACE(OObject, vos), 0);
@@ -150,8 +150,8 @@ OSocketAddr& OSocketAddr::operator=(const OSocketAddr& Addr)
}
-VOS_IMPLEMENT_CLASSINFO(VOS_CLASSNAME(OInetSocketAddr, vos),
- VOS_NAMESPACE(OInetSocketAddr, vos),
+VOS_IMPLEMENT_CLASSINFO(VOS_CLASSNAME(OInetSocketAddr, vos),
+ VOS_NAMESPACE(OInetSocketAddr, vos),
VOS_NAMESPACE(OSocketAddr, vos), 0);
@@ -160,7 +160,7 @@ VOS_IMPLEMENT_CLASSINFO(VOS_CLASSNAME(OInetSocketAddr, vos),
// OInetSocketAddr
// creates arbitrary inet-address (INADDR_ANY)
/*****************************************************************************/
-OInetSocketAddr::OInetSocketAddr()
+OInetSocketAddr::OInetSocketAddr()
{
m_SockAddr= osl_createEmptySocketAddr(osl_Socket_FamilyInet);
}
@@ -184,7 +184,7 @@ OInetSocketAddr::OInetSocketAddr(const rtl::OUString& ustrAddrOrHostname, sal_In
{
// first try as dotted address.
m_SockAddr= osl_createInetSocketAddr(ustrAddrOrHostname.pData, Port);
-
+
// create failed, maybe it's an hostname
if(m_SockAddr == 0)
{
@@ -206,7 +206,7 @@ OInetSocketAddr::OInetSocketAddr(const OInetSocketAddr& sa) :
OSocketAddr(sa)
{
VOS_ASSERT(getFamily() == TFamily_Inet);
-}
+}
/*****************************************************************************/
// OInetSocketAddr(const OSocketAddr&)
@@ -215,7 +215,7 @@ OInetSocketAddr::OInetSocketAddr(const OSocketAddr& sa) :
OSocketAddr(sa)
{
VOS_ASSERT(sa.getFamily() == TFamily_Inet);
-}
+}
/*****************************************************************************/
// ~OInetSocketAddr
@@ -229,7 +229,7 @@ OInetSocketAddr::~OInetSocketAddr()
/*****************************************************************************/
void OInetSocketAddr::operator= (oslSocketAddr Addr)
{
- VOS_PRECOND(osl_getFamilyOfSocketAddr(Addr) == osl_Socket_FamilyInet,
+ VOS_PRECOND(osl_getFamilyOfSocketAddr(Addr) == osl_Socket_FamilyInet,
"oslSocketAddr not of type osl_Socket_FamilyInet!");
OSocketAddr::operator=(Addr);
@@ -270,7 +270,7 @@ OInetSocketAddr& OInetSocketAddr::operator=(const OSocketAddr& Addr)
/*****************************************************************************/
// getServicePort()
/*****************************************************************************/
-sal_Int32 OInetSocketAddr::getServicePort(const rtl::OUString& ustrServiceName,
+sal_Int32 OInetSocketAddr::getServicePort(const rtl::OUString& ustrServiceName,
const rtl::OUString& ustrProtocolName)
{
return osl_getServicePort(ustrServiceName.pData, ustrProtocolName.pData);
@@ -309,20 +309,20 @@ OSocketAddr::TResult OInetSocketAddr::getDottedAddr( rtl::OUString& pBuffer ) co
sal_Bool OInetSocketAddr::setAddr(const rtl::OUString& ustrAddrOrHostname)
{
sal_Int32 Port = 0;
-
+
if(m_SockAddr) {
-
+
// retrieve old port
Port= getPort();
// free old address
osl_destroySocketAddr(m_SockAddr);
m_SockAddr= 0;
- }
+ }
// first try as dotted address.
m_SockAddr= osl_createInetSocketAddr(ustrAddrOrHostname.pData, Port);
-
+
// create failed, maybe it's an hostname
if(m_SockAddr == 0)
{
@@ -346,8 +346,8 @@ sal_Bool OInetSocketAddr::setAddr(const rtl::OUString& ustrAddrOrHostname)
///////////////////////////////////////////////////////////////////////////////
// OIpxSocketAddr
-VOS_IMPLEMENT_CLASSINFO(VOS_CLASSNAME(OIpxSocketAddr, vos),
- VOS_NAMESPACE(OIpxSocketAddr, vos),
+VOS_IMPLEMENT_CLASSINFO(VOS_CLASSNAME(OIpxSocketAddr, vos),
+ VOS_NAMESPACE(OIpxSocketAddr, vos),
VOS_NAMESPACE(OSocketAddr, vos), 0);
@@ -410,7 +410,7 @@ OIpxSocketAddr::~OIpxSocketAddr()
/*****************************************************************************/
void OIpxSocketAddr::operator= (oslSocketAddr Addr)
{
- VOS_PRECOND(osl_getFamilyOfSocketAddr(Addr) == osl_Socket_FamilyIpx,
+ VOS_PRECOND(osl_getFamilyOfSocketAddr(Addr) == osl_Socket_FamilyIpx,
"oslSocketAddr not of type osl_Socket_FamilyIpx!");
OSocketAddr::operator=(Addr);
@@ -471,7 +471,7 @@ OSocketAddr::TResult OIpxSocketAddr::getNodeNumber(TIpxNodeNumber& ) const
/*****************************************************************************/
sal_uInt32 OIpxSocketAddr::getSocketNumber() const
{
-// return osl_getIpxSocketNumber(m_SockAddr);
+// return osl_getIpxSocketNumber(m_SockAddr);
return (TResult)0;
}
@@ -490,8 +490,8 @@ void OIpxSocketAddr::getAddressString( rtl::OUString& ) const
// Socket
-VOS_IMPLEMENT_CLASSINFO(VOS_CLASSNAME(OSocket, vos),
- VOS_NAMESPACE(OSocket, vos),
+VOS_IMPLEMENT_CLASSINFO(VOS_CLASSNAME(OSocket, vos),
+ VOS_NAMESPACE(OSocket, vos),
VOS_NAMESPACE(OObject, vos), 0);
/*****************************************************************************/
@@ -509,18 +509,18 @@ OSocket::OSocket()
/*****************************************************************************/
// OSocket()
/*****************************************************************************/
-OSocket::OSocket(TSocketType Type,
- TAddrFamily Family,
- TProtocol Protocol)
+OSocket::OSocket(TSocketType Type,
+ TAddrFamily Family,
+ TProtocol Protocol)
{
m_pRecvTimeout = 0;
m_pSendTimeout = 0;
- m_pSockRef=
- new SockRef(osl_createSocket((oslAddrFamily)Family,
- (oslSocketType)Type,
+ m_pSockRef=
+ new SockRef(osl_createSocket((oslAddrFamily)Family,
+ (oslSocketType)Type,
(oslProtocol)Protocol));
-
+
VOS_POSTCOND(m_pSockRef != 0, "OSocket(): new failed.\n");
VOS_POSTCOND((*m_pSockRef)(), "OSocket(): creation of socket failed!\n");
}
@@ -534,16 +534,16 @@ ISocketTypes(), OReference(), OObject()
m_pRecvTimeout = 0;
m_pSendTimeout = 0;
m_pSockRef=0;
-
+
VOS_ASSERT(sock.m_pSockRef != 0);
if ( sock.m_pSockRef !=0 )
- {
+ {
m_pSockRef= sock.m_pSockRef;
setRecvTimeout(sock.m_pRecvTimeout);
setSendTimeout(sock.m_pSendTimeout);
-
+
m_pSockRef->acquire();
}
}
@@ -575,8 +575,8 @@ OSocket::~OSocket()
/*****************************************************************************/
// create
/*****************************************************************************/
-sal_Bool OSocket::create(TSocketType Type,
- TAddrFamily Family,
+sal_Bool OSocket::create(TSocketType Type,
+ TAddrFamily Family,
TProtocol Protocol)
{
// if this was a valid socket, decrease reference
@@ -587,9 +587,9 @@ sal_Bool OSocket::create(TSocketType Type,
m_pSockRef= 0;
}
- m_pSockRef=
- new SockRef(osl_createSocket((oslAddrFamily)Family,
- (oslSocketType)Type,
+ m_pSockRef=
+ new SockRef(osl_createSocket((oslAddrFamily)Family,
+ (oslSocketType)Type,
(oslProtocol)Protocol));
VOS_POSTCOND(m_pSockRef != 0, "OSocket(): new failed.\n");
@@ -648,7 +648,7 @@ sal_Bool OSocket::isValid() const
/*****************************************************************************/
void OSocket::close()
{
- if (m_pSockRef && (*m_pSockRef)() && (m_pSockRef->release() == 0))
+ if (m_pSockRef && (*m_pSockRef)() && (m_pSockRef->release() == 0))
{
osl_releaseSocket((*m_pSockRef)());
delete m_pSockRef;
@@ -665,7 +665,7 @@ void OSocket::getLocalAddr(OSocketAddr& sa) const
VOS_ASSERT(m_pSockRef && (*m_pSockRef)());
if ( m_pSockRef && (*m_pSockRef)() )
- {
+ {
sa= osl_getLocalAddrOfSocket((*m_pSockRef)());
}
}
@@ -673,23 +673,23 @@ void OSocket::getLocalAddr(OSocketAddr& sa) const
/*****************************************************************************/
// getLocalPort
/*****************************************************************************/
-sal_Int32 OSocket::getLocalPort() const
+sal_Int32 OSocket::getLocalPort() const
{
VOS_ASSERT(m_pSockRef && (*m_pSockRef)());
sal_Int32 Port= OSL_INVALID_PORT;
if ( m_pSockRef && (*m_pSockRef)() )
- {
+ {
oslSocketAddr Addr= osl_getLocalAddrOfSocket((*m_pSockRef)());
-
- if(Addr)
+
+ if(Addr)
{
Port= osl_getInetPortOfSocketAddr(Addr);
osl_destroySocketAddr(Addr);
}
}
-
+
return Port;
}
@@ -701,22 +701,22 @@ OSocket::TResult OSocket::getLocalHost( rtl::OUString& pBuffer) const
VOS_ASSERT(m_pSockRef && (*m_pSockRef)());
if ( m_pSockRef && (*m_pSockRef)() )
- {
+ {
oslSocketAddr Addr= osl_getLocalAddrOfSocket((*m_pSockRef)());
-
- if(Addr)
+
+ if(Addr)
{
-// TResult Result= (TResult)osl_getHostnameOfSocketAddr(Addr,
-// pBuffer, BufferSize);
- TResult Result= (TResult)osl_getHostnameOfSocketAddr(Addr,
+// TResult Result= (TResult)osl_getHostnameOfSocketAddr(Addr,
+// pBuffer, BufferSize);
+ TResult Result= (TResult)osl_getHostnameOfSocketAddr(Addr,
&pBuffer.pData );
-
+
osl_destroySocketAddr(Addr);
return Result;
}
}
-
+
return TResult_Error;
}
@@ -728,7 +728,7 @@ void OSocket::getPeerAddr(OSocketAddr& sa) const
VOS_ASSERT(m_pSockRef && (*m_pSockRef)());
if ( m_pSockRef && (*m_pSockRef)() )
- {
+ {
sa= osl_getPeerAddrOfSocket((*m_pSockRef)());
}
}
@@ -741,12 +741,12 @@ sal_Int32 OSocket::getPeerPort() const
VOS_ASSERT(m_pSockRef && (*m_pSockRef)());
sal_Int32 Port= OSL_INVALID_PORT;
-
+
if ( m_pSockRef && (*m_pSockRef)() )
- {
+ {
oslSocketAddr Addr= osl_getPeerAddrOfSocket((*m_pSockRef)());
- if(Addr)
+ if(Addr)
{
Port= osl_getInetPortOfSocketAddr(Addr);
osl_destroySocketAddr(Addr);
@@ -767,11 +767,11 @@ OSocket::TResult OSocket::getPeerHost( rtl::OUString& pBuffer ) const
{
oslSocketAddr Addr= osl_getPeerAddrOfSocket((*m_pSockRef)());
- if(Addr)
+ if(Addr)
{
-// TResult Result= (TResult)osl_getHostnameOfSocketAddr(Addr,
-// pBuffer, BufferSize);
- TResult Result= (TResult)osl_getHostnameOfSocketAddr(Addr,
+// TResult Result= (TResult)osl_getHostnameOfSocketAddr(Addr,
+// pBuffer, BufferSize);
+ TResult Result= (TResult)osl_getHostnameOfSocketAddr(Addr,
&pBuffer.pData );
osl_destroySocketAddr(Addr);
@@ -794,7 +794,7 @@ sal_Bool OSocket::bind(const OSocketAddr& Addr)
{
return osl_bindAddrToSocket((*m_pSockRef)(), (oslSocketAddr)Addr);
}
-
+
return sal_False;
}
@@ -833,10 +833,10 @@ sal_Bool OSocket::isRecvReady(const TimeValue* pTimeout) const
VOS_ASSERT(m_pSockRef && (*m_pSockRef)());
if ( m_pSockRef && (*m_pSockRef)() )
- {
+ {
return osl_isReceiveReady((*m_pSockRef)(), pTimeout);
}
-
+
return sal_False;
}
@@ -863,10 +863,10 @@ sal_Bool OSocket::isExceptionPending(const TimeValue* pTimeout) const
VOS_ASSERT(m_pSockRef && (*m_pSockRef)());
if ( m_pSockRef && (*m_pSockRef)() )
- {
+ {
return osl_isExceptionPending((*m_pSockRef)(), pTimeout);
}
-
+
return sal_False;
}
@@ -874,7 +874,7 @@ sal_Bool OSocket::isExceptionPending(const TimeValue* pTimeout) const
/*****************************************************************************/
// getOption
/*****************************************************************************/
-sal_Int32 OSocket::getOption(TSocketOption Option,
+sal_Int32 OSocket::getOption(TSocketOption Option,
void* pBuffer,
sal_uInt32 BufferLen,
TSocketOptionLevel Level) const
@@ -886,7 +886,7 @@ sal_Int32 OSocket::getOption(TSocketOption Option,
return osl_getSocketOption((*m_pSockRef)(),
(oslSocketOptionLevel)Level,
(oslSocketOption)Option,
- pBuffer,
+ pBuffer,
BufferLen);
}
@@ -896,7 +896,7 @@ sal_Int32 OSocket::getOption(TSocketOption Option,
/*****************************************************************************/
// setOption
/*****************************************************************************/
-sal_Bool OSocket::setOption(TSocketOption Option,
+sal_Bool OSocket::setOption(TSocketOption Option,
void* pBuffer,
sal_uInt32 BufferLen,
TSocketOptionLevel Level) const
@@ -904,11 +904,11 @@ sal_Bool OSocket::setOption(TSocketOption Option,
VOS_ASSERT(m_pSockRef && (*m_pSockRef)());
if ( m_pSockRef && (*m_pSockRef)() )
- {
+ {
return osl_setSocketOption((*m_pSockRef)(),
(oslSocketOptionLevel)Level,
(oslSocketOption)Option,
- pBuffer,
+ pBuffer,
BufferLen);
}
@@ -924,7 +924,7 @@ sal_Bool OSocket::enableNonBlockingMode(sal_Bool On)
VOS_ASSERT(m_pSockRef && (*m_pSockRef)());
if ( m_pSockRef && (*m_pSockRef)() )
- {
+ {
return osl_enableNonBlockingMode((*m_pSockRef)(), On);
}
@@ -939,7 +939,7 @@ sal_Bool OSocket::isNonBlockingMode() const
VOS_ASSERT(m_pSockRef && (*m_pSockRef)());
if ( m_pSockRef && (*m_pSockRef)() )
- {
+ {
return osl_isNonBlockingMode((*m_pSockRef)());
}
@@ -954,7 +954,7 @@ OSocket::TSocketType OSocket::getType() const
VOS_ASSERT(m_pSockRef && (*m_pSockRef)());
if ( m_pSockRef && (*m_pSockRef)() )
- {
+ {
return (TSocketType)osl_getSocketType((*m_pSockRef)());
}
@@ -981,10 +981,10 @@ sal_Int32 OSocket::setDebug(sal_Int32 opt) const
sal_Int32 old= 0;
getOption(TOption_Debug, &old, sizeof(old));
-
+
if (opt != -1)
setOption(TOption_Debug, &opt, sizeof(opt));
-
+
return old;
}
@@ -994,9 +994,9 @@ sal_Int32 OSocket::setDebug(sal_Int32 opt) const
sal_Int32 OSocket::setReuseAddr(sal_Int32 opt) const
{
sal_Int32 old = 0;
-
+
getOption(TOption_ReuseAddr, &old, sizeof(old));
-
+
if (opt != -1)
setOption(TOption_ReuseAddr, &opt, sizeof(opt));
@@ -1009,12 +1009,12 @@ sal_Int32 OSocket::setReuseAddr(sal_Int32 opt) const
sal_Int32 OSocket::setKeepAlive(sal_Int32 opt) const
{
sal_Int32 old = 0;
-
+
getOption(TOption_KeepAlive, &old, sizeof(old));
if (opt != -1)
setOption(TOption_KeepAlive, &opt, sizeof(opt));
-
+
return (old);
}
@@ -1024,12 +1024,12 @@ sal_Int32 OSocket::setKeepAlive(sal_Int32 opt) const
sal_Int32 OSocket::setDontRoute(sal_Int32 opt) const
{
sal_Int32 old = 0;
-
+
getOption(TOption_DontRoute, &old, sizeof(old));
-
+
if (opt != -1)
setOption(TOption_DontRoute, &opt, sizeof(opt));
-
+
return (old);
}
@@ -1039,12 +1039,12 @@ sal_Int32 OSocket::setDontRoute(sal_Int32 opt) const
sal_Int32 OSocket::setBroadcast(sal_Int32 opt) const
{
sal_Int32 old = 0;
-
+
getOption(TOption_Broadcast, &old, sizeof(old));
-
+
if (opt != -1)
setOption(TOption_Broadcast, &opt, sizeof(opt));
-
+
return (old);
}
@@ -1054,12 +1054,12 @@ sal_Int32 OSocket::setBroadcast(sal_Int32 opt) const
sal_Int32 OSocket::setOobinline(sal_Int32 opt) const
{
sal_Int32 old = 0;
-
+
getOption(TOption_OOBinLine, &old, sizeof(old));
-
+
if (opt != -1)
setOption(TOption_OOBinLine, &opt, sizeof(opt));
-
+
return (old);
}
@@ -1069,7 +1069,7 @@ sal_Int32 OSocket::setOobinline(sal_Int32 opt) const
sal_Int32 OSocket::setLinger(sal_Int32 time) const
{
/* local decl. of linger-struct */
- struct SockLinger
+ struct SockLinger
{
sal_Int32 m_onoff; // option on/off
sal_Int32 m_linger; // linger time
@@ -1077,10 +1077,10 @@ sal_Int32 OSocket::setLinger(sal_Int32 time) const
SockLinger old = { 0, 0 };
-
+
getOption(TOption_Linger, &old, sizeof(old));
-
- if (time > 0) // enable linger with wait-times > 0
+
+ if (time > 0) // enable linger with wait-times > 0
{
SockLinger nw = { 1, time };
setOption(TOption_Linger, &nw, sizeof(nw));
@@ -1116,12 +1116,12 @@ sal_Int32 OSocket::setSendBufSize(sal_Int32 sz) const
sal_Int32 OSocket::setRecvBufSize(sal_Int32 sz) const
{
sal_Int32 old = 0;
-
+
getOption(TOption_RcvBuf, &old, sizeof(old));
-
+
if (sz >= 0)
setOption(TOption_RcvBuf, &sz, sizeof(sz));
-
+
return (old);
}
@@ -1131,12 +1131,12 @@ sal_Int32 OSocket::setRecvBufSize(sal_Int32 sz) const
sal_Int32 OSocket::setTcpNoDelay(sal_Int32 sz) const
{
sal_Int32 old = 0;
-
+
getOption(TOption_TcpNoDelay, &old, sizeof(old), TLevel_Tcp);
-
+
if (sz >= 0)
setOption(TOption_TcpNoDelay, &sz, sizeof(sz), TLevel_Tcp);
-
+
return (old);
}
@@ -1146,7 +1146,7 @@ sal_Int32 OSocket::setTcpNoDelay(sal_Int32 sz) const
//void OSocket::getError(sal_Char* pBuffer, sal_uInt32 nSize) const
void OSocket::getError( rtl::OUString& pBuffer ) const
{
- VOS_ASSERT(m_pSockRef && (*m_pSockRef)());
+ VOS_ASSERT(m_pSockRef && (*m_pSockRef)());
if (m_pSockRef && (*m_pSockRef)())
osl_getLastSocketErrorDescription((*m_pSockRef)(), &pBuffer.pData );
@@ -1159,7 +1159,7 @@ void OSocket::getError( rtl::OUString& pBuffer ) const
/*****************************************************************************/
OSocket::TSocketError OSocket::getError() const
{
- VOS_ASSERT(m_pSockRef && (*m_pSockRef)());
+ VOS_ASSERT(m_pSockRef && (*m_pSockRef)());
if (m_pSockRef && (*m_pSockRef)())
return (TSocketError)osl_getLastSocketError((*m_pSockRef)());
@@ -1169,15 +1169,15 @@ OSocket::TSocketError OSocket::getError() const
-VOS_IMPLEMENT_CLASSINFO(VOS_CLASSNAME(OAcceptorSocket, vos),
- VOS_NAMESPACE(OAcceptorSocket, vos),
+VOS_IMPLEMENT_CLASSINFO(VOS_CLASSNAME(OAcceptorSocket, vos),
+ VOS_NAMESPACE(OAcceptorSocket, vos),
VOS_NAMESPACE(OSocket, vos), 0);
/*****************************************************************************/
// OAcceptorSocket
/*****************************************************************************/
-OAcceptorSocket::OAcceptorSocket(TAddrFamily Family,
+OAcceptorSocket::OAcceptorSocket(TAddrFamily Family,
TProtocol Protocol,
TSocketType Type) :
OSocket(Type, Family, Protocol)
@@ -1188,21 +1188,21 @@ OAcceptorSocket::OAcceptorSocket(TAddrFamily Family,
// OAcceptorSocket
/*****************************************************************************/
OAcceptorSocket::OAcceptorSocket(const OAcceptorSocket& sock) :
- OSocket(sock)
+ OSocket(sock)
{
}
/*****************************************************************************/
// ~OAcceptorSocket
/*****************************************************************************/
-OAcceptorSocket::~OAcceptorSocket()
+OAcceptorSocket::~OAcceptorSocket()
{
if (m_pSockRef && (*m_pSockRef)() && (m_pSockRef->release() == 0))
{
/* mfe: prepare for forthcoming api change */
- osl_closeSocket((*m_pSockRef)());
+ osl_closeSocket((*m_pSockRef)());
osl_releaseSocket((*m_pSockRef)());
- delete m_pSockRef;
+ delete m_pSockRef;
m_pSockRef = 0;
}
}
@@ -1216,7 +1216,7 @@ void OAcceptorSocket::close()
{
osl_closeSocket((*m_pSockRef)());
}
-
+
m_pSockRef= 0;
}
@@ -1228,10 +1228,10 @@ sal_Bool OAcceptorSocket::listen(sal_Int32 MaxPendingConnections)
VOS_ASSERT(m_pSockRef && (*m_pSockRef)());
if ( m_pSockRef && (*m_pSockRef)() )
- {
+ {
return osl_listenOnSocket((*m_pSockRef)(), MaxPendingConnections);
}
-
+
return sal_False;
}
@@ -1241,27 +1241,27 @@ sal_Bool OAcceptorSocket::listen(sal_Int32 MaxPendingConnections)
/*****************************************************************************/
OSocket::TResult OAcceptorSocket::acceptConnection(OStreamSocket& connection)
{
- if (m_pRecvTimeout && ! isRecvReady(m_pRecvTimeout))
+ if (m_pRecvTimeout && ! isRecvReady(m_pRecvTimeout))
return TResult_TimedOut;
VOS_ASSERT(m_pSockRef && (*m_pSockRef)());
OStreamSocket aSocket;
-
+
if ( m_pSockRef && (*m_pSockRef)() )
- {
+ {
aSocket = osl_acceptConnectionOnSocket((*m_pSockRef)(), 0);
}
-
+
if( aSocket.isValid() )
{
connection = aSocket;
return TResult_Ok;
}
else
- {
+ {
return TResult_Error;
}
-
+
}
/*****************************************************************************/
@@ -1273,22 +1273,22 @@ OSocket::TResult OAcceptorSocket::acceptConnection(OStreamSocket& connection,
oslSocketAddr PeerAddr = 0;
oslSocket Socket = 0;
- if (m_pRecvTimeout && ! isRecvReady(m_pRecvTimeout))
+ if (m_pRecvTimeout && ! isRecvReady(m_pRecvTimeout))
return TResult_TimedOut;
VOS_ASSERT(m_pSockRef && (*m_pSockRef)());
if ( m_pSockRef && (*m_pSockRef)() )
- {
+ {
Socket= osl_acceptConnectionOnSocket((*m_pSockRef)(), &PeerAddr);
}
-
+
if (Socket)
{
sa= PeerAddr;
connection= Socket;
return TResult_Ok;
- }
+ }
else
{
return TResult_Error;
@@ -1296,8 +1296,8 @@ OSocket::TResult OAcceptorSocket::acceptConnection(OStreamSocket& connection,
}
-VOS_IMPLEMENT_CLASSINFO(VOS_CLASSNAME(OStreamSocket, vos),
- VOS_NAMESPACE(OStreamSocket, vos),
+VOS_IMPLEMENT_CLASSINFO(VOS_CLASSNAME(OStreamSocket, vos),
+ VOS_NAMESPACE(OStreamSocket, vos),
VOS_NAMESPACE(OSocket, vos), 0);
@@ -1312,7 +1312,7 @@ OStreamSocket::OStreamSocket()
/*****************************************************************************/
// OStreamSocket
/*****************************************************************************/
-OStreamSocket::OStreamSocket(TAddrFamily Family,
+OStreamSocket::OStreamSocket(TAddrFamily Family,
TProtocol Protocol,
TSocketType Type) :
OSocket(Type, Family, Protocol)
@@ -1406,16 +1406,16 @@ sal_Int32 OStreamSocket::read(void* pBuffer, sal_uInt32 n) const
{
sal_uInt8 *Ptr = (sal_uInt8 *)pBuffer;
- if (m_pRecvTimeout && ! isRecvReady(m_pRecvTimeout))
+ if (m_pRecvTimeout && ! isRecvReady(m_pRecvTimeout))
return 0;
VOS_ASSERT(m_pSockRef && (*m_pSockRef)());
if ( ! ( m_pSockRef && (*m_pSockRef)() ) )
{
- return -1;
+ return -1;
}
-
+
/* loop until all desired bytes were read or an error occured */
sal_uInt32 BytesRead= 0;
sal_uInt32 BytesToRead= n;
@@ -1460,9 +1460,9 @@ sal_Int32 OStreamSocket::write(const void* pBuffer, sal_uInt32 n)
if ( ! ( m_pSockRef && (*m_pSockRef)() ) )
{
- return -1;
+ return -1;
}
-
+
/* loop until all desired bytes were send or an error occured */
sal_uInt32 BytesSend= 0;
sal_uInt32 BytesToSend= n;
@@ -1515,7 +1515,7 @@ sal_Int32 OStreamSocket::recv(void* pBuffer,
{
return -1;
}
-
+
return osl_receiveSocket((*m_pSockRef)(),
pBuffer,
BytesToRead,
@@ -1525,22 +1525,22 @@ sal_Int32 OStreamSocket::recv(void* pBuffer,
/*****************************************************************************/
// send
/*****************************************************************************/
-sal_Int32 OStreamSocket::send(const void* pBuffer,
- sal_uInt32 BytesToSend,
+sal_Int32 OStreamSocket::send(const void* pBuffer,
+ sal_uInt32 BytesToSend,
TSocketMsgFlag Flag)
{
- if (m_pSendTimeout && ! isSendReady(m_pSendTimeout))
+ if (m_pSendTimeout && ! isSendReady(m_pSendTimeout))
return 0;
-
+
VOS_ASSERT(m_pSockRef && (*m_pSockRef)());
if ( ! ( m_pSockRef && (*m_pSockRef)() ) )
{
return -1;
}
-
- return osl_sendSocket((*m_pSockRef)(),
- pBuffer,
+
+ return osl_sendSocket((*m_pSockRef)(),
+ pBuffer,
BytesToSend,
(oslSocketMsgFlag)Flag);
}
@@ -1556,14 +1556,14 @@ sal_Bool OStreamSocket::shutdown(TSocketDirection Direction)
{
return osl_shutdownSocket((*m_pSockRef)(), (oslSocketDirection)Direction);
}
-
+
return sal_False;
}
-VOS_IMPLEMENT_CLASSINFO(VOS_CLASSNAME(OConnectorSocket, vos),
- VOS_NAMESPACE(OConnectorSocket, vos),
+VOS_IMPLEMENT_CLASSINFO(VOS_CLASSNAME(OConnectorSocket, vos),
+ VOS_NAMESPACE(OConnectorSocket, vos),
VOS_NAMESPACE(OStreamSocket, vos), 0);
@@ -1571,7 +1571,7 @@ VOS_IMPLEMENT_CLASSINFO(VOS_CLASSNAME(OConnectorSocket, vos),
/*****************************************************************************/
// OConnectorSocket
/*****************************************************************************/
-OConnectorSocket::OConnectorSocket(TAddrFamily Family,
+OConnectorSocket::OConnectorSocket(TAddrFamily Family,
TProtocol Protocol,
TSocketType Type) :
OStreamSocket(Family, Protocol, Type)
@@ -1596,32 +1596,32 @@ OConnectorSocket::~OConnectorSocket()
/*****************************************************************************/
// connect
/*****************************************************************************/
-OSocket::TResult OConnectorSocket::connect(const OSocketAddr& Addr,
+OSocket::TResult OConnectorSocket::connect(const OSocketAddr& Addr,
const TimeValue* pTimeout)
{
-
+
VOS_ASSERT(m_pSockRef && (*m_pSockRef)());
if ( m_pSockRef && (*m_pSockRef)() )
- {
+ {
return (TResult)osl_connectSocketTo((*m_pSockRef)(),
(oslSocketAddr)Addr,
pTimeout);
}
-
+
return TResult_Error;
}
-VOS_IMPLEMENT_CLASSINFO(VOS_CLASSNAME(ODatagramSocket, vos),
- VOS_NAMESPACE(ODatagramSocket, vos),
+VOS_IMPLEMENT_CLASSINFO(VOS_CLASSNAME(ODatagramSocket, vos),
+ VOS_NAMESPACE(ODatagramSocket, vos),
VOS_NAMESPACE(OSocket, vos), 0);
/*****************************************************************************/
// ODatagramSocket
/*****************************************************************************/
-ODatagramSocket::ODatagramSocket(TAddrFamily Family,
+ODatagramSocket::ODatagramSocket(TAddrFamily Family,
TProtocol Protocol,
TSocketType Type) :
OSocket(Type, Family, Protocol)
@@ -1647,13 +1647,13 @@ ODatagramSocket::~ODatagramSocket()
/*****************************************************************************/
// recvFrom
/*****************************************************************************/
-sal_Int32 ODatagramSocket::recvFrom(void* pBuffer,
- sal_uInt32 BufferSize,
+sal_Int32 ODatagramSocket::recvFrom(void* pBuffer,
+ sal_uInt32 BufferSize,
OSocketAddr* pSenderAddr,
TSocketMsgFlag Flag)
{
- if (m_pRecvTimeout && ! isRecvReady(m_pRecvTimeout))
+ if (m_pRecvTimeout && ! isRecvReady(m_pRecvTimeout))
return 0;
VOS_ASSERT(m_pSockRef && (*m_pSockRef)());
@@ -1662,7 +1662,7 @@ sal_Int32 ODatagramSocket::recvFrom(void* pBuffer,
{
return -1;
}
-
+
sal_Int32 BytesRead;
if(pSenderAddr)
@@ -1698,22 +1698,22 @@ sal_Int32 ODatagramSocket::recvFrom(void* pBuffer,
/*****************************************************************************/
// sendTo
/*****************************************************************************/
-sal_Int32 ODatagramSocket::sendTo(const OSocketAddr& ReceiverAddr,
+sal_Int32 ODatagramSocket::sendTo(const OSocketAddr& ReceiverAddr,
const void* pBuffer,
- sal_uInt32 BufferSize,
+ sal_uInt32 BufferSize,
TSocketMsgFlag Flag)
{
- if (m_pSendTimeout && ! isSendReady(m_pSendTimeout))
+ if (m_pSendTimeout && ! isSendReady(m_pSendTimeout))
return 0;
VOS_ASSERT(m_pSockRef && (*m_pSockRef)());
if ( ( m_pSockRef && (*m_pSockRef)() ) )
{
-
- return osl_sendToSocket((*m_pSockRef)(),
+
+ return osl_sendToSocket((*m_pSockRef)(),
(oslSocketAddr)ReceiverAddr,
- pBuffer,
+ pBuffer,
BufferSize,
(oslSocketMsgFlag)Flag);
}
diff --git a/vos/source/stream.cxx b/vos/source/stream.cxx
index 5f7b5b55304f..14dac89ee8c0 100644
--- a/vos/source/stream.cxx
+++ b/vos/source/stream.cxx
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -52,9 +52,9 @@ OStream::~OStream()
sal_Int32 OStream::read(void* pbuffer, sal_uInt32 n) const
{
return (m_rStream.read(pbuffer, n));
-}
+}
-sal_Int32 OStream::read(IPositionableStream::Offset offset,
+sal_Int32 OStream::read(IPositionableStream::Offset offset,
void* pbuffer, sal_uInt32 n) const
{
return (seekTo(offset) ? read(pbuffer, n) : -1);
@@ -67,7 +67,7 @@ sal_Int32 OStream::write(const void* pbuffer, sal_uInt32 n)
&& (m_rStream.write(pbuffer, n) == static_cast< sal_Int32 >(n));
}
-sal_Int32 OStream::write(IPositionableStream::Offset offset,
+sal_Int32 OStream::write(IPositionableStream::Offset offset,
const void* pbuffer, sal_uInt32 n)
{
return (seekTo(offset) && write(pbuffer, n));
@@ -83,7 +83,7 @@ sal_Bool OStream::seekTo(IPositionableStream::Offset pos) const
return (m_rStream.seekTo(pos));
}
-sal_Bool OStream::seekToEnd() const
+sal_Bool OStream::seekToEnd() const
{
return (m_rStream.seekToEnd());
}
diff --git a/vos/source/thread.cxx b/vos/source/thread.cxx
index 8b2c8826b753..24b546a293c9 100644
--- a/vos/source/thread.cxx
+++ b/vos/source/thread.cxx
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -39,12 +39,12 @@ void vos::threadWorkerFunction_impl(void * pthis)
// call Handler-Function of OThread-derived class
pThis->run();
- // if not already terminating, by a kill do normal shutdown
+ // if not already terminating, by a kill do normal shutdown
if (! pThis->m_bTerminating)
{
pThis->m_bTerminating = sal_True;
- pThis->onTerminated(); // could e.g. delete this
+ pThis->onTerminated(); // could e.g. delete this
}
}
@@ -53,62 +53,62 @@ void vos::threadWorkerFunction_impl(void * pthis)
// Thread class
//
-VOS_IMPLEMENT_CLASSINFO(VOS_CLASSNAME(OThread, vos),
- VOS_NAMESPACE(OThread, vos),
+VOS_IMPLEMENT_CLASSINFO(VOS_CLASSNAME(OThread, vos),
+ VOS_NAMESPACE(OThread, vos),
VOS_NAMESPACE(OObject, vos), 0);
-OThread::OThread()
+OThread::OThread()
{
m_hThread = 0;
m_bTerminating = sal_False;
m_aCondition = osl_createCondition();
}
-OThread::~OThread()
+OThread::~OThread()
{
if (m_hThread != 0)
{
osl_destroyThread(m_hThread);
}
-
+
osl_destroyCondition( m_aCondition );
}
-sal_Bool OThread::create()
+sal_Bool OThread::create()
{
- VOS_ASSERT(m_hThread == 0); // only one running thread per instance
+ VOS_ASSERT(m_hThread == 0); // only one running thread per instance
m_hThread = osl_createSuspendedThread(
threadWorkerFunction_impl, (void*)this);
if (m_hThread)
- osl_resumeThread(m_hThread);
+ osl_resumeThread(m_hThread);
return m_hThread != 0;
}
-sal_Bool OThread::createSuspended()
+sal_Bool OThread::createSuspended()
{
- VOS_ASSERT(m_hThread == 0); // only one running thread per instance
+ VOS_ASSERT(m_hThread == 0); // only one running thread per instance
m_hThread= osl_createSuspendedThread(threadWorkerFunction_impl, (void*)this);
return m_hThread != 0;
}
-void OThread::suspend()
+void OThread::suspend()
{
- VOS_ASSERT(m_hThread != 0); // use only on running thread
+ VOS_ASSERT(m_hThread != 0); // use only on running thread
osl_suspendThread(m_hThread);
}
-void OThread::resume()
+void OThread::resume()
{
- VOS_ASSERT(m_hThread != 0); // use only on running thread
+ VOS_ASSERT(m_hThread != 0); // use only on running thread
osl_resumeThread(m_hThread);
}
-sal_Bool OThread::isRunning()
+sal_Bool OThread::isRunning()
{
return m_hThread != 0 && osl_isThreadRunning(m_hThread);
}
@@ -123,7 +123,7 @@ OThread::TThreadIdentifier OThread::getCurrentIdentifier()
return (TThreadIdentifier)osl_getThreadIdentifier(0);
}
-void OThread::join()
+void OThread::join()
{
if (m_hThread) {
VOS_ASSERT(getCurrentIdentifier() != getIdentifier());
@@ -131,25 +131,25 @@ void OThread::join()
}
}
-OThread::TThreadSleep OThread::sleep(const TimeValue& Delay)
+OThread::TThreadSleep OThread::sleep(const TimeValue& Delay)
{
TThreadSleep eRet;
-
+
switch( osl_waitCondition( m_aCondition, &Delay ) )
{
case osl_cond_result_ok:
eRet = TSleep_Normal;
break;
-
+
case osl_cond_result_timeout:
eRet = TSleep_Cancel;
- break;
-
+ break;
+
default:
eRet = TSleep_Error;
break;
}
-
+
return eRet;
}
@@ -157,13 +157,13 @@ void OThread::wait(const TimeValue& Delay) {
osl_waitThread(&Delay);
}
-sal_Bool OThread::awake()
+sal_Bool OThread::awake()
{
osl_setCondition( m_aCondition );
return osl_resetCondition( m_aCondition );
}
-void OThread::terminate()
+void OThread::terminate()
{
osl_terminateThread(m_hThread);
}
@@ -172,9 +172,9 @@ sal_Bool OThread::schedule() {
return osl_scheduleThread(m_hThread);
}
-void OThread::kill()
+void OThread::kill()
{
- if (osl_isThreadRunning(m_hThread))
+ if (osl_isThreadRunning(m_hThread))
{
// flag we are shutting down
m_bTerminating = sal_True;
@@ -191,16 +191,16 @@ void OThread::setPriority(OThread::TThreadPriority Priority)
OThread::TThreadPriority OThread::getPriority()
{
- return (TThreadPriority)osl_getThreadPriority(m_hThread);
+ return (TThreadPriority)osl_getThreadPriority(m_hThread);
}
-void OThread::yield()
-{
+void OThread::yield()
+{
osl_yieldThread();
}
-void OThread::onTerminated()
+void OThread::onTerminated()
{
}
@@ -209,8 +209,8 @@ void OThread::onTerminated()
// ThreadData class
//
-VOS_IMPLEMENT_CLASSINFO(VOS_CLASSNAME(OThreadData, vos),
- VOS_NAMESPACE(OThreadData, vos),
+VOS_IMPLEMENT_CLASSINFO(VOS_CLASSNAME(OThreadData, vos),
+ VOS_NAMESPACE(OThreadData, vos),
VOS_NAMESPACE(OObject, vos), 0);
OThreadData::OThreadData( oslThreadKeyCallbackFunction pCallback )
diff --git a/vos/source/timer.cxx b/vos/source/timer.cxx
index 1c1e2385b60c..624b3d7e84ad 100644
--- a/vos/source/timer.cxx
+++ b/vos/source/timer.cxx
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -43,15 +43,15 @@ class OTimerManagerCleanup;
class NAMESPACE_VOS(OTimerManager) : public NAMESPACE_VOS(OThread)
{
-
+
public:
///
OTimerManager();
-
+
///
~OTimerManager();
-
+
/// register timer
sal_Bool SAL_CALL registerTimer(NAMESPACE_VOS(OTimer)* pTimer);
@@ -64,9 +64,9 @@ public:
/// retrieves the "Singleton" TimerManager Instance
static OTimerManager* SAL_CALL getTimerManager();
-
+
protected:
-
+
/// worker-function of thread
virtual void SAL_CALL run();
@@ -75,13 +75,13 @@ protected:
// cleanup Method
virtual void SAL_CALL onTerminated();
-
+
// sorted-queue data
- NAMESPACE_VOS(OTimer)* m_pHead;
+ NAMESPACE_VOS(OTimer)* m_pHead;
// List Protection
- NAMESPACE_VOS(OMutex) m_Lock;
+ NAMESPACE_VOS(OMutex) m_Lock;
// Signal the insertion of a timer
- NAMESPACE_VOS(OCondition) m_notEmpty;
+ NAMESPACE_VOS(OCondition) m_notEmpty;
// Synchronize access to OTimerManager
static NAMESPACE_VOS(OMutex) m_Access;
@@ -90,7 +90,7 @@ protected:
static NAMESPACE_VOS(OTimerManager)* m_pManager;
friend class OTimerManagerCleanup;
-
+
};
using namespace vos;
@@ -106,7 +106,7 @@ VOS_IMPLEMENT_CLASSINFO(VOS_CLASSNAME(OTimer, vos),
OTimer::OTimer()
{
- m_TimeOut = 0;
+ m_TimeOut = 0;
m_Expired = 0;
m_RepeatDelta = 0;
m_pNext = 0;
@@ -114,7 +114,7 @@ OTimer::OTimer()
OTimer::OTimer(const TTimeValue& Time)
{
- m_TimeOut = Time;
+ m_TimeOut = Time;
m_RepeatDelta = 0;
m_Expired = 0;
m_pNext = 0;
@@ -124,7 +124,7 @@ OTimer::OTimer(const TTimeValue& Time)
OTimer::OTimer(const TTimeValue& Time, const TTimeValue& Repeat)
{
- m_TimeOut = Time;
+ m_TimeOut = Time;
m_RepeatDelta = Repeat;
m_Expired = 0;
m_pNext = 0;
@@ -298,16 +298,16 @@ void OTimerManager::onTerminated()
{
delete this; // mfe: AAARRRGGGHHH!!!
}
-
+
OTimerManager* OTimerManager::getTimerManager()
-{
- OGuard Guard(&m_Access);
-
+{
+ OGuard Guard(&m_Access);
+
if (! m_pManager)
new OTimerManager;
return (m_pManager);
-}
+}
sal_Bool OTimerManager::registerTimer(OTimer* pTimer)
{
@@ -317,28 +317,28 @@ sal_Bool OTimerManager::registerTimer(OTimer* pTimer)
{
return sal_False;
}
-
+
OGuard Guard(&m_Lock);
// try to find one with equal or lower remaining time.
OTimer** ppIter = &m_pHead;
-
- while (*ppIter)
+
+ while (*ppIter)
{
if (pTimer->expiresBefore(*ppIter))
- {
- // next element has higher remaining time,
+ {
+ // next element has higher remaining time,
// => insert new timer before
break;
}
ppIter= &((*ppIter)->m_pNext);
- }
-
- // next element has higher remaining time,
+ }
+
+ // next element has higher remaining time,
// => insert new timer before
pTimer->m_pNext= *ppIter;
*ppIter = pTimer;
-
+
if (pTimer == m_pHead)
{
@@ -358,27 +358,27 @@ sal_Bool OTimerManager::unregisterTimer(OTimer* pTimer)
{
return sal_False;
}
-
+
// lock access
OGuard Guard(&m_Lock);
OTimer** ppIter = &m_pHead;
- while (*ppIter)
+ while (*ppIter)
{
if (pTimer == (*ppIter))
- {
+ {
// remove timer from list
*ppIter = (*ppIter)->m_pNext;
return sal_True;
}
ppIter= &((*ppIter)->m_pNext);
- }
+ }
return sal_False;
}
-sal_Bool OTimerManager::lookupTimer(const OTimer* pTimer)
+sal_Bool OTimerManager::lookupTimer(const OTimer* pTimer)
{
VOS_ASSERT(pTimer);
@@ -386,7 +386,7 @@ sal_Bool OTimerManager::lookupTimer(const OTimer* pTimer)
{
return sal_False;
}
-
+
// lock access
OGuard Guard(&m_Lock);
@@ -394,7 +394,7 @@ sal_Bool OTimerManager::lookupTimer(const OTimer* pTimer)
for (OTimer* pIter = m_pHead; pIter != 0; pIter= pIter->m_pNext)
{
if (pIter == pTimer)
- {
+ {
return sal_True;
}
}
@@ -409,7 +409,7 @@ void OTimerManager::checkForTimeout()
if ( m_pHead == 0 )
{
- m_Lock.release();
+ m_Lock.release();
return;
}
@@ -421,9 +421,9 @@ void OTimerManager::checkForTimeout()
m_pHead = pTimer->m_pNext;
pTimer->acquire();
-
+
m_Lock.release();
-
+
pTimer->onShot();
// restart timer if specified
@@ -433,8 +433,8 @@ void OTimerManager::checkForTimeout()
osl_getSystemTime(&Now);
- Now.Seconds += pTimer->m_RepeatDelta.Seconds;
- Now.Nanosec += pTimer->m_RepeatDelta.Nanosec;
+ Now.Seconds += pTimer->m_RepeatDelta.Seconds;
+ Now.Nanosec += pTimer->m_RepeatDelta.Nanosec;
pTimer->m_Expired = Now;
@@ -451,16 +451,16 @@ void OTimerManager::checkForTimeout()
return;
}
-void OTimerManager::run()
+void OTimerManager::run()
{
setPriority(TPriority_BelowNormal);
while (schedule())
{
- TTimeValue delay;
- TTimeValue* pDelay=0;
-
+ TTimeValue delay;
+ TTimeValue* pDelay=0;
+
m_Lock.acquire();
if (m_pHead != 0)
@@ -472,13 +472,13 @@ void OTimerManager::run()
{
pDelay=0;
}
-
-
+
+
m_notEmpty.reset();
m_Lock.release();
-
+
m_notEmpty.wait(pDelay);
checkForTimeout();
diff --git a/vos/source/xception.cxx b/vos/source/xception.cxx
index a454460be69b..c69c4d6701dd 100644
--- a/vos/source/xception.cxx
+++ b/vos/source/xception.cxx
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -30,11 +30,11 @@
using namespace vos;
/*
- * OException, baseclass of all exceptions
+ * OException, baseclass of all exceptions
*/
-VOS_IMPLEMENT_CLASSINFO(VOS_CLASSNAME(OException, vos), \
- VOS_NAMESPACE(OException, vos), \
+VOS_IMPLEMENT_CLASSINFO(VOS_CLASSNAME(OException, vos), \
+ VOS_NAMESPACE(OException, vos), \
VOS_NAMESPACE(OObject, vos), 0);
OException::~OException()