summaryrefslogtreecommitdiff
path: root/sc/inc
diff options
context:
space:
mode:
authorMatúš Kukan <matus.kukan@gmail.com>2013-10-31 10:56:15 +0100
committerMatúš Kukan <matus.kukan@gmail.com>2013-11-13 10:33:17 +0100
commitf7d01def98cf542172e0f1dcebb9f35964c5c1ee (patch)
tree6b07a234bf3420981b583314a058a171e6be5ff5 /sc/inc
parent4753b9a2435a6ddab54c99aee12c52b25bad7c06 (diff)
ScRefreshTimer: implement methods in source file
And don't export any of them. Change-Id: Ib29eec6765f0fe71c9c7fbc82b0531f562b6404a
Diffstat (limited to 'sc/inc')
-rw-r--r--sc/inc/refreshtimer.hxx72
1 files changed, 18 insertions, 54 deletions
diff --git a/sc/inc/refreshtimer.hxx b/sc/inc/refreshtimer.hxx
index bbc5a9f1da63..ff8fb12f225c 100644
--- a/sc/inc/refreshtimer.hxx
+++ b/sc/inc/refreshtimer.hxx
@@ -22,80 +22,44 @@
#include <vcl/timer.hxx>
#include <osl/mutex.hxx>
-#include "scdllapi.h"
class ScRefreshTimerControl
{
-private:
- ::osl::Mutex aMutex;
- sal_uInt16 nBlockRefresh;
+ ::osl::Mutex aMutex;
+ sal_uInt16 nBlockRefresh;
public:
ScRefreshTimerControl() : nBlockRefresh(0) {}
-
- void SetAllowRefresh( sal_Bool b )
- {
- if ( b && nBlockRefresh )
- --nBlockRefresh;
- else if ( !b && nBlockRefresh < (sal_uInt16)(~0) )
- ++nBlockRefresh;
- }
-
+ void SetAllowRefresh( sal_Bool b );
sal_Bool IsRefreshAllowed() const { return !nBlockRefresh; }
-
::osl::Mutex& GetMutex() { return aMutex; }
};
class ScRefreshTimer : public AutoTimer
{
-private:
ScRefreshTimerControl * const * ppControl;
- void Start()
- {
- if ( GetTimeout() )
- AutoTimer::Start();
- }
-
public:
- ScRefreshTimer() : ppControl(0) { SetTimeout( 0 ); }
-
- ScRefreshTimer( sal_uLong nSeconds ) : ppControl(0)
- {
- SetTimeout( nSeconds * 1000 );
- Start();
- }
-
- ScRefreshTimer( const ScRefreshTimer& r ) : AutoTimer( r ), ppControl(0) {}
-
+ ScRefreshTimer();
+ ScRefreshTimer( sal_uLong nSeconds );
+ ScRefreshTimer( const ScRefreshTimer& r );
virtual ~ScRefreshTimer();
- ScRefreshTimer& operator=( const ScRefreshTimer& r )
- {
- SetRefreshControl(0);
- AutoTimer::operator=( r );
- return *this;
- }
-
- sal_Bool operator==( const ScRefreshTimer& r ) const
- { return GetTimeout() == r.GetTimeout(); }
-
- sal_Bool operator!=( const ScRefreshTimer& r ) const
- { return !ScRefreshTimer::operator==( r ); }
-
- void StartRefreshTimer() { Start(); }
+ ScRefreshTimer& operator=( const ScRefreshTimer& r );
+ sal_Bool operator==( const ScRefreshTimer& r ) const;
+ sal_Bool operator!=( const ScRefreshTimer& r ) const;
- void SetRefreshControl( ScRefreshTimerControl * const * pp ) { ppControl = pp; }
+ void StartRefreshTimer();
+ void SetRefreshControl( ScRefreshTimerControl * const * pp );
+ void SetRefreshHandler( const Link& rLink );
+ sal_uLong GetRefreshDelay() const;
+ void StopRefreshTimer();
- void SetRefreshHandler( const Link& rLink ) { SetTimeoutHdl( rLink ); }
+ virtual void SetRefreshDelay( sal_uLong nSeconds );
+ virtual void Timeout();
- sal_uLong GetRefreshDelay() const { return GetTimeout() / 1000; }
-
- void StopRefreshTimer() { Stop(); }
-
- SC_DLLPUBLIC virtual void SetRefreshDelay( sal_uLong nSeconds );
-
- SC_DLLPUBLIC virtual void Timeout();
+private:
+ void Start();
};
#endif // SC_REFRESHTIMER_HXX