summaryrefslogtreecommitdiff
path: root/codemaker/source/cppumaker/cppuoptions.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'codemaker/source/cppumaker/cppuoptions.cxx')
-rw-r--r--codemaker/source/cppumaker/cppuoptions.cxx17
1 files changed, 12 insertions, 5 deletions
diff --git a/codemaker/source/cppumaker/cppuoptions.cxx b/codemaker/source/cppumaker/cppuoptions.cxx
index 1bc398391c9d..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;
@@ -346,9 +354,8 @@ OString CppuOptions::prepareHelp()
OString CppuOptions::prepareVersion()
{
- OString version("\nSun Microsystems (R) ");
- version += m_program + " Version 2.0\n\n";
-
+ OString version(m_program);
+ version += " Version 2.0\n\n";
return version;
}