summaryrefslogtreecommitdiff
path: root/desktop/unx
diff options
context:
space:
mode:
authorTor Lillqvist <tml@iki.fi>2013-03-12 13:43:31 +0200
committerTor Lillqvist <tml@iki.fi>2013-03-12 13:47:33 +0200
commitecdd44e8f577e51e0208e9f421704a70041f1be8 (patch)
tree5dff0ddfe4796f698065d7346e0febff7882c778 /desktop/unx
parent0950bb5e9cb85265986435fe26906af9741f2854 (diff)
Use symbolic names instead of magic literal constants
We use tons of plain C-style #defines to give symbolic names to constants all over the place already, in headers used from C++ code only. So why in this rare case where the symbolic names for some constants actually would be needed from a C source file, too, here then we define them inside a C++ class? Change-Id: I45726fe42687779724c45a1e2b118cc7a1debcf1
Diffstat (limited to 'desktop/unx')
-rw-r--r--desktop/unx/source/officeloader/officeloader.cxx4
-rw-r--r--desktop/unx/source/start.c5
2 files changed, 5 insertions, 4 deletions
diff --git a/desktop/unx/source/officeloader/officeloader.cxx b/desktop/unx/source/officeloader/officeloader.cxx
index 53ab5a2f41c0..621555b301bf 100644
--- a/desktop/unx/source/officeloader/officeloader.cxx
+++ b/desktop/unx/source/officeloader/officeloader.cxx
@@ -22,7 +22,7 @@
#include <osl/process.h>
#include <rtl/ustring.hxx>
-#include "../../../source/inc/exithelper.hxx"
+#include "../../../source/inc/exithelper.h"
using namespace desktop;
using ::rtl::OUString;
@@ -83,7 +83,7 @@ SAL_IMPLEMENT_MAIN()
if ( info.Fields & osl_Process_EXITCODE )
{
exitcode = info.Code;
- bRestart = (ExitHelper::E_CRASH_WITH_RESTART == exitcode || ExitHelper::E_NORMAL_RESTART == exitcode);
+ bRestart = (EXITHELPER_CRASH_WITH_RESTART == exitcode || EXITHELPER_NORMAL_RESTART == exitcode);
}
else
break;
diff --git a/desktop/unx/source/start.c b/desktop/unx/source/start.c
index 9ec7341d7b9e..7366a9323a32 100644
--- a/desktop/unx/source/start.c
+++ b/desktop/unx/source/start.c
@@ -50,6 +50,7 @@
#include <sal/main.h>
#include "args.h"
+#include "exithelper.h"
#include "splashx.h"
#define PIPEDEFAULTPATH "/tmp"
@@ -927,14 +928,14 @@ SAL_IMPLEMENT_MAIN_WITH_ARGS( argc, argv )
status = child_get_exit_code(info);
g_pProcess = 0; // reset
switch (status) {
- case 79: // re-start with just -env: parameters
+ case EXITHELPER_CRASH_WITH_RESTART: // re-start with just -env: parameters
#if OSL_DEBUG_LEVEL > 0
fprintf (stderr, "oosplash: re-start with just -env: params !\n");
#endif
bRestart = sal_True;
bAllArgs = sal_False;
break;
- case 81: // re-start with all arguments
+ case EXITHELPER_NORMAL_RESTART: // re-start with all arguments
#if OSL_DEBUG_LEVEL > 0
fprintf (stderr, "oosplash: re-start with all params !\n");
#endif