diff options
author | Tobias Madl <tobias.madl.dev@gmail.com> | 2014-11-21 08:12:11 +0000 |
---|---|---|
committer | Tobias Madl <tobias.madl.dev@gmail.com> | 2014-12-09 12:35:04 +0000 |
commit | b35820c000788eba3c50aa659f4174d2f613586d (patch) | |
tree | 001d1775b2e0145c13b0b23b3108736878ce9c6d /sd | |
parent | changed timers to idles (diff) | |
download | core-b35820c000788eba3c50aa659f4174d2f613586d.tar.gz core-b35820c000788eba3c50aa659f4174d2f613586d.zip |
changed timers to idles
Change-Id: Iac97f482df9fca8563e6931e4c710c1cc4e6503d
Diffstat (limited to 'sd')
-rw-r--r-- | sd/inc/drawdoc.hxx | 2 | ||||
-rw-r--r-- | sd/source/core/drawdoc.cxx | 2 | ||||
-rw-r--r-- | sd/source/core/drawdoc4.cxx | 18 | ||||
-rw-r--r-- | sd/source/ui/slidesorter/cache/SlsQueueProcessor.cxx | 18 | ||||
-rw-r--r-- | sd/source/ui/slidesorter/cache/SlsQueueProcessor.hxx | 2 |
5 files changed, 21 insertions, 21 deletions
diff --git a/sd/inc/drawdoc.hxx b/sd/inc/drawdoc.hxx index 6cd99ce335cf..524dcba959ce 100644 --- a/sd/inc/drawdoc.hxx +++ b/sd/inc/drawdoc.hxx @@ -149,7 +149,7 @@ private: ::sd::Outliner* mpOutliner; ///< local outliner for outline mode ::sd::Outliner* mpInternalOutliner; ///< internal outliner for creation of text objects Timer* mpWorkStartupTimer; - Timer* mpOnlineSpellingTimer; + Idle* mpOnlineSpellingIdle; sd::ShapeList* mpOnlineSpellingList; SvxSearchItem* mpOnlineSearchItem; std::vector<sd::FrameView*> maFrameViewList; diff --git a/sd/source/core/drawdoc.cxx b/sd/source/core/drawdoc.cxx index f18436c45c89..9e5a422b08b2 100644 --- a/sd/source/core/drawdoc.cxx +++ b/sd/source/core/drawdoc.cxx @@ -152,7 +152,7 @@ SdDrawDocument::SdDrawDocument(DocumentType eType, SfxObjectShell* pDrDocSh) , mpOutliner(NULL) , mpInternalOutliner(NULL) , mpWorkStartupTimer(NULL) -, mpOnlineSpellingTimer(NULL) +, mpOnlineSpellingIdle(NULL) , mpOnlineSpellingList(NULL) , mpOnlineSearchItem(NULL) , mpCustomShowList(NULL) diff --git a/sd/source/core/drawdoc4.cxx b/sd/source/core/drawdoc4.cxx index 8b1848f64978..6789ad278c87 100644 --- a/sd/source/core/drawdoc4.cxx +++ b/sd/source/core/drawdoc4.cxx @@ -725,13 +725,13 @@ sal_uInt16 SdDrawDocument::GetMasterPageUserCount(SdrPage* pMaster) const void SdDrawDocument::StopOnlineSpelling() { - if (mpOnlineSpellingTimer && mpOnlineSpellingTimer->IsActive()) + if (mpOnlineSpellingIdle && mpOnlineSpellingIdle->IsActive()) { - mpOnlineSpellingTimer->Stop(); + mpOnlineSpellingIdle->Stop(); } - delete mpOnlineSpellingTimer; - mpOnlineSpellingTimer = NULL; + delete mpOnlineSpellingIdle; + mpOnlineSpellingIdle = NULL; delete mpOnlineSpellingList; mpOnlineSpellingList = NULL; @@ -773,10 +773,10 @@ void SdDrawDocument::StartOnlineSpelling(bool bForceSpelling) } mpOnlineSpellingList->seekShape(0); - mpOnlineSpellingTimer = new Timer(); - mpOnlineSpellingTimer->SetTimeoutHdl( LINK(this, SdDrawDocument, OnlineSpellingHdl) ); - mpOnlineSpellingTimer->SetTimeout(250); - mpOnlineSpellingTimer->Start(); + mpOnlineSpellingIdle = new Idle(); + mpOnlineSpellingIdle->SetIdleHdl( LINK(this, SdDrawDocument, OnlineSpellingHdl) ); + mpOnlineSpellingIdle->SetPriority(VCL_IDLE_PRIORITY_LOWEST); + mpOnlineSpellingIdle->Start(); } } @@ -861,7 +861,7 @@ IMPL_LINK_NOARG(SdDrawDocument, OnlineSpellingHdl) } // Continue search - mpOnlineSpellingTimer->Start(); + mpOnlineSpellingIdle->Start(); } else { diff --git a/sd/source/ui/slidesorter/cache/SlsQueueProcessor.cxx b/sd/source/ui/slidesorter/cache/SlsQueueProcessor.cxx index cc6c78865427..1364bee980e5 100644 --- a/sd/source/ui/slidesorter/cache/SlsQueueProcessor.cxx +++ b/sd/source/ui/slidesorter/cache/SlsQueueProcessor.cxx @@ -32,7 +32,7 @@ QueueProcessor::QueueProcessor ( const bool bDoSuperSampling, const SharedCacheContext& rpCacheContext) : maMutex(), - maTimer(), + maIdle(), mnTimeBetweenHighPriorityRequests (10/*ms*/), mnTimeBetweenLowPriorityRequests (100/*ms*/), mnTimeBetweenRequestsWhenNotIdle (1000/*ms*/), @@ -58,8 +58,8 @@ QueueProcessor::QueueProcessor ( if (aTimeBetweenReqeusts.has<sal_Int32>()) aTimeBetweenReqeusts >>= mnTimeBetweenRequestsWhenNotIdle; - maTimer.SetTimeoutHdl (LINK(this,QueueProcessor,ProcessRequestHdl)); - maTimer.SetTimeout (mnTimeBetweenHighPriorityRequests); + maIdle.SetIdleHdl (LINK(this,QueueProcessor,ProcessRequestHdl)); + maIdle.SetPriority (VCL_IDLE_PRIORITY_REPAINT); } QueueProcessor::~QueueProcessor (void) @@ -70,20 +70,20 @@ void QueueProcessor::Start (int nPriorityClass) { if (mbIsPaused) return; - if ( ! maTimer.IsActive()) + if ( ! maIdle.IsActive()) { if (nPriorityClass == 0) - maTimer.SetTimeout (mnTimeBetweenHighPriorityRequests); + maIdle.SetPriority (VCL_IDLE_PRIORITY_REPAINT); else - maTimer.SetTimeout (mnTimeBetweenLowPriorityRequests); - maTimer.Start(); + maIdle.SetPriority (VCL_IDLE_PRIORITY_LOW); + maIdle.Start(); } } void QueueProcessor::Stop (void) { - if (maTimer.IsActive()) - maTimer.Stop(); + if (maIdle.IsActive()) + maIdle.Stop(); } void QueueProcessor::Pause (void) diff --git a/sd/source/ui/slidesorter/cache/SlsQueueProcessor.hxx b/sd/source/ui/slidesorter/cache/SlsQueueProcessor.hxx index 1e34261caa61..6993d5cdbf3c 100644 --- a/sd/source/ui/slidesorter/cache/SlsQueueProcessor.hxx +++ b/sd/source/ui/slidesorter/cache/SlsQueueProcessor.hxx @@ -92,7 +92,7 @@ private: */ ::osl::Mutex maMutex; - Timer maTimer; + Idle maIdle; DECL_LINK(ProcessRequestHdl, void *); sal_uInt32 mnTimeBetweenHighPriorityRequests; sal_uInt32 mnTimeBetweenLowPriorityRequests; |