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
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
50 additions
and
10 deletions
+50
-10
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
+29
-7
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)
...
@@ -98,8 +98,9 @@ void Desktop::RegisterServices(Reference< XComponentContext > const & context)
CommandLineArgs
&
rCmdLine
=
GetCommandLineArgs
();
CommandLineArgs
&
rCmdLine
=
GetCommandLineArgs
();
// Headless mode for FAT Office, auto cancels any dialogs that popup
// Headless mode for FAT Office, auto cancels any dialogs that popup
bool
bHeadlessMode
=
rCmdLine
.
IsHeadless
()
&&
!
rCmdLine
.
IsEventTesting
();
if
(
rCmdLine
.
IsEventTesting
())
if
(
bHeadlessMode
)
Application
::
EnableEventTestingMode
();
else
if
(
rCmdLine
.
IsHeadless
())
Application
::
EnableHeadlessMode
(
false
);
Application
::
EnableHeadlessMode
(
false
);
// read accept string from configuration
// 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()
...
@@ -231,7 +231,7 @@ sal_Bool SAL_CALL Desktop::terminate()
// try to close all open frames.
// try to close all open frames.
// Allow using of any UI ... because Desktop.terminate() was designed as UI functionality in the past.
// 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
);
bool
bFramesClosed
=
impl_closeFrames
(
bAllowUI
);
if
(
!
bFramesClosed
)
if
(
!
bFramesClosed
)
{
{
...
...
include/vcl/svapp.hxx
Dosyayı görüntüle @
b6b8ef25
...
@@ -1382,6 +1382,22 @@ public:
...
@@ -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
/** @name IME Status Window Control
*/
*/
///@{
///@{
...
...
vcl/inc/svdata.hxx
Dosyayı görüntüle @
b6b8ef25
...
@@ -162,6 +162,7 @@ struct ImplSVAppData
...
@@ -162,6 +162,7 @@ struct ImplSVAppData
int
mnEventTestLimit
;
int
mnEventTestLimit
;
DECL_STATIC_LINK_TYPED
(
ImplSVAppData
,
ImplQuitMsg
,
void
*
,
void
);
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
,
ImplEndAllDialogsMsg
,
void
*
,
void
);
DECL_STATIC_LINK_TYPED
(
ImplSVAppData
,
ImplEndAllPopupsMsg
,
void
*
,
void
);
DECL_STATIC_LINK_TYPED
(
ImplSVAppData
,
ImplEndAllPopupsMsg
,
void
*
,
void
);
DECL_STATIC_LINK_TYPED
(
ImplSVAppData
,
ImplVclEventTestingHdl
,
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 @@
...
@@ -65,7 +65,9 @@
#include "com/sun/star/uno/Reference.h"
#include "com/sun/star/uno/Reference.h"
#include "com/sun/star/awt/XToolkit.hpp"
#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/uno/XNamingService.hpp"
#include <com/sun/star/util/XModifiable.hpp>
#include "com/sun/star/lang/XMultiServiceFactory.hpp"
#include "com/sun/star/lang/XMultiServiceFactory.hpp"
#include "comphelper/solarmutex.hxx"
#include "comphelper/solarmutex.hxx"
#include "osl/process.h"
#include "osl/process.h"
...
@@ -359,7 +361,7 @@ void Application::EndAllPopups()
...
@@ -359,7 +361,7 @@ void Application::EndAllPopups()
namespace
namespace
{
{
bool
InjectKeyEvent
(
SvStream
&
rStream
)
VclPtr
<
vcl
::
Window
>
GetEventWindow
(
)
{
{
VclPtr
<
vcl
::
Window
>
xWin
(
Application
::
GetFirstTopLevelWindow
());
VclPtr
<
vcl
::
Window
>
xWin
(
Application
::
GetFirstTopLevelWindow
());
while
(
xWin
)
while
(
xWin
)
...
@@ -368,6 +370,12 @@ namespace
...
@@ -368,6 +370,12 @@ namespace
break
;
break
;
xWin
.
reset
(
Application
::
GetNextTopLevelWindow
(
xWin
));
xWin
.
reset
(
Application
::
GetNextTopLevelWindow
(
xWin
));
}
}
return
xWin
;
}
bool
InjectKeyEvent
(
SvStream
&
rStream
)
{
VclPtr
<
vcl
::
Window
>
xWin
(
GetEventWindow
());
if
(
!
xWin
)
if
(
!
xWin
)
return
false
;
return
false
;
...
@@ -398,6 +406,7 @@ namespace
...
@@ -398,6 +406,7 @@ namespace
{
{
Application
::
EndAllPopups
();
Application
::
EndAllPopups
();
Application
::
EndAllDialogs
();
Application
::
EndAllDialogs
();
Application
::
PostUserEvent
(
LINK
(
NULL
,
ImplSVAppData
,
ImplPrepareExitMsg
)
);
Application
::
Quit
();
Application
::
Quit
();
}
}
}
}
...
@@ -437,16 +446,19 @@ IMPL_STATIC_LINK_NOARG_TYPED( ImplSVAppData, ImplVclEventTestingHdl, void*, void
...
@@ -437,16 +446,19 @@ 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
()
void
Application
::
Execute
()
{
{
ImplSVData
*
pSVData
=
ImplGetSVData
();
ImplSVData
*
pSVData
=
ImplGetSVData
();
pSVData
->
maAppData
.
mbInAppExecute
=
true
;
pSVData
->
maAppData
.
mbInAppExecute
=
true
;
pSVData
->
maAppData
.
mbAppQuit
=
false
;
pSVData
->
maAppData
.
mbAppQuit
=
false
;
sal_uInt16
n
=
GetCommandLineParamCount
();
if
(
Application
::
IsEventTestingModeEnabled
())
for
(
sal_uInt16
i
=
0
;
i
!=
n
;
++
i
)
{
if
(
GetCommandLineParam
(
i
)
==
"--eventtesting"
)
{
{
pSVData
->
maAppData
.
mnEventTestLimit
=
50
;
pSVData
->
maAppData
.
mnEventTestLimit
=
50
;
pSVData
->
maAppData
.
mpEventTestingIdle
=
new
Idle
(
"eventtesting"
);
pSVData
->
maAppData
.
mpEventTestingIdle
=
new
Idle
(
"eventtesting"
);
...
@@ -454,8 +466,6 @@ void Application::Execute()
...
@@ -454,8 +466,6 @@ void Application::Execute()
pSVData
->
maAppData
.
mpEventTestingIdle
->
SetPriority
(
SchedulerPriority
::
MEDIUM
);
pSVData
->
maAppData
.
mpEventTestingIdle
->
SetPriority
(
SchedulerPriority
::
MEDIUM
);
pSVData
->
maAppData
.
mpEventTestInput
=
new
SvFileStream
(
"eventtesting"
,
StreamMode
::
READ
);
pSVData
->
maAppData
.
mpEventTestInput
=
new
SvFileStream
(
"eventtesting"
,
StreamMode
::
READ
);
pSVData
->
maAppData
.
mpEventTestingIdle
->
Start
();
pSVData
->
maAppData
.
mpEventTestingIdle
->
Start
();
break
;
}
}
}
while
(
!
pSVData
->
maAppData
.
mbAppQuit
)
while
(
!
pSVData
->
maAppData
.
mbAppQuit
)
...
@@ -1655,6 +1665,18 @@ void Application::EnableConsoleOnly()
...
@@ -1655,6 +1665,18 @@ void Application::EnableConsoleOnly()
bConsoleOnly
=
true
;
bConsoleOnly
=
true
;
}
}
static
bool
bEventTestingMode
=
false
;
bool
Application
::
IsEventTestingModeEnabled
()
{
return
bEventTestingMode
;
}
void
Application
::
EnableEventTestingMode
()
{
bEventTestingMode
=
true
;
}
void
Application
::
ShowNativeErrorBox
(
const
OUString
&
sTitle
,
void
Application
::
ShowNativeErrorBox
(
const
OUString
&
sTitle
,
const
OUString
&
sMessage
)
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