summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--idlc/source/astdump.cxx6
-rw-r--r--idlc/source/astoperation.cxx2
-rw-r--r--include/registry/types.h16
-rw-r--r--registry/source/reflread.cxx4
-rw-r--r--registry/source/reflwrit.cxx2
-rw-r--r--registry/source/regimpl.cxx8
-rw-r--r--registry/test/testregcpp.cxx2
-rw-r--r--registry/tools/regcompare.cxx8
-rw-r--r--unoidl/source/legacyprovider.cxx14
9 files changed, 31 insertions, 31 deletions
diff --git a/idlc/source/astdump.cxx b/idlc/source/astdump.cxx
index c8691972b486..f970f6c7bc9c 100644
--- a/idlc/source/astdump.cxx
+++ b/idlc/source/astdump.cxx
@@ -302,7 +302,7 @@ bool AstService::dump(RegistryKey& rKey)
}
if (m_defaultConstructor) {
writer.setMethodData(
- constructorIndex++, emptyStr, RT_MODE_TWOWAY,
+ constructorIndex++, emptyStr, RTMethodMode::TWOWAY,
emptyStr, OUString("void"),
0, 0);
}
@@ -374,10 +374,10 @@ bool AstAttribute::dumpBlob(
OStringToOUString(getType()->getRelativName(), RTL_TEXTENCODING_UTF8),
RTConstValue());
dumpExceptions(
- rBlob, m_getDocumentation, m_getExceptions, RT_MODE_ATTRIBUTE_GET,
+ rBlob, m_getDocumentation, m_getExceptions, RTMethodMode::ATTRIBUTE_GET,
methodIndex);
dumpExceptions(
- rBlob, m_setDocumentation, m_setExceptions, RT_MODE_ATTRIBUTE_SET,
+ rBlob, m_setDocumentation, m_setExceptions, RTMethodMode::ATTRIBUTE_SET,
methodIndex);
return true;
diff --git a/idlc/source/astoperation.cxx b/idlc/source/astoperation.cxx
index ce67313a8632..6e9f6753a064 100644
--- a/idlc/source/astoperation.cxx
+++ b/idlc/source/astoperation.cxx
@@ -42,7 +42,7 @@ bool AstOperation::dumpBlob(typereg::Writer & rBlob, sal_uInt16 index)
{
sal_uInt16 nParam = getNodeCount(NT_parameter);
sal_uInt16 nExcep = nExceptions();
- RTMethodMode methodMode = RT_MODE_TWOWAY;
+ RTMethodMode methodMode = RTMethodMode::TWOWAY;
OUString returnTypeName;
if (m_pReturnType == 0) {
diff --git a/include/registry/types.h b/include/registry/types.h
index dcc1152ab11b..6d87f84b4d9a 100644
--- a/include/registry/types.h
+++ b/include/registry/types.h
@@ -232,21 +232,21 @@ union RTConstValueUnion {
A method can be synchron or asynchron (oneway). The const attribute for
methods was removed so that the const values are deprecated.
*/
-enum RTMethodMode {
+enum class RTMethodMode {
/// indicates an invalid mode
- RT_MODE_INVALID,
+ INVALID,
/// indicates the asynchronous mode of a method
- RT_MODE_ONEWAY,
+ ONEWAY,
/// @deprecated
- RT_MODE_ONEWAY_CONST,
+ ONEWAY_CONST,
/// indicated the synchronous mode of a method
- RT_MODE_TWOWAY,
+ TWOWAY,
/// @deprecated
- RT_MODE_TWOWAY_CONST,
+ TWOWAY_CONST,
/**
Indicates an extended attribute getter (that has a 'raises' clause) of an
@@ -254,7 +254,7 @@ enum RTMethodMode {
@since UDK 3.2.0
*/
- RT_MODE_ATTRIBUTE_GET,
+ ATTRIBUTE_GET,
/**
Indicates an extended attribute setter (that has a 'raises' clause) of an
@@ -262,7 +262,7 @@ enum RTMethodMode {
@since UDK 3.2.0
*/
- RT_MODE_ATTRIBUTE_SET
+ ATTRIBUTE_SET
};
/** specifies the mode of a parameter.
diff --git a/registry/source/reflread.cxx b/registry/source/reflread.cxx
index 5b1c58c8dbef..cfc218d31e25 100644
--- a/registry/source/reflread.cxx
+++ b/registry/source/reflread.cxx
@@ -1132,7 +1132,7 @@ const sal_Char* MethodList::getMethodReturnType(sal_uInt16 index)
RTMethodMode MethodList::getMethodMode(sal_uInt16 index)
{
- RTMethodMode aMode = RT_MODE_INVALID;
+ RTMethodMode aMode = RTMethodMode::INVALID;
if ((m_numOfEntries > 0) && (index <= m_numOfEntries))
{
@@ -1730,7 +1730,7 @@ RTMethodMode TYPEREG_CALLTYPE typereg_reader_getMethodFlags(void * hEntry, sal_u
{
TypeRegistryEntry* pEntry = static_cast<TypeRegistryEntry*>(hEntry);
- if (pEntry == NULL) return RT_MODE_INVALID;
+ if (pEntry == NULL) return RTMethodMode::INVALID;
return pEntry->m_pMethods->getMethodMode(index);
}
diff --git a/registry/source/reflwrit.cxx b/registry/source/reflwrit.cxx
index 426911bce518..b97b4f36419d 100644
--- a/registry/source/reflwrit.cxx
+++ b/registry/source/reflwrit.cxx
@@ -538,7 +538,7 @@ protected:
};
MethodEntry::MethodEntry()
- : m_mode(RT_MODE_INVALID)
+ : m_mode(RTMethodMode::INVALID)
, m_paramCount(0)
, m_params(NULL)
, m_excCount(0)
diff --git a/registry/source/regimpl.cxx b/registry/source/regimpl.cxx
index 09afcc0c5cb7..50085b419420 100644
--- a/registry/source/regimpl.cxx
+++ b/registry/source/regimpl.cxx
@@ -294,19 +294,19 @@ void dumpType(typereg::Reader const & reader, OString const & indent) {
printf("\n");
printf("%s flags: ", indent.getStr());
switch (reader.getMethodFlags(i)) {
- case RT_MODE_ONEWAY:
+ case RTMethodMode::ONEWAY:
printf("oneway");
break;
- case RT_MODE_TWOWAY:
+ case RTMethodMode::TWOWAY:
printf("synchronous");
break;
- case RT_MODE_ATTRIBUTE_GET:
+ case RTMethodMode::ATTRIBUTE_GET:
printf("attribute get");
break;
- case RT_MODE_ATTRIBUTE_SET:
+ case RTMethodMode::ATTRIBUTE_SET:
printf("attribute set");
break;
diff --git a/registry/test/testregcpp.cxx b/registry/test/testregcpp.cxx
index e7853c36b81e..19ef8a7ee157 100644
--- a/registry/test/testregcpp.cxx
+++ b/registry/test/testregcpp.cxx
@@ -235,7 +235,7 @@ void test_coreReflection()
OUString("DummyFile"), RTFieldAccess::CONST, aConst);
writer.setMethodData(0, OUString("methodA"),
- OUString("double"), RT_MODE_TWOWAY, 2, 1,
+ OUString("double"), RTMethodMode::TWOWAY, 2, 1,
OUString("Hallo ich bin die methodA"));
writer.setParamData(0, 0, OUString("ModuleA/StructA"),
OUString("aStruct"), RT_PARAM_IN);
diff --git a/registry/tools/regcompare.cxx b/registry/tools/regcompare.cxx
index 2018f57e40e0..e85eff8dea7e 100644
--- a/registry/tools/regcompare.cxx
+++ b/registry/tools/regcompare.cxx
@@ -700,13 +700,13 @@ static char const * getMethodMode(RTMethodMode methodMode)
{
switch ( methodMode )
{
- case RT_MODE_ONEWAY:
+ case RTMethodMode::ONEWAY:
return "ONEWAY";
- case RT_MODE_ONEWAY_CONST:
+ case RTMethodMode::ONEWAY_CONST:
return "ONEWAY,CONST";
- case RT_MODE_TWOWAY:
+ case RTMethodMode::TWOWAY:
return "NONE";
- case RT_MODE_TWOWAY_CONST:
+ case RTMethodMode::TWOWAY_CONST:
return "CONST";
default:
return "INVALID";
diff --git a/unoidl/source/legacyprovider.cxx b/unoidl/source/legacyprovider.cxx
index 7d10eb3cd5bd..135061721694 100644
--- a/unoidl/source/legacyprovider.cxx
+++ b/unoidl/source/legacyprovider.cxx
@@ -258,7 +258,7 @@ rtl::Reference< Entity > readEntity(
for (sal_uInt16 k = 0; k != methodCount; ++k) {
if (reader.getMethodName(k) == attrName) {
switch (reader.getMethodFlags(k)) {
- case RT_MODE_ATTRIBUTE_GET:
+ case RTMethodMode::ATTRIBUTE_GET:
{
sal_uInt16 m
= reader.getMethodExceptionCount(k);
@@ -272,7 +272,7 @@ rtl::Reference< Entity > readEntity(
}
break;
}
- case RT_MODE_ATTRIBUTE_SET:
+ case RTMethodMode::ATTRIBUTE_SET:
{
sal_uInt16 m
= reader.getMethodExceptionCount(k);
@@ -307,8 +307,8 @@ rtl::Reference< Entity > readEntity(
std::vector< InterfaceTypeEntity::Method > meths;
for (sal_uInt16 j = 0; j != methodCount; ++j) {
RTMethodMode flags = reader.getMethodFlags(j);
- if (flags != RT_MODE_ATTRIBUTE_GET
- && flags != RT_MODE_ATTRIBUTE_SET)
+ if (flags != RTMethodMode::ATTRIBUTE_GET
+ && flags != RTMethodMode::ATTRIBUTE_SET)
{
std::vector< InterfaceTypeEntity::Method::Parameter >
params;
@@ -598,7 +598,7 @@ rtl::Reference< Entity > readEntity(
std::vector< SingleInterfaceBasedServiceEntity::Constructor >
ctors;
sal_uInt16 n = reader.getMethodCount();
- if (n == 1 && reader.getMethodFlags(0) == RT_MODE_TWOWAY
+ if (n == 1 && reader.getMethodFlags(0) == RTMethodMode::TWOWAY
&& reader.getMethodName(0).isEmpty()
&& reader.getMethodReturnTypeName(0) == "void"
&& reader.getMethodParameterCount(0) == 0
@@ -608,11 +608,11 @@ rtl::Reference< Entity > readEntity(
SingleInterfaceBasedServiceEntity::Constructor());
} else {
for (sal_uInt16 j = 0; j != n; ++j) {
- if (reader.getMethodFlags(j) != RT_MODE_TWOWAY) {
+ if (reader.getMethodFlags(j) != RTMethodMode::TWOWAY) {
throw FileFormatException(
key.getRegistryName(),
("legacy format: unexpected mode "
- + OUString::number(reader.getMethodFlags(j))
+ + OUString::number(static_cast<int>(reader.getMethodFlags(j)))
+ " of constructor " + reader.getMethodName(j)
+ " in service with key " + sub.getName()));
}