summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--codemaker/source/cppumaker/cppuoptions.cxx12
-rw-r--r--codemaker/source/javamaker/javaoptions.cxx12
-rw-r--r--idlc/source/options.cxx12
-rw-r--r--registry/tools/regcompare.cxx6
4 files changed, 34 insertions, 8 deletions
diff --git a/codemaker/source/cppumaker/cppuoptions.cxx b/codemaker/source/cppumaker/cppuoptions.cxx
index 20ed3683a8bc..da8ce2089c6e 100644
--- a/codemaker/source/cppumaker/cppuoptions.cxx
+++ b/codemaker/source/cppumaker/cppuoptions.cxx
@@ -34,6 +34,12 @@
#include "osl/thread.h"
#include "osl/process.h"
+#ifdef SAL_UNX
+#define SEPARATOR '/'
+#else
+#define SEPARATOR '\\'
+#endif
+
using namespace rtl;
sal_Bool CppuOptions::initOptions(int ac, char* av[], sal_Bool bCmdFile)
@@ -46,7 +52,9 @@ sal_Bool CppuOptions::initOptions(int ac, char* av[], sal_Bool bCmdFile)
{
bCmdFile = sal_True;
- m_program = av[0];
+ OString name(av[0]);
+ sal_Int32 index = name.lastIndexOf(SEPARATOR);
+ m_program = name.copy((index > 0 ? index+1 : 0));
if (ac < 2)
{
@@ -338,7 +346,7 @@ OString CppuOptions::prepareHelp()
help += " necessary information is available for bridging the type in UNO.\n";
help += " -G = generate only target files which does not exists.\n";
help += " -Gc = generate only target files which content will be changed.\n";
- help += " -X<file> = extra types which will not be taken into account for generation.\n";
+ help += " -X<file> = extra types which will not be taken into account for generation.\n\n";
help += prepareVersion();
return help;
diff --git a/codemaker/source/javamaker/javaoptions.cxx b/codemaker/source/javamaker/javaoptions.cxx
index 5daedef06089..58235bd32616 100644
--- a/codemaker/source/javamaker/javaoptions.cxx
+++ b/codemaker/source/javamaker/javaoptions.cxx
@@ -33,6 +33,12 @@
#include "osl/process.h"
#include "osl/thread.h"
+#ifdef SAL_UNX
+#define SEPARATOR '/'
+#else
+#define SEPARATOR '\\'
+#endif
+
using namespace rtl;
sal_Bool JavaOptions::initOptions(int ac, char* av[], sal_Bool bCmdFile)
@@ -45,7 +51,9 @@ sal_Bool JavaOptions::initOptions(int ac, char* av[], sal_Bool bCmdFile)
{
bCmdFile = sal_True;
- m_program = av[0];
+ OString name(av[0]);
+ sal_Int32 index = name.lastIndexOf(SEPARATOR);
+ m_program = name.copy((index > 0 ? index+1 : 0));
if (ac < 2)
{
@@ -282,7 +290,7 @@ OString JavaOptions::prepareHelp()
help += " -nD = no dependent types are generated.\n";
help += " -G = generate only target files which does not exists.\n";
help += " -Gc = generate only target files which content will be changed.\n";
- help += " -X<file> = extra types which will not be taken into account for generation.\n";
+ help += " -X<file> = extra types which will not be taken into account for generation.\n\n";
help += prepareVersion();
return help;
diff --git a/idlc/source/options.cxx b/idlc/source/options.cxx
index a115a2262fe1..edf8648c31c3 100644
--- a/idlc/source/options.cxx
+++ b/idlc/source/options.cxx
@@ -32,6 +32,12 @@
#include /*MSVC trouble: <cstring>*/ <string.h>
#include <idlc/options.hxx>
+#ifdef SAL_UNX
+#define SEPARATOR '/'
+#else
+#define SEPARATOR '\\'
+#endif
+
using namespace rtl;
Options::Options(): m_stdin(false), m_verbose(false), m_quiet(false)
@@ -52,7 +58,9 @@ sal_Bool Options::initOptions(int ac, char* av[], sal_Bool bCmdFile)
{
bCmdFile = sal_True;
- m_program = av[0];
+ OString name(av[0]);
+ sal_Int32 index = name.lastIndexOf(SEPARATOR);
+ m_program = name.copy((index > 0 ? index+1 : 0));
if (ac < 2)
{
@@ -335,7 +343,7 @@ OString Options::prepareHelp()
help += " requirements.\n";
help += " -w = display warning messages.\n";
help += " -we = treat warnings as errors.\n";
- help += " -h|-? = print this help message and exit.\n";
+ help += " -h|-? = print this help message and exit.\n\n";
help += prepareVersion();
return help;
diff --git a/registry/tools/regcompare.cxx b/registry/tools/regcompare.cxx
index d4bbe8c21ee2..ec8cdaa9e1a6 100644
--- a/registry/tools/regcompare.cxx
+++ b/registry/tools/regcompare.cxx
@@ -172,7 +172,9 @@ sal_Bool Options::initOptions(int ac, char* av[], sal_Bool bCmdFile)
{
bCmdFile = sal_True;
- m_program = av[0];
+ OString name(av[0]);
+ sal_Int32 index = name.lastIndexOf(SEPARATOR);
+ m_program = name.copy((index > 0 ? index+1 : 0));
if (ac < 2)
{
@@ -397,7 +399,7 @@ OString Options::prepareHelp()
help += " incompatible to r1. But if a service in r2 supports more properties as\n";
help += " in r1 and the new properties are 'optonal' it is compatible.\n";
help += " -u|U = additionally check types that are unpublished in registry 1.\n";
- help += " -h|-? = print this help message and exit.\n";
+ help += " -h|-? = print this help message and exit.\n\n";
help += prepareVersion();
return help;