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
45935fc3
Kaydet (Commit)
45935fc3
authored
May 08, 2014
tarafından
Michael Meeks
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
quit after emitting all the events to allow valgrinding.
Change-Id: Ibee9d8f00008dd0a266db276772d48deb0bd9d18
üst
4ea70f09
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
5 deletions
+8
-5
debugevent.cxx
vcl/source/window/debugevent.cxx
+8
-5
No files found.
vcl/source/window/debugevent.cxx
Dosyayı görüntüle @
45935fc3
...
@@ -120,7 +120,7 @@ void DebugEventInjector::InjectMenuEvent()
...
@@ -120,7 +120,7 @@ void DebugEventInjector::InjectMenuEvent()
static
void
InitKeyEvent
(
SalKeyEvent
&
rKeyEvent
)
static
void
InitKeyEvent
(
SalKeyEvent
&
rKeyEvent
)
{
{
double
nRand
=
getRandom
();
double
nRand
=
getRandom
();
if
(
nRand
<
0.01
)
if
(
nRand
<
0.0
0
1
)
rKeyEvent
.
mnTime
=
getRandom
()
*
ULONG_MAX
;
rKeyEvent
.
mnTime
=
getRandom
()
*
ULONG_MAX
;
else
else
rKeyEvent
.
mnTime
=
Time
::
GetSystemTicks
();
rKeyEvent
.
mnTime
=
Time
::
GetSystemTicks
();
...
@@ -216,14 +216,15 @@ void DebugEventInjector::InjectKeyNavEdit()
...
@@ -216,14 +216,15 @@ void DebugEventInjector::InjectKeyNavEdit()
InitKeyEvent
(
aKeyEvent
);
InitKeyEvent
(
aKeyEvent
);
aKeyEvent
.
mnCode
=
nKey
;
aKeyEvent
.
mnCode
=
nKey
;
if
(
getRandom
()
<
0.1
0
)
// modifier
if
(
getRandom
()
<
0.1
5
)
// modifier
aKeyEvent
.
mnCode
|=
(
sal_uInt16
)(
getRandom
()
*
KEY_MODTYPE
)
&
KEY_MODTYPE
;
aKeyEvent
.
mnCode
|=
(
sal_uInt16
)(
getRandom
()
*
KEY_MODTYPE
)
&
KEY_MODTYPE
;
aKeyEvent
.
mnCharCode
=
0x0
;
// hopefully unused.
aKeyEvent
.
mnCharCode
=
0x0
;
// hopefully unused.
bool
bHandled
=
ImplWindowFrameProc
(
pWindow
,
NULL
,
SALEVENT_KEYINPUT
,
&
aKeyEvent
);
bool
bHandled
=
ImplWindowFrameProc
(
pWindow
,
NULL
,
SALEVENT_KEYINPUT
,
&
aKeyEvent
);
fprintf
(
stderr
,
"Injected edit / move key 0x%x -> %d win %p
\n
"
,
fprintf
(
stderr
,
"Injected edit / move key 0x%x -> %d win %p
\n
"
,
(
int
)
aKeyEvent
.
mnCode
,
(
int
)
bHandled
,
pWindow
);
(
int
)
aKeyEvent
.
mnCode
,
(
int
)
bHandled
,
pWindow
);
ImplWindowFrameProc
(
pWindow
,
NULL
,
SALEVENT_KEYUP
,
&
aKeyEvent
);
}
}
void
DebugEventInjector
::
Timeout
()
void
DebugEventInjector
::
Timeout
()
...
@@ -235,6 +236,8 @@ void DebugEventInjector::Timeout()
...
@@ -235,6 +236,8 @@ void DebugEventInjector::Timeout()
SetTimeout
(
1
);
SetTimeout
(
1
);
Start
();
Start
();
}
}
else
Application
::
Quit
();
}
}
DebugEventInjector
*
DebugEventInjector
::
getCreate
()
DebugEventInjector
*
DebugEventInjector
::
getCreate
()
...
...
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