summaryrefslogtreecommitdiff
path: root/uui/source
diff options
context:
space:
mode:
authorOliver Bolte <obo@openoffice.org>2005-03-15 09:04:27 +0000
committerOliver Bolte <obo@openoffice.org>2005-03-15 09:04:27 +0000
commitbe8ae3ad9209f62a2c6515a3a7581c39e07d396a (patch)
tree520f49fe2baf084070add6a710e0f2c0ef79a2f1 /uui/source
parent86bcd89e6951f15ec48fbf5b3dbe3a79d624de49 (diff)
INTEGRATION: CWS maybeb (1.44.18); FILE MERGED
2005/02/28 10:41:09 abi 1.44.18.2: RESYNC: (1.44-1.45); FILE MERGED 2005/01/13 10:23:16 abi 1.44.18.1: #90644#
Diffstat (limited to 'uui/source')
-rw-r--r--uui/source/iahndl.cxx61
1 files changed, 59 insertions, 2 deletions
diff --git a/uui/source/iahndl.cxx b/uui/source/iahndl.cxx
index 0526718aae37..5b2759ab709b 100644
--- a/uui/source/iahndl.cxx
+++ b/uui/source/iahndl.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: iahndl.cxx,v $
*
- * $Revision: 1.45 $
+ * $Revision: 1.46 $
*
- * last change: $Author: obo $ $Date: 2005-01-27 12:19:25 $
+ * last change: $Author: obo $ $Date: 2005-03-15 10:04:27 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -252,6 +252,9 @@
#ifndef _OSL_DIAGNOSE_H_
#include "osl/diagnose.h"
#endif
+#ifndef _OSL_CONDITN_HXX_
+#include <osl/conditn.hxx>
+#endif
#ifndef _OSL_MUTEX_HXX_
#include "osl/mutex.hxx"
#endif
@@ -309,9 +312,15 @@
#ifndef _SOLAR_H
#include "tools/solar.h"
#endif
+#ifndef _LINK_HXX
+#include <tools/link.hxx>
+#endif
#ifndef _STRING_HXX
#include "tools/string.hxx"
#endif
+#ifndef _SV_SVAPP_HXX
+#include <vcl/svapp.hxx>
+#endif
#ifndef _SV_MSGBOX_HXX
#include "vcl/msgbox.hxx"
#endif
@@ -576,11 +585,59 @@ UUIInteractionHandler::initialize(
m_aProperties = rArguments;
}
+
+class HandleData : public osl::Condition {
+public:
+ HandleData(
+ star::uno::Reference< star::task::XInteractionRequest > const & rRequest)
+ : osl::Condition(),
+ m_rRequest(rRequest)
+ {
+ }
+
+ star::uno::Reference< star::task::XInteractionRequest > m_rRequest;
+};
+
+
+long handlerequest(void* pHandleData,void* pInteractionHandler)
+{
+ HandleData* pHND = (HandleData*) pHandleData;
+ UUIInteractionHandler* pUUI = (UUIInteractionHandler*) pInteractionHandler;
+ pUUI->handle_impl(pHND->m_rRequest);
+ pHND->set();
+ return 0;
+}
+
+
void SAL_CALL
UUIInteractionHandler::handle(
star::uno::Reference< star::task::XInteractionRequest > const & rRequest)
throw (star::uno::RuntimeException)
{
+ Application* pApp = 0;
+ if(
+ // be aware,it is the same type
+ ((oslThreadIdentifier) Application::GetMainThreadIdentifier())
+ != osl_getThreadIdentifier(NULL)
+ &&
+ (pApp = GetpApp())
+ != 0
+ ) {
+ // we are not in the main thread, let it handle that stuff
+ HandleData aHD(rRequest);
+ Link aLink(&aHD,handlerequest);
+ pApp->PostUserEvent(aLink,this);
+ aHD.wait();
+ }
+ else
+ handle_impl(rRequest);
+}
+
+void SAL_CALL
+UUIInteractionHandler::handle_impl(
+ star::uno::Reference< star::task::XInteractionRequest > const & rRequest)
+ throw (star::uno::RuntimeException)
+{
try
{
if (!rRequest.is())