summaryrefslogtreecommitdiff
path: root/unoidl
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2015-04-08 14:45:50 +0200
committerNoel Grandin <noel@peralex.com>2015-04-09 08:41:11 +0200
commit0833143c271ae444ca83ec16923db9f403f98b86 (patch)
tree28e12be6bac8bedac51b1b324147c86bddf67c34 /unoidl
parent7b4ca582fcfd77b20eea5a11bd0e87b39d640e91 (diff)
convert RT_ACCESS fields to scoped enum
Change-Id: Ifef0aaae6208f18c1352fef7c471deb60a97820d
Diffstat (limited to 'unoidl')
-rw-r--r--unoidl/source/legacyprovider.cxx33
1 files changed, 15 insertions, 18 deletions
diff --git a/unoidl/source/legacyprovider.cxx b/unoidl/source/legacyprovider.cxx
index db042069ef86..7d10eb3cd5bd 100644
--- a/unoidl/source/legacyprovider.cxx
+++ b/unoidl/source/legacyprovider.cxx
@@ -300,8 +300,8 @@ rtl::Reference< Entity > readEntity(
attrs.push_back(
InterfaceTypeEntity::Attribute(
attrName, reader.getFieldTypeName(j).replace('/', '.'),
- (flags & RT_ACCESS_BOUND) != 0,
- (flags & RT_ACCESS_READONLY) != 0, getExcs, setExcs,
+ bool(flags & RTFieldAccess::BOUND),
+ bool(flags & RTFieldAccess::READONLY), getExcs, setExcs,
translateAnnotations(reader.getFieldDocumentation(j))));
}
std::vector< InterfaceTypeEntity::Method > meths;
@@ -422,9 +422,8 @@ rtl::Reference< Entity > readEntity(
PolymorphicStructTypeTemplateEntity::Member(
reader.getFieldName(j),
reader.getFieldTypeName(j).replace('/', '.'),
- ((reader.getFieldFlags(j)
- & RT_ACCESS_PARAMETERIZED_TYPE)
- != 0),
+ bool(reader.getFieldFlags(j)
+ & RTFieldAccess::PARAMETERIZED_TYPE),
translateAnnotations(
reader.getFieldDocumentation(j))));
}
@@ -514,8 +513,7 @@ rtl::Reference< Entity > readEntity(
reader.getReferenceDocumentation(j)));
switch (reader.getReferenceSort(j)) {
case RT_REF_EXPORTS:
- if ((reader.getReferenceFlags(j) & RT_ACCESS_OPTIONAL)
- == 0)
+ if (!(reader.getReferenceFlags(j) & RTFieldAccess::OPTIONAL))
{
mandServs.push_back(base);
} else {
@@ -523,8 +521,7 @@ rtl::Reference< Entity > readEntity(
}
break;
case RT_REF_SUPPORTS:
- if ((reader.getReferenceFlags(j) & RT_ACCESS_OPTIONAL)
- == 0)
+ if (!(reader.getReferenceFlags(j) & RTFieldAccess::OPTIONAL))
{
mandIfcs.push_back(base);
} else {
@@ -545,39 +542,39 @@ rtl::Reference< Entity > readEntity(
for (sal_uInt16 j = 0; j != n; ++j) {
RTFieldAccess acc = reader.getFieldFlags(j);
int attrs = 0;
- if ((acc & RT_ACCESS_READONLY) != 0) {
+ if (acc & RTFieldAccess::READONLY) {
attrs |= AccumulationBasedServiceEntity::Property::
ATTRIBUTE_READ_ONLY;
}
- if ((acc & RT_ACCESS_OPTIONAL) != 0) {
+ if (acc & RTFieldAccess::OPTIONAL) {
attrs |= AccumulationBasedServiceEntity::Property::
ATTRIBUTE_OPTIONAL;
}
- if ((acc & RT_ACCESS_MAYBEVOID) != 0) {
+ if (acc & RTFieldAccess::MAYBEVOID) {
attrs |= AccumulationBasedServiceEntity::Property::
ATTRIBUTE_MAYBE_VOID;
}
- if ((acc & RT_ACCESS_BOUND) != 0) {
+ if (acc & RTFieldAccess::BOUND) {
attrs |= AccumulationBasedServiceEntity::Property::
ATTRIBUTE_BOUND;
}
- if ((acc & RT_ACCESS_CONSTRAINED) != 0) {
+ if (acc & RTFieldAccess::CONSTRAINED) {
attrs |= AccumulationBasedServiceEntity::Property::
ATTRIBUTE_CONSTRAINED;
}
- if ((acc & RT_ACCESS_TRANSIENT) != 0) {
+ if (acc & RTFieldAccess::TRANSIENT) {
attrs |= AccumulationBasedServiceEntity::Property::
ATTRIBUTE_TRANSIENT;
}
- if ((acc & RT_ACCESS_MAYBEAMBIGUOUS) != 0) {
+ if (acc & RTFieldAccess::MAYBEAMBIGUOUS) {
attrs |= AccumulationBasedServiceEntity::Property::
ATTRIBUTE_MAYBE_AMBIGUOUS;
}
- if ((acc & RT_ACCESS_MAYBEDEFAULT) != 0) {
+ if (acc & RTFieldAccess::MAYBEDEFAULT) {
attrs |= AccumulationBasedServiceEntity::Property::
ATTRIBUTE_MAYBE_DEFAULT;
}
- if ((acc & RT_ACCESS_REMOVABLE) != 0) {
+ if (acc & RTFieldAccess::REMOVABLE) {
attrs |= AccumulationBasedServiceEntity::Property::
ATTRIBUTE_REMOVABLE;
}