summaryrefslogtreecommitdiff
path: root/desktop
diff options
context:
space:
mode:
authorOliver Bolte <obo@openoffice.org>2008-02-27 09:21:22 +0000
committerOliver Bolte <obo@openoffice.org>2008-02-27 09:21:22 +0000
commit67ff35e904f00bdd0e899704b03f09927bb61036 (patch)
tree4f7ebd3f9e77f92012604248d5b22779b68e7be3 /desktop
parent90bf46ed13a975d2c6e7fdc8c905c8cebab5671d (diff)
INTEGRATION: CWS jl92_DEV300 (1.11.86); FILE MERGED
2008/02/22 14:24:52 jl 1.11.86.2: #i86304# prevent deadlocks when updating the progress bar 2008/02/22 14:17:08 jl 1.11.86.1: #i86304# prevent deadlocks when updating the progress bar
Diffstat (limited to 'desktop')
-rw-r--r--desktop/source/deployment/gui/dp_gui_cmdenv.h25
1 files changed, 23 insertions, 2 deletions
diff --git a/desktop/source/deployment/gui/dp_gui_cmdenv.h b/desktop/source/deployment/gui/dp_gui_cmdenv.h
index 89d989962cff..d71bbd18d1b6 100644
--- a/desktop/source/deployment/gui/dp_gui_cmdenv.h
+++ b/desktop/source/deployment/gui/dp_gui_cmdenv.h
@@ -4,9 +4,9 @@
*
* $RCSfile: dp_gui_cmdenv.h,v $
*
- * $Revision: 1.11 $
+ * $Revision: 1.12 $
*
- * last change: $Author: ihi $ $Date: 2007-11-22 15:01:13 $
+ * last change: $Author: obo $ $Date: 2008-02-27 10:21:22 $
*
* The Contents of this file are made available subject to
* the terms of GNU Lesser General Public License Version 2.1.
@@ -46,6 +46,8 @@
#include "com/sun/star/ucb/XCommandEnvironment.hpp"
#include <memory>
+#include "com/sun/star/uno/XInterface.hpp"
+
namespace com { namespace sun { namespace star {
namespace ucb {
class XProgressHandler;
@@ -55,6 +57,7 @@ namespace com { namespace sun { namespace star {
class XAbortChannel;
}
namespace uno {
+// class XInterface;
class XComponentContext;
}
} } }
@@ -106,6 +109,22 @@ class ProgressCommandEnv
ProgressDialog( ProgressCommandEnv * cmdEnv );
};
+
+ //Keeps the parameters of the ProgressCommandEnv::updateProgress call so they can be
+ //used later in the event handler asyncUpdateProgress. It also keeps the ProgressCommandEnv
+ //instance alive so that the posted events (to ourself) can always be processed
+ struct UpdateParams
+ {
+ UpdateParams(::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface>
+ const & xProgressCommandEnv, ::rtl::OUString const & _text);
+ //This reference keeps the ProgressCommandEnv alive until the event has been processed
+ ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface> xProgressCommandEnv;
+ //The argument supplied to ProgressCommandEnv::updateProgress
+ ::rtl::OUString text;
+ };
+ //Perfom asynchronous updateProgress call in main thread
+ DECL_LINK(asyncUpdateProgress, UpdateParams*);
+
friend struct ProgressDialog;
friend struct ProgressDialog::CancelButtonImpl;
@@ -149,6 +168,8 @@ public:
::com::sun::star::uno::Reference< ::com::sun::star::task::XAbortChannel > const & xAbortChannel = 0 );
inline bool isAborted() const { return m_aborted; }
+
+
// XCommandEnvironment
virtual ::com::sun::star::uno::Reference< ::com::sun::star::task::XInteractionHandler > SAL_CALL
getInteractionHandler() throw (::com::sun::star::uno::RuntimeException);