summaryrefslogtreecommitdiff
path: root/embedserv
diff options
context:
space:
mode:
authorMikhail Voitenko <mav@openoffice.org>2003-03-19 09:56:49 +0000
committerMikhail Voitenko <mav@openoffice.org>2003-03-19 09:56:49 +0000
commit615ea2559fc3f29d3ded828c1b280e41c80d3203 (patch)
tree624dab2a2ce97f40d2b6cc5c97dbe9e49c019115 /embedserv
parentb9dc9f9a522ffa816fc3dcef9a0b4f24fa2c8c76 (diff)
#i2822# let the project be independent component
Diffstat (limited to 'embedserv')
-rwxr-xr-xembedserv/prj/build.lst2
-rwxr-xr-xembedserv/source/embed/servprov.cxx47
-rwxr-xr-xembedserv/util/makefile.mk8
3 files changed, 45 insertions, 12 deletions
diff --git a/embedserv/prj/build.lst b/embedserv/prj/build.lst
index bce50e01b6e6..e2b5333653fc 100755
--- a/embedserv/prj/build.lst
+++ b/embedserv/prj/build.lst
@@ -1,4 +1,4 @@
-sf embedserv : unotools NULL
+sf embedserv : sal cppu cppuhelper NULL
sf embedserv usr1 - w es_mkout NULL
sf embedserv\source\embed nmake - w es_embed NULL
sf embedserv\util nmake - w es_util es_embed.w NULL
diff --git a/embedserv/source/embed/servprov.cxx b/embedserv/source/embed/servprov.cxx
index 9efcb668761a..a96134bc00d2 100755
--- a/embedserv/source/embed/servprov.cxx
+++ b/embedserv/source/embed/servprov.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: servprov.cxx,v $
*
- * $Revision: 1.1 $
+ * $Revision: 1.2 $
*
- * last change: $Author: mav $ $Date: 2003-03-05 15:50:11 $
+ * last change: $Author: mav $ $Date: 2003-03-19 10:56:49 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -73,8 +73,9 @@
#ifndef _OSL_MUTEX_HXX_
#include <osl/mutex.hxx>
#endif
-
-#include <vos/thread.hxx>
+#ifndef _OSL_THREAD_H_
+#include <osl/thread.h>
+#endif
using namespace com::sun::star;
@@ -88,6 +89,42 @@ const GUID* guidList[ SUPPORTED_FACTORIES_NUM ] = {
&OID_MathServer
};
+class CurThreadData
+{
+ public:
+ CurThreadData();
+ virtual ~CurThreadData();
+
+ sal_Bool SAL_CALL setData(void *pData);
+
+ void* SAL_CALL getData();
+
+ protected:
+ oslThreadKey m_hKey;
+};
+
+CurThreadData::CurThreadData()
+{
+ m_hKey = osl_createThreadKey( (oslThreadKeyCallbackFunction)NULL );
+}
+
+CurThreadData::~CurThreadData()
+{
+ osl_destroyThreadKey(m_hKey);
+}
+
+sal_Bool CurThreadData::setData(void *pData)
+{
+ OSL_ENSURE( m_hKey, "No thread key!\n" );
+ return (osl_setThreadKeyData(m_hKey, pData));
+}
+
+void *CurThreadData::getData()
+{
+ OSL_ENSURE( m_hKey, "No thread key!\n" );
+ return (osl_getThreadKeyData(m_hKey));
+}
+
// CoInitializeEx *
typedef DECLSPEC_IMPORT HRESULT (STDAPICALLTYPE *ptrCoInitEx)( LPVOID, DWORD);
@@ -96,7 +133,7 @@ typedef DECLSPEC_IMPORT HRESULT (STDAPICALLTYPE *ptrCoInit)( LPVOID);
void o2u_attachCurrentThread()
{
- static ::vos::OThreadData oleThreadData;
+ static CurThreadData oleThreadData;
if ((sal_Bool)oleThreadData.getData() != sal_True)
{
diff --git a/embedserv/util/makefile.mk b/embedserv/util/makefile.mk
index bde93a85e47a..c93d14f097ac 100755
--- a/embedserv/util/makefile.mk
+++ b/embedserv/util/makefile.mk
@@ -2,9 +2,9 @@
#
# $RCSfile: makefile.mk,v $
#
-# $Revision: 1.2 $
+# $Revision: 1.3 $
#
-# last change: $Author: mav $ $Date: 2003-03-12 15:38:00 $
+# last change: $Author: mav $ $Date: 2003-03-19 10:56:49 $
#
# The Contents of this file are made available subject to the terms of
# either of the following licenses
@@ -90,10 +90,6 @@ SHL1OBJS= \
SHL1STDLIBS=\
$(SALLIB) \
- $(VOSLIB) \
- $(TOOLSLIB) \
- $(UNOTOOLSLIB) \
- $(VCLLIB) \
$(CPPULIB) \
$(CPPUHELPERLIB) \
$(LIBCIMT) \