Skip to content
Projeler
Gruplar
Parçacıklar
Yardım
Yükleniyor...
Oturum aç / Kaydol
Gezinmeyi değiştir
C
core
Proje
Proje
Ayrıntılar
Etkinlik
Cycle Analytics
Depo (repository)
Depo (repository)
Dosyalar
Kayıtlar (commit)
Dallar (branch)
Etiketler
Katkıda bulunanlar
Grafik
Karşılaştır
Grafikler
Konular (issue)
0
Konular (issue)
0
Liste
Pano
Etiketler
Kilometre Taşları
Birleştirme (merge) Talepleri
0
Birleştirme (merge) Talepleri
0
CI / CD
CI / CD
İş akışları (pipeline)
İşler
Zamanlamalar
Grafikler
Paketler
Paketler
Wiki
Wiki
Parçacıklar
Parçacıklar
Üyeler
Üyeler
Collapse sidebar
Close sidebar
Etkinlik
Grafik
Grafikler
Yeni bir konu (issue) oluştur
İşler
Kayıtlar (commit)
Konu (issue) Panoları
Kenar çubuğunu aç
LibreOffice
core
Commits
f384496d
Kaydet (Commit)
f384496d
authored
Şub 26, 2015
tarafından
Tobias Madl
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Timer to idle
Change-Id: Iaac3618501b4e382afe8d183836a370eea699af4
üst
f33d6800
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
16 additions
and
16 deletions
+16
-16
DocumentTimerManager.cxx
sw/source/core/doc/DocumentTimerManager.cxx
+13
-13
DocumentTimerManager.hxx
sw/source/core/inc/DocumentTimerManager.hxx
+3
-3
No files found.
sw/source/core/doc/DocumentTimerManager.cxx
Dosyayı görüntüle @
f384496d
...
...
@@ -41,44 +41,44 @@ DocumentTimerManager::DocumentTimerManager( SwDoc& i_rSwdoc ) : m_rDoc( i_rSwdoc
mbStartIdleTimer
(
false
),
mIdleBlockCount
(
0
)
{
maIdle
Timer
.
SetTimeout
(
600
);
maIdle
Timer
.
SetTimeout
Hdl
(
LINK
(
this
,
DocumentTimerManager
,
DoIdleJobs
)
);
maIdle
.
SetPriority
(
SchedulerPriority
::
LOWEST
);
maIdle
.
SetIdle
Hdl
(
LINK
(
this
,
DocumentTimerManager
,
DoIdleJobs
)
);
}
void
DocumentTimerManager
::
StartIdling
()
{
mbStartIdleTimer
=
true
;
if
(
!
mIdleBlockCount
)
maIdle
Timer
.
Start
();
maIdle
.
Start
();
}
void
DocumentTimerManager
::
StopIdling
()
{
mbStartIdleTimer
=
false
;
maIdle
Timer
.
Stop
();
maIdle
.
Stop
();
}
void
DocumentTimerManager
::
BlockIdling
()
{
maIdle
Timer
.
Stop
();
maIdle
.
Stop
();
++
mIdleBlockCount
;
}
void
DocumentTimerManager
::
UnblockIdling
()
{
--
mIdleBlockCount
;
if
(
!
mIdleBlockCount
&&
mbStartIdleTimer
&&
!
maIdle
Timer
.
IsActive
()
)
maIdle
Timer
.
Start
();
if
(
!
mIdleBlockCount
&&
mbStartIdleTimer
&&
!
maIdle
.
IsActive
()
)
maIdle
.
Start
();
}
void
DocumentTimerManager
::
StartBackgroundJobs
()
{
// Trigger DoIdleJobs(), asynchronously.
if
(
!
maIdle
Timer
.
IsActive
())
//fdo#73165 if the timer is already running don't restart from 0
maIdle
Timer
.
Start
();
if
(
!
maIdle
.
IsActive
())
//fdo#73165 if the timer is already running don't restart from 0
maIdle
.
Start
();
}
IMPL_LINK
(
DocumentTimerManager
,
DoIdleJobs
,
Timer
*
,
pTimer
)
IMPL_LINK
(
DocumentTimerManager
,
DoIdleJobs
,
Idle
*
,
pIdle
)
{
#ifdef TIMELOG
static
::
rtl
::
Logfile
*
pModLogFile
=
0
;
...
...
@@ -95,7 +95,7 @@ IMPL_LINK( DocumentTimerManager, DoIdleJobs, Timer*, pTimer )
{
if
(
rSh
.
ActionPend
()
)
{
p
Timer
->
Start
();
p
Idle
->
Start
();
return
0
;
}
}
...
...
@@ -119,7 +119,7 @@ IMPL_LINK( DocumentTimerManager, DoIdleJobs, Timer*, pTimer )
(
*
pLayIter
)
->
GetCurrShell
()
->
LayoutIdle
();
// Defer the remaining work.
p
Timer
->
Start
();
p
Idle
->
Start
();
return
0
;
}
}
...
...
@@ -135,7 +135,7 @@ IMPL_LINK( DocumentTimerManager, DoIdleJobs, Timer*, pTimer )
if
(
m_rDoc
.
getIDocumentFieldsAccess
().
GetUpdtFlds
().
IsInUpdateFlds
()
||
m_rDoc
.
getIDocumentFieldsAccess
().
IsExpFldsLocked
()
)
{
p
Timer
->
Start
();
p
Idle
->
Start
();
return
0
;
}
...
...
sw/source/core/inc/DocumentTimerManager.hxx
Dosyayı görüntüle @
f384496d
...
...
@@ -23,7 +23,7 @@
#include <IDocumentTimerAccess.hxx>
#include <boost/utility.hpp>
#include <vcl/
timer
.hxx>
#include <vcl/
idle
.hxx>
#include <sal/types.h>
#include <tools/link.hxx>
...
...
@@ -50,7 +50,7 @@ public:
void
StartBackgroundJobs
()
SAL_OVERRIDE
;
// Our own 'IdleTimer' calls the following method
DECL_LINK
(
DoIdleJobs
,
Timer
*
);
DECL_LINK
(
DoIdleJobs
,
Idle
*
);
virtual
~
DocumentTimerManager
();
...
...
@@ -60,7 +60,7 @@ private:
bool
mbStartIdleTimer
;
//< idle timer mode start/stop
sal_Int32
mIdleBlockCount
;
Timer
maIdleTimer
;
Idle
maIdle
;
};
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment