summaryrefslogtreecommitdiff
path: root/unodevtools
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2012-01-20 11:51:36 +0100
committerStephan Bergmann <sbergman@redhat.com>2012-01-20 12:14:45 +0100
commit6cd581f240f9be985e92365f9da0c919142005b4 (patch)
tree35d90844c7ceaa9bc16c334aa0a1d463996685e9 /unodevtools
parentb855cd62f626858efae5c7a5cd4911f7afb4b06c (diff)
Code clean up.
Diffstat (limited to 'unodevtools')
-rw-r--r--unodevtools/inc/unodevtools/options.hxx4
-rw-r--r--unodevtools/source/skeletonmaker/cppcompskeleton.cxx12
-rw-r--r--unodevtools/source/skeletonmaker/javacompskeleton.cxx9
-rw-r--r--unodevtools/source/skeletonmaker/javatypemaker.cxx2
-rw-r--r--unodevtools/source/skeletonmaker/skeletoncpp.hxx3
-rw-r--r--unodevtools/source/skeletonmaker/skeletonjava.hxx5
-rw-r--r--unodevtools/source/skeletonmaker/skeletonmaker.cxx12
-rw-r--r--unodevtools/source/unodevtools/options.cxx6
8 files changed, 23 insertions, 30 deletions
diff --git a/unodevtools/inc/unodevtools/options.hxx b/unodevtools/inc/unodevtools/options.hxx
index f1fc70bad3fc..da7a06b8a7b9 100644
--- a/unodevtools/inc/unodevtools/options.hxx
+++ b/unodevtools/inc/unodevtools/options.hxx
@@ -39,12 +39,12 @@ namespace unodevtools {
//-------------------------------------------------------------------------------
sal_Bool readOption( rtl::OUString * pValue, const sal_Char * pOpt,
- sal_Int32 * pnIndex, const rtl::OUString & aArg)
+ sal_uInt32 * pnIndex, const rtl::OUString & aArg)
throw (com::sun::star::uno::RuntimeException);
//-------------------------------------------------------------------------------
sal_Bool readOption( sal_Bool * pbOpt, const sal_Char * pOpt,
- sal_Int32 * pnIndex, const rtl::OUString & aArg);
+ sal_uInt32 * pnIndex, const rtl::OUString & aArg);
} // end of namespace unodevtools
diff --git a/unodevtools/source/skeletonmaker/cppcompskeleton.cxx b/unodevtools/source/skeletonmaker/cppcompskeleton.cxx
index 57b46137a70c..82987cc73ea7 100644
--- a/unodevtools/source/skeletonmaker/cppcompskeleton.cxx
+++ b/unodevtools/source/skeletonmaker/cppcompskeleton.cxx
@@ -41,7 +41,6 @@ namespace skeletonmaker { namespace cpp {
void generateIncludes(std::ostream & o,
const boost::unordered_set< OString, OStringHash >& interfaces,
- const AttributeInfo& /*properties*/,
OString propertyhelper, bool serviceobject,
bool supportxcomponent)
{
@@ -968,8 +967,7 @@ void generateQueryInterface(std::ostream& o,
void generateSkeleton(ProgramOptions const & options,
TypeManager const & manager,
- std::vector< OString > const & types,
- OString const & /*delegate*/)
+ std::vector< OString > const & types)
{
// special handling of calc add-ins
if (options.componenttype == 2) {
@@ -1030,8 +1028,8 @@ void generateSkeleton(ProgramOptions const & options,
printLicenseHeader(*pofs, compFileName);
}
- generateIncludes(*pofs, interfaces, properties, propertyhelper,
- serviceobject, supportxcomponent);
+ generateIncludes(*pofs, interfaces, propertyhelper, serviceobject,
+ supportxcomponent);
if (options.componenttype == 3) {
*pofs << "#include \"com/sun/star/frame/XFrame.hpp\"\n";
@@ -1192,8 +1190,8 @@ void generateCalcAddin(ProgramOptions const & options,
printLicenseHeader(*pofs, compFileName);
}
- generateIncludes(*pofs, interfaces, properties, propertyhelper,
- serviceobject, supportxcomponent);
+ generateIncludes(*pofs, interfaces, propertyhelper, serviceobject,
+ supportxcomponent);
*pofs <<
"#include \"com/sun/star/beans/PropertyValue.hpp\"\n"
diff --git a/unodevtools/source/skeletonmaker/javacompskeleton.cxx b/unodevtools/source/skeletonmaker/javacompskeleton.cxx
index 5b5a86c021d4..63bbd396be2b 100644
--- a/unodevtools/source/skeletonmaker/javacompskeleton.cxx
+++ b/unodevtools/source/skeletonmaker/javacompskeleton.cxx
@@ -47,7 +47,6 @@ void generatePackage(std::ostream & o, const OString & implname)
}
void generateImports(std::ostream & o, ProgramOptions const & options,
- const boost::unordered_set< OString, OStringHash >& /*interfaces*/,
const OString & propertyhelper,
bool serviceobject, bool supportxcomponent)
{
@@ -265,7 +264,6 @@ bool checkAttribute(OStringBuffer& attributeValue, sal_uInt16 attribute)
}
void registerProperties(std::ostream& o,
- TypeManager const & /*manager*/,
const AttributeInfo& properties,
const OString& indentation)
{
@@ -837,7 +835,7 @@ void generateClassDefinition(std::ostream& o,
o << "\n public " << classname << "( XComponentContext context )\n"
" {\n m_xContext = context;\n";
if (propertyhelper.equals("_")) {
- registerProperties(o, manager, properties, " ");
+ registerProperties(o, properties, " ");
} else {
if (propertyhelper.getLength() > 1) {
o << propcomment
@@ -862,8 +860,7 @@ void generateClassDefinition(std::ostream& o,
void generateSkeleton(ProgramOptions const & options,
TypeManager const & manager,
- std::vector< OString > const & types,
- OString const & /*delegate*/)
+ std::vector< OString > const & types)
{
boost::unordered_set< OString, OStringHash > interfaces;
boost::unordered_set< OString, OStringHash > services;
@@ -958,7 +955,7 @@ void generateSkeleton(ProgramOptions const & options,
generatePackage(*pofs, options.implname);
- generateImports(*pofs, options, interfaces, propertyhelper,
+ generateImports(*pofs, options, propertyhelper,
serviceobject, supportxcomponent);
OString classname(options.implname);
diff --git a/unodevtools/source/skeletonmaker/javatypemaker.cxx b/unodevtools/source/skeletonmaker/javatypemaker.cxx
index 6a192aecfda5..51b52e51b047 100644
--- a/unodevtools/source/skeletonmaker/javatypemaker.cxx
+++ b/unodevtools/source/skeletonmaker/javatypemaker.cxx
@@ -203,7 +203,7 @@ void printConstructor(std::ostream & o,
void printMethodParameters(std::ostream & o,
ProgramOptions const & options, TypeManager const & manager,
typereg::Reader const & reader, sal_uInt16 method, bool previous,
- bool withtype, bool /*shortname*/)
+ bool withtype)
{
for ( sal_uInt16 i = 0; i < reader.getMethodParameterCount(method); ++i ) {
if ( previous )
diff --git a/unodevtools/source/skeletonmaker/skeletoncpp.hxx b/unodevtools/source/skeletonmaker/skeletoncpp.hxx
index 803788cfb3c6..fed82e448c03 100644
--- a/unodevtools/source/skeletonmaker/skeletoncpp.hxx
+++ b/unodevtools/source/skeletonmaker/skeletoncpp.hxx
@@ -130,8 +130,7 @@ void generateDocumentation(std::ostream & o,
void generateSkeleton(ProgramOptions const & options,
TypeManager const & manager,
- std::vector< rtl::OString > const & types,
- rtl::OString const & delegate);
+ std::vector< rtl::OString > const & types);
void generateCalcAddin(ProgramOptions const & options,
TypeManager const & manager,
diff --git a/unodevtools/source/skeletonmaker/skeletonjava.hxx b/unodevtools/source/skeletonmaker/skeletonjava.hxx
index e2c0c9e75539..d4dfc077dec9 100644
--- a/unodevtools/source/skeletonmaker/skeletonjava.hxx
+++ b/unodevtools/source/skeletonmaker/skeletonjava.hxx
@@ -64,8 +64,7 @@ void printMethodParameters(std::ostream & o,
TypeManager const & manager,
typereg::Reader const & reader,
sal_uInt16 method, bool previous,
- bool withtype,
- bool shortname=false);
+ bool withtype);
void printExceptionSpecification(std::ostream & o,
ProgramOptions const & options,
@@ -109,7 +108,7 @@ void generateDocumentation(std::ostream & o,
rtl::OString const & type,
rtl::OString const & delegate);
-void generateSkeleton(ProgramOptions const & options, TypeManager const & manager, std::vector< rtl::OString > const & types, rtl::OString const & delegate);
+void generateSkeleton(ProgramOptions const & options, TypeManager const & manager, std::vector< rtl::OString > const & types);
} }
diff --git a/unodevtools/source/skeletonmaker/skeletonmaker.cxx b/unodevtools/source/skeletonmaker/skeletonmaker.cxx
index 119b778535bc..456f7b2408a9 100644
--- a/unodevtools/source/skeletonmaker/skeletonmaker.cxx
+++ b/unodevtools/source/skeletonmaker/skeletonmaker.cxx
@@ -141,12 +141,13 @@ void printUsageAndExit(const char* programname, const char* version)
}
-SAL_IMPLEMENT_MAIN_WITH_ARGS(argc, /*argv*/)
+SAL_IMPLEMENT_MAIN()
{
const char* version = "0.4";
const char* programname = "uno-skeletonmaker";
- if ( argc <= 1 ) {
+ sal_uInt32 nCount = rtl_getAppCommandArgCount();
+ if ( nCount == 0 ) {
printUsageAndExit(programname, version);
exit(EXIT_FAILURE);
}
@@ -158,8 +159,7 @@ SAL_IMPLEMENT_MAIN_WITH_ARGS(argc, /*argv*/)
try {
- sal_Int32 nPos = 0;
- sal_Int32 nCount = (sal_Int32)rtl_getAppCommandArgCount();
+ sal_uInt32 nPos = 0;
OUString arg, sOption;
sal_Bool bOption=sal_False;
@@ -327,10 +327,10 @@ SAL_IMPLEMENT_MAIN_WITH_ARGS(argc, /*argv*/)
switch ( options.language )
{
case 1: //Java
- java::generateSkeleton(options, manager, types, delegate);
+ java::generateSkeleton(options, manager, types);
break;
case 2: //C++
- cpp::generateSkeleton(options, manager, types, delegate);
+ cpp::generateSkeleton(options, manager, types);
break;
default:
OSL_ASSERT(false);
diff --git a/unodevtools/source/unodevtools/options.cxx b/unodevtools/source/unodevtools/options.cxx
index dbca5cb95f93..776c882ca5db 100644
--- a/unodevtools/source/unodevtools/options.cxx
+++ b/unodevtools/source/unodevtools/options.cxx
@@ -49,7 +49,7 @@ static void out( const sal_Char * pText )
//-------------------------------------------------------------------------------
sal_Bool readOption( OUString * pValue, const sal_Char * pOpt,
- sal_Int32 * pnIndex, const OUString & aArg)
+ sal_uInt32 * pnIndex, const OUString & aArg)
throw (RuntimeException)
{
const OUString dash = OUString(RTL_CONSTASCII_USTRINGPARAM("-"));
@@ -66,7 +66,7 @@ sal_Bool readOption( OUString * pValue, const sal_Char * pOpt,
++(*pnIndex);
rtl_getAppCommandArg(*pnIndex, &pValue->pData);
- if (*pnIndex >= (sal_Int32)rtl_getAppCommandArgCount() ||
+ if (*pnIndex >= rtl_getAppCommandArgCount() ||
pValue->copy(1).equals(dash))
{
OUStringBuffer buf( 32 );
@@ -103,7 +103,7 @@ sal_Bool readOption( OUString * pValue, const sal_Char * pOpt,
//-------------------------------------------------------------------------------
sal_Bool readOption( sal_Bool * pbOpt, const sal_Char * pOpt,
- sal_Int32 * pnIndex, const OUString & aArg)
+ sal_uInt32 * pnIndex, const OUString & aArg)
{
const OUString dashdash(RTL_CONSTASCII_USTRINGPARAM("--"));
const OUString dash(RTL_CONSTASCII_USTRINGPARAM("-"));