summaryrefslogtreecommitdiff
path: root/sd/source/ui/remotecontrol
diff options
context:
space:
mode:
authorThorsten Behrens <tbehrens@suse.com>2012-11-23 17:58:15 +0100
committerThorsten Behrens <tbehrens@suse.com>2012-11-24 15:01:55 +0100
commit895a367d4fb7e5dedefe45937a06d4ba25641d27 (patch)
treed49f4a97ee467d4beebb0abb6e9d89336dcadad5 /sd/source/ui/remotecontrol
parentc50fdef7cf89e8c59db5a8539bbe51c3430d9271 (diff)
Revert ImagePreparer to plain osl::Thread, suicide in onTerminate
This amends 4ab63a3aacdaa819fa98957fa017978e768931bd - since osl will still call into the object, e.g. for onTerminate. Kill ourselves there. Change-Id: I2e88f3a61ba32971e08d4cbb1590d3325d1c5364
Diffstat (limited to 'sd/source/ui/remotecontrol')
-rw-r--r--sd/source/ui/remotecontrol/ImagePreparer.cxx9
-rw-r--r--sd/source/ui/remotecontrol/ImagePreparer.hxx7
2 files changed, 10 insertions, 6 deletions
diff --git a/sd/source/ui/remotecontrol/ImagePreparer.cxx b/sd/source/ui/remotecontrol/ImagePreparer.cxx
index fa642df09a9c..28e6d6c1cecf 100644
--- a/sd/source/ui/remotecontrol/ImagePreparer.cxx
+++ b/sd/source/ui/remotecontrol/ImagePreparer.cxx
@@ -55,8 +55,7 @@ using namespace ::com::sun::star::uno;
ImagePreparer::ImagePreparer(
const uno::Reference<presentation::XSlideShowController>& rxController,
Transmitter *aTransmitter )
- : Thread( "ImagePreparer Thread" ),
- xController( rxController ),
+ : xController( rxController ),
pTransmitter( aTransmitter )
{
}
@@ -65,7 +64,7 @@ ImagePreparer::~ImagePreparer()
{
}
-void ImagePreparer::execute()
+void SAL_CALL ImagePreparer::run()
{
sal_uInt32 aSlides = xController->getSlideCount();
for ( sal_uInt32 i = 0; i < aSlides; i++ )
@@ -84,6 +83,10 @@ void ImagePreparer::execute()
}
sendNotes( i );
}
+}
+
+void SAL_CALL ImagePreparer::onTerminated()
+{
delete this;
}
diff --git a/sd/source/ui/remotecontrol/ImagePreparer.hxx b/sd/source/ui/remotecontrol/ImagePreparer.hxx
index 2743775dac7e..86234d5383a4 100644
--- a/sd/source/ui/remotecontrol/ImagePreparer.hxx
+++ b/sd/source/ui/remotecontrol/ImagePreparer.hxx
@@ -9,7 +9,7 @@
#ifndef _SD_IMPRESSREMOTE_IMAGEPREPARER_HXX
#define _SD_IMPRESSREMOTE_IMAGEPREPARER_HXX
-#include <salhelper/thread.hxx>
+#include <osl/thread.hxx>
#include <com/sun/star/presentation/XSlideShowController.hpp>
@@ -21,7 +21,7 @@ namespace sd
{
class ImagePreparer:
- public salhelper::Thread
+ public osl::Thread
{
public:
ImagePreparer( const
@@ -34,7 +34,8 @@ private:
Transmitter *pTransmitter;
// Thread method
- void execute();
+ virtual void SAL_CALL run();
+ virtual void SAL_CALL onTerminated();
void sendPreview( sal_uInt32 aSlideNumber );
css::uno::Sequence<sal_Int8> preparePreview( sal_uInt32 aSlideNumber,