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
db5d4214
Kaydet (Commit)
db5d4214
authored
Eki 25, 2012
tarafından
David Tardon
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
always set event description
Change-Id: I8d83c0d65fff0b0d3d08f32aa3d5c0bb5e7e9c8a
üst
112b481a
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
13 additions
and
46 deletions
+13
-46
eventqueue.cxx
slideshow/source/engine/eventqueue.cxx
+0
-14
rehearsetimingsactivity.cxx
slideshow/source/engine/rehearsetimingsactivity.cxx
+1
-3
wakeupevent.cxx
slideshow/source/engine/wakeupevent.cxx
+1
-3
delayevent.hxx
slideshow/source/inc/delayevent.hxx
+8
-17
event.hxx
slideshow/source/inc/event.hxx
+2
-6
interruptabledelayevent.hxx
slideshow/source/inc/interruptabledelayevent.hxx
+1
-3
No files found.
slideshow/source/engine/eventqueue.cxx
Dosyayı görüntüle @
db5d4214
...
...
@@ -91,13 +91,11 @@ namespace slideshow
{
::
osl
::
MutexGuard
aGuard
(
maMutex
);
#if OSL_DEBUG_LEVEL > 1
SAL_INFO
(
"slideshow.eventqueue"
,
"adding event
\"
"
<<
rEvent
->
GetDescription
()
<<
"
\"
["
<<
rEvent
.
get
()
<<
"] at "
<<
mpTimer
->
getElapsedTime
()
<<
" with delay "
<<
rEvent
->
getActivationTime
(
0.0
)
);
#endif
ENSURE_OR_RETURN_FALSE
(
rEvent
,
"EventQueue::addEvent: event ptr NULL"
);
...
...
@@ -119,13 +117,11 @@ namespace slideshow
{
::
osl
::
MutexGuard
aGuard
(
maMutex
);
#if OSL_DEBUG_LEVEL > 1
SAL_INFO
(
"slideshow.eventqueue"
,
"adding event
\"
"
<<
rEvent
->
GetDescription
()
<<
"
\"
["
<<
rEvent
.
get
()
<<
"] for the next round at "
<<
mpTimer
->
getElapsedTime
()
<<
" with delay "
<<
rEvent
->
getActivationTime
(
0.0
)
);
#endif
ENSURE_OR_RETURN_FALSE
(
rEvent
.
get
()
!=
NULL
,
"EventQueue::addEvent: event ptr NULL"
);
...
...
@@ -139,13 +135,11 @@ namespace slideshow
{
::
osl
::
MutexGuard
aGuard
(
maMutex
);
#if OSL_DEBUG_LEVEL > 1
SAL_INFO
(
"slideshow.eventqueue"
,
"adding event
\"
"
<<
rpEvent
->
GetDescription
()
<<
"
\"
["
<<
rpEvent
.
get
()
<<
"] for execution when the queue is empty at "
<<
mpTimer
->
getElapsedTime
()
<<
" with delay "
<<
rpEvent
->
getActivationTime
(
0.0
)
);
#endif
ENSURE_OR_RETURN_FALSE
(
rpEvent
.
get
()
!=
NULL
,
...
...
@@ -222,20 +216,12 @@ namespace slideshow
{
try
{
#if OSL_DEBUG_LEVEL > 0
VERBOSE_TRACE
(
"Firing event: unknown (0x%X), timeout was: %f"
,
event
.
pEvent
.
get
(),
event
.
pEvent
->
getActivationTime
(
0.0
)
);
#endif
#if OSL_DEBUG_LEVEL > 1
SAL_INFO
(
"slideshow.eventqueue"
,
"firing event
\"
"
<<
event
.
pEvent
->
GetDescription
()
<<
"
\"
["
<<
event
.
pEvent
.
get
()
<<
"] at "
<<
mpTimer
->
getElapsedTime
()
<<
" with delay "
<<
event
.
pEvent
->
getActivationTime
(
0.0
)
);
#endif
event
.
pEvent
->
fire
();
SAL_INFO
(
"slideshow.eventqueue"
,
"event
\"
"
<<
event
.
pEvent
->
GetDescription
()
...
...
slideshow/source/engine/rehearsetimingsactivity.cxx
Dosyayı görüntüle @
db5d4214
...
...
@@ -60,9 +60,7 @@ public:
WakeupEvent
(
boost
::
shared_ptr
<
::
canvas
::
tools
::
ElapsedTime
>
const
&
pTimeBase
,
ActivitySharedPtr
const
&
rActivity
,
ActivitiesQueue
&
rActivityQueue
)
:
#if OSL_DEBUG_LEVEL > 1
Event
(
::
rtl
::
OUString
(
"WakeupEvent"
)),
#endif
Event
(
"WakeupEvent"
),
maTimer
(
pTimeBase
),
mnNextTime
(
0.0
),
mpActivity
(
rActivity
),
...
...
slideshow/source/engine/wakeupevent.cxx
Dosyayı görüntüle @
db5d4214
...
...
@@ -32,9 +32,7 @@ namespace slideshow
WakeupEvent
::
WakeupEvent
(
boost
::
shared_ptr
<
canvas
::
tools
::
ElapsedTime
>
const
&
pTimeBase
,
ActivitiesQueue
&
rActivityQueue
)
:
#if OSL_DEBUG_LEVEL > 1
Event
(
::
rtl
::
OUString
(
"WakeupEvent"
)),
#endif
Event
(
"WakeupEvent"
),
maTimer
(
pTimeBase
),
mnNextTime
(
0.0
),
mpActivity
(),
...
...
slideshow/source/inc/delayevent.hxx
Dosyayı görüntüle @
db5d4214
...
...
@@ -37,22 +37,14 @@ public:
template
<
typename
FuncT
>
Delay
(
FuncT
const
&
func
,
double
nTimeout
#if OSL_DEBUG_LEVEL > 1
,
const
::
rtl
::
OUString
&
rsDescription
)
:
Event
(
rsDescription
),
#else
)
:
#endif
mnTimeout
(
nTimeout
),
maFunc
(
func
),
mbWasFired
(
false
)
{}
Delay
(
const
boost
::
function0
<
void
>&
func
,
double
nTimeout
#if OSL_DEBUG_LEVEL > 1
,
const
::
rtl
::
OUString
&
rsDescription
)
:
Event
(
rsDescription
),
#else
)
:
#endif
mnTimeout
(
nTimeout
),
maFunc
(
func
),
mbWasFired
(
false
)
{}
...
...
@@ -83,9 +75,9 @@ private:
@return generated delay event
*/
template
<
typename
FuncT
>
inline
EventSharedPtr
makeDelay_
(
FuncT
const
&
func
,
double
nTimeout
)
inline
EventSharedPtr
makeDelay_
(
FuncT
const
&
func
,
double
nTimeout
,
rtl
::
OUString
const
&
rsDescription
)
{
return
EventSharedPtr
(
new
Delay
(
func
,
nTimeout
)
);
return
EventSharedPtr
(
new
Delay
(
func
,
nTimeout
,
rsDescription
)
);
}
/** Generate immediate event
...
...
@@ -96,15 +88,14 @@ inline EventSharedPtr makeDelay_( FuncT const& func, double nTimeout )
@return generated immediate event.
*/
template
<
typename
FuncT
>
inline
EventSharedPtr
makeEvent_
(
FuncT
const
&
func
)
inline
EventSharedPtr
makeEvent_
(
FuncT
const
&
func
,
rtl
::
OUString
const
&
rsDescription
)
{
return
EventSharedPtr
(
new
Delay
(
func
,
0.0
)
);
return
EventSharedPtr
(
new
Delay
(
func
,
0.0
,
rsDescription
)
);
}
// Strip away description.
#define makeDelay(f, t, d) makeDelay_(f, t)
#define makeEvent(f, d) makeEvent_(f)
#define makeDelay(f, t, d) makeDelay_(f, t, d)
#define makeEvent(f, d) makeEvent_(f, d)
#else // OSL_DEBUG_LEVEL > 1
...
...
@@ -135,10 +126,10 @@ inline EventSharedPtr makeDelay_(
#define makeDelay(f, t, d) makeDelay_(f, t, \
BOOST_CURRENT_FUNCTION, __FILE__, __LINE__, \
::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(d))
)
d
)
#define makeEvent(f, d) makeDelay_(f, 0.0, \
BOOST_CURRENT_FUNCTION, __FILE__, __LINE__, \
::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(d))
)
d
)
#endif // OSL_DEBUG_LEVEL <= 1
...
...
slideshow/source/inc/event.hxx
Dosyayı görüntüle @
db5d4214
...
...
@@ -32,9 +32,7 @@ namespace internal {
class
Event
:
public
Disposable
{
public
:
#if OSL_DEBUG_LEVEL > 1
Event
(
const
::
rtl
::
OUString
&
rsDescription
)
:
msDescription
(
rsDescription
)
{};
#endif
Event
(
const
::
rtl
::
OUString
&
rsDescription
)
:
msDescription
(
rsDescription
)
{}
/** Execute the event.
...
...
@@ -66,12 +64,10 @@ public:
*/
virtual
double
getActivationTime
(
double
nCurrentTime
)
const
=
0
;
#if OSL_DEBUG_LEVEL > 1
::
rtl
::
OUString
GetDescription
(
void
)
const
{
return
msDescription
;
}
const
::
rtl
::
OUString
&
GetDescription
(
void
)
const
{
return
msDescription
;
}
private
:
const
::
rtl
::
OUString
msDescription
;
#endif
};
typedef
::
boost
::
shared_ptr
<
Event
>
EventSharedPtr
;
...
...
slideshow/source/inc/interruptabledelayevent.hxx
Dosyayı görüntüle @
db5d4214
...
...
@@ -38,9 +38,7 @@ namespace slideshow
public
:
DelayFacade
(
const
EventSharedPtr
&
rEvent
,
double
nTimeout
)
:
#if OSL_DEBUG_LEVEL > 1
Event
(
::
rtl
::
OUString
(
"DelayFacade"
)),
#endif
Event
(
"DelayFacade"
),
mpEvent
(
rEvent
),
mnTimeout
(
nTimeout
)
{
...
...
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