summaryrefslogtreecommitdiff
path: root/svtools/source
diff options
context:
space:
mode:
authorTobias Madl <tobias.madl.dev@gmail.com>2014-11-04 11:51:18 +0000
committerTobias Madl <tobias.madl.dev@gmail.com>2014-12-09 12:34:50 +0000
commit379f61127e9851e91197007c706c24f479da2b38 (patch)
treecf9e1d3733741933712c8e555b16273e02d43045 /svtools/source
parent65a44185a66450aa5bc0c7bc6cdd1c2f0efdd672 (diff)
Changed Idle Timers. into Idle
Change-Id: I44e33e9e04893237578eb685516fa5ffe43e397f
Diffstat (limited to 'svtools/source')
-rw-r--r--svtools/source/graphic/grfcache.cxx7
-rw-r--r--svtools/source/graphic/grfcache.hxx2
-rw-r--r--svtools/source/misc/filechangedchecker.cxx18
3 files changed, 13 insertions, 14 deletions
diff --git a/svtools/source/graphic/grfcache.cxx b/svtools/source/graphic/grfcache.cxx
index ef025e336e5c..f5baadb3e3e5 100644
--- a/svtools/source/graphic/grfcache.cxx
+++ b/svtools/source/graphic/grfcache.cxx
@@ -32,7 +32,6 @@
#include <rtl/crc.h>
#include <boost/scoped_ptr.hpp>
-#define RELEASE_TIMEOUT 10000
#define MAX_BMP_EXTENT 4096
static const char aHexData[] = { '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'A', 'B', 'C', 'D', 'E', 'F' };
@@ -825,9 +824,9 @@ GraphicCache::GraphicCache( sal_uLong nDisplayCacheSize, sal_uLong nMaxObjDispla
mnMaxObjDisplaySize ( nMaxObjDisplayCacheSize ),
mnUsedDisplaySize ( 0UL )
{
- maReleaseTimer.SetTimeoutHdl( LINK( this, GraphicCache, ReleaseTimeoutHdl ) );
- maReleaseTimer.SetTimeout( RELEASE_TIMEOUT );
- maReleaseTimer.Start();
+ maReleaseIdle.SetIdleHdl( LINK( this, GraphicCache, ReleaseTimeoutHdl ) );
+ maReleaseIdle.SetPriority( VCL_IDLE_PRIORITY_LOWEST );
+ maReleaseIdle.Start();
}
GraphicCache::~GraphicCache()
diff --git a/svtools/source/graphic/grfcache.hxx b/svtools/source/graphic/grfcache.hxx
index ddb6f6b4eb4c..e8259e7a54c5 100644
--- a/svtools/source/graphic/grfcache.hxx
+++ b/svtools/source/graphic/grfcache.hxx
@@ -39,7 +39,7 @@ private:
typedef std::list< GraphicCacheEntry* > GraphicCacheEntryList;
typedef std::list< GraphicDisplayCacheEntry* > GraphicDisplayCacheEntryList;
- Timer maReleaseTimer;
+ Idle maReleaseIdle;
GraphicCacheEntryList maGraphicCache;
GraphicDisplayCacheEntryList maDisplayCache;
sal_uLong mnReleaseTimeoutSeconds;
diff --git a/svtools/source/misc/filechangedchecker.cxx b/svtools/source/misc/filechangedchecker.cxx
index 9d8a7133bec4..33d500815cd2 100644
--- a/svtools/source/misc/filechangedchecker.cxx
+++ b/svtools/source/misc/filechangedchecker.cxx
@@ -12,7 +12,7 @@
#include <svtools/filechangedchecker.hxx>
FileChangedChecker::FileChangedChecker(const OUString& rFilename, const ::boost::function0<void>& rCallback) :
- mTimer(),
+ mIdle(),
mFileName(rFilename),
mLastModTime(),
mpCallback(rCallback)
@@ -20,8 +20,8 @@ FileChangedChecker::FileChangedChecker(const OUString& rFilename, const ::boost:
// Get the curren last file modified Status
getCurrentModTime(mLastModTime);
- // associate the callback function for the timer
- mTimer.SetTimeoutHdl(LINK(this, FileChangedChecker, TimerHandler));
+ // associate the callback function for the Idle
+ mIdle.SetIdleHdl(LINK(this, FileChangedChecker, TimerHandler));
//start the timer
resetTimer();
@@ -29,12 +29,12 @@ FileChangedChecker::FileChangedChecker(const OUString& rFilename, const ::boost:
void FileChangedChecker::resetTimer()
{
- //Start the timer if its not active
- if(!mTimer.IsActive())
- mTimer.Start();
+ //Start the Idle if its not active
+ if(!mIdle.IsActive())
+ mIdle.Start();
- // Set a timeout of 3 seconds
- mTimer.SetTimeout(3000);
+ // Set lowest Priority
+ mIdle.SetPriority(VCL_IDLE_PRIORITY_LOWEST);
}
bool FileChangedChecker::getCurrentModTime(TimeValue& o_rValue) const
@@ -85,7 +85,7 @@ IMPL_LINK_NOARG(FileChangedChecker, TimerHandler)
mpCallback();
}
- // Reset the timer in any case
+ // Reset the Idle in any case
resetTimer();
return 0;
}