summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--codemaker/source/codemaker/exceptiontree.cxx2
-rw-r--r--codemaker/source/codemaker/typemanager.cxx108
-rw-r--r--codemaker/source/commoncpp/commoncpp.cxx8
-rw-r--r--codemaker/source/commonjava/commonjava.cxx6
-rw-r--r--codemaker/source/cppumaker/cpputype.cxx290
-rw-r--r--codemaker/source/cppumaker/dependencies.cxx62
-rw-r--r--codemaker/source/cppumaker/includes.cxx44
-rw-r--r--codemaker/source/javamaker/classfile.cxx8
-rw-r--r--codemaker/source/javamaker/javatype.cxx241
-rw-r--r--include/codemaker/unotype.hxx60
-rw-r--r--unodevtools/source/skeletonmaker/cppcompskeleton.cxx2
-rw-r--r--unodevtools/source/skeletonmaker/cpptypemaker.cxx118
-rw-r--r--unodevtools/source/skeletonmaker/javatypemaker.cxx116
-rw-r--r--unodevtools/source/skeletonmaker/skeletoncommon.cxx28
14 files changed, 546 insertions, 547 deletions
diff --git a/codemaker/source/codemaker/exceptiontree.cxx b/codemaker/source/codemaker/exceptiontree.cxx
index 7b5ccd97db60..0f63a5bd0ab5 100644
--- a/codemaker/source/codemaker/exceptiontree.cxx
+++ b/codemaker/source/codemaker/exceptiontree.cxx
@@ -61,7 +61,7 @@ void ExceptionTree::add(
rtl::Reference< unoidl::Entity > ent;
codemaker::UnoType::Sort s = manager->getSort(b2u(n), &ent);
(void) s; // WaE: unused variable
- assert(s == codemaker::UnoType::SORT_EXCEPTION_TYPE);
+ assert(s == codemaker::UnoType::Sort::Exception);
n = u2b(
static_cast< unoidl::ExceptionTypeEntity * >(ent.get())->
getDirectBase());
diff --git a/codemaker/source/codemaker/typemanager.cxx b/codemaker/source/codemaker/typemanager.cxx
index 8e74c5d6acd5..f0886286f247 100644
--- a/codemaker/source/codemaker/typemanager.cxx
+++ b/codemaker/source/codemaker/typemanager.cxx
@@ -64,58 +64,58 @@ codemaker::UnoType::Sort TypeManager::getSort(
if (cursor != nullptr) {
*cursor = manager_->createCursor("");
}
- return codemaker::UnoType::SORT_MODULE;
+ return codemaker::UnoType::Sort::Module;
}
if (name == "void") {
- return codemaker::UnoType::SORT_VOID;
+ return codemaker::UnoType::Sort::Void;
}
if (name == "boolean") {
- return codemaker::UnoType::SORT_BOOLEAN;
+ return codemaker::UnoType::Sort::Boolean;
}
if (name == "byte") {
- return codemaker::UnoType::SORT_BYTE;
+ return codemaker::UnoType::Sort::Byte;
}
if (name == "short") {
- return codemaker::UnoType::SORT_SHORT;
+ return codemaker::UnoType::Sort::Short;
}
if (name == "unsigned short") {
- return codemaker::UnoType::SORT_UNSIGNED_SHORT;
+ return codemaker::UnoType::Sort::UnsignedShort;
}
if (name == "long") {
- return codemaker::UnoType::SORT_LONG;
+ return codemaker::UnoType::Sort::Long;
}
if (name == "unsigned long") {
- return codemaker::UnoType::SORT_UNSIGNED_LONG;
+ return codemaker::UnoType::Sort::UnsignedLong;
}
if (name == "hyper") {
- return codemaker::UnoType::SORT_HYPER;
+ return codemaker::UnoType::Sort::Hyper;
}
if (name == "unsigned hyper") {
- return codemaker::UnoType::SORT_UNSIGNED_HYPER;
+ return codemaker::UnoType::Sort::UnsignedHyper;
}
if (name == "float") {
- return codemaker::UnoType::SORT_FLOAT;
+ return codemaker::UnoType::Sort::Float;
}
if (name == "double") {
- return codemaker::UnoType::SORT_DOUBLE;
+ return codemaker::UnoType::Sort::Double;
}
if (name == "char") {
- return codemaker::UnoType::SORT_CHAR;
+ return codemaker::UnoType::Sort::Char;
}
if (name == "string") {
- return codemaker::UnoType::SORT_STRING;
+ return codemaker::UnoType::Sort::String;
}
if (name == "type") {
- return codemaker::UnoType::SORT_TYPE;
+ return codemaker::UnoType::Sort::Type;
}
if (name == "any") {
- return codemaker::UnoType::SORT_ANY;
+ return codemaker::UnoType::Sort::Any;
}
if (name.startsWith("[")) {
- return codemaker::UnoType::SORT_SEQUENCE_TYPE;
+ return codemaker::UnoType::Sort::Sequence;
}
if (name.indexOf('<') != -1) {
- return codemaker::UnoType::SORT_INSTANTIATED_POLYMORPHIC_STRUCT_TYPE;
+ return codemaker::UnoType::Sort::InstantiatedPolymorphicStruct;
}
rtl::Reference< unoidl::Entity > ent(manager_->findEntity(name));
if (!ent.is()) {
@@ -129,29 +129,29 @@ codemaker::UnoType::Sort TypeManager::getSort(
if (cursor != nullptr) {
*cursor = manager_->createCursor(name);
}
- return codemaker::UnoType::SORT_MODULE;
+ return codemaker::UnoType::Sort::Module;
case unoidl::Entity::SORT_ENUM_TYPE:
- return codemaker::UnoType::SORT_ENUM_TYPE;
+ return codemaker::UnoType::Sort::Enum;
case unoidl::Entity::SORT_PLAIN_STRUCT_TYPE:
- return codemaker::UnoType::SORT_PLAIN_STRUCT_TYPE;
+ return codemaker::UnoType::Sort::PlainStruct;
case unoidl::Entity::SORT_POLYMORPHIC_STRUCT_TYPE_TEMPLATE:
- return codemaker::UnoType::SORT_POLYMORPHIC_STRUCT_TYPE_TEMPLATE;
+ return codemaker::UnoType::Sort::PolymorphicStructTemplate;
case unoidl::Entity::SORT_EXCEPTION_TYPE:
- return codemaker::UnoType::SORT_EXCEPTION_TYPE;
+ return codemaker::UnoType::Sort::Exception;
case unoidl::Entity::SORT_INTERFACE_TYPE:
- return codemaker::UnoType::SORT_INTERFACE_TYPE;
+ return codemaker::UnoType::Sort::Interface;
case unoidl::Entity::SORT_TYPEDEF:
- return codemaker::UnoType::SORT_TYPEDEF;
+ return codemaker::UnoType::Sort::Typedef;
case unoidl::Entity::SORT_CONSTANT_GROUP:
- return codemaker::UnoType::SORT_CONSTANT_GROUP;
+ return codemaker::UnoType::Sort::ConstantGroup;
case unoidl::Entity::SORT_SINGLE_INTERFACE_BASED_SERVICE:
- return codemaker::UnoType::SORT_SINGLE_INTERFACE_BASED_SERVICE;
+ return codemaker::UnoType::Sort::SingleInterfaceBasedService;
case unoidl::Entity::SORT_ACCUMULATION_BASED_SERVICE:
- return codemaker::UnoType::SORT_ACCUMULATION_BASED_SERVICE;
+ return codemaker::UnoType::Sort::AccumulationBasedService;
case unoidl::Entity::SORT_INTERFACE_BASED_SINGLETON:
- return codemaker::UnoType::SORT_INTERFACE_BASED_SINGLETON;
+ return codemaker::UnoType::Sort::InterfaceBasedSingleton;
case unoidl::Entity::SORT_SERVICE_BASED_SINGLETON:
- return codemaker::UnoType::SORT_SERVICE_BASED_SINGLETON;
+ return codemaker::UnoType::Sort::ServiceBasedSingleton;
default:
for (;;) { std::abort(); } // this cannot happen
}
@@ -169,14 +169,14 @@ codemaker::UnoType::Sort TypeManager::decompose(
rtl::Reference< unoidl::Entity > ent;
codemaker::UnoType::Sort s = getSort(n, &ent);
if (args.empty()
- != (s != codemaker::UnoType::SORT_POLYMORPHIC_STRUCT_TYPE_TEMPLATE))
+ != (s != codemaker::UnoType::Sort::PolymorphicStructTemplate))
{
throw CannotDumpException(
"template arguments mismatch for \"" + n
+ "\" resolved from \"" + name + "\"");
}
switch (s) {
- case codemaker::UnoType::SORT_TYPEDEF:
+ case codemaker::UnoType::Sort::Typedef:
if (resolveTypedefs) {
n = dynamic_cast<unoidl::TypedefEntity&>(*ent.get()).
getType();
@@ -187,25 +187,25 @@ codemaker::UnoType::Sort TypeManager::decompose(
break;
}
// fall through
- case codemaker::UnoType::SORT_VOID:
- case codemaker::UnoType::SORT_BOOLEAN:
- case codemaker::UnoType::SORT_BYTE:
- case codemaker::UnoType::SORT_SHORT:
- case codemaker::UnoType::SORT_UNSIGNED_SHORT:
- case codemaker::UnoType::SORT_LONG:
- case codemaker::UnoType::SORT_UNSIGNED_LONG:
- case codemaker::UnoType::SORT_HYPER:
- case codemaker::UnoType::SORT_UNSIGNED_HYPER:
- case codemaker::UnoType::SORT_FLOAT:
- case codemaker::UnoType::SORT_DOUBLE:
- case codemaker::UnoType::SORT_CHAR:
- case codemaker::UnoType::SORT_STRING:
- case codemaker::UnoType::SORT_TYPE:
- case codemaker::UnoType::SORT_ANY:
- case codemaker::UnoType::SORT_ENUM_TYPE:
- case codemaker::UnoType::SORT_PLAIN_STRUCT_TYPE:
- case codemaker::UnoType::SORT_EXCEPTION_TYPE:
- case codemaker::UnoType::SORT_INTERFACE_TYPE:
+ case codemaker::UnoType::Sort::Void:
+ case codemaker::UnoType::Sort::Boolean:
+ case codemaker::UnoType::Sort::Byte:
+ case codemaker::UnoType::Sort::Short:
+ case codemaker::UnoType::Sort::UnsignedShort:
+ case codemaker::UnoType::Sort::Long:
+ case codemaker::UnoType::Sort::UnsignedLong:
+ case codemaker::UnoType::Sort::Hyper:
+ case codemaker::UnoType::Sort::UnsignedHyper:
+ case codemaker::UnoType::Sort::Float:
+ case codemaker::UnoType::Sort::Double:
+ case codemaker::UnoType::Sort::Char:
+ case codemaker::UnoType::Sort::String:
+ case codemaker::UnoType::Sort::Type:
+ case codemaker::UnoType::Sort::Any:
+ case codemaker::UnoType::Sort::Enum:
+ case codemaker::UnoType::Sort::PlainStruct:
+ case codemaker::UnoType::Sort::Exception:
+ case codemaker::UnoType::Sort::Interface:
if (nucleus != nullptr) {
*nucleus = n;
}
@@ -219,7 +219,7 @@ codemaker::UnoType::Sort TypeManager::decompose(
*entity = ent;
}
return s;
- case codemaker::UnoType::SORT_POLYMORPHIC_STRUCT_TYPE_TEMPLATE:
+ case codemaker::UnoType::Sort::PolymorphicStructTemplate:
if (args.size()
!= (dynamic_cast<
unoidl::PolymorphicStructTypeTemplateEntity * >(ent.get())->
@@ -246,8 +246,8 @@ codemaker::UnoType::Sort TypeManager::decompose(
*entity = ent;
}
return
- codemaker::UnoType::SORT_INSTANTIATED_POLYMORPHIC_STRUCT_TYPE;
- case codemaker::UnoType::SORT_SEQUENCE_TYPE:
+ codemaker::UnoType::Sort::InstantiatedPolymorphicStruct;
+ case codemaker::UnoType::Sort::Sequence:
assert(false); // this cannot happen
// fall through
default:
diff --git a/codemaker/source/commoncpp/commoncpp.cxx b/codemaker/source/commoncpp/commoncpp.cxx
index e50e982cca60..d2c5915f2e28 100644
--- a/codemaker/source/commoncpp/commoncpp.cxx
+++ b/codemaker/source/commoncpp/commoncpp.cxx
@@ -68,15 +68,15 @@ OString translateUnoToCppType(
codemaker::UnoType::Sort sort, OUString const & nucleus)
{
OStringBuffer buf;
- if (sort <= codemaker::UnoType::SORT_ANY) {
- static char const * const cppTypes[codemaker::UnoType::SORT_ANY + 1] = {
+ if (sort <= codemaker::UnoType::Sort::Any) {
+ static char const * const cppTypes[static_cast<int>(codemaker::UnoType::Sort::Any) + 1] = {
"void", "::sal_Bool", "::sal_Int8", "::sal_Int16", "::sal_uInt16",
"::sal_Int32", "::sal_uInt32", "::sal_Int64", "::sal_uInt64",
"float", "double", "::sal_Unicode", "rtl::OUString",
"::css::uno::Type", "::css::uno::Any" };
- buf.append(cppTypes[sort]);
+ buf.append(cppTypes[static_cast<int>(sort)]);
} else {
- if (sort == codemaker::UnoType::SORT_INTERFACE_TYPE
+ if (sort == codemaker::UnoType::Sort::Interface
&& nucleus == "com.sun.star.uno.XInterface")
{
buf.append("::css::uno::XInterface");
diff --git a/codemaker/source/commonjava/commonjava.cxx b/codemaker/source/commonjava/commonjava.cxx
index 20bdce402e51..37a6ffe604be 100644
--- a/codemaker/source/commonjava/commonjava.cxx
+++ b/codemaker/source/commonjava/commonjava.cxx
@@ -41,8 +41,8 @@ OString translateUnoToJavaType(
codemaker::UnoType::Sort sort, OString const & nucleus, bool referenceType)
{
OStringBuffer buf;
- if (sort <= codemaker::UnoType::SORT_ANY) {
- OString const javaTypes[codemaker::UnoType::SORT_ANY + 1][2] = {
+ if (sort <= codemaker::UnoType::Sort::Any) {
+ OString const javaTypes[static_cast<int>(codemaker::UnoType::Sort::Any) + 1][2] = {
{ "void", "java/lang/Void" },
{ "boolean", "java/lang/Boolean" },
{ "byte", "java/lang/Byte" },
@@ -58,7 +58,7 @@ OString translateUnoToJavaType(
{ "java/lang/String", "java/lang/String" },
{ "com/sun/star/uno/Type", "com/sun/star/uno/Type" },
{ "java/lang/Object", "java/lang/Object" } };
- buf.append(javaTypes[sort][referenceType]);
+ buf.append(javaTypes[static_cast<int>(sort)][referenceType]);
} else {
if (nucleus == "com/sun/star/uno/XInterface") {
buf.append("java/lang/Object");
diff --git a/codemaker/source/cppumaker/cpputype.cxx b/codemaker/source/cppumaker/cpputype.cxx
index 06f6561ebb69..92a1c648420f 100644
--- a/codemaker/source/cppumaker/cpputype.cxx
+++ b/codemaker/source/cppumaker/cpputype.cxx
@@ -463,7 +463,7 @@ void CppuType::addDefaultHIncludes(codemaker::cppumaker::Includes & includes)
//TODO: Only include what is really needed
includes.addCppuMacrosHxx();
if (m_typeMgr->getSort(name_)
- == codemaker::UnoType::SORT_INTERFACE_TYPE)
+ == codemaker::UnoType::Sort::Interface)
{
includes.addException();
includes.addReference();
@@ -476,7 +476,7 @@ void CppuType::addDefaultHxxIncludes(codemaker::cppumaker::Includes & includes)
//TODO: Only include what is really needed
includes.addType();
if (m_typeMgr->getSort(name_)
- == codemaker::UnoType::SORT_INTERFACE_TYPE)
+ == codemaker::UnoType::Sort::Interface)
{
includes.addException();
includes.addReference();
@@ -496,32 +496,32 @@ void CppuType::dumpInitializer(
if (k == 0) {
rtl::Reference< unoidl::Entity > ent;
switch (m_typeMgr->getSort(n, &ent)) {
- case codemaker::UnoType::SORT_BOOLEAN:
+ case codemaker::UnoType::Sort::Boolean:
out << "false";
break;
- case codemaker::UnoType::SORT_BYTE:
- case codemaker::UnoType::SORT_SHORT:
- case codemaker::UnoType::SORT_UNSIGNED_SHORT:
- case codemaker::UnoType::SORT_LONG:
- case codemaker::UnoType::SORT_UNSIGNED_LONG:
- case codemaker::UnoType::SORT_HYPER:
- case codemaker::UnoType::SORT_UNSIGNED_HYPER:
- case codemaker::UnoType::SORT_FLOAT:
- case codemaker::UnoType::SORT_DOUBLE:
- case codemaker::UnoType::SORT_CHAR:
+ case codemaker::UnoType::Sort::Byte:
+ case codemaker::UnoType::Sort::Short:
+ case codemaker::UnoType::Sort::UnsignedShort:
+ case codemaker::UnoType::Sort::Long:
+ case codemaker::UnoType::Sort::UnsignedLong:
+ case codemaker::UnoType::Sort::Hyper:
+ case codemaker::UnoType::Sort::UnsignedHyper:
+ case codemaker::UnoType::Sort::Float:
+ case codemaker::UnoType::Sort::Double:
+ case codemaker::UnoType::Sort::Char:
out << "0";
break;
- case codemaker::UnoType::SORT_ENUM_TYPE:
+ case codemaker::UnoType::Sort::Enum:
out << codemaker::cpp::scopedCppName(u2b(n)) << "_"
<< (dynamic_cast< unoidl::EnumTypeEntity * >(ent.get())->
getMembers()[0].name);
break;
- case codemaker::UnoType::SORT_STRING:
- case codemaker::UnoType::SORT_TYPE:
- case codemaker::UnoType::SORT_ANY:
- case codemaker::UnoType::SORT_PLAIN_STRUCT_TYPE:
- case codemaker::UnoType::SORT_POLYMORPHIC_STRUCT_TYPE_TEMPLATE:
- case codemaker::UnoType::SORT_INTERFACE_TYPE:
+ case codemaker::UnoType::Sort::String:
+ case codemaker::UnoType::Sort::Type:
+ case codemaker::UnoType::Sort::Any:
+ case codemaker::UnoType::Sort::PlainStruct:
+ case codemaker::UnoType::Sort::PolymorphicStructTemplate:
+ case codemaker::UnoType::Sort::Interface:
break;
default:
throw CannotDumpException(
@@ -634,89 +634,89 @@ sal_uInt32 CppuType::getInheritedMemberCount()
OUString CppuType::getTypeClass(OUString const & name, bool cStyle) {
rtl::Reference< unoidl::Entity > ent;
switch (m_typeMgr->getSort(name, &ent)) {
- case codemaker::UnoType::SORT_VOID:
+ case codemaker::UnoType::Sort::Void:
return cStyle
? OUString("typelib_TypeClass_VOID")
: OUString("::css::uno::TypeClass_VOID");
- case codemaker::UnoType::SORT_BOOLEAN:
+ case codemaker::UnoType::Sort::Boolean:
return cStyle
? OUString("typelib_TypeClass_BOOLEAN")
: OUString("::css::uno::TypeClass_BOOLEAN");
- case codemaker::UnoType::SORT_BYTE:
+ case codemaker::UnoType::Sort::Byte:
return cStyle
? OUString("typelib_TypeClass_BYTE")
: OUString("::css::uno::TypeClass_BYTE");
- case codemaker::UnoType::SORT_SHORT:
+ case codemaker::UnoType::Sort::Short:
return cStyle
? OUString("typelib_TypeClass_SHORT")
: OUString("::css::uno::TypeClass_SHORT");
- case codemaker::UnoType::SORT_UNSIGNED_SHORT:
+ case codemaker::UnoType::Sort::UnsignedShort:
return cStyle
? OUString("typelib_TypeClass_UNSIGNED_SHORT")
: OUString("::css::uno::TypeClass_UNSIGNED_SHORT");
- case codemaker::UnoType::SORT_LONG:
+ case codemaker::UnoType::Sort::Long:
return cStyle
? OUString("typelib_TypeClass_LONG")
: OUString("::css::uno::TypeClass_LONG");
- case codemaker::UnoType::SORT_UNSIGNED_LONG:
+ case codemaker::UnoType::Sort::UnsignedLong:
return cStyle
? OUString("typelib_TypeClass_UNSIGNED_LONG")
: OUString("::css::uno::TypeClass_UNSIGNED_LONG");
- case codemaker::UnoType::SORT_HYPER:
+ case codemaker::UnoType::Sort::Hyper:
return cStyle
? OUString("typelib_TypeClass_HYPER")
: OUString("::css::uno::TypeClass_HYPER");
- case codemaker::UnoType::SORT_UNSIGNED_HYPER:
+ case codemaker::UnoType::Sort::UnsignedHyper:
return cStyle
? OUString("typelib_TypeClass_UNSIGNED_HYPER")
: OUString("::css::uno::TypeClass_UNSIGNED_HYPER");
- case codemaker::UnoType::SORT_FLOAT:
+ case codemaker::UnoType::Sort::Float:
return cStyle
? OUString("typelib_TypeClass_FLOAT")
: OUString("::css::uno::TypeClass_FLOAT");
- case codemaker::UnoType::SORT_DOUBLE:
+ case codemaker::UnoType::Sort::Double:
return cStyle
? OUString("typelib_TypeClass_DOUBLE")
: OUString("::css::uno::TypeClass_DOUBLE");
- case codemaker::UnoType::SORT_CHAR:
+ case codemaker::UnoType::Sort::Char:
return cStyle
? OUString("typelib_TypeClass_CHAR")
: OUString("::css::uno::TypeClass_CHAR");
- case codemaker::UnoType::SORT_STRING:
+ case codemaker::UnoType::Sort::String:
return cStyle
? OUString("typelib_TypeClass_STRING")
: OUString("::css::uno::TypeClass_STRING");
- case codemaker::UnoType::SORT_TYPE:
+ case codemaker::UnoType::Sort::Type:
return cStyle
? OUString("typelib_TypeClass_TYPE")
: OUString("::css::uno::TypeClass_TYPE");
- case codemaker::UnoType::SORT_ANY:
+ case codemaker::UnoType::Sort::Any:
return cStyle
? OUString("typelib_TypeClass_ANY")
: OUString("::css::uno::TypeClass_ANY");
- case codemaker::UnoType::SORT_SEQUENCE_TYPE:
+ case codemaker::UnoType::Sort::Sequence:
return cStyle
? OUString("typelib_TypeClass_SEQUENCE")
: OUString("::css::uno::TypeClass_SEQUENCE");
- case codemaker::UnoType::SORT_ENUM_TYPE:
+ case codemaker::UnoType::Sort::Enum:
return cStyle
? OUString("typelib_TypeClass_ENUM")
: OUString("::css::uno::TypeClass_ENUM");
- case codemaker::UnoType::SORT_PLAIN_STRUCT_TYPE:
- case codemaker::UnoType::SORT_POLYMORPHIC_STRUCT_TYPE_TEMPLATE:
- case codemaker::UnoType::SORT_INSTANTIATED_POLYMORPHIC_STRUCT_TYPE:
+ case codemaker::UnoType::Sort::PlainStruct:
+ case codemaker::UnoType::Sort::PolymorphicStructTemplate:
+ case codemaker::UnoType::Sort::InstantiatedPolymorphicStruct:
return cStyle
? OUString("typelib_TypeClass_STRUCT")
: OUString("::css::uno::TypeClass_STRUCT");
- case codemaker::UnoType::SORT_EXCEPTION_TYPE:
+ case codemaker::UnoType::Sort::Exception:
return cStyle
? OUString("typelib_TypeClass_EXCEPTION")
: OUString("::css::uno::TypeClass_EXCEPTION");
- case codemaker::UnoType::SORT_INTERFACE_TYPE:
+ case codemaker::UnoType::Sort::Interface:
return cStyle
? OUString("typelib_TypeClass_INTERFACE")
: OUString("::css::uno::TypeClass_INTERFACE");
- case codemaker::UnoType::SORT_TYPEDEF:
+ case codemaker::UnoType::Sort::Typedef:
return getTypeClass(
dynamic_cast<unoidl::TypedefEntity&>(*ent.get()).getType(),
cStyle);
@@ -743,57 +743,57 @@ void CppuType::dumpType(
<< "< ";
}
switch (m_typeMgr->getSort(n)) {
- case codemaker::UnoType::SORT_VOID:
+ case codemaker::UnoType::Sort::Void:
out << "void";
break;
- case codemaker::UnoType::SORT_BOOLEAN:
+ case codemaker::UnoType::Sort::Boolean:
out << "::sal_Bool";
break;
- case codemaker::UnoType::SORT_BYTE:
+ case codemaker::UnoType::Sort::Byte:
out << "::sal_Int8";
break;
- case codemaker::UnoType::SORT_SHORT:
+ case codemaker::UnoType::Sort::Short:
out << "::sal_Int16";
break;
- case codemaker::UnoType::SORT_UNSIGNED_SHORT:
+ case codemaker::UnoType::Sort::UnsignedShort:
out << (cppuUnoType ? "::cppu::UnoUnsignedShortType" : "::sal_uInt16");
break;
- case codemaker::UnoType::SORT_LONG:
+ case codemaker::UnoType::Sort::Long:
out << "::sal_Int32";
break;
- case codemaker::UnoType::SORT_UNSIGNED_LONG:
+ case codemaker::UnoType::Sort::UnsignedLong:
out << "::sal_uInt32";
break;
- case codemaker::UnoType::SORT_HYPER:
+ case codemaker::UnoType::Sort::Hyper:
out << "::sal_Int64";
break;
- case codemaker::UnoType::SORT_UNSIGNED_HYPER:
+ case codemaker::UnoType::Sort::UnsignedHyper:
out << "::sal_uInt64";
break;
- case codemaker::UnoType::SORT_FLOAT:
+ case codemaker::UnoType::Sort::Float:
out << "float";
break;
- case codemaker::UnoType::SORT_DOUBLE:
+ case codemaker::UnoType::Sort::Double:
out << "double";
break;
- case codemaker::UnoType::SORT_CHAR:
+ case codemaker::UnoType::Sort::Char:
out << (cppuUnoType ? "::cppu::UnoCharType" : "::sal_Unicode");
break;
- case codemaker::UnoType::SORT_STRING:
+ case codemaker::UnoType::Sort::String:
out << "::rtl::OUString";
break;
- case codemaker::UnoType::SORT_TYPE:
+ case codemaker::UnoType::Sort::Type:
out << "::css::uno::Type";
break;
- case codemaker::UnoType::SORT_ANY:
+ case codemaker::UnoType::Sort::Any:
out << "::css::uno::Any";
break;
- case codemaker::UnoType::SORT_ENUM_TYPE:
- case codemaker::UnoType::SORT_PLAIN_STRUCT_TYPE:
- case codemaker::UnoType::SORT_EXCEPTION_TYPE:
+ case codemaker::UnoType::Sort::Enum:
+ case codemaker::UnoType::Sort::PlainStruct:
+ case codemaker::UnoType::Sort::Exception:
out << codemaker::cpp::scopedCppName(u2b(n));
break;
- case codemaker::UnoType::SORT_POLYMORPHIC_STRUCT_TYPE_TEMPLATE:
+ case codemaker::UnoType::Sort::PolymorphicStructTemplate:
out << codemaker::cpp::scopedCppName(u2b(n));
if (!args.empty()) {
out << "< ";
@@ -808,7 +808,7 @@ void CppuType::dumpType(
out << " >";
}
break;
- case codemaker::UnoType::SORT_INTERFACE_TYPE:
+ case codemaker::UnoType::Sort::Interface:
if (!native) {
out << "::css::uno::Reference< ";
}
@@ -837,29 +837,29 @@ void CppuType::dumpCppuGetType(
sal_Int32 rank;
codemaker::UnoType::Sort sort = m_typeMgr->decompose(
name, true, &nucleus, &rank, nullptr, nullptr);
- switch (rank == 0 ? sort : codemaker::UnoType::SORT_SEQUENCE_TYPE) {
- case codemaker::UnoType::SORT_VOID:
- case codemaker::UnoType::SORT_BOOLEAN:
- case codemaker::UnoType::SORT_BYTE:
- case codemaker::UnoType::SORT_SHORT:
- case codemaker::UnoType::SORT_UNSIGNED_SHORT:
- case codemaker::UnoType::SORT_LONG:
- case codemaker::UnoType::SORT_UNSIGNED_LONG:
- case codemaker::UnoType::SORT_HYPER:
- case codemaker::UnoType::SORT_UNSIGNED_HYPER:
- case codemaker::UnoType::SORT_FLOAT:
- case codemaker::UnoType::SORT_DOUBLE:
- case codemaker::UnoType::SORT_CHAR:
- case codemaker::UnoType::SORT_STRING:
- case codemaker::UnoType::SORT_TYPE:
- case codemaker::UnoType::SORT_ANY:
+ switch (rank == 0 ? sort : codemaker::UnoType::Sort::Sequence) {
+ case codemaker::UnoType::Sort::Void:
+ case codemaker::UnoType::Sort::Boolean:
+ case codemaker::UnoType::Sort::Byte:
+ case codemaker::UnoType::Sort::Short:
+ case codemaker::UnoType::Sort::UnsignedShort:
+ case codemaker::UnoType::Sort::Long:
+ case codemaker::UnoType::Sort::UnsignedLong:
+ case codemaker::UnoType::Sort::Hyper:
+ case codemaker::UnoType::Sort::UnsignedHyper:
+ case codemaker::UnoType::Sort::Float:
+ case codemaker::UnoType::Sort::Double:
+ case codemaker::UnoType::Sort::Char:
+ case codemaker::UnoType::Sort::String:
+ case codemaker::UnoType::Sort::Type:
+ case codemaker::UnoType::Sort::Any:
break;
- case codemaker::UnoType::SORT_SEQUENCE_TYPE:
- case codemaker::UnoType::SORT_ENUM_TYPE:
- case codemaker::UnoType::SORT_PLAIN_STRUCT_TYPE:
- case codemaker::UnoType::SORT_INSTANTIATED_POLYMORPHIC_STRUCT_TYPE:
- case codemaker::UnoType::SORT_EXCEPTION_TYPE:
- case codemaker::UnoType::SORT_INTERFACE_TYPE:
+ case codemaker::UnoType::Sort::Sequence:
+ case codemaker::UnoType::Sort::Enum:
+ case codemaker::UnoType::Sort::PlainStruct:
+ case codemaker::UnoType::Sort::InstantiatedPolymorphicStruct:
+ case codemaker::UnoType::Sort::Exception:
+ case codemaker::UnoType::Sort::Interface:
// Take care of recursion like struct S { sequence<S> x; }:
if (ownName == nullptr || nucleus != *ownName) {
out << indent() << "::cppu::UnoType< ";
@@ -867,7 +867,7 @@ void CppuType::dumpCppuGetType(
out << " >::get();\n";
}
break;
- case codemaker::UnoType::SORT_TYPEDEF:
+ case codemaker::UnoType::Sort::Typedef:
assert(false); // this cannot happen
// fall through
default:
@@ -879,26 +879,26 @@ void CppuType::dumpCppuGetType(
bool CppuType::passByReference(OUString const & name) const {
switch (m_typeMgr->getSort(resolveOuterTypedefs(name))) {
- case codemaker::UnoType::SORT_BOOLEAN:
- case codemaker::UnoType::SORT_BYTE:
- case codemaker::UnoType::SORT_SHORT:
- case codemaker::UnoType::SORT_UNSIGNED_SHORT:
- case codemaker::UnoType::SORT_LONG:
- case codemaker::UnoType::SORT_UNSIGNED_LONG:
- case codemaker::UnoType::SORT_HYPER:
- case codemaker::UnoType::SORT_UNSIGNED_HYPER:
- case codemaker::UnoType::SORT_FLOAT:
- case codemaker::UnoType::SORT_DOUBLE:
- case codemaker::UnoType::SORT_CHAR:
- case codemaker::UnoType::SORT_ENUM_TYPE:
+ case codemaker::UnoType::Sort::Boolean:
+ case codemaker::UnoType::Sort::Byte:
+ case codemaker::UnoType::Sort::Short:
+ case codemaker::UnoType::Sort::UnsignedShort:
+ case codemaker::UnoType::Sort::Long:
+ case codemaker::UnoType::Sort::UnsignedLong:
+ case codemaker::UnoType::Sort::Hyper:
+ case codemaker::UnoType::Sort::UnsignedHyper:
+ case codemaker::UnoType::Sort::Float:
+ case codemaker::UnoType::Sort::Double:
+ case codemaker::UnoType::Sort::Char:
+ case codemaker::UnoType::Sort::Enum:
return false;
- case codemaker::UnoType::SORT_STRING:
- case codemaker::UnoType::SORT_TYPE:
- case codemaker::UnoType::SORT_ANY:
- case codemaker::UnoType::SORT_SEQUENCE_TYPE:
- case codemaker::UnoType::SORT_PLAIN_STRUCT_TYPE:
- case codemaker::UnoType::SORT_INSTANTIATED_POLYMORPHIC_STRUCT_TYPE:
- case codemaker::UnoType::SORT_INTERFACE_TYPE:
+ case codemaker::UnoType::Sort::String:
+ case codemaker::UnoType::Sort::Type:
+ case codemaker::UnoType::Sort::Any:
+ case codemaker::UnoType::Sort::Sequence:
+ case codemaker::UnoType::Sort::PlainStruct:
+ case codemaker::UnoType::Sort::InstantiatedPolymorphicStruct:
+ case codemaker::UnoType::Sort::Interface:
return true;
default:
throw CannotDumpException(
@@ -916,22 +916,22 @@ bool CppuType::canBeWarnUnused(OUString const & name, int depth) const {
return false;
OUString aResolvedName = resolveOuterTypedefs(name);
switch (m_typeMgr->getSort(aResolvedName)) {
- case codemaker::UnoType::SORT_BOOLEAN:
- case codemaker::UnoType::SORT_BYTE:
- case codemaker::UnoType::SORT_SHORT:
- case codemaker::UnoType::SORT_UNSIGNED_SHORT:
- case codemaker::UnoType::SORT_LONG:
- case codemaker::UnoType::SORT_UNSIGNED_LONG:
- case codemaker::UnoType::SORT_HYPER:
- case codemaker::UnoType::SORT_UNSIGNED_HYPER:
- case codemaker::UnoType::SORT_FLOAT:
- case codemaker::UnoType::SORT_DOUBLE:
- case codemaker::UnoType::SORT_CHAR:
- case codemaker::UnoType::SORT_ENUM_TYPE:
- case codemaker::UnoType::SORT_STRING:
- case codemaker::UnoType::SORT_TYPE:
+ case codemaker::UnoType::Sort::Boolean:
+ case codemaker::UnoType::Sort::Byte:
+ case codemaker::UnoType::Sort::Short:
+ case codemaker::UnoType::Sort::UnsignedShort:
+ case codemaker::UnoType::Sort::Long:
+ case codemaker::UnoType::Sort::UnsignedLong:
+ case codemaker::UnoType::Sort::Hyper:
+ case codemaker::UnoType::Sort::UnsignedHyper:
+ case codemaker::UnoType::Sort::Float:
+ case codemaker::UnoType::Sort::Double:
+ case codemaker::UnoType::Sort::Char:
+ case codemaker::UnoType::Sort::Enum:
+ case codemaker::UnoType::Sort::String:
+ case codemaker::UnoType::Sort::Type:
return true;
- case codemaker::UnoType::SORT_PLAIN_STRUCT_TYPE:
+ case codemaker::UnoType::Sort::PlainStruct:
{
rtl::Reference< unoidl::Entity > ent;
m_typeMgr->getSort(aResolvedName, &ent);
@@ -946,14 +946,14 @@ bool CppuType::canBeWarnUnused(OUString const & name, int depth) const {
}
return true;
}
- case codemaker::UnoType::SORT_SEQUENCE_TYPE:
+ case codemaker::UnoType::Sort::Sequence:
{
OUString aInnerType = aResolvedName.copy(2);
return canBeWarnUnused(aInnerType, depth+1);
}
- case codemaker::UnoType::SORT_ANY:
- case codemaker::UnoType::SORT_INSTANTIATED_POLYMORPHIC_STRUCT_TYPE:
- case codemaker::UnoType::SORT_INTERFACE_TYPE:
+ case codemaker::UnoType::Sort::Any:
+ case codemaker::UnoType::Sort::InstantiatedPolymorphicStruct:
+ case codemaker::UnoType::Sort::Interface:
return false;
default:
throw CannotDumpException(
@@ -965,7 +965,7 @@ bool CppuType::canBeWarnUnused(OUString const & name, int depth) const {
OUString CppuType::resolveOuterTypedefs(OUString const & name) const {
for (OUString n(name);;) {
rtl::Reference< unoidl::Entity > ent;
- if (m_typeMgr->getSort(n, &ent) != codemaker::UnoType::SORT_TYPEDEF) {
+ if (m_typeMgr->getSort(n, &ent) != codemaker::UnoType::Sort::Typedef) {
return n;
}
n = dynamic_cast<unoidl::TypedefEntity&>(*ent.get()).getType();
@@ -977,7 +977,7 @@ OUString CppuType::resolveAllTypedefs(OUString const & name) const {
OUString n(b2u(codemaker::UnoType::decompose(u2b(name), &k1)));
for (;;) {
rtl::Reference< unoidl::Entity > ent;
- if (m_typeMgr->getSort(n, &ent) != codemaker::UnoType::SORT_TYPEDEF) {
+ if (m_typeMgr->getSort(n, &ent) != codemaker::UnoType::Sort::Typedef) {
break;
}
sal_Int32 k2;
@@ -1057,7 +1057,7 @@ void BaseOffset::calculateBases(
if (set_.insert(ar.name).second) {
rtl::Reference< unoidl::Entity > ent;
codemaker::UnoType::Sort sort = manager_->getSort(ar.name, &ent);
- if (sort != codemaker::UnoType::SORT_INTERFACE_TYPE) {
+ if (sort != codemaker::UnoType::Sort::Interface) {
throw CannotDumpException(
"interface type base " + ar.name
+ " is not an interface type");
@@ -2116,7 +2116,7 @@ bool PlainStructType::dumpBaseMembers(
if (!base.isEmpty()) {
rtl::Reference< unoidl::Entity > ent;
codemaker::UnoType::Sort sort = m_typeMgr->getSort(base, &ent);
- if (sort != codemaker::UnoType::SORT_PLAIN_STRUCT_TYPE) {
+ if (sort != codemaker::UnoType::Sort::PlainStruct) {
throw CannotDumpException(
"plain struct type base " + base
+ " is not a plain struct type");
@@ -2183,7 +2183,7 @@ sal_uInt32 PlainStructType::getTotalMemberCount(OUString const & base) const {
}
rtl::Reference< unoidl::Entity > ent;
codemaker::UnoType::Sort sort = m_typeMgr->getSort(base, &ent);
- if (sort != codemaker::UnoType::SORT_PLAIN_STRUCT_TYPE) {
+ if (sort != codemaker::UnoType::Sort::PlainStruct) {
throw CannotDumpException(
"plain struct type base " + base + " is not a plain struct type");
}
@@ -3093,7 +3093,7 @@ bool ExceptionType::dumpBaseMembers(
if (!base.isEmpty()) {
rtl::Reference< unoidl::Entity > ent;
codemaker::UnoType::Sort sort = m_typeMgr->getSort(base, &ent);
- if (sort != codemaker::UnoType::SORT_EXCEPTION_TYPE) {
+ if (sort != codemaker::UnoType::Sort::Exception) {
throw CannotDumpException(
"exception type base " + base + " is not an exception type");
}
@@ -3139,7 +3139,7 @@ sal_uInt32 ExceptionType::getTotalMemberCount(OUString const & base) const {
}
rtl::Reference< unoidl::Entity > ent;
codemaker::UnoType::Sort sort = m_typeMgr->getSort(base, &ent);
- if (sort != codemaker::UnoType::SORT_EXCEPTION_TYPE) {
+ if (sort != codemaker::UnoType::Sort::Exception) {
throw CannotDumpException(
"exception type base " + base + " is not an exception type");
}
@@ -3461,7 +3461,7 @@ void ServiceType::dumpHppFile(
if (m_typeMgr->getSort(
b2u(codemaker::UnoType::decompose(
u2b(param.type))))
- == codemaker::UnoType::SORT_CHAR)
+ == codemaker::UnoType::Sort::Char)
{
includes.addCppuUnotypeHxx();
break;
@@ -3619,7 +3619,7 @@ void ServiceType::dumpHppFile(
if (m_typeMgr->getSort(
b2u(codemaker::UnoType::decompose(
u2b(j.type), &rank)))
- == codemaker::UnoType::SORT_CHAR)
+ == codemaker::UnoType::Sort::Char)
{
o << "= ::css::uno::Any(&" << param
<< ", ::cppu::UnoType< ";
@@ -3880,7 +3880,7 @@ void produce(
rtl::Reference< unoidl::Entity > ent;
rtl::Reference< unoidl::MapCursor > cur;
switch (manager->getSort(name, &ent, &cur)) {
- case codemaker::UnoType::SORT_MODULE:
+ case codemaker::UnoType::Sort::Module:
{
OUString prefix;
if (!name.isEmpty()) {
@@ -3895,7 +3895,7 @@ void produce(
}
break;
}
- case codemaker::UnoType::SORT_ENUM_TYPE:
+ case codemaker::UnoType::Sort::Enum:
{
EnumType t(
dynamic_cast< unoidl::EnumTypeEntity * >(ent.get()), name,
@@ -3904,7 +3904,7 @@ void produce(
t.dumpDependedTypes(generated, options);
break;
}
- case codemaker::UnoType::SORT_PLAIN_STRUCT_TYPE:
+ case codemaker::UnoType::Sort::PlainStruct:
{
PlainStructType t(
dynamic_cast< unoidl::PlainStructTypeEntity * >(ent.get()),
@@ -3913,7 +3913,7 @@ void produce(
t.dumpDependedTypes(generated, options);
break;
}
- case codemaker::UnoType::SORT_POLYMORPHIC_STRUCT_TYPE_TEMPLATE:
+ case codemaker::UnoType::Sort::PolymorphicStructTemplate:
{
PolyStructType t(
dynamic_cast< unoidl::PolymorphicStructTypeTemplateEntity * >(
@@ -3923,7 +3923,7 @@ void produce(
t.dumpDependedTypes(generated, options);
break;
}
- case codemaker::UnoType::SORT_EXCEPTION_TYPE:
+ case codemaker::UnoType::Sort::Exception:
{
ExceptionType t(
dynamic_cast< unoidl::ExceptionTypeEntity * >(ent.get()), name,
@@ -3932,7 +3932,7 @@ void produce(
t.dumpDependedTypes(generated, options);
break;
}
- case codemaker::UnoType::SORT_INTERFACE_TYPE:
+ case codemaker::UnoType::Sort::Interface:
{
InterfaceType t(
dynamic_cast< unoidl::InterfaceTypeEntity * >(ent.get()), name,
@@ -3941,7 +3941,7 @@ void produce(
t.dumpDependedTypes(generated, options);
break;
}
- case codemaker::UnoType::SORT_TYPEDEF:
+ case codemaker::UnoType::Sort::Typedef:
{
Typedef t(
dynamic_cast< unoidl::TypedefEntity * >(ent.get()), name,
@@ -3950,7 +3950,7 @@ void produce(
t.dumpDependedTypes(generated, options);
break;
}
- case codemaker::UnoType::SORT_CONSTANT_GROUP:
+ case codemaker::UnoType::Sort::ConstantGroup:
{
ConstantGroup t(
dynamic_cast< unoidl::ConstantGroupEntity * >(ent.get()), name,
@@ -3960,7 +3960,7 @@ void produce(
}
break;
}
- case codemaker::UnoType::SORT_SINGLE_INTERFACE_BASED_SERVICE:
+ case codemaker::UnoType::Sort::SingleInterfaceBasedService:
{
ServiceType t(
dynamic_cast< unoidl::SingleInterfaceBasedServiceEntity * >(
@@ -3970,7 +3970,7 @@ void produce(
t.dumpDependedTypes(generated, options);
break;
}
- case codemaker::UnoType::SORT_INTERFACE_BASED_SINGLETON:
+ case codemaker::UnoType::Sort::InterfaceBasedSingleton:
{
SingletonType t(
dynamic_cast< unoidl::InterfaceBasedSingletonEntity * >(
@@ -3980,8 +3980,8 @@ void produce(
t.dumpDependedTypes(generated, options);
break;
}
- case codemaker::UnoType::SORT_ACCUMULATION_BASED_SERVICE:
- case codemaker::UnoType::SORT_SERVICE_BASED_SINGLETON:
+ case codemaker::UnoType::Sort::AccumulationBasedService:
+ case codemaker::UnoType::Sort::ServiceBasedSingleton:
break;
default:
throw CannotDumpException(
diff --git a/codemaker/source/cppumaker/dependencies.cxx b/codemaker/source/cppumaker/dependencies.cxx
index a50f65fc470e..d7e40aed7b2d 100644
--- a/codemaker/source/cppumaker/dependencies.cxx
+++ b/codemaker/source/cppumaker/dependencies.cxx
@@ -52,9 +52,9 @@ Dependencies::Dependencies(
assert(manager.is());
rtl::Reference< unoidl::Entity > ent;
switch (m_manager->getSort(name, &ent)) {
- case UnoType::SORT_ENUM_TYPE:
+ case UnoType::Sort::Enum:
break;
- case UnoType::SORT_PLAIN_STRUCT_TYPE:
+ case UnoType::Sort::PlainStruct:
{
rtl::Reference< unoidl::PlainStructTypeEntity > ent2(
static_cast< unoidl::PlainStructTypeEntity * >(ent.get()));
@@ -67,7 +67,7 @@ Dependencies::Dependencies(
}
break;
}
- case UnoType::SORT_POLYMORPHIC_STRUCT_TYPE_TEMPLATE:
+ case UnoType::Sort::PolymorphicStructTemplate:
{
rtl::Reference< unoidl::PolymorphicStructTypeTemplateEntity > ent2(
static_cast< unoidl::PolymorphicStructTypeTemplateEntity * >(
@@ -80,7 +80,7 @@ Dependencies::Dependencies(
}
break;
}
- case UnoType::SORT_EXCEPTION_TYPE:
+ case UnoType::Sort::Exception:
{
rtl::Reference< unoidl::ExceptionTypeEntity > ent2(
static_cast< unoidl::ExceptionTypeEntity * >(ent.get()));
@@ -93,7 +93,7 @@ Dependencies::Dependencies(
}
break;
}
- case UnoType::SORT_INTERFACE_TYPE:
+ case UnoType::Sort::Interface:
{
rtl::Reference< unoidl::InterfaceTypeEntity > ent2(
static_cast< unoidl::InterfaceTypeEntity * >(ent.get()));
@@ -132,10 +132,10 @@ Dependencies::Dependencies(
}
break;
}
- case UnoType::SORT_TYPEDEF:
+ case UnoType::Sort::Typedef:
insert(static_cast< unoidl::TypedefEntity * >(ent.get())->getType());
break;
- case UnoType::SORT_CONSTANT_GROUP:
+ case UnoType::Sort::ConstantGroup:
{
rtl::Reference< unoidl::ConstantGroupEntity > ent2(
static_cast< unoidl::ConstantGroupEntity * >(ent.get()));
@@ -176,7 +176,7 @@ Dependencies::Dependencies(
}
break;
}
- case UnoType::SORT_SINGLE_INTERFACE_BASED_SERVICE:
+ case UnoType::Sort::SingleInterfaceBasedService:
{
rtl::Reference< unoidl::SingleInterfaceBasedServiceEntity > ent2(
static_cast< unoidl::SingleInterfaceBasedServiceEntity * >(
@@ -201,7 +201,7 @@ Dependencies::Dependencies(
}
break;
}
- case UnoType::SORT_INTERFACE_BASED_SINGLETON:
+ case UnoType::Sort::InterfaceBasedSingleton:
insert(
static_cast< unoidl::InterfaceBasedSingletonEntity * >(ent.get())->
getBase());
@@ -221,63 +221,63 @@ void Dependencies::insert(OUString const & name, bool base) {
m_sequenceDependency = true;
}
switch (m_manager->getSort(n)) {
- case UnoType::SORT_VOID:
+ case UnoType::Sort::Void:
m_voidDependency = true;
break;
- case UnoType::SORT_BOOLEAN:
+ case UnoType::Sort::Boolean:
m_booleanDependency = true;
break;
- case UnoType::SORT_BYTE:
+ case UnoType::Sort::Byte:
m_byteDependency = true;
break;
- case UnoType::SORT_SHORT:
+ case UnoType::Sort::Short:
m_shortDependency = true;
break;
- case UnoType::SORT_UNSIGNED_SHORT:
+ case UnoType::Sort::UnsignedShort:
m_unsignedShortDependency = true;
break;
- case UnoType::SORT_LONG:
+ case UnoType::Sort::Long:
m_longDependency = true;
break;
- case UnoType::SORT_UNSIGNED_LONG:
+ case UnoType::Sort::UnsignedLong:
m_unsignedLongDependency = true;
break;
- case UnoType::SORT_HYPER:
+ case UnoType::Sort::Hyper:
m_hyperDependency = true;
break;
- case UnoType::SORT_UNSIGNED_HYPER:
+ case UnoType::Sort::UnsignedHyper:
m_unsignedHyperDependency = true;
break;
- case UnoType::SORT_FLOAT:
+ case UnoType::Sort::Float:
m_floatDependency = true;
break;
- case UnoType::SORT_DOUBLE:
+ case UnoType::Sort::Double:
m_doubleDependency = true;
break;
- case UnoType::SORT_CHAR:
+ case UnoType::Sort::Char:
m_charDependency = true;
break;
- case UnoType::SORT_STRING:
+ case UnoType::Sort::String:
m_stringDependency = true;
break;
- case UnoType::SORT_TYPE:
+ case UnoType::Sort::Type:
m_typeDependency = true;
break;
- case UnoType::SORT_ANY:
+ case UnoType::Sort::Any:
m_anyDependency = true;
break;
- case UnoType::SORT_POLYMORPHIC_STRUCT_TYPE_TEMPLATE:
+ case UnoType::Sort::PolymorphicStructTemplate:
for (const OString& arg : args)
{
insert(b2u(arg));
}
// fall through
- case UnoType::SORT_SEQUENCE_TYPE:
- case UnoType::SORT_ENUM_TYPE:
- case UnoType::SORT_PLAIN_STRUCT_TYPE:
- case UnoType::SORT_EXCEPTION_TYPE:
- case UnoType::SORT_INTERFACE_TYPE:
- case UnoType::SORT_TYPEDEF:
+ case UnoType::Sort::Sequence:
+ case UnoType::Sort::Enum:
+ case UnoType::Sort::PlainStruct:
+ case UnoType::Sort::Exception:
+ case UnoType::Sort::Interface:
+ case UnoType::Sort::Typedef:
{
std::pair< Map::iterator, bool > i(
m_map.insert(
diff --git a/codemaker/source/cppumaker/includes.cxx b/codemaker/source/cppumaker/includes.cxx
index d1a9f2b65318..27d26cfa58aa 100644
--- a/codemaker/source/cppumaker/includes.cxx
+++ b/codemaker/source/cppumaker/includes.cxx
@@ -76,41 +76,41 @@ void Includes::add(OString const & entityName) {
m_includeSequence = true;
}
switch (m_manager->getSort(n)) {
- case codemaker::UnoType::SORT_BOOLEAN:
- case codemaker::UnoType::SORT_BYTE:
- case codemaker::UnoType::SORT_SHORT:
- case codemaker::UnoType::SORT_UNSIGNED_SHORT:
- case codemaker::UnoType::SORT_LONG:
- case codemaker::UnoType::SORT_UNSIGNED_LONG:
- case codemaker::UnoType::SORT_HYPER:
- case codemaker::UnoType::SORT_UNSIGNED_HYPER:
- case codemaker::UnoType::SORT_CHAR:
+ case codemaker::UnoType::Sort::Boolean:
+ case codemaker::UnoType::Sort::Byte:
+ case codemaker::UnoType::Sort::Short:
+ case codemaker::UnoType::Sort::UnsignedShort:
+ case codemaker::UnoType::Sort::Long:
+ case codemaker::UnoType::Sort::UnsignedLong:
+ case codemaker::UnoType::Sort::Hyper:
+ case codemaker::UnoType::Sort::UnsignedHyper:
+ case codemaker::UnoType::Sort::Char:
m_includeSalTypesH = true;
break;
- case codemaker::UnoType::SORT_FLOAT:
- case codemaker::UnoType::SORT_DOUBLE:
+ case codemaker::UnoType::Sort::Float:
+ case codemaker::UnoType::Sort::Double:
break;
- case codemaker::UnoType::SORT_STRING:
+ case codemaker::UnoType::Sort::String:
m_includeRtlUstringHxx = true;
break;
- case codemaker::UnoType::SORT_TYPE:
+ case codemaker::UnoType::Sort::Type:
m_includeType = true;
break;
- case codemaker::UnoType::SORT_ANY:
+ case codemaker::UnoType::Sort::Any:
m_includeAny = true;
break;
- case codemaker::UnoType::SORT_POLYMORPHIC_STRUCT_TYPE_TEMPLATE:
+ case codemaker::UnoType::Sort::PolymorphicStructTemplate:
for (const OString& arg : args)
{
add(arg);
}
// fall through
- case codemaker::UnoType::SORT_SEQUENCE_TYPE:
- case codemaker::UnoType::SORT_ENUM_TYPE:
- case codemaker::UnoType::SORT_PLAIN_STRUCT_TYPE:
- case codemaker::UnoType::SORT_EXCEPTION_TYPE:
- case codemaker::UnoType::SORT_INTERFACE_TYPE:
- case codemaker::UnoType::SORT_TYPEDEF:
+ case codemaker::UnoType::Sort::Sequence:
+ case codemaker::UnoType::Sort::Enum:
+ case codemaker::UnoType::Sort::PlainStruct:
+ case codemaker::UnoType::Sort::Exception:
+ case codemaker::UnoType::Sort::Interface:
+ case codemaker::UnoType::Sort::Typedef:
m_map.insert(
Dependencies::Map::value_type(n, Dependencies::KIND_NO_BASE));
break;
@@ -268,7 +268,7 @@ void Includes::dumpInclude(
}
bool Includes::isInterfaceType(OString const & entityName) const {
- return m_manager->getSort(b2u(entityName)) == UnoType::SORT_INTERFACE_TYPE;
+ return m_manager->getSort(b2u(entityName)) == UnoType::Sort::Interface;
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/codemaker/source/javamaker/classfile.cxx b/codemaker/source/javamaker/classfile.cxx
index 6e9b9845f6fd..19de29c22d38 100644
--- a/codemaker/source/javamaker/classfile.cxx
+++ b/codemaker/source/javamaker/classfile.cxx
@@ -268,13 +268,13 @@ void ClassFile::Code::instrNew(OString const & type) {
void ClassFile::Code::instrNewarray(codemaker::UnoType::Sort sort) {
OSL_ASSERT(
- sort >= codemaker::UnoType::SORT_BOOLEAN
- && sort <= codemaker::UnoType::SORT_CHAR);
+ sort >= codemaker::UnoType::Sort::Boolean
+ && sort <= codemaker::UnoType::Sort::Char);
// newarray <atype>:
appendU1(m_code, 0xBC);
- static sal_uInt8 const atypes[codemaker::UnoType::SORT_CHAR] = {
+ static sal_uInt8 const atypes[static_cast<int>(codemaker::UnoType::Sort::Char)] = {
0x04, 0x08, 0x09, 0x09, 0x0A, 0x0A, 0x0B, 0x0B, 0x06, 0x07, 0x05 };
- appendU1(m_code, atypes[sort - 1]);
+ appendU1(m_code, atypes[static_cast<int>(sort) - 1]);
}
void ClassFile::Code::instrPop() {
diff --git a/codemaker/source/javamaker/javatype.cxx b/codemaker/source/javamaker/javatype.cxx
index 7157b1b51410..c2dba14deb87 100644
--- a/codemaker/source/javamaker/javatype.cxx
+++ b/codemaker/source/javamaker/javatype.cxx
@@ -145,7 +145,7 @@ SpecialType translateUnoTypeToDescriptor(
assert(
arguments.empty()
== (sort
- != codemaker::UnoType::SORT_INSTANTIATED_POLYMORPHIC_STRUCT_TYPE));
+ != codemaker::UnoType::Sort::InstantiatedPolymorphicStruct));
if (rank > 0xFF - (array ? 1 : 0)) {
throw CannotDumpException(
"Too many array dimensions for Java class file format");
@@ -163,7 +163,7 @@ SpecialType translateUnoTypeToDescriptor(
}
if (polymorphicUnoType != nullptr) {
if (sort
- == codemaker::UnoType::SORT_INSTANTIATED_POLYMORPHIC_STRUCT_TYPE)
+ == codemaker::UnoType::Sort::InstantiatedPolymorphicStruct)
{
polymorphicUnoType->kind = rank == 0
? PolymorphicUnoType::KIND_STRUCT
@@ -175,24 +175,24 @@ SpecialType translateUnoTypeToDescriptor(
}
}
switch (sort) {
- case codemaker::UnoType::SORT_VOID:
- case codemaker::UnoType::SORT_BOOLEAN:
- case codemaker::UnoType::SORT_BYTE:
- case codemaker::UnoType::SORT_SHORT:
- case codemaker::UnoType::SORT_UNSIGNED_SHORT:
- case codemaker::UnoType::SORT_LONG:
- case codemaker::UnoType::SORT_UNSIGNED_LONG:
- case codemaker::UnoType::SORT_HYPER:
- case codemaker::UnoType::SORT_UNSIGNED_HYPER:
- case codemaker::UnoType::SORT_FLOAT:
- case codemaker::UnoType::SORT_DOUBLE:
- case codemaker::UnoType::SORT_CHAR:
- case codemaker::UnoType::SORT_STRING:
- case codemaker::UnoType::SORT_TYPE:
- case codemaker::UnoType::SORT_ANY:
+ case codemaker::UnoType::Sort::Void:
+ case codemaker::UnoType::Sort::Boolean:
+ case codemaker::UnoType::Sort::Byte:
+ case codemaker::UnoType::Sort::Short:
+ case codemaker::UnoType::Sort::UnsignedShort:
+ case codemaker::UnoType::Sort::Long:
+ case codemaker::UnoType::Sort::UnsignedLong:
+ case codemaker::UnoType::Sort::Hyper:
+ case codemaker::UnoType::Sort::UnsignedHyper:
+ case codemaker::UnoType::Sort::Float:
+ case codemaker::UnoType::Sort::Double:
+ case codemaker::UnoType::Sort::Char:
+ case codemaker::UnoType::Sort::String:
+ case codemaker::UnoType::Sort::Type:
+ case codemaker::UnoType::Sort::Any:
{
static char const * const
- simpleTypeDescriptors[codemaker::UnoType::SORT_ANY + 1][2] = {
+ simpleTypeDescriptors[static_cast<int>(codemaker::UnoType::Sort::Any) + 1][2] = {
{ "V", "Ljava/lang/Void;" },
{ "Z", "Ljava/lang/Boolean;" },
{ "B", "Ljava/lang/Byte;" },
@@ -209,7 +209,7 @@ SpecialType translateUnoTypeToDescriptor(
{ "Lcom/sun/star/uno/Type;", "Lcom/sun/star/uno/Type;" },
{ "Ljava/lang/Object;", "Ljava/lang/Object;" } };
char const * s
- = simpleTypeDescriptors[sort][rank == 0 && classType];
+ = simpleTypeDescriptors[static_cast<int>(sort)][rank == 0 && classType];
if (descriptor != nullptr) {
descriptor->append(s);
}
@@ -217,15 +217,15 @@ SpecialType translateUnoTypeToDescriptor(
signature->append(s);
}
static SpecialType const
- simpleTypeSpecials[codemaker::UnoType::SORT_ANY + 1] = {
+ simpleTypeSpecials[static_cast<int>(codemaker::UnoType::Sort::Any) + 1] = {
SPECIAL_TYPE_NONE, SPECIAL_TYPE_NONE, SPECIAL_TYPE_NONE,
SPECIAL_TYPE_NONE, SPECIAL_TYPE_UNSIGNED, SPECIAL_TYPE_NONE,
SPECIAL_TYPE_UNSIGNED, SPECIAL_TYPE_NONE, SPECIAL_TYPE_UNSIGNED,
SPECIAL_TYPE_NONE, SPECIAL_TYPE_NONE, SPECIAL_TYPE_NONE,
SPECIAL_TYPE_NONE, SPECIAL_TYPE_NONE, SPECIAL_TYPE_ANY };
- return simpleTypeSpecials[sort];
+ return simpleTypeSpecials[static_cast<int>(sort)];
}
- case codemaker::UnoType::SORT_INTERFACE_TYPE:
+ case codemaker::UnoType::Sort::Interface:
if (nucleus == "com.sun.star.uno.XInterface") {
if (descriptor != nullptr) {
descriptor->append("Ljava/lang/Object;");
@@ -236,10 +236,10 @@ SpecialType translateUnoTypeToDescriptor(
return SPECIAL_TYPE_INTERFACE;
}
// fall through
- case codemaker::UnoType::SORT_SEQUENCE_TYPE:
- case codemaker::UnoType::SORT_ENUM_TYPE:
- case codemaker::UnoType::SORT_PLAIN_STRUCT_TYPE:
- case codemaker::UnoType::SORT_INSTANTIATED_POLYMORPHIC_STRUCT_TYPE:
+ case codemaker::UnoType::Sort::Sequence:
+ case codemaker::UnoType::Sort::Enum:
+ case codemaker::UnoType::Sort::PlainStruct:
+ case codemaker::UnoType::Sort::InstantiatedPolymorphicStruct:
if (dependencies != nullptr) {
dependencies->insert(nucleus);
}
@@ -871,37 +871,37 @@ sal_uInt16 addFieldInit(
fieldType, true, &nucleus, &rank, &args, &ent);
if (rank == 0) {
switch (sort) {
- case codemaker::UnoType::SORT_BOOLEAN:
- case codemaker::UnoType::SORT_BYTE:
- case codemaker::UnoType::SORT_SHORT:
- case codemaker::UnoType::SORT_UNSIGNED_SHORT:
- case codemaker::UnoType::SORT_LONG:
- case codemaker::UnoType::SORT_UNSIGNED_LONG:
- case codemaker::UnoType::SORT_HYPER:
- case codemaker::UnoType::SORT_UNSIGNED_HYPER:
- case codemaker::UnoType::SORT_FLOAT:
- case codemaker::UnoType::SORT_DOUBLE:
- case codemaker::UnoType::SORT_CHAR:
- case codemaker::UnoType::SORT_INTERFACE_TYPE:
+ case codemaker::UnoType::Sort::Boolean:
+ case codemaker::UnoType::Sort::Byte:
+ case codemaker::UnoType::Sort::Short:
+ case codemaker::UnoType::Sort::UnsignedShort:
+ case codemaker::UnoType::Sort::Long:
+ case codemaker::UnoType::Sort::UnsignedLong:
+ case codemaker::UnoType::Sort::Hyper:
+ case codemaker::UnoType::Sort::UnsignedHyper:
+ case codemaker::UnoType::Sort::Float:
+ case codemaker::UnoType::Sort::Double:
+ case codemaker::UnoType::Sort::Char:
+ case codemaker::UnoType::Sort::Interface:
return 0;
- case codemaker::UnoType::SORT_STRING:
+ case codemaker::UnoType::Sort::String:
code->loadLocalReference(0);
code->loadStringConstant(OString());
code->instrPutfield(className, name, "Ljava/lang/String;");
return 2;
- case codemaker::UnoType::SORT_TYPE:
+ case codemaker::UnoType::Sort::Type:
code->loadLocalReference(0);
code->instrGetstatic(
"com/sun/star/uno/Type", "VOID", "Lcom/sun/star/uno/Type;");
code->instrPutfield(className, name, "Lcom/sun/star/uno/Type;");
return 2;
- case codemaker::UnoType::SORT_ANY:
+ case codemaker::UnoType::Sort::Any:
code->loadLocalReference(0);
code->instrGetstatic(
"com/sun/star/uno/Any", "VOID", "Lcom/sun/star/uno/Any;");
code->instrPutfield(className, name, "Ljava/lang/Object;");
return 2;
- case codemaker::UnoType::SORT_ENUM_TYPE:
+ case codemaker::UnoType::Sort::Enum:
{
rtl::Reference< unoidl::EnumTypeEntity > ent2(
dynamic_cast< unoidl::EnumTypeEntity * >(ent.get()));
@@ -918,8 +918,8 @@ sal_uInt16 addFieldInit(
code->instrPutfield(className, name, desc);
return 2;
}
- case codemaker::UnoType::SORT_PLAIN_STRUCT_TYPE:
- case codemaker::UnoType::SORT_INSTANTIATED_POLYMORPHIC_STRUCT_TYPE:
+ case codemaker::UnoType::Sort::PlainStruct:
+ case codemaker::UnoType::Sort::InstantiatedPolymorphicStruct:
{
code->loadLocalReference(0);
code->instrNew(
@@ -935,8 +935,8 @@ sal_uInt16 addFieldInit(
code->instrPutfield(className, name, desc.makeStringAndClear());
return 3;
}
- case codemaker::UnoType::SORT_SEQUENCE_TYPE:
- case codemaker::UnoType::SORT_TYPEDEF:
+ case codemaker::UnoType::Sort::Sequence:
+ case codemaker::UnoType::Sort::Typedef:
assert(false); // this cannot happen
// fall through
default:
@@ -948,8 +948,8 @@ sal_uInt16 addFieldInit(
code->loadLocalReference(0);
code->loadIntegerConstant(0);
if (rank == 1) {
- if (sort >= codemaker::UnoType::SORT_BOOLEAN
- && sort <= codemaker::UnoType::SORT_CHAR)
+ if (sort >= codemaker::UnoType::Sort::Boolean
+ && sort <= codemaker::UnoType::Sort::Char)
{
code->instrNewarray(sort);
} else {
@@ -996,7 +996,7 @@ sal_uInt16 addLoadLocal(
type, true, &nucleus, &rank, &args, nullptr);
if (rank == 0) {
switch (sort) {
- case codemaker::UnoType::SORT_BOOLEAN:
+ case codemaker::UnoType::Sort::Boolean:
if (any) {
code->instrNew("java/lang/Boolean");
code->instrDup();
@@ -1010,7 +1010,7 @@ sal_uInt16 addLoadLocal(
}
size = 1;
break;
- case codemaker::UnoType::SORT_BYTE:
+ case codemaker::UnoType::Sort::Byte:
if (any) {
code->instrNew("java/lang/Byte");
code->instrDup();
@@ -1024,7 +1024,7 @@ sal_uInt16 addLoadLocal(
}
size = 1;
break;
- case codemaker::UnoType::SORT_SHORT:
+ case codemaker::UnoType::Sort::Short:
if (any) {
code->instrNew("java/lang/Short");
code->instrDup();
@@ -1038,7 +1038,7 @@ sal_uInt16 addLoadLocal(
}
size = 1;
break;
- case codemaker::UnoType::SORT_UNSIGNED_SHORT:
+ case codemaker::UnoType::Sort::UnsignedShort:
if (any) {
code->instrNew("com/sun/star/uno/Any");
code->instrDup();
@@ -1060,7 +1060,7 @@ sal_uInt16 addLoadLocal(
}
size = 1;
break;
- case codemaker::UnoType::SORT_LONG:
+ case codemaker::UnoType::Sort::Long:
if (any) {
code->instrNew("java/lang/Integer");
code->instrDup();
@@ -1074,7 +1074,7 @@ sal_uInt16 addLoadLocal(
}
size = 1;
break;
- case codemaker::UnoType::SORT_UNSIGNED_LONG:
+ case codemaker::UnoType::Sort::UnsignedLong:
if (any) {
code->instrNew("com/sun/star/uno/Any");
code->instrDup();
@@ -1096,7 +1096,7 @@ sal_uInt16 addLoadLocal(
}
size = 1;
break;
- case codemaker::UnoType::SORT_HYPER:
+ case codemaker::UnoType::Sort::Hyper:
if (any) {
code->instrNew("java/lang/Long");
code->instrDup();
@@ -1110,7 +1110,7 @@ sal_uInt16 addLoadLocal(
}
size = 2;
break;
- case codemaker::UnoType::SORT_UNSIGNED_HYPER:
+ case codemaker::UnoType::Sort::UnsignedHyper:
if (any) {
code->instrNew("com/sun/star/uno/Any");
code->instrDup();
@@ -1132,7 +1132,7 @@ sal_uInt16 addLoadLocal(
}
size = 2;
break;
- case codemaker::UnoType::SORT_FLOAT:
+ case codemaker::UnoType::Sort::Float:
if (any) {
code->instrNew("java/lang/Float");
code->instrDup();
@@ -1146,7 +1146,7 @@ sal_uInt16 addLoadLocal(
}
size = 1;
break;
- case codemaker::UnoType::SORT_DOUBLE:
+ case codemaker::UnoType::Sort::Double:
if (any) {
code->instrNew("java/lang/Double");
code->instrDup();
@@ -1160,7 +1160,7 @@ sal_uInt16 addLoadLocal(
}
size = 2;
break;
- case codemaker::UnoType::SORT_CHAR:
+ case codemaker::UnoType::Sort::Char:
if (any) {
code->instrNew("java/lang/Character");
code->instrDup();
@@ -1174,20 +1174,20 @@ sal_uInt16 addLoadLocal(
}
size = 1;
break;
- case codemaker::UnoType::SORT_STRING:
- case codemaker::UnoType::SORT_TYPE:
- case codemaker::UnoType::SORT_ANY:
+ case codemaker::UnoType::Sort::String:
+ case codemaker::UnoType::Sort::Type:
+ case codemaker::UnoType::Sort::Any:
code->loadLocalReference(*index);
stack = size = 1;
break;
- case codemaker::UnoType::SORT_ENUM_TYPE:
+ case codemaker::UnoType::Sort::Enum:
// Assuming that no Java types are derived from Java types that
// are directly derived from com.sun.star.uno.Enum:
code->loadLocalReference(*index);
stack = size = 1;
break;
- case codemaker::UnoType::SORT_PLAIN_STRUCT_TYPE:
- case codemaker::UnoType::SORT_INSTANTIATED_POLYMORPHIC_STRUCT_TYPE:
+ case codemaker::UnoType::Sort::PlainStruct:
+ case codemaker::UnoType::Sort::InstantiatedPolymorphicStruct:
if (any) {
code->instrNew("com/sun/star/uno/Any");
code->instrDup();
@@ -1214,7 +1214,7 @@ sal_uInt16 addLoadLocal(
}
size = 1;
break;
- case codemaker::UnoType::SORT_INTERFACE_TYPE:
+ case codemaker::UnoType::Sort::Interface:
if (any && nucleus != "com.sun.star.uno.XInterface") {
code->instrNew("com/sun/star/uno/Any");
code->instrDup();
@@ -1239,8 +1239,8 @@ sal_uInt16 addLoadLocal(
}
size = 1;
break;
- case codemaker::UnoType::SORT_SEQUENCE_TYPE:
- case codemaker::UnoType::SORT_TYPEDEF:
+ case codemaker::UnoType::Sort::Sequence:
+ case codemaker::UnoType::Sort::Typedef:
assert(false); // this cannot happen
// fall through
default:
@@ -1252,35 +1252,34 @@ sal_uInt16 addLoadLocal(
bool bWrap = false;
if (any) {
switch (sort) {
- case codemaker::UnoType::SORT_BOOLEAN:
- case codemaker::UnoType::SORT_BYTE:
- case codemaker::UnoType::SORT_SHORT:
- case codemaker::UnoType::SORT_LONG:
- case codemaker::UnoType::SORT_HYPER:
- case codemaker::UnoType::SORT_FLOAT:
- case codemaker::UnoType::SORT_DOUBLE:
- case codemaker::UnoType::SORT_CHAR:
- case codemaker::UnoType::SORT_STRING:
- case codemaker::UnoType::SORT_TYPE:
+ case codemaker::UnoType::Sort::Boolean:
+ case codemaker::UnoType::Sort::Byte:
+ case codemaker::UnoType::Sort::Short:
+ case codemaker::UnoType::Sort::Long:
+ case codemaker::UnoType::Sort::Hyper:
+ case codemaker::UnoType::Sort::Float:
+ case codemaker::UnoType::Sort::Double:
+ case codemaker::UnoType::Sort::Char:
+ case codemaker::UnoType::Sort::String:
+ case codemaker::UnoType::Sort::Type:
// assuming that no Java types are derived from
// com.sun.star.uno.Type
- case codemaker::UnoType::SORT_ENUM_TYPE:
+ case codemaker::UnoType::Sort::Enum:
// assuming that no Java types are derived from Java
// types that are directly derived from
// com.sun.star.uno.Enum
break;
- case codemaker::UnoType::SORT_UNSIGNED_SHORT:
- case codemaker::UnoType::SORT_UNSIGNED_LONG:
- case codemaker::UnoType::SORT_UNSIGNED_HYPER:
- case codemaker::UnoType::SORT_ANY:
- case codemaker::UnoType::SORT_PLAIN_STRUCT_TYPE:
- case codemaker::UnoType::
- SORT_INSTANTIATED_POLYMORPHIC_STRUCT_TYPE:
- case codemaker::UnoType::SORT_INTERFACE_TYPE:
+ case codemaker::UnoType::Sort::UnsignedShort:
+ case codemaker::UnoType::Sort::UnsignedLong:
+ case codemaker::UnoType::Sort::UnsignedHyper:
+ case codemaker::UnoType::Sort::Any:
+ case codemaker::UnoType::Sort::PlainStruct:
+ case codemaker::UnoType::Sort::InstantiatedPolymorphicStruct:
+ case codemaker::UnoType::Sort::Interface:
bWrap = true;
break;
- case codemaker::UnoType::SORT_SEQUENCE_TYPE:
- case codemaker::UnoType::SORT_TYPEDEF:
+ case codemaker::UnoType::Sort::Sequence:
+ case codemaker::UnoType::Sort::Typedef:
assert(false); // this cannot happen
// fall through
default:
@@ -1351,7 +1350,7 @@ void addPlainStructBaseArguments(
assert(methodDescriptor != nullptr);
rtl::Reference< unoidl::Entity > ent;
if (manager->getSort(base, &ent)
- != codemaker::UnoType::SORT_PLAIN_STRUCT_TYPE)
+ != codemaker::UnoType::Sort::PlainStruct)
{
throw CannotDumpException(
"unexpected entity \"" + base
@@ -1541,7 +1540,7 @@ void addExceptionBaseArguments(
assert(manager.is());
assert(methodDescriptor != nullptr);
rtl::Reference< unoidl::Entity > ent;
- if (manager->getSort(base, &ent) != codemaker::UnoType::SORT_EXCEPTION_TYPE)
+ if (manager->getSort(base, &ent) != codemaker::UnoType::Sort::Exception)
{
throw CannotDumpException(
"unexpected entity \"" + base
@@ -1981,25 +1980,25 @@ void handleTypedef(
OUString nucleus;
switch (manager->decompose(entity->getType(), false, &nucleus, nullptr, nullptr, nullptr))
{
- case codemaker::UnoType::SORT_BOOLEAN:
- case codemaker::UnoType::SORT_BYTE:
- case codemaker::UnoType::SORT_SHORT:
- case codemaker::UnoType::SORT_UNSIGNED_SHORT:
- case codemaker::UnoType::SORT_LONG:
- case codemaker::UnoType::SORT_UNSIGNED_LONG:
- case codemaker::UnoType::SORT_HYPER:
- case codemaker::UnoType::SORT_UNSIGNED_HYPER:
- case codemaker::UnoType::SORT_FLOAT:
- case codemaker::UnoType::SORT_DOUBLE:
- case codemaker::UnoType::SORT_CHAR:
- case codemaker::UnoType::SORT_STRING:
- case codemaker::UnoType::SORT_TYPE:
- case codemaker::UnoType::SORT_ANY:
+ case codemaker::UnoType::Sort::Boolean:
+ case codemaker::UnoType::Sort::Byte:
+ case codemaker::UnoType::Sort::Short:
+ case codemaker::UnoType::Sort::UnsignedShort:
+ case codemaker::UnoType::Sort::Long:
+ case codemaker::UnoType::Sort::UnsignedLong:
+ case codemaker::UnoType::Sort::Hyper:
+ case codemaker::UnoType::Sort::UnsignedHyper:
+ case codemaker::UnoType::Sort::Float:
+ case codemaker::UnoType::Sort::Double:
+ case codemaker::UnoType::Sort::Char:
+ case codemaker::UnoType::Sort::String:
+ case codemaker::UnoType::Sort::Type:
+ case codemaker::UnoType::Sort::Any:
break;
- case codemaker::UnoType::SORT_ENUM_TYPE:
- case codemaker::UnoType::SORT_PLAIN_STRUCT_TYPE:
- case codemaker::UnoType::SORT_INTERFACE_TYPE:
- case codemaker::UnoType::SORT_TYPEDEF:
+ case codemaker::UnoType::Sort::Enum:
+ case codemaker::UnoType::Sort::PlainStruct:
+ case codemaker::UnoType::Sort::Interface:
+ case codemaker::UnoType::Sort::Typedef:
dependencies->insert(nucleus);
break;
default:
@@ -2474,7 +2473,7 @@ void produce(
rtl::Reference< unoidl::Entity > ent;
rtl::Reference< unoidl::MapCursor > cur;
switch (manager->getSort(name, &ent, &cur)) {
- case codemaker::UnoType::SORT_MODULE:
+ case codemaker::UnoType::Sort::Module:
{
OUString prefix;
if (!name.isEmpty()) {
@@ -2489,56 +2488,56 @@ void produce(
}
return;
}
- case codemaker::UnoType::SORT_ENUM_TYPE:
+ case codemaker::UnoType::Sort::Enum:
handleEnumType(
name, dynamic_cast< unoidl::EnumTypeEntity * >(ent.get()), options);
break;
- case codemaker::UnoType::SORT_PLAIN_STRUCT_TYPE:
+ case codemaker::UnoType::Sort::PlainStruct:
handlePlainStructType(
name, dynamic_cast< unoidl::PlainStructTypeEntity * >(ent.get()),
manager, options, &deps);
break;
- case codemaker::UnoType::SORT_POLYMORPHIC_STRUCT_TYPE_TEMPLATE:
+ case codemaker::UnoType::Sort::PolymorphicStructTemplate:
handlePolyStructType(
name,
dynamic_cast< unoidl::PolymorphicStructTypeTemplateEntity * >(
ent.get()),
manager, options, &deps);
break;
- case codemaker::UnoType::SORT_EXCEPTION_TYPE:
+ case codemaker::UnoType::Sort::Exception:
handleExceptionType(
name, dynamic_cast< unoidl::ExceptionTypeEntity * >(ent.get()),
manager, options, &deps);
break;
- case codemaker::UnoType::SORT_INTERFACE_TYPE:
+ case codemaker::UnoType::Sort::Interface:
handleInterfaceType(
name, dynamic_cast< unoidl::InterfaceTypeEntity * >(ent.get()),
manager, options, &deps);
break;
- case codemaker::UnoType::SORT_TYPEDEF:
+ case codemaker::UnoType::Sort::Typedef:
handleTypedef(
dynamic_cast< unoidl::TypedefEntity * >(ent.get()), manager, &deps);
break;
- case codemaker::UnoType::SORT_CONSTANT_GROUP:
+ case codemaker::UnoType::Sort::ConstantGroup:
handleConstantGroup(
name, dynamic_cast< unoidl::ConstantGroupEntity * >(ent.get()),
manager, options, &deps);
break;
- case codemaker::UnoType::SORT_SINGLE_INTERFACE_BASED_SERVICE:
+ case codemaker::UnoType::Sort::SingleInterfaceBasedService:
handleService(
name,
dynamic_cast< unoidl::SingleInterfaceBasedServiceEntity * >(
ent.get()),
manager, options, &deps);
break;
- case codemaker::UnoType::SORT_INTERFACE_BASED_SINGLETON:
+ case codemaker::UnoType::Sort::InterfaceBasedSingleton:
handleSingleton(
name,
dynamic_cast< unoidl::InterfaceBasedSingletonEntity * >(ent.get()),
manager, options, &deps);
break;
- case codemaker::UnoType::SORT_ACCUMULATION_BASED_SERVICE:
- case codemaker::UnoType::SORT_SERVICE_BASED_SINGLETON:
+ case codemaker::UnoType::Sort::AccumulationBasedService:
+ case codemaker::UnoType::Sort::ServiceBasedSingleton:
break;
default:
throw CannotDumpException(
diff --git a/include/codemaker/unotype.hxx b/include/codemaker/unotype.hxx
index ef2859c1dee1..90e17f5197f9 100644
--- a/include/codemaker/unotype.hxx
+++ b/include/codemaker/unotype.hxx
@@ -32,36 +32,36 @@ namespace UnoType {
/**
An enumeration of all the sorts of relevant UNOIDL entities.
*/
- enum Sort {
- SORT_VOID,
- SORT_BOOLEAN,
- SORT_BYTE,
- SORT_SHORT,
- SORT_UNSIGNED_SHORT,
- SORT_LONG,
- SORT_UNSIGNED_LONG,
- SORT_HYPER,
- SORT_UNSIGNED_HYPER,
- SORT_FLOAT,
- SORT_DOUBLE,
- SORT_CHAR,
- SORT_STRING,
- SORT_TYPE,
- SORT_ANY,
- SORT_SEQUENCE_TYPE,
- SORT_MODULE,
- SORT_ENUM_TYPE,
- SORT_PLAIN_STRUCT_TYPE,
- SORT_POLYMORPHIC_STRUCT_TYPE_TEMPLATE,
- SORT_INSTANTIATED_POLYMORPHIC_STRUCT_TYPE,
- SORT_EXCEPTION_TYPE,
- SORT_INTERFACE_TYPE,
- SORT_TYPEDEF,
- SORT_CONSTANT_GROUP,
- SORT_SINGLE_INTERFACE_BASED_SERVICE,
- SORT_ACCUMULATION_BASED_SERVICE,
- SORT_INTERFACE_BASED_SINGLETON,
- SORT_SERVICE_BASED_SINGLETON
+ enum class Sort {
+ Void,
+ Boolean,
+ Byte,
+ Short,
+ UnsignedShort,
+ Long,
+ UnsignedLong,
+ Hyper,
+ UnsignedHyper,
+ Float,
+ Double,
+ Char,
+ String,
+ Type,
+ Any,
+ Sequence,
+ Module,
+ Enum,
+ PlainStruct,
+ PolymorphicStructTemplate,
+ InstantiatedPolymorphicStruct,
+ Exception,
+ Interface,
+ Typedef,
+ ConstantGroup,
+ SingleInterfaceBasedService,
+ AccumulationBasedService,
+ InterfaceBasedSingleton,
+ ServiceBasedSingleton
};
/**
diff --git a/unodevtools/source/skeletonmaker/cppcompskeleton.cxx b/unodevtools/source/skeletonmaker/cppcompskeleton.cxx
index dc49eb8bb5bd..4b6aa7d57f51 100644
--- a/unodevtools/source/skeletonmaker/cppcompskeleton.cxx
+++ b/unodevtools/source/skeletonmaker/cppcompskeleton.cxx
@@ -585,7 +585,7 @@ void generateMemberInitialization(std::ostream& o,
{
sal_Int32 rank;
if ((manager->decompose(i->type, true, nullptr, &rank, nullptr, nullptr)
- <= codemaker::UnoType::SORT_CHAR)
+ <= codemaker::UnoType::Sort::Char)
&& rank == 0)
{
o << ",\n m_" << i->name << "(";
diff --git a/unodevtools/source/skeletonmaker/cpptypemaker.cxx b/unodevtools/source/skeletonmaker/cpptypemaker.cxx
index 4472f3f943f1..1fdeabd15201 100644
--- a/unodevtools/source/skeletonmaker/cpptypemaker.cxx
+++ b/unodevtools/source/skeletonmaker/cpptypemaker.cxx
@@ -38,21 +38,21 @@ void printType(
rtl::Reference< unoidl::Entity > const & entity, short referenceType,
bool defaultvalue)
{
- if (defaultvalue && rank == 0 && sort <= codemaker::UnoType::SORT_CHAR) {
+ if (defaultvalue && rank == 0 && sort <= codemaker::UnoType::Sort::Char) {
switch (sort) {
- case codemaker::UnoType::SORT_BOOLEAN:
+ case codemaker::UnoType::Sort::Boolean:
o << "sal_False";
return;
- case codemaker::UnoType::SORT_CHAR:
- case codemaker::UnoType::SORT_BYTE:
- case codemaker::UnoType::SORT_SHORT:
- case codemaker::UnoType::SORT_UNSIGNED_SHORT:
- case codemaker::UnoType::SORT_LONG:
- case codemaker::UnoType::SORT_UNSIGNED_LONG:
- case codemaker::UnoType::SORT_HYPER:
- case codemaker::UnoType::SORT_UNSIGNED_HYPER:
- case codemaker::UnoType::SORT_FLOAT:
- case codemaker::UnoType::SORT_DOUBLE:
+ case codemaker::UnoType::Sort::Char:
+ case codemaker::UnoType::Sort::Byte:
+ case codemaker::UnoType::Sort::Short:
+ case codemaker::UnoType::Sort::UnsignedShort:
+ case codemaker::UnoType::Sort::Long:
+ case codemaker::UnoType::Sort::UnsignedLong:
+ case codemaker::UnoType::Sort::Hyper:
+ case codemaker::UnoType::Sort::UnsignedHyper:
+ case codemaker::UnoType::Sort::Float:
+ case codemaker::UnoType::Sort::Double:
o << "0";
return;
default:
@@ -61,7 +61,7 @@ void printType(
}
if (defaultvalue && referenceType == 16) {
- if (sort == codemaker::UnoType::SORT_ENUM_TYPE) {
+ if (sort == codemaker::UnoType::Sort::Enum) {
o << nucleus.copy(nucleus.lastIndexOf('.') + 1) << "_"
<< dynamic_cast< unoidl::EnumTypeEntity * >(entity.get())->
getMembers()[0].name;
@@ -69,10 +69,10 @@ void printType(
return;
}
bool bReference = false;
- if (((sort > codemaker::UnoType::SORT_CHAR ||
+ if (((sort > codemaker::UnoType::Sort::Char ||
rank > 0) && referenceType != 8 &&
- !(sort == codemaker::UnoType::SORT_ENUM_TYPE && referenceType == 4 && rank == 0)) ||
- (sort <= codemaker::UnoType::SORT_CHAR && referenceType == 2))
+ !(sort == codemaker::UnoType::Sort::Enum && referenceType == 4 && rank == 0)) ||
+ (sort <= codemaker::UnoType::Sort::Char && referenceType == 2))
{
bReference = true;
}
@@ -84,7 +84,7 @@ void printType(
o << ((options.shortnames) ? "css::uno::Sequence< " :
"::com::sun::star::uno::Sequence< ");
}
- if (sort == codemaker::UnoType::SORT_INTERFACE_TYPE && referenceType > 0) {
+ if (sort == codemaker::UnoType::Sort::Interface && referenceType > 0) {
o << ((options.shortnames) ? "css::uno::Reference< " :
"::com::sun::star::uno::Reference< ");
}
@@ -92,7 +92,7 @@ void printType(
o << scopedCppName(codemaker::cpp::translateUnoToCppType(sort, nucleus),
options.shortnames && referenceType > 0);
- if (sort == codemaker::UnoType::SORT_INTERFACE_TYPE && referenceType > 0)
+ if (sort == codemaker::UnoType::Sort::Interface && referenceType > 0)
o << " >";
if (!arguments.empty()) {
@@ -114,7 +114,7 @@ void printType(
if (bReference && referenceType > 1)
o << " &";
- if (referenceType == 8 && (sort > codemaker::UnoType::SORT_CHAR || rank > 0))
+ if (referenceType == 8 && (sort > codemaker::UnoType::Sort::Char || rank > 0))
o << "()";
}
@@ -143,7 +143,7 @@ bool printConstructorParameters(
{
bool previous = false;
switch (sort) {
- case codemaker::UnoType::SORT_PLAIN_STRUCT_TYPE:
+ case codemaker::UnoType::Sort::PlainStruct:
{
rtl::Reference< unoidl::PlainStructTypeEntity > ent2(
dynamic_cast< unoidl::PlainStructTypeEntity * >(entity.get()));
@@ -171,7 +171,7 @@ bool printConstructorParameters(
}
break;
}
- case codemaker::UnoType::SORT_POLYMORPHIC_STRUCT_TYPE_TEMPLATE:
+ case codemaker::UnoType::Sort::PolymorphicStructTemplate:
{
rtl::Reference< unoidl::PolymorphicStructTypeTemplateEntity > ent2(
dynamic_cast< unoidl::PolymorphicStructTypeTemplateEntity * >(
@@ -197,7 +197,7 @@ bool printConstructorParameters(
}
break;
}
- case codemaker::UnoType::SORT_INSTANTIATED_POLYMORPHIC_STRUCT_TYPE:
+ case codemaker::UnoType::Sort::InstantiatedPolymorphicStruct:
{
rtl::Reference< unoidl::PolymorphicStructTypeTemplateEntity > ent2(
dynamic_cast< unoidl::PolymorphicStructTypeTemplateEntity * >(
@@ -232,7 +232,7 @@ bool printConstructorParameters(
}
break;
}
- case codemaker::UnoType::SORT_EXCEPTION_TYPE:
+ case codemaker::UnoType::Sort::Exception:
{
rtl::Reference< unoidl::ExceptionTypeEntity > ent2(
dynamic_cast< unoidl::ExceptionTypeEntity * >(entity.get()));
@@ -498,7 +498,7 @@ void printMethods(std::ostream & o,
generated.add(u2b(name));
rtl::Reference< unoidl::Entity > ent;
- if (manager->getSort(name, &ent) != codemaker::UnoType::SORT_INTERFACE_TYPE)
+ if (manager->getSort(name, &ent) != codemaker::UnoType::Sort::Interface)
{
throw CannotDumpException(
"unexpected entity \"" + name
@@ -658,7 +658,7 @@ void printConstructors(
{
rtl::Reference< unoidl::Entity > ent;
if (manager->getSort(name, &ent)
- != codemaker::UnoType::SORT_SINGLE_INTERFACE_BASED_SERVICE)
+ != codemaker::UnoType::Sort::SingleInterfaceBasedService)
{
throw CannotDumpException(
"unexpected entity \"" + name
@@ -772,9 +772,9 @@ void generateDocumentation(std::ostream & o,
bool comment = true;
if (!delegate.isEmpty()) {
- if (sort != codemaker::UnoType::SORT_INTERFACE_TYPE &&
- sort != codemaker::UnoType::SORT_SINGLE_INTERFACE_BASED_SERVICE &&
- sort != codemaker::UnoType::SORT_ACCUMULATION_BASED_SERVICE )
+ if (sort != codemaker::UnoType::Sort::Interface &&
+ sort != codemaker::UnoType::Sort::SingleInterfaceBasedService &&
+ sort != codemaker::UnoType::Sort::AccumulationBasedService )
{
return;
}
@@ -785,59 +785,59 @@ void generateDocumentation(std::ostream & o,
o << "\n// UNO";
if (rank != 0) {
o << " sequence type";
- } else if (sort <= codemaker::UnoType::SORT_ANY) {
+ } else if (sort <= codemaker::UnoType::Sort::Any) {
o << " simple type";
} else {
switch (sort) {
- case codemaker::UnoType::SORT_INTERFACE_TYPE:
+ case codemaker::UnoType::Sort::Interface:
o << " interface type";
break;
- case codemaker::UnoType::SORT_MODULE:
+ case codemaker::UnoType::Sort::Module:
o << "IDL module";
break;
- case codemaker::UnoType::SORT_PLAIN_STRUCT_TYPE:
+ case codemaker::UnoType::Sort::PlainStruct:
o << " simple struct type";
break;
- case codemaker::UnoType::SORT_POLYMORPHIC_STRUCT_TYPE_TEMPLATE:
+ case codemaker::UnoType::Sort::PolymorphicStructTemplate:
o << " polymorphic struct type template";
break;
- case codemaker::UnoType::SORT_INSTANTIATED_POLYMORPHIC_STRUCT_TYPE:
+ case codemaker::UnoType::Sort::InstantiatedPolymorphicStruct:
o << " instantiated polymorphic struct type";
break;
- case codemaker::UnoType::SORT_ENUM_TYPE:
+ case codemaker::UnoType::Sort::Enum:
o << " enum type";
break;
- case codemaker::UnoType::SORT_EXCEPTION_TYPE:
+ case codemaker::UnoType::Sort::Exception:
o << " exception type";
break;
- case codemaker::UnoType::SORT_TYPEDEF:
+ case codemaker::UnoType::Sort::Typedef:
o << "IDL typedef";
break;
- case codemaker::UnoType::SORT_SINGLE_INTERFACE_BASED_SERVICE:
+ case codemaker::UnoType::Sort::SingleInterfaceBasedService:
o << " single-inheritance--based service";
break;
- case codemaker::UnoType::SORT_ACCUMULATION_BASED_SERVICE:
+ case codemaker::UnoType::Sort::AccumulationBasedService:
o << "IDL accumulation-based service";
break;
- case codemaker::UnoType::SORT_INTERFACE_BASED_SINGLETON:
+ case codemaker::UnoType::Sort::InterfaceBasedSingleton:
o << " inheritance-based singleton";
break;
- case codemaker::UnoType::SORT_SERVICE_BASED_SINGLETON:
+ case codemaker::UnoType::Sort::ServiceBasedSingleton:
o << "IDL service-based singleton";
break;
- case codemaker::UnoType::SORT_CONSTANT_GROUP:
+ case codemaker::UnoType::Sort::ConstantGroup:
o << "IDL constant group";
break;
@@ -859,7 +859,7 @@ void generateDocumentation(std::ostream & o,
"array");
o << '\n';
}
- } else if (sort <= codemaker::UnoType::SORT_ANY) {
+ } else if (sort <= codemaker::UnoType::Sort::Any) {
if (comment) {
printMapsToCppType(
o, options, manager, sort, nucleus, rank, arguments, entity, nullptr);
@@ -867,7 +867,7 @@ void generateDocumentation(std::ostream & o,
}
} else {
switch (sort) {
- case codemaker::UnoType::SORT_INTERFACE_TYPE:
+ case codemaker::UnoType::Sort::Interface:
if (comment)
printMapsToCppType(
o, options, manager, sort, nucleus, rank, arguments, entity,
@@ -886,70 +886,70 @@ void generateDocumentation(std::ostream & o,
}
break;
- case codemaker::UnoType::SORT_MODULE:
+ case codemaker::UnoType::Sort::Module:
printMapsToCppType(
o, options, manager, sort, nucleus, rank, arguments, entity,
"namespace");
o << '\n';
break;
- case codemaker::UnoType::SORT_PLAIN_STRUCT_TYPE:
+ case codemaker::UnoType::Sort::PlainStruct:
printMapsToCppType(
o, options, manager, sort, nucleus, rank, arguments, entity,
"class");
o << "; full constructor:\n";
printConstructor(
- o, options, manager, codemaker::UnoType::SORT_PLAIN_STRUCT_TYPE,
+ o, options, manager, codemaker::UnoType::Sort::PlainStruct,
entity, nucleus, arguments);
break;
- case codemaker::UnoType::SORT_POLYMORPHIC_STRUCT_TYPE_TEMPLATE:
+ case codemaker::UnoType::Sort::PolymorphicStructTemplate:
printMapsToCppType(
o, options, manager, sort, nucleus, rank, arguments, entity,
"class template");
o << "; full constructor:\n";
printConstructor(
o, options, manager,
- codemaker::UnoType::SORT_POLYMORPHIC_STRUCT_TYPE_TEMPLATE,
+ codemaker::UnoType::Sort::PolymorphicStructTemplate,
entity, nucleus, arguments);
break;
- case codemaker::UnoType::SORT_INSTANTIATED_POLYMORPHIC_STRUCT_TYPE:
+ case codemaker::UnoType::Sort::InstantiatedPolymorphicStruct:
printMapsToCppType(
o, options, manager, sort, nucleus, rank, arguments, entity,
"class template instantiation");
o << "; full constructor:\n";
printConstructor(
o, options, manager,
- codemaker::UnoType::SORT_INSTANTIATED_POLYMORPHIC_STRUCT_TYPE,
+ codemaker::UnoType::Sort::InstantiatedPolymorphicStruct,
entity, nucleus, arguments);
break;
- case codemaker::UnoType::SORT_ENUM_TYPE:
+ case codemaker::UnoType::Sort::Enum:
printMapsToCppType(
o, options, manager, sort, nucleus, rank, arguments, entity,
"enum");
o << '\n';
break;
- case codemaker::UnoType::SORT_CONSTANT_GROUP:
+ case codemaker::UnoType::Sort::ConstantGroup:
printMapsToCppType(
o, options, manager, sort, nucleus, rank, arguments, entity,
"namespace");
o << '\n';
break;
- case codemaker::UnoType::SORT_EXCEPTION_TYPE:
+ case codemaker::UnoType::Sort::Exception:
printMapsToCppType(
o, options, manager, sort, nucleus, rank, arguments, entity,
"exception class");
o << "; full constructor:\n";
printConstructor(
- o, options, manager, codemaker::UnoType::SORT_EXCEPTION_TYPE,
+ o, options, manager, codemaker::UnoType::Sort::Exception,
entity, nucleus, arguments);
break;
- case codemaker::UnoType::SORT_SINGLE_INTERFACE_BASED_SERVICE:
+ case codemaker::UnoType::Sort::SingleInterfaceBasedService:
if (comment) {
printMapsToCppType(
o, options, manager, sort, nucleus, rank, arguments, entity,
@@ -964,7 +964,7 @@ void generateDocumentation(std::ostream & o,
delegate);
break;
- case codemaker::UnoType::SORT_ACCUMULATION_BASED_SERVICE:
+ case codemaker::UnoType::Sort::AccumulationBasedService:
if (comment)
o << ("does not map to C++\n"
"// the service members are generated instead\n");
@@ -975,7 +975,7 @@ void generateDocumentation(std::ostream & o,
delegate);
break;
- case codemaker::UnoType::SORT_INTERFACE_BASED_SINGLETON:
+ case codemaker::UnoType::Sort::InterfaceBasedSingleton:
printMapsToCppType(
o, options, manager, sort, nucleus, rank, arguments, entity,
"class");
@@ -988,7 +988,7 @@ void generateDocumentation(std::ostream & o,
o << " get(::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext > const & context);\n";
break;
- case codemaker::UnoType::SORT_SERVICE_BASED_SINGLETON:
+ case codemaker::UnoType::Sort::ServiceBasedSingleton:
o << "does not map to C++\n";
break;
diff --git a/unodevtools/source/skeletonmaker/javatypemaker.cxx b/unodevtools/source/skeletonmaker/javatypemaker.cxx
index 20c1c8c47d2c..e097b831be90 100644
--- a/unodevtools/source/skeletonmaker/javatypemaker.cxx
+++ b/unodevtools/source/skeletonmaker/javatypemaker.cxx
@@ -37,21 +37,21 @@ void printType(
std::vector< OUString > const & arguments, bool referenceType,
bool defaultvalue)
{
- if (defaultvalue && rank == 0 && sort <= codemaker::UnoType::SORT_CHAR) {
+ if (defaultvalue && rank == 0 && sort <= codemaker::UnoType::Sort::Char) {
switch (sort) {
- case codemaker::UnoType::SORT_BOOLEAN:
+ case codemaker::UnoType::Sort::Boolean:
o << "false";
return;
- case codemaker::UnoType::SORT_CHAR:
- case codemaker::UnoType::SORT_BYTE:
- case codemaker::UnoType::SORT_SHORT:
- case codemaker::UnoType::SORT_UNSIGNED_SHORT:
- case codemaker::UnoType::SORT_LONG:
- case codemaker::UnoType::SORT_UNSIGNED_LONG:
- case codemaker::UnoType::SORT_HYPER:
- case codemaker::UnoType::SORT_UNSIGNED_HYPER:
- case codemaker::UnoType::SORT_FLOAT:
- case codemaker::UnoType::SORT_DOUBLE:
+ case codemaker::UnoType::Sort::Char:
+ case codemaker::UnoType::Sort::Byte:
+ case codemaker::UnoType::Sort::Short:
+ case codemaker::UnoType::Sort::UnsignedShort:
+ case codemaker::UnoType::Sort::Long:
+ case codemaker::UnoType::Sort::UnsignedLong:
+ case codemaker::UnoType::Sort::Hyper:
+ case codemaker::UnoType::Sort::UnsignedHyper:
+ case codemaker::UnoType::Sort::Float:
+ case codemaker::UnoType::Sort::Double:
o << "0";
return;
default:
@@ -60,16 +60,16 @@ void printType(
}
if (defaultvalue) {
- if (sort == codemaker::UnoType::SORT_INTERFACE_TYPE) {
+ if (sort == codemaker::UnoType::Sort::Interface) {
o << "null";
return;
- } else if (sort == codemaker::UnoType::SORT_ANY && rank == 0) {
+ } else if (sort == codemaker::UnoType::Sort::Any && rank == 0) {
o << "com.sun.star.uno.Any.VOID";
return;
- } else if (sort == codemaker::UnoType::SORT_TYPE && rank == 0) {
+ } else if (sort == codemaker::UnoType::Sort::Type && rank == 0) {
o << "com.sun.star.uno.Type.VOID";
return;
- } else if (sort != codemaker::UnoType::SORT_ENUM_TYPE || rank != 0) {
+ } else if (sort != codemaker::UnoType::Sort::Enum || rank != 0) {
o << "new ";
}
}
@@ -100,8 +100,8 @@ void printType(
o << "[]";
}
- if (defaultvalue && sort > codemaker::UnoType::SORT_CHAR && rank == 0) {
- if (sort == codemaker::UnoType::SORT_ENUM_TYPE)
+ if (defaultvalue && sort > codemaker::UnoType::Sort::Char && rank == 0) {
+ if (sort == codemaker::UnoType::Sort::Enum)
o << ".getDefault()";
else
o << "()";
@@ -132,7 +132,7 @@ bool printConstructorParameters(
{
bool previous = false;
switch (sort) {
- case codemaker::UnoType::SORT_PLAIN_STRUCT_TYPE:
+ case codemaker::UnoType::Sort::PlainStruct:
{
rtl::Reference< unoidl::PlainStructTypeEntity > ent2(
dynamic_cast< unoidl::PlainStructTypeEntity * >(entity.get()));
@@ -160,7 +160,7 @@ bool printConstructorParameters(
}
break;
}
- case codemaker::UnoType::SORT_POLYMORPHIC_STRUCT_TYPE_TEMPLATE:
+ case codemaker::UnoType::Sort::PolymorphicStructTemplate:
{
rtl::Reference< unoidl::PolymorphicStructTypeTemplateEntity > ent2(
dynamic_cast< unoidl::PolymorphicStructTypeTemplateEntity * >(
@@ -186,7 +186,7 @@ bool printConstructorParameters(
}
break;
}
- case codemaker::UnoType::SORT_INSTANTIATED_POLYMORPHIC_STRUCT_TYPE:
+ case codemaker::UnoType::Sort::InstantiatedPolymorphicStruct:
{
rtl::Reference< unoidl::PolymorphicStructTypeTemplateEntity > ent2(
dynamic_cast< unoidl::PolymorphicStructTypeTemplateEntity * >(
@@ -221,7 +221,7 @@ bool printConstructorParameters(
}
break;
}
- case codemaker::UnoType::SORT_EXCEPTION_TYPE:
+ case codemaker::UnoType::Sort::Exception:
{
rtl::Reference< unoidl::ExceptionTypeEntity > ent2(
dynamic_cast< unoidl::ExceptionTypeEntity * >(entity.get()));
@@ -445,7 +445,7 @@ void printMethods(std::ostream & o,
generated.add(u2b(name));
rtl::Reference< unoidl::Entity > ent;
- if (manager->getSort(name, &ent) != codemaker::UnoType::SORT_INTERFACE_TYPE)
+ if (manager->getSort(name, &ent) != codemaker::UnoType::Sort::Interface)
{
throw CannotDumpException(
"unexpected entity \"" + name
@@ -576,7 +576,7 @@ void printConstructors(
{
rtl::Reference< unoidl::Entity > ent;
if (manager->getSort(name, &ent)
- != codemaker::UnoType::SORT_SINGLE_INTERFACE_BASED_SERVICE)
+ != codemaker::UnoType::Sort::SingleInterfaceBasedService)
{
throw CannotDumpException(
"unexpected entity \"" + name
@@ -686,9 +686,9 @@ void generateDocumentation(std::ostream & o,
bool comment = true;
if (!delegate.isEmpty()) {
- if (sort != codemaker::UnoType::SORT_INTERFACE_TYPE &&
- sort != codemaker::UnoType::SORT_SINGLE_INTERFACE_BASED_SERVICE &&
- sort != codemaker::UnoType::SORT_ACCUMULATION_BASED_SERVICE )
+ if (sort != codemaker::UnoType::Sort::Interface &&
+ sort != codemaker::UnoType::Sort::SingleInterfaceBasedService &&
+ sort != codemaker::UnoType::Sort::AccumulationBasedService )
{
return;
}
@@ -699,59 +699,59 @@ void generateDocumentation(std::ostream & o,
o << "\n// UNO";
if (rank != 0) {
o << " sequence type";
- } else if (sort <= codemaker::UnoType::SORT_ANY) {
+ } else if (sort <= codemaker::UnoType::Sort::Any) {
o << " simple type";
} else {
switch (sort) {
- case codemaker::UnoType::SORT_INTERFACE_TYPE:
+ case codemaker::UnoType::Sort::Interface:
o << " interface type";
break;
- case codemaker::UnoType::SORT_MODULE:
+ case codemaker::UnoType::Sort::Module:
o << "IDL module";
break;
- case codemaker::UnoType::SORT_PLAIN_STRUCT_TYPE:
+ case codemaker::UnoType::Sort::PlainStruct:
o << " simple struct type";
break;
- case codemaker::UnoType::SORT_POLYMORPHIC_STRUCT_TYPE_TEMPLATE:
+ case codemaker::UnoType::Sort::PolymorphicStructTemplate:
o << " polymorphic struct type template";
break;
- case codemaker::UnoType::SORT_INSTANTIATED_POLYMORPHIC_STRUCT_TYPE:
+ case codemaker::UnoType::Sort::InstantiatedPolymorphicStruct:
o << " instantiated polymorphic struct type";
break;
- case codemaker::UnoType::SORT_ENUM_TYPE:
+ case codemaker::UnoType::Sort::Enum:
o << " enum type";
break;
- case codemaker::UnoType::SORT_EXCEPTION_TYPE:
+ case codemaker::UnoType::Sort::Exception:
o << " exception type";
break;
- case codemaker::UnoType::SORT_TYPEDEF:
+ case codemaker::UnoType::Sort::Typedef:
o << "IDL typedef";
break;
- case codemaker::UnoType::SORT_SINGLE_INTERFACE_BASED_SERVICE:
+ case codemaker::UnoType::Sort::SingleInterfaceBasedService:
o << " single-inheritance--based service";
break;
- case codemaker::UnoType::SORT_ACCUMULATION_BASED_SERVICE:
+ case codemaker::UnoType::Sort::AccumulationBasedService:
o << "IDL accumulation-based service";
break;
- case codemaker::UnoType::SORT_INTERFACE_BASED_SINGLETON:
+ case codemaker::UnoType::Sort::InterfaceBasedSingleton:
o << " inheritance-based singleton";
break;
- case codemaker::UnoType::SORT_SERVICE_BASED_SINGLETON:
+ case codemaker::UnoType::Sort::ServiceBasedSingleton:
o << "IDL service-based singleton";
break;
- case codemaker::UnoType::SORT_CONSTANT_GROUP:
+ case codemaker::UnoType::Sort::ConstantGroup:
o << "IDL constant group";
break;
@@ -770,13 +770,13 @@ void generateDocumentation(std::ostream & o,
printMapsToJavaType(
o, options, manager, sort, nucleus, rank, arguments, "array");
o << '\n';
- } else if (sort <= codemaker::UnoType::SORT_ANY) {
+ } else if (sort <= codemaker::UnoType::Sort::Any) {
printMapsToJavaType(
o, options, manager, sort, nucleus, rank, arguments, nullptr);
o << '\n';
} else {
switch (sort) {
- case codemaker::UnoType::SORT_INTERFACE_TYPE:
+ case codemaker::UnoType::Sort::Interface:
printMapsToJavaType(
o, options, manager, sort, nucleus, rank, arguments,
"interface");
@@ -790,61 +790,61 @@ void generateDocumentation(std::ostream & o,
}
break;
- case codemaker::UnoType::SORT_MODULE:
+ case codemaker::UnoType::Sort::Module:
printMapsToJavaType(
o, options, manager, sort, nucleus, rank, arguments, "package");
o << '\n';
break;
- case codemaker::UnoType::SORT_PLAIN_STRUCT_TYPE:
+ case codemaker::UnoType::Sort::PlainStruct:
printMapsToJavaType(
o, options, manager, sort, nucleus, rank, arguments, "class");
o << "; full constructor:\n";
printConstructor(
- o, options, manager, codemaker::UnoType::SORT_PLAIN_STRUCT_TYPE,
+ o, options, manager, codemaker::UnoType::Sort::PlainStruct,
entity, nucleus, arguments);
break;
- case codemaker::UnoType::SORT_POLYMORPHIC_STRUCT_TYPE_TEMPLATE:
+ case codemaker::UnoType::Sort::PolymorphicStructTemplate:
printMapsToJavaType(
o, options, manager, sort, nucleus, rank, arguments,
"generic class");
o << "; full constructor:\n";
printConstructor(
o, options, manager,
- codemaker::UnoType::SORT_POLYMORPHIC_STRUCT_TYPE_TEMPLATE,
+ codemaker::UnoType::Sort::PolymorphicStructTemplate,
entity, nucleus, arguments);
break;
- case codemaker::UnoType::SORT_INSTANTIATED_POLYMORPHIC_STRUCT_TYPE:
+ case codemaker::UnoType::Sort::InstantiatedPolymorphicStruct:
printMapsToJavaType(
o, options, manager, sort, nucleus, rank, arguments,
"generic class instantiation");
o << "; full constructor:\n";
printConstructor(
o, options, manager,
- codemaker::UnoType::SORT_INSTANTIATED_POLYMORPHIC_STRUCT_TYPE,
+ codemaker::UnoType::Sort::InstantiatedPolymorphicStruct,
entity, nucleus, arguments);
break;
- case codemaker::UnoType::SORT_ENUM_TYPE:
- case codemaker::UnoType::SORT_CONSTANT_GROUP:
+ case codemaker::UnoType::Sort::Enum:
+ case codemaker::UnoType::Sort::ConstantGroup:
printMapsToJavaType(
o, options, manager, sort, nucleus, rank, arguments, "class");
o << '\n';
break;
- case codemaker::UnoType::SORT_EXCEPTION_TYPE:
+ case codemaker::UnoType::Sort::Exception:
printMapsToJavaType(
o, options, manager, sort, nucleus, rank, arguments,
"exception class");
o << "; full constructor:\n";
printConstructor(
- o, options, manager, codemaker::UnoType::SORT_EXCEPTION_TYPE,
+ o, options, manager, codemaker::UnoType::Sort::Exception,
entity, nucleus, arguments);
break;
- case codemaker::UnoType::SORT_SINGLE_INTERFACE_BASED_SERVICE:
+ case codemaker::UnoType::Sort::SingleInterfaceBasedService:
printMapsToJavaType(
o, options, manager, sort, nucleus, rank, arguments, "class");
o << "; construction methods:\n";
@@ -856,7 +856,7 @@ void generateDocumentation(std::ostream & o,
delegate);
break;
- case codemaker::UnoType::SORT_ACCUMULATION_BASED_SERVICE:
+ case codemaker::UnoType::Sort::AccumulationBasedService:
o << ("does not map to Java\n"
"// the service members are generated instead\n");
printServiceMembers(
@@ -866,7 +866,7 @@ void generateDocumentation(std::ostream & o,
delegate);
break;
- case codemaker::UnoType::SORT_INTERFACE_BASED_SINGLETON:
+ case codemaker::UnoType::Sort::InterfaceBasedSingleton:
printMapsToJavaType(
o, options, manager, sort, nucleus, rank, arguments, "class");
o << "; get method:\npublic static ";
@@ -878,7 +878,7 @@ void generateDocumentation(std::ostream & o,
o << " get(com.sun.star.uno.XComponentContext context);\n";
break;
- case codemaker::UnoType::SORT_SERVICE_BASED_SINGLETON:
+ case codemaker::UnoType::Sort::ServiceBasedSingleton:
o << "does not map to Java\n";
break;
diff --git a/unodevtools/source/skeletonmaker/skeletoncommon.cxx b/unodevtools/source/skeletonmaker/skeletoncommon.cxx
index 8bf54f664627..b0dc9333c687 100644
--- a/unodevtools/source/skeletonmaker/skeletoncommon.cxx
+++ b/unodevtools/source/skeletonmaker/skeletoncommon.cxx
@@ -116,7 +116,7 @@ void checkAttributes(rtl::Reference< TypeManager > const & manager,
}
rtl::Reference< unoidl::Entity > ent;
switch (manager->getSort(name, &ent)) {
- case codemaker::UnoType::SORT_INTERFACE_TYPE:
+ case codemaker::UnoType::Sort::Interface:
{
rtl::Reference< unoidl::InterfaceTypeEntity > ent2(
dynamic_cast< unoidl::InterfaceTypeEntity * >(ent.get()));
@@ -149,7 +149,7 @@ void checkAttributes(rtl::Reference< TypeManager > const & manager,
}
break;
}
- case codemaker::UnoType::SORT_ACCUMULATION_BASED_SERVICE:
+ case codemaker::UnoType::Sort::AccumulationBasedService:
{
rtl::Reference< unoidl::AccumulationBasedServiceEntity > ent2(
dynamic_cast< unoidl::AccumulationBasedServiceEntity * >(
@@ -193,7 +193,7 @@ void checkType(rtl::Reference< TypeManager > const & manager,
{
rtl::Reference< unoidl::Entity > ent;
switch (manager->getSort(name, &ent)) {
- case codemaker::UnoType::SORT_INTERFACE_TYPE:
+ case codemaker::UnoType::Sort::Interface:
// com.sun.star.lang.XComponent should be also not in the list
// but it will be used for checking the impl helper and will be
// removed later if necessary.
@@ -204,7 +204,7 @@ void checkType(rtl::Reference< TypeManager > const & manager,
interfaceTypes.insert(name);
}
break;
- case codemaker::UnoType::SORT_SINGLE_INTERFACE_BASED_SERVICE:
+ case codemaker::UnoType::Sort::SingleInterfaceBasedService:
if (serviceTypes.find(name) == serviceTypes.end()) {
serviceTypes.insert(name);
rtl::Reference< unoidl::SingleInterfaceBasedServiceEntity > ent2(
@@ -228,7 +228,7 @@ void checkType(rtl::Reference< TypeManager > const & manager,
}
}
break;
- case codemaker::UnoType::SORT_ACCUMULATION_BASED_SERVICE:
+ case codemaker::UnoType::Sort::AccumulationBasedService:
if ( serviceTypes.find(name) == serviceTypes.end() ) {
serviceTypes.insert(name);
rtl::Reference< unoidl::AccumulationBasedServiceEntity > ent2(
@@ -289,7 +289,7 @@ bool checkServiceProperties(rtl::Reference< TypeManager > const & manager,
{
rtl::Reference< unoidl::Entity > ent;
if (manager->getSort(name, &ent)
- == codemaker::UnoType::SORT_ACCUMULATION_BASED_SERVICE)
+ == codemaker::UnoType::Sort::AccumulationBasedService)
{
rtl::Reference< unoidl::AccumulationBasedServiceEntity > ent2(
dynamic_cast< unoidl::AccumulationBasedServiceEntity * >(
@@ -337,7 +337,7 @@ OUString checkPropertyHelper(
if ( !services.empty() ) {
if (options.supportpropertysetmixin
&& (sort
- == codemaker::UnoType::SORT_SINGLE_INTERFACE_BASED_SERVICE))
+ == codemaker::UnoType::Sort::SingleInterfaceBasedService))
{
rtl::Reference< unoidl::SingleInterfaceBasedServiceEntity >
ent2(
@@ -374,7 +374,7 @@ bool checkXComponentSupport(
}
rtl::Reference< unoidl::Entity > ent;
codemaker::UnoType::Sort sort = manager->getSort(name, &ent);
- if (sort != codemaker::UnoType::SORT_INTERFACE_TYPE) {
+ if (sort != codemaker::UnoType::Sort::Interface) {
throw CannotDumpException(
"unexpected entity \"" + name
+ "\" in call to skeletonmaker::checkXComponentSupport");
@@ -459,14 +459,14 @@ bool checkAddinType(rtl::Reference< TypeManager > const & manager,
codemaker::UnoType::Sort sort = manager->decompose(
type, true, nullptr, &rank, nullptr, nullptr);
- if ( sort == codemaker::UnoType::SORT_LONG ||
- sort == codemaker::UnoType::SORT_DOUBLE ||
- sort == codemaker::UnoType::SORT_STRING )
+ if ( sort == codemaker::UnoType::Sort::Long ||
+ sort == codemaker::UnoType::Sort::Double ||
+ sort == codemaker::UnoType::Sort::String )
{
if ( rank == 0 || rank ==2 )
return true;
}
- if ( sort == codemaker::UnoType::SORT_ANY )
+ if ( sort == codemaker::UnoType::Sort::Any )
{
if ( rank <= 2 ) {
if ( rank ==1 ) {
@@ -478,7 +478,7 @@ bool checkAddinType(rtl::Reference< TypeManager > const & manager,
return true;
}
}
- if ( sort == codemaker::UnoType::SORT_INTERFACE_TYPE )
+ if ( sort == codemaker::UnoType::Sort::Interface )
{
if ( bIsReturn && type == "com.sun.star.sheet.XVolatileResult" )
return true;
@@ -566,7 +566,7 @@ void generateFunctionParameterMap(std::ostream& o,
rtl::Reference< unoidl::Entity > ent;
codemaker::UnoType::Sort sort = manager->getSort(name, &ent);
- if (sort != codemaker::UnoType::SORT_INTERFACE_TYPE) {
+ if (sort != codemaker::UnoType::Sort::Interface) {
throw CannotDumpException(
"unexpected entity \"" + name
+ "\" in call to skeletonmaker::generateFunctionParameterMap");