diff options
author | Juergen Schmidt <jsc@openoffice.org> | 2011-02-24 10:51:05 +0100 |
---|---|---|
committer | Juergen Schmidt <jsc@openoffice.org> | 2011-02-24 10:51:05 +0100 |
commit | 228e4d2915a12802bf08303b750494c0f88e3d4a (patch) | |
tree | 30271fdfdc36b04e0c6b29ba74f7947501faaafa /codemaker | |
parent | 35c319c209f34e62cebd0193693727c30795c8cc (diff) |
jsc340: i114847: fix name
Diffstat (limited to 'codemaker')
-rw-r--r-- | codemaker/source/cppumaker/cppuoptions.cxx | 12 | ||||
-rw-r--r-- | codemaker/source/javamaker/javaoptions.cxx | 12 |
2 files changed, 20 insertions, 4 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; |