summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sd/inc/drawdoc.hxx2
-rw-r--r--sd/source/core/drawdoc.cxx2
-rw-r--r--sd/source/core/drawdoc4.cxx18
-rw-r--r--sd/source/ui/slidesorter/cache/SlsQueueProcessor.cxx18
-rw-r--r--sd/source/ui/slidesorter/cache/SlsQueueProcessor.hxx2
-rw-r--r--svx/source/stbctrls/modctrl.cxx16
6 files changed, 26 insertions, 32 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;
diff --git a/svx/source/stbctrls/modctrl.cxx b/svx/source/stbctrls/modctrl.cxx
index cfbaede1589b..7899bcbc94ba 100644
--- a/svx/source/stbctrls/modctrl.cxx
+++ b/svx/source/stbctrls/modctrl.cxx
@@ -35,12 +35,6 @@ using ::com::sun::star::beans::PropertyValue;
SFX_IMPL_STATUSBAR_CONTROL(SvxModifyControl, SfxBoolItem);
-
-namespace
-{
-const unsigned _FEEDBACK_TIMEOUT = 3000;
-}
-
struct SvxModifyControl::ImplData
{
enum ModificationState
@@ -51,7 +45,7 @@ struct SvxModifyControl::ImplData
MODIFICATION_STATE_SIZE
};
- Timer maTimer;
+ Idle maIdle;
Image maImages[MODIFICATION_STATE_SIZE];
ModificationState mnModState;
@@ -63,7 +57,7 @@ struct SvxModifyControl::ImplData
maImages[MODIFICATION_STATE_YES] = Image(SVX_RES(RID_SVXBMP_DOC_MODIFIED_YES));
maImages[MODIFICATION_STATE_FEEDBACK] = Image(SVX_RES(RID_SVXBMP_DOC_MODIFIED_FEEDBACK));
- maTimer.SetTimeout(_FEEDBACK_TIMEOUT);
+ maIdle.SetPriority(VCL_IDLE_PRIORITY_LOWEST);
}
};
@@ -82,7 +76,7 @@ SvxModifyControl::SvxModifyControl( sal_uInt16 _nSlotId, sal_uInt16 _nId, Status
}
}
//#endif
- mpImpl->maTimer.SetTimeoutHdl( LINK(this, SvxModifyControl, OnTimer) );
+ mpImpl->maIdle.SetIdleHdl( LINK(this, SvxModifyControl, OnTimer) );
}
@@ -95,7 +89,7 @@ void SvxModifyControl::StateChanged( sal_uInt16, SfxItemState eState,
DBG_ASSERT( pState->ISA( SfxBoolItem ), "invalid item type" );
const SfxBoolItem* pItem = static_cast<const SfxBoolItem*>(pState);
- mpImpl->maTimer.Stop();
+ mpImpl->maIdle.Stop();
bool modified = pItem->GetValue();
bool start = ( !modified && mpImpl->mnModState == ImplData::MODIFICATION_STATE_YES); // should timer be started and feedback image displayed ?
@@ -108,7 +102,7 @@ void SvxModifyControl::StateChanged( sal_uInt16, SfxItemState eState,
GetStatusBar().SetQuickHelpText(GetId(), SVX_RESSTR(nResId));
if ( start )
- mpImpl->maTimer.Start();
+ mpImpl->maIdle.Start();
}