summaryrefslogtreecommitdiff
path: root/fpicker
diff options
context:
space:
mode:
authorTino Rachui <tra@openoffice.org>2002-03-21 06:33:32 +0000
committerTino Rachui <tra@openoffice.org>2002-03-21 06:33:32 +0000
commit329f11775f3febe663a4d259e59325386930bbe6 (patch)
tree4c9081c85a3b84d35007691b163cf8fdeda9a3af /fpicker
parentcd329519ffd78703eca2c8fa213ef15bed9e60bb (diff)
#96112#explicitly starting and stoping async. event notifier thread in execute
Diffstat (limited to 'fpicker')
-rw-r--r--fpicker/source/win32/filepicker/FilePicker.cxx39
-rw-r--r--fpicker/source/win32/filepicker/FilePicker.hxx11
2 files changed, 23 insertions, 27 deletions
diff --git a/fpicker/source/win32/filepicker/FilePicker.cxx b/fpicker/source/win32/filepicker/FilePicker.cxx
index 250b7a0437d4..6c09f13da150 100644
--- a/fpicker/source/win32/filepicker/FilePicker.cxx
+++ b/fpicker/source/win32/filepicker/FilePicker.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: FilePicker.cxx,v $
*
- * $Revision: 1.14 $
+ * $Revision: 1.15 $
*
- * last change: $Author: tra $ $Date: 2002-02-22 09:59:31 $
+ * last change: $Author: tra $ $Date: 2002-03-21 07:33:32 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -86,6 +86,10 @@
#include <com/sun/star/ui/dialogs/TemplateDescription.hpp>
#endif
+#ifndef _FILEPICKEREVENTNOTIFICATION_HXX_
+#include "filepickereventnotification.hxx"
+#endif
+
//------------------------------------------------------------------------
// namespace directives
//------------------------------------------------------------------------
@@ -205,8 +209,8 @@ void SAL_CALL CFilePicker::disposing( const EventObject& aEvent ) throw(RuntimeE
{
Reference< XFilePickerListener > xFilePickerListener( aEvent.Source, ::com::sun::star::uno::UNO_QUERY );
- if ( xFilePickerListener.is( ) )
- removeFilePickerListener( xFilePickerListener );
+ if (xFilePickerListener.is())
+ removeFilePickerListener(xFilePickerListener);
}
//-----------------------------------------------------------------------------------------
@@ -215,9 +219,9 @@ void SAL_CALL CFilePicker::disposing( const EventObject& aEvent ) throw(RuntimeE
void SAL_CALL CFilePicker::fileSelectionChanged( FilePickerEvent aEvent )
{
- CAsyncEventNotifier::EventListenerMethod_t pfncFPListener = &XFilePickerListener::fileSelectionChanged;
aEvent.Source = Reference<XInterface>(static_cast<XFilePickerNotifier*>(this));
- notifyAllListener( pfncFPListener, aEvent );
+ m_aAsyncEventNotifier.notifyEvent(
+ new CFilePickerParamEventNotification(&XFilePickerListener::fileSelectionChanged,aEvent));
}
//-----------------------------------------------------------------------------------------
@@ -226,9 +230,9 @@ void SAL_CALL CFilePicker::fileSelectionChanged( FilePickerEvent aEvent )
void SAL_CALL CFilePicker::directoryChanged( FilePickerEvent aEvent )
{
- CAsyncEventNotifier::EventListenerMethod_t pfncFPListener = &XFilePickerListener::directoryChanged;
aEvent.Source = Reference<XInterface>(static_cast<XFilePickerNotifier*>(this));
- notifyAllListener( pfncFPListener, aEvent );
+ m_aAsyncEventNotifier.notifyEvent(
+ new CFilePickerParamEventNotification(&XFilePickerListener::directoryChanged,aEvent));
}
//-----------------------------------------------------------------------------------------
@@ -237,9 +241,9 @@ void SAL_CALL CFilePicker::directoryChanged( FilePickerEvent aEvent )
void SAL_CALL CFilePicker::controlStateChanged( FilePickerEvent aEvent )
{
- CAsyncEventNotifier::EventListenerMethod_t pfncFPListener = &XFilePickerListener::controlStateChanged;
aEvent.Source = Reference<XInterface>(static_cast<XFilePickerNotifier*>(this));
- notifyAllListener( pfncFPListener, aEvent );
+ m_aAsyncEventNotifier.notifyEvent(
+ new CFilePickerParamEventNotification(&XFilePickerListener::controlStateChanged,aEvent));
}
//-----------------------------------------------------------------------------------------
@@ -248,17 +252,8 @@ void SAL_CALL CFilePicker::controlStateChanged( FilePickerEvent aEvent )
void SAL_CALL CFilePicker::dialogSizeChanged( )
{
- // not yet implemented
-}
-
-//-----------------------------------------------------------------------------------------
-//
-//-----------------------------------------------------------------------------------------
-
-void SAL_CALL CFilePicker::notifyAllListener( CAsyncEventNotifier::EventListenerMethod_t pfncFPListener, FilePickerEvent aEvent )
-{
- OSL_ASSERT(pfncFPListener);
- m_aAsyncEventNotifier.notifyEvent(pfncFPListener, aEvent);
+ m_aAsyncEventNotifier.notifyEvent(
+ new CFilePickerEventNotification(&XFilePickerListener::dialogSizeChanged));
}
//-----------------------------------------------------------------------------------------
@@ -643,7 +638,7 @@ void SAL_CALL CFilePicker::initialize( const Sequence< Any >& aArguments )
sal_Bool bFileOpenDialog = sal_True;
sal_uInt32 winResTemplateId = 0;
- sal_Bool bIsWin2000 = IsWin2000( );
+ sal_Bool bIsWin2000 = IsWindows2000Platform();
switch ( templateId )
{
diff --git a/fpicker/source/win32/filepicker/FilePicker.hxx b/fpicker/source/win32/filepicker/FilePicker.hxx
index 3594d67ef22f..94f76928bab5 100644
--- a/fpicker/source/win32/filepicker/FilePicker.hxx
+++ b/fpicker/source/win32/filepicker/FilePicker.hxx
@@ -2,9 +2,9 @@
*
* $RCSfile: FilePicker.hxx,v $
*
- * $Revision: 1.6 $
+ * $Revision: 1.7 $
*
- * last change: $Author: tra $ $Date: 2002-02-21 14:46:49 $
+ * last change: $Author: tra $ $Date: 2002-03-21 07:33:32 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -115,6 +115,10 @@
#include "asynceventnotifier.hxx"
#endif
+#ifndef _EVENTNOTIFICATION_HXX_
+#include "eventnotification.hxx"
+#endif
+
#include <memory>
//----------------------------------------------------------
@@ -296,9 +300,6 @@ public:
void SAL_CALL dialogSizeChanged( );
private:
- void SAL_CALL notifyAllListener( CAsyncEventNotifier::EventListenerMethod_t pfncFPListener, ::com::sun::star::ui::dialogs::FilePickerEvent aEvent );
-
-private:
// prevent copy and assignment
CFilePicker( const CFilePicker& );
CFilePicker& operator=( const CFilePicker& );