summaryrefslogtreecommitdiff
path: root/desktop
diff options
context:
space:
mode:
authorNoel Grandin <noelgrandin@gmail.com>2016-05-29 13:25:05 +0200
committerNoel Grandin <noelgrandin@gmail.com>2016-05-30 06:41:15 +0000
commit8ac4240efe975e9689e8dfc23dc3c1b88eee6dcf (patch)
tree0ec90ad5e02bd191e7e36c3f862d10a7ff4c559a /desktop
parent12aafb69fab3c7f91aa727ace19c1df7c53edd64 (diff)
Convert ApplicationEvent::Type to scoped enum
Change-Id: Ie65951d5fd1e155e3d3b36d4725792fb95fb9a52 Reviewed-on: https://gerrit.libreoffice.org/25608 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
Diffstat (limited to 'desktop')
-rw-r--r--desktop/source/app/app.cxx22
-rw-r--r--desktop/source/app/officeipcthread.cxx14
2 files changed, 18 insertions, 18 deletions
diff --git a/desktop/source/app/app.cxx b/desktop/source/app/app.cxx
index 90254147089d..38101efaf6b1 100644
--- a/desktop/source/app/app.cxx
+++ b/desktop/source/app/app.cxx
@@ -2285,12 +2285,12 @@ void Desktop::HandleAppEvent( const ApplicationEvent& rAppEvent )
{
switch ( rAppEvent.GetEvent() )
{
- case ApplicationEvent::TYPE_ACCEPT:
+ case ApplicationEvent::Type::Accept:
// every time an accept parameter is used we create an acceptor
// with the corresponding accept-string
createAcceptor(rAppEvent.GetStringData());
break;
- case ApplicationEvent::TYPE_APPEAR:
+ case ApplicationEvent::Type::Appear:
if ( !GetCommandLineArgs().IsInvisible() )
{
Reference< css::uno::XComponentContext > xContext = ::comphelper::getProcessComponentContext();
@@ -2336,13 +2336,13 @@ void Desktop::HandleAppEvent( const ApplicationEvent& rAppEvent )
}
}
break;
- case ApplicationEvent::TYPE_HELP:
+ case ApplicationEvent::Type::Help:
displayCmdlineHelp(rAppEvent.GetStringData());
break;
- case ApplicationEvent::TYPE_VERSION:
+ case ApplicationEvent::Type::Version:
displayVersion();
break;
- case ApplicationEvent::TYPE_OPEN:
+ case ApplicationEvent::Type::Open:
{
const CommandLineArgs& rCmdLine = GetCommandLineArgs();
if ( !rCmdLine.IsInvisible() && !rCmdLine.IsTerminateAfterInit() )
@@ -2355,11 +2355,11 @@ void Desktop::HandleAppEvent( const ApplicationEvent& rAppEvent )
}
}
break;
- case ApplicationEvent::TYPE_OPENHELPURL:
+ case ApplicationEvent::Type::OpenHelpUrl:
// start help for a specific URL
Application::GetHelp()->Start(rAppEvent.GetStringData(), nullptr);
break;
- case ApplicationEvent::TYPE_PRINT:
+ case ApplicationEvent::Type::Print:
{
const CommandLineArgs& rCmdLine = GetCommandLineArgs();
if ( !rCmdLine.IsInvisible() && !rCmdLine.IsTerminateAfterInit() )
@@ -2372,7 +2372,7 @@ void Desktop::HandleAppEvent( const ApplicationEvent& rAppEvent )
}
}
break;
- case ApplicationEvent::TYPE_PRIVATE_DOSHUTDOWN:
+ case ApplicationEvent::Type::PrivateDoShutdown:
{
Desktop* pD = dynamic_cast<Desktop*>(GetpApp());
OSL_ENSURE( pD, "no desktop ?!?" );
@@ -2380,7 +2380,7 @@ void Desktop::HandleAppEvent( const ApplicationEvent& rAppEvent )
pD->doShutdown();
}
break;
- case ApplicationEvent::TYPE_QUICKSTART:
+ case ApplicationEvent::Type::QuickStart:
if ( !GetCommandLineArgs().IsInvisible() )
{
// If the office has been started the second time its command line arguments are sent through a pipe
@@ -2392,7 +2392,7 @@ void Desktop::HandleAppEvent( const ApplicationEvent& rAppEvent )
css::office::Quickstart::createStart(xContext, true/*Quickstart*/);
}
break;
- case ApplicationEvent::TYPE_SHOWDIALOG:
+ case ApplicationEvent::Type::ShowDialog:
// ignore all errors here. It's clicking a menu entry only ...
// The user will try it again, in case nothing happens .-)
try
@@ -2419,7 +2419,7 @@ void Desktop::HandleAppEvent( const ApplicationEvent& rAppEvent )
catch(const css::uno::Exception&)
{}
break;
- case ApplicationEvent::TYPE_UNACCEPT:
+ case ApplicationEvent::Type::Unaccept:
// try to remove corresponding acceptor
destroyAcceptor(rAppEvent.GetStringData());
break;
diff --git a/desktop/source/app/officeipcthread.cxx b/desktop/source/app/officeipcthread.cxx
index c067a92555b9..31635e85cd74 100644
--- a/desktop/source/app/officeipcthread.cxx
+++ b/desktop/source/app/officeipcthread.cxx
@@ -959,13 +959,13 @@ bool IpcThread::process(OString const & arguments, bool * waitProcessed) {
if ( !aUnknown.isEmpty() || aCmdLineArgs->IsHelp() )
{
ApplicationEvent* pAppEvent =
- new ApplicationEvent(ApplicationEvent::TYPE_HELP, aUnknown);
+ new ApplicationEvent(ApplicationEvent::Type::Help, aUnknown);
ImplPostForeignAppEvent( pAppEvent );
}
else if ( aCmdLineArgs->IsVersion() )
{
ApplicationEvent* pAppEvent =
- new ApplicationEvent(ApplicationEvent::TYPE_VERSION);
+ new ApplicationEvent(ApplicationEvent::Type::Version);
ImplPostForeignAppEvent( pAppEvent );
}
else
@@ -976,7 +976,7 @@ bool IpcThread::process(OString const & arguments, bool * waitProcessed) {
{
// we have to use application event, because we have to start quickstart service in main thread!!
ApplicationEvent* pAppEvent =
- new ApplicationEvent(ApplicationEvent::TYPE_QUICKSTART);
+ new ApplicationEvent(ApplicationEvent::Type::QuickStart);
ImplPostForeignAppEvent( pAppEvent );
}
@@ -986,7 +986,7 @@ bool IpcThread::process(OString const & arguments, bool * waitProcessed) {
i != accept.end(); ++i)
{
ApplicationEvent* pAppEvent = new ApplicationEvent(
- ApplicationEvent::TYPE_ACCEPT, *i);
+ ApplicationEvent::Type::Accept, *i);
ImplPostForeignAppEvent( pAppEvent );
}
// handle acceptor removal
@@ -995,7 +995,7 @@ bool IpcThread::process(OString const & arguments, bool * waitProcessed) {
i != unaccept.end(); ++i)
{
ApplicationEvent* pAppEvent = new ApplicationEvent(
- ApplicationEvent::TYPE_UNACCEPT, *i);
+ ApplicationEvent::Type::Unaccept, *i);
ImplPostForeignAppEvent( pAppEvent );
}
@@ -1096,7 +1096,7 @@ bool IpcThread::process(OString const & arguments, bool * waitProcessed) {
aHelpURLBuffer.appendAscii("&System=WIN");
#endif
ApplicationEvent* pAppEvent = new ApplicationEvent(
- ApplicationEvent::TYPE_OPENHELPURL,
+ ApplicationEvent::Type::OpenHelpUrl,
aHelpURLBuffer.makeStringAndClear());
ImplPostForeignAppEvent( pAppEvent );
}
@@ -1133,7 +1133,7 @@ bool IpcThread::process(OString const & arguments, bool * waitProcessed) {
{
// no document was sent, just bring Office to front
ApplicationEvent* pAppEvent =
- new ApplicationEvent(ApplicationEvent::TYPE_APPEAR);
+ new ApplicationEvent(ApplicationEvent::Type::Appear);
ImplPostForeignAppEvent( pAppEvent );
}
}