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
b6b8ef25
Kaydet (Commit)
b6b8ef25
authored
Eki 20, 2015
tarafından
Caolán McNamara
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
afl-eventtesting: shutdown cleaner to allow things to deregister
Change-Id: I2dc7c90f1f5a776bb0e6772d2b381116d28dd46f
üst
e9fc4129
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
56 additions
and
16 deletions
+56
-16
appinit.cxx
desktop/source/app/appinit.cxx
+3
-2
desktop.cxx
framework/source/services/desktop.cxx
+1
-1
svapp.hxx
include/vcl/svapp.hxx
+16
-0
svdata.hxx
vcl/inc/svdata.hxx
+1
-0
svapp.cxx
vcl/source/app/svapp.cxx
+35
-13
No files found.
desktop/source/app/appinit.cxx
Dosyayı görüntüle @
b6b8ef25
...
...
@@ -98,8 +98,9 @@ void Desktop::RegisterServices(Reference< XComponentContext > const & context)
CommandLineArgs
&
rCmdLine
=
GetCommandLineArgs
();
// Headless mode for FAT Office, auto cancels any dialogs that popup
bool
bHeadlessMode
=
rCmdLine
.
IsHeadless
()
&&
!
rCmdLine
.
IsEventTesting
();
if
(
bHeadlessMode
)
if
(
rCmdLine
.
IsEventTesting
())
Application
::
EnableEventTestingMode
();
else
if
(
rCmdLine
.
IsHeadless
())
Application
::
EnableHeadlessMode
(
false
);
// read accept string from configuration
...
...
framework/source/services/desktop.cxx
Dosyayı görüntüle @
b6b8ef25
...
...
@@ -231,7 +231,7 @@ sal_Bool SAL_CALL Desktop::terminate()
// try to close all open frames.
// Allow using of any UI ... because Desktop.terminate() was designed as UI functionality in the past.
bool
bAllowUI
=
true
;
bool
bAllowUI
=
!
Application
::
IsEventTestingModeEnabled
()
;
bool
bFramesClosed
=
impl_closeFrames
(
bAllowUI
);
if
(
!
bFramesClosed
)
{
...
...
include/vcl/svapp.hxx
Dosyayı görüntüle @
b6b8ef25
...
...
@@ -1382,6 +1382,22 @@ public:
///@}
/** @name Event Testing Mode
*/
/** Enables event testing mode.
*/
static
void
EnableEventTestingMode
();
/** Determines if event testing mode is enabled
@return True if event testing mode is enabled, false if not.
*/
static
bool
IsEventTestingModeEnabled
();
///@}
/** @name IME Status Window Control
*/
///@{
...
...
vcl/inc/svdata.hxx
Dosyayı görüntüle @
b6b8ef25
...
...
@@ -162,6 +162,7 @@ struct ImplSVAppData
int
mnEventTestLimit
;
DECL_STATIC_LINK_TYPED
(
ImplSVAppData
,
ImplQuitMsg
,
void
*
,
void
);
DECL_STATIC_LINK_TYPED
(
ImplSVAppData
,
ImplPrepareExitMsg
,
void
*
,
void
);
DECL_STATIC_LINK_TYPED
(
ImplSVAppData
,
ImplEndAllDialogsMsg
,
void
*
,
void
);
DECL_STATIC_LINK_TYPED
(
ImplSVAppData
,
ImplEndAllPopupsMsg
,
void
*
,
void
);
DECL_STATIC_LINK_TYPED
(
ImplSVAppData
,
ImplVclEventTestingHdl
,
void
*
,
void
);
...
...
vcl/source/app/svapp.cxx
Dosyayı görüntüle @
b6b8ef25
...
...
@@ -65,7 +65,9 @@
#include "com/sun/star/uno/Reference.h"
#include "com/sun/star/awt/XToolkit.hpp"
#include <com/sun/star/frame/Desktop.hpp>
#include "com/sun/star/uno/XNamingService.hpp"
#include <com/sun/star/util/XModifiable.hpp>
#include "com/sun/star/lang/XMultiServiceFactory.hpp"
#include "comphelper/solarmutex.hxx"
#include "osl/process.h"
...
...
@@ -359,7 +361,7 @@ void Application::EndAllPopups()
namespace
{
bool
InjectKeyEvent
(
SvStream
&
rStream
)
VclPtr
<
vcl
::
Window
>
GetEventWindow
(
)
{
VclPtr
<
vcl
::
Window
>
xWin
(
Application
::
GetFirstTopLevelWindow
());
while
(
xWin
)
...
...
@@ -368,6 +370,12 @@ namespace
break
;
xWin
.
reset
(
Application
::
GetNextTopLevelWindow
(
xWin
));
}
return
xWin
;
}
bool
InjectKeyEvent
(
SvStream
&
rStream
)
{
VclPtr
<
vcl
::
Window
>
xWin
(
GetEventWindow
());
if
(
!
xWin
)
return
false
;
...
...
@@ -398,6 +406,7 @@ namespace
{
Application
::
EndAllPopups
();
Application
::
EndAllDialogs
();
Application
::
PostUserEvent
(
LINK
(
NULL
,
ImplSVAppData
,
ImplPrepareExitMsg
)
);
Application
::
Quit
();
}
}
...
...
@@ -437,25 +446,26 @@ IMPL_STATIC_LINK_NOARG_TYPED( ImplSVAppData, ImplVclEventTestingHdl, void*, void
}
}
IMPL_STATIC_LINK_NOARG_TYPED
(
ImplSVAppData
,
ImplPrepareExitMsg
,
void
*
,
void
)
{
//now close top level frames
(
void
)
GetpApp
()
->
QueryExit
();
}
void
Application
::
Execute
()
{
ImplSVData
*
pSVData
=
ImplGetSVData
();
pSVData
->
maAppData
.
mbInAppExecute
=
true
;
pSVData
->
maAppData
.
mbAppQuit
=
false
;
sal_uInt16
n
=
GetCommandLineParamCount
();
for
(
sal_uInt16
i
=
0
;
i
!=
n
;
++
i
)
if
(
Application
::
IsEventTestingModeEnabled
())
{
if
(
GetCommandLineParam
(
i
)
==
"--eventtesting"
)
{
pSVData
->
maAppData
.
mnEventTestLimit
=
50
;
pSVData
->
maAppData
.
mpEventTestingIdle
=
new
Idle
(
"eventtesting"
);
pSVData
->
maAppData
.
mpEventTestingIdle
->
SetIdleHdl
(
LINK
(
&
(
pSVData
->
maAppData
),
ImplSVAppData
,
VclEventTestingHdl
));
pSVData
->
maAppData
.
mpEventTestingIdle
->
SetPriority
(
SchedulerPriority
::
MEDIUM
);
pSVData
->
maAppData
.
mpEventTestInput
=
new
SvFileStream
(
"eventtesting"
,
StreamMode
::
READ
);
pSVData
->
maAppData
.
mpEventTestingIdle
->
Start
();
break
;
}
pSVData
->
maAppData
.
mnEventTestLimit
=
50
;
pSVData
->
maAppData
.
mpEventTestingIdle
=
new
Idle
(
"eventtesting"
);
pSVData
->
maAppData
.
mpEventTestingIdle
->
SetIdleHdl
(
LINK
(
&
(
pSVData
->
maAppData
),
ImplSVAppData
,
VclEventTestingHdl
));
pSVData
->
maAppData
.
mpEventTestingIdle
->
SetPriority
(
SchedulerPriority
::
MEDIUM
);
pSVData
->
maAppData
.
mpEventTestInput
=
new
SvFileStream
(
"eventtesting"
,
StreamMode
::
READ
);
pSVData
->
maAppData
.
mpEventTestingIdle
->
Start
();
}
while
(
!
pSVData
->
maAppData
.
mbAppQuit
)
...
...
@@ -1655,6 +1665,18 @@ void Application::EnableConsoleOnly()
bConsoleOnly
=
true
;
}
static
bool
bEventTestingMode
=
false
;
bool
Application
::
IsEventTestingModeEnabled
()
{
return
bEventTestingMode
;
}
void
Application
::
EnableEventTestingMode
()
{
bEventTestingMode
=
true
;
}
void
Application
::
ShowNativeErrorBox
(
const
OUString
&
sTitle
,
const
OUString
&
sMessage
)
{
...
...
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