[Libreoffice-commits] core.git: Branch 'feature/priorities' - 2 commits - include/svtools svtools/source svx/source
Tobias Madl
tobias.madl.dev at gmail.com
Mon Nov 17 04:37:41 PST 2014
include/svtools/asynclink.hxx | 8 ++++----
svtools/source/control/asynclink.cxx | 18 +++++++++---------
svx/source/sdr/overlay/overlaymanagerbuffered.cxx | 2 +-
3 files changed, 14 insertions(+), 14 deletions(-)
New commits:
commit 280649a558b085de0bfdd9ff6a70a4d6c5be527b
Author: Tobias Madl <tobias.madl.dev at gmail.com>
Date: Mon Nov 17 12:36:23 2014 +0000
changed Timer tp idle
Change-Id: Ia3e76239ba98530547e057bebfda767ad684730b
diff --git a/include/svtools/asynclink.hxx b/include/svtools/asynclink.hxx
index e303bbe..fea886d 100644
--- a/include/svtools/asynclink.hxx
+++ b/include/svtools/asynclink.hxx
@@ -25,7 +25,7 @@
#include <tools/link.hxx>
#include <osl/mutex.hxx>
-class Timer;
+class Idle;
struct ImplSVEvent;
namespace svtools {
@@ -34,7 +34,7 @@ class SVT_DLLPUBLIC AsynchronLink
{
Link _aLink;
ImplSVEvent * _nEventId;
- Timer* _pTimer;
+ Idle* _pIdle;
bool _bInCall;
bool* _pDeleted;
void* _pArg;
@@ -47,7 +47,7 @@ public:
AsynchronLink( const Link& rLink )
: _aLink( rLink )
, _nEventId( 0 )
- , _pTimer( 0 )
+ , _pIdle( 0 )
, _bInCall( false )
, _pDeleted( 0 )
, _pArg( 0 )
@@ -55,7 +55,7 @@ public:
{}
AsynchronLink()
: _nEventId( 0 )
- , _pTimer( 0 )
+ , _pIdle( 0 )
, _bInCall( false )
, _pDeleted( 0 )
, _pArg( 0 )
diff --git a/svtools/source/control/asynclink.cxx b/svtools/source/control/asynclink.cxx
index 57550e8..1efd934 100644
--- a/svtools/source/control/asynclink.cxx
+++ b/svtools/source/control/asynclink.cxx
@@ -46,7 +46,7 @@ bAllowDoubles
{
_pArg = pObj;
DBG_ASSERT( bAllowDoubles ||
- ( !_nEventId && ( !_pTimer || !_pTimer->IsActive() ) ),
+ ( !_nEventId && ( !_pIdle || !_pIdle->IsActive() ) ),
"Schon ein Call unterwegs" );
if( _nEventId )
{
@@ -54,17 +54,17 @@ bAllowDoubles
Application::RemoveUserEvent( _nEventId );
if( _pMutex ) _pMutex->release();
}
- if( _pTimer )_pTimer->Stop();
+ if( _pIdle )_pIdle->Stop();
if( bUseTimer )
{
- if( !_pTimer )
+ if( !_pIdle )
{
- _pTimer = new Timer;
- _pTimer->SetTimeout( 0 );
- _pTimer->SetTimeoutHdl( STATIC_LINK(
+ _pIdle = new Idle;
+ _pIdle->SetPriority( VCL_IDLE_PRIORITY_HIGHEST );
+ _pIdle->SetIdleHdl( STATIC_LINK(
this, AsynchronLink, HandleCall) );
}
- _pTimer->Start();
+ _pIdle->Start();
}
else
{
@@ -81,7 +81,7 @@ AsynchronLink::~AsynchronLink()
{
Application::RemoveUserEvent( _nEventId );
}
- delete _pTimer;
+ delete _pIdle;
if( _pDeleted ) *_pDeleted = true;
delete _pMutex;
}
@@ -104,7 +104,7 @@ void AsynchronLink::ClearPendingCall()
_nEventId = 0;
}
if( _pMutex ) _pMutex->release();
- if( _pTimer ) _pTimer->Stop();
+ if( _pIdle ) _pIdle->Stop();
}
void AsynchronLink::Call_Impl( void* pArg )
commit 1688ee26cf83fcb954af20fff0a66ab381759ca3
Author: Tobias Madl <tobias.madl.dev at gmail.com>
Date: Mon Nov 17 12:14:50 2014 +0000
fixed timer, idle bug
Change-Id: Ic7ce17e39d2bcaf608576dd785b4f6abf62407c0
diff --git a/svx/source/sdr/overlay/overlaymanagerbuffered.cxx b/svx/source/sdr/overlay/overlaymanagerbuffered.cxx
index dde69b3..006c310 100644
--- a/svx/source/sdr/overlay/overlaymanagerbuffered.cxx
+++ b/svx/source/sdr/overlay/overlaymanagerbuffered.cxx
@@ -429,7 +429,7 @@ namespace sdr
{
// Init timer
maBufferIdle.SetPriority( VCL_IDLE_PRIORITY_HIGH );
- maBufferIdle.SetTimeoutHdl(LINK(this, OverlayManagerBuffered, ImpBufferTimerHandler));
+ maBufferIdle.SetIdleHdl(LINK(this, OverlayManagerBuffered, ImpBufferTimerHandler));
}
rtl::Reference<OverlayManager> OverlayManagerBuffered::create(
More information about the Libreoffice-commits
mailing list