summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--include/svtools/filechangedchecker.hxx2
-rw-r--r--svtools/source/graphic/grfcache.cxx7
-rw-r--r--svtools/source/graphic/grfcache.hxx2
-rw-r--r--svtools/source/misc/filechangedchecker.cxx18
4 files changed, 14 insertions, 15 deletions
diff --git a/include/svtools/filechangedchecker.hxx b/include/svtools/filechangedchecker.hxx
index acff32dd5211..cea8d16b7020 100644
--- a/include/svtools/filechangedchecker.hxx
+++ b/include/svtools/filechangedchecker.hxx
@@ -23,7 +23,7 @@
class SVT_DLLPUBLIC FileChangedChecker
{
private :
- Timer mTimer;
+ Idle mIdle;
OUString mFileName;
TimeValue mLastModTime;
::boost::function0<void> mpCallback;
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;
}