diff options
-rw-r--r-- | idlc/source/astdump.cxx | 8 | ||||
-rw-r--r-- | idlc/source/astinterface.cxx | 2 | ||||
-rw-r--r-- | idlc/source/aststruct.cxx | 2 | ||||
-rw-r--r-- | include/registry/types.h | 14 | ||||
-rw-r--r-- | registry/source/reflread.cxx | 4 | ||||
-rw-r--r-- | registry/source/reflwrit.cxx | 2 | ||||
-rw-r--r-- | registry/source/regimpl.cxx | 6 | ||||
-rw-r--r-- | registry/test/testregcpp.cxx | 8 | ||||
-rw-r--r-- | registry/tools/regcompare.cxx | 18 | ||||
-rw-r--r-- | unoidl/source/legacyprovider.cxx | 6 |
10 files changed, 35 insertions, 35 deletions
diff --git a/idlc/source/astdump.cxx b/idlc/source/astdump.cxx index f970f6c7bc9c..b4dfa84df65a 100644 --- a/idlc/source/astdump.cxx +++ b/idlc/source/astdump.cxx @@ -257,7 +257,7 @@ bool AstService::dump(RegistryKey& rKey) { AstInterfaceMember * decl = static_cast<AstInterfaceMember *>(*i); writer.setReferenceData( - referenceIndex++, decl->getDocumentation(), RT_REF_SUPPORTS, + referenceIndex++, decl->getDocumentation(), RTReferenceType::SUPPORTS, (decl->isOptional() ? RTFieldAccess::OPTIONAL : RTFieldAccess::INVALID), OStringToOUString( decl->getRealInterface()->getRelativName(), RTL_TEXTENCODING_UTF8)); @@ -268,7 +268,7 @@ bool AstService::dump(RegistryKey& rKey) if (getNodeType() == NT_service) { AstServiceMember * decl = static_cast<AstServiceMember *>(*i); - writer.setReferenceData(referenceIndex++, decl->getDocumentation(), RT_REF_EXPORTS, + writer.setReferenceData(referenceIndex++, decl->getDocumentation(), RTReferenceType::EXPORTS, (decl->isOptional() ? RTFieldAccess::OPTIONAL : RTFieldAccess::INVALID), OStringToOUString(decl->getRealService()->getRelativName(), RTL_TEXTENCODING_UTF8)); @@ -278,7 +278,7 @@ bool AstService::dump(RegistryKey& rKey) case NT_observes: { AstObserves * decl = static_cast<AstObserves *>(*i); - writer.setReferenceData(referenceIndex++, decl->getDocumentation(), RT_REF_OBSERVES, + writer.setReferenceData(referenceIndex++, decl->getDocumentation(), RTReferenceType::OBSERVES, RTFieldAccess::INVALID, OStringToOUString( decl->getRealInterface()->getRelativName(), RTL_TEXTENCODING_UTF8)); @@ -288,7 +288,7 @@ bool AstService::dump(RegistryKey& rKey) case NT_needs: { AstNeeds * decl = static_cast<AstNeeds *>(*i); - writer.setReferenceData( referenceIndex++, decl->getDocumentation(), RT_REF_NEEDS, + writer.setReferenceData( referenceIndex++, decl->getDocumentation(), RTReferenceType::NEEDS, RTFieldAccess::INVALID, OStringToOUString( decl->getRealService()->getRelativName(), RTL_TEXTENCODING_UTF8)); diff --git a/idlc/source/astinterface.cxx b/idlc/source/astinterface.cxx index 5941fa3e64d9..97d8f020170c 100644 --- a/idlc/source/astinterface.cxx +++ b/idlc/source/astinterface.cxx @@ -206,7 +206,7 @@ bool AstInterface::dump(RegistryKey& rKey) { if (i->isOptional()) { aBlob.setReferenceData( - referenceIndex++, i->getDocumentation(), RT_REF_SUPPORTS, + referenceIndex++, i->getDocumentation(), RTReferenceType::SUPPORTS, RTFieldAccess::OPTIONAL, OStringToOUString( i->getInterface()->getRelativName(), diff --git a/idlc/source/aststruct.cxx b/idlc/source/aststruct.cxx index 49831731e97d..d2232990e615 100644 --- a/idlc/source/aststruct.cxx +++ b/idlc/source/aststruct.cxx @@ -153,7 +153,7 @@ bool AstStruct::dump(RegistryKey& rKey) i != m_typeParameters.end(); ++i) { aBlob.setReferenceData( - index++, emptyStr, RT_REF_TYPE_PARAMETER, RTFieldAccess::INVALID, + index++, emptyStr, RTReferenceType::TYPE_PARAMETER, RTFieldAccess::INVALID, OStringToOUString( (*i)->getLocalName(), RTL_TEXTENCODING_UTF8)); } diff --git a/include/registry/types.h b/include/registry/types.h index 6d87f84b4d9a..27eacb899967 100644 --- a/include/registry/types.h +++ b/include/registry/types.h @@ -298,37 +298,37 @@ enum RTParamMode { /** specifies the type of a reference used in a service description. */ -enum RTReferenceType { +enum class RTReferenceType { /// the reference type is unknown - RT_REF_INVALID, + INVALID, /** the service support the interface that means a implementation of this service must implement this interface. */ - RT_REF_SUPPORTS, + SUPPORTS, /** @deprecated the service observes the interface. */ - RT_REF_OBSERVES, + OBSERVES, /** the service exports the specified service that means this service provides also the specified service. */ - RT_REF_EXPORTS, + EXPORTS, /** @deprecated the service needs the specified service that means in the context of this service the specified service will be used or must be available. */ - RT_REF_NEEDS, + NEEDS, /** Indicates a type parameter of a polymorphic struct type template. @since UDK 3.2.0 */ - RT_REF_TYPE_PARAMETER + TYPE_PARAMETER }; #ifdef __cplusplus diff --git a/registry/source/reflread.cxx b/registry/source/reflread.cxx index cfc218d31e25..49f6e4e2a358 100644 --- a/registry/source/reflread.cxx +++ b/registry/source/reflread.cxx @@ -846,7 +846,7 @@ const sal_Char* ReferenceList::getReferenceName(sal_uInt16 index) RTReferenceType ReferenceList::getReferenceType(sal_uInt16 index) { - RTReferenceType refType = RT_REF_INVALID; + RTReferenceType refType = RTReferenceType::INVALID; if ((m_numOfEntries > 0) && (index <= m_numOfEntries)) { @@ -1788,7 +1788,7 @@ RTReferenceType TYPEREG_CALLTYPE typereg_reader_getReferenceSort(void * hEntry, { TypeRegistryEntry* pEntry = static_cast<TypeRegistryEntry*>(hEntry); - if (pEntry == NULL) return RT_REF_INVALID; + if (pEntry == NULL) return RTReferenceType::INVALID; return pEntry->m_pReferences->getReferenceType(index); } diff --git a/registry/source/reflwrit.cxx b/registry/source/reflwrit.cxx index b97b4f36419d..b98c469fd980 100644 --- a/registry/source/reflwrit.cxx +++ b/registry/source/reflwrit.cxx @@ -480,7 +480,7 @@ public: }; ReferenceEntry::ReferenceEntry() - : m_type(RT_REF_INVALID) + : m_type(RTReferenceType::INVALID) , m_access(RTFieldAccess::INVALID) { } diff --git a/registry/source/regimpl.cxx b/registry/source/regimpl.cxx index 50085b419420..64ad999816bb 100644 --- a/registry/source/regimpl.cxx +++ b/registry/source/regimpl.cxx @@ -394,15 +394,15 @@ void dumpType(typereg::Reader const & reader, OString const & indent) { printf("\n"); printf("%s sort: ", indent.getStr()); switch (reader.getReferenceSort(i)) { - case RT_REF_SUPPORTS: + case RTReferenceType::SUPPORTS: printf("supports"); break; - case RT_REF_EXPORTS: + case RTReferenceType::EXPORTS: printf("exports"); break; - case RT_REF_TYPE_PARAMETER: + case RTReferenceType::TYPE_PARAMETER: printf("type parameter"); break; diff --git a/registry/test/testregcpp.cxx b/registry/test/testregcpp.cxx index 19ef8a7ee157..bc9d447724b2 100644 --- a/registry/test/testregcpp.cxx +++ b/registry/test/testregcpp.cxx @@ -299,14 +299,14 @@ void test_coreReflection() OUString("ich bin eine property"), OUString(), RTFieldAccess::READWRITE); - writer.setReferenceData(0, OUString("ModuleA/XInterfaceA"), RT_REF_SUPPORTS, + writer.setReferenceData(0, OUString("ModuleA/XInterfaceA"), RTReferenceType::SUPPORTS, OUString("Hallo ich eine Reference auf ein supported interface"), RTFieldAccess::OPTIONAL); - writer.setReferenceData(1, OUString("ModuleA/XInterfaceA"), RT_REF_OBSERVES, + writer.setReferenceData(1, OUString("ModuleA/XInterfaceA"), RTReferenceType::OBSERVES, OUString("Hallo ich eine Reference auf ein observed interface")); - writer.setReferenceData(2, OUString("ModuleA/ServiceB"), RT_REF_EXPORTS, + writer.setReferenceData(2, OUString("ModuleA/ServiceB"), RTReferenceType::EXPORTS, OUString("Hallo ich eine Reference auf einen exported service")); - writer.setReferenceData(3, OUString("ModuleA/ServiceB"), RT_REF_NEEDS, + writer.setReferenceData(3, OUString("ModuleA/ServiceB"), RTReferenceType::NEEDS, OUString("Hallo ich eine Reference auf einen needed service")); const sal_uInt8* pBlop = writer.getBlop(); diff --git a/registry/tools/regcompare.cxx b/registry/tools/regcompare.cxx index e85eff8dea7e..8d4d4221bc5d 100644 --- a/registry/tools/regcompare.cxx +++ b/registry/tools/regcompare.cxx @@ -886,16 +886,16 @@ static char const * getReferenceType(RTReferenceType refType) { switch (refType) { - case RT_REF_SUPPORTS: - return "RT_REF_SUPPORTS"; - case RT_REF_OBSERVES: - return "RT_REF_OBSERVES"; - case RT_REF_EXPORTS: - return "RT_REF_EXPORTS"; - case RT_REF_NEEDS: - return "RT_REF_NEEDS"; + case RTReferenceType::SUPPORTS: + return "RTReferenceType::SUPPORTS"; + case RTReferenceType::OBSERVES: + return "RTReferenceType::OBSERVES"; + case RTReferenceType::EXPORTS: + return "RTReferenceType::EXPORTS"; + case RTReferenceType::NEEDS: + return "RTReferenceType::NEEDS"; default: - return "RT_REF_INVALID"; + return "RTReferenceType::INVALID"; } } diff --git a/unoidl/source/legacyprovider.cxx b/unoidl/source/legacyprovider.cxx index 135061721694..d3f34bb0918e 100644 --- a/unoidl/source/legacyprovider.cxx +++ b/unoidl/source/legacyprovider.cxx @@ -512,7 +512,7 @@ rtl::Reference< Entity > readEntity( translateAnnotations( reader.getReferenceDocumentation(j))); switch (reader.getReferenceSort(j)) { - case RT_REF_EXPORTS: + case RTReferenceType::EXPORTS: if (!(reader.getReferenceFlags(j) & RTFieldAccess::OPTIONAL)) { mandServs.push_back(base); @@ -520,7 +520,7 @@ rtl::Reference< Entity > readEntity( optServs.push_back(base); } break; - case RT_REF_SUPPORTS: + case RTReferenceType::SUPPORTS: if (!(reader.getReferenceFlags(j) & RTFieldAccess::OPTIONAL)) { mandIfcs.push_back(base); @@ -532,7 +532,7 @@ rtl::Reference< Entity > readEntity( throw FileFormatException( key.getRegistryName(), ("legacy format: unexpected mode " - + OUString::number(reader.getReferenceSort(j)) + + OUString::number(static_cast<int>(reader.getReferenceSort(j))) + " of reference " + reader.getReferenceTypeName(j) + " in service with key " + sub.getName())); } |