Lines 645-651
Link Here
|
645 |
case Node::KIND_GROUP: |
645 |
case Node::KIND_GROUP: |
646 |
case Node::KIND_SET: |
646 |
case Node::KIND_SET: |
647 |
if (i->second.children.empty()) { |
647 |
if (i->second.children.empty()) { |
648 |
if (child->getNode()->getTemplateName().getLength() != 0) { |
648 |
if ( child->getNode()->getTemplateName().isEmpty() == false ) { |
649 |
for (ContainerListeners::iterator j( |
649 |
for (ContainerListeners::iterator j( |
650 |
containerListeners_.begin()); |
650 |
containerListeners_.begin()); |
651 |
j != containerListeners_.end(); ++j) |
651 |
j != containerListeners_.end(); ++j) |
Lines 1239-1245
Link Here
|
1239 |
path.append(root->getAbsolutePathRepresentation()); |
1239 |
path.append(root->getAbsolutePathRepresentation()); |
1240 |
} |
1240 |
} |
1241 |
rtl::OUString rel(getRelativePathRepresentation()); |
1241 |
rtl::OUString rel(getRelativePathRepresentation()); |
1242 |
if (path.getLength() != 0 && rel.getLength() != 0) { |
1242 |
if (path.getLength() != 0 && !rel.isEmpty()) { |
1243 |
path.append(sal_Unicode('/')); |
1243 |
path.append(sal_Unicode('/')); |
1244 |
} |
1244 |
} |
1245 |
path.append(rel); |
1245 |
path.append(rel); |
Lines 1255-1261
Link Here
|
1255 |
OSL_ASSERT(thisIs(IS_ANY)); |
1255 |
OSL_ASSERT(thisIs(IS_ANY)); |
1256 |
osl::MutexGuard g(lock); |
1256 |
osl::MutexGuard g(lock); |
1257 |
checkLocalizedPropertyAccess(); |
1257 |
checkLocalizedPropertyAccess(); |
1258 |
if (aRelativeName.getLength() == 0 || aRelativeName[0] == '/') { |
1258 |
if (aRelativeName.isEmpty() || aRelativeName[0] == '/') { |
1259 |
throw css::lang::IllegalArgumentException( |
1259 |
throw css::lang::IllegalArgumentException( |
1260 |
rtl::OUString( |
1260 |
rtl::OUString( |
1261 |
RTL_CONSTASCII_USTRINGPARAM( |
1261 |
RTL_CONSTASCII_USTRINGPARAM( |
Lines 1295-1301
Link Here
|
1295 |
rtl::Reference< Access > parent(getParentAccess()); |
1295 |
rtl::Reference< Access > parent(getParentAccess()); |
1296 |
if (parent.is()) { |
1296 |
if (parent.is()) { |
1297 |
rtl::Reference< Node > node(getNode()); |
1297 |
rtl::Reference< Node > node(getNode()); |
1298 |
if (node->getTemplateName().getLength() != 0) { |
1298 |
if ( !node->getTemplateName().isEmpty() ) { |
1299 |
rtl::Reference< ChildAccess > other( |
1299 |
rtl::Reference< ChildAccess > other( |
1300 |
parent->getChild(aName)); |
1300 |
parent->getChild(aName)); |
1301 |
if (other.get() == this) { |
1301 |
if (other.get() == this) { |
Lines 1991-1997
Link Here
|
1991 |
rtl::Reference< ChildAccess > Access::getSubChild(rtl::OUString const & path) { |
1991 |
rtl::Reference< ChildAccess > Access::getSubChild(rtl::OUString const & path) { |
1992 |
sal_Int32 i = 0; |
1992 |
sal_Int32 i = 0; |
1993 |
// For backwards compatibility, allow absolute paths where meaningful: |
1993 |
// For backwards compatibility, allow absolute paths where meaningful: |
1994 |
if (path.getLength() != 0 && path[0] == '/') { |
1994 |
if (!path.isEmpty() && path[0] == '/') { |
1995 |
++i; |
1995 |
++i; |
1996 |
if (!getRootAccess().is()) { |
1996 |
if (!getRootAccess().is()) { |
1997 |
return rtl::Reference< ChildAccess >(); |
1997 |
return rtl::Reference< ChildAccess >(); |
Lines 2038-2050
Link Here
|
2038 |
switch (p->kind()) { |
2038 |
switch (p->kind()) { |
2039 |
case Node::KIND_LOCALIZED_PROPERTY: |
2039 |
case Node::KIND_LOCALIZED_PROPERTY: |
2040 |
if (!Components::allLocales(getRootAccess()->getLocale()) || |
2040 |
if (!Components::allLocales(getRootAccess()->getLocale()) || |
2041 |
templateName.getLength() != 0) |
2041 |
!templateName.isEmpty()) |
2042 |
{ |
2042 |
{ |
2043 |
return rtl::Reference< ChildAccess >(); |
2043 |
return rtl::Reference< ChildAccess >(); |
2044 |
} |
2044 |
} |
2045 |
break; |
2045 |
break; |
2046 |
case Node::KIND_SET: |
2046 |
case Node::KIND_SET: |
2047 |
if (templateName.getLength() != 0 && |
2047 |
if (!templateName.isEmpty() && |
2048 |
!dynamic_cast< SetNode * >(p.get())->isValidTemplate( |
2048 |
!dynamic_cast< SetNode * >(p.get())->isValidTemplate( |
2049 |
templateName)) |
2049 |
templateName)) |
2050 |
{ |
2050 |
{ |
Lines 2148-2154
Link Here
|
2148 |
} |
2148 |
} |
2149 |
|
2149 |
|
2150 |
void Access::checkKnownProperty(rtl::OUString const & descriptor) { |
2150 |
void Access::checkKnownProperty(rtl::OUString const & descriptor) { |
2151 |
if (descriptor.getLength() == 0) { |
2151 |
if ( descriptor.isEmpty() ) { |
2152 |
return; |
2152 |
return; |
2153 |
} |
2153 |
} |
2154 |
rtl::Reference< ChildAccess > child(getChild(descriptor)); |
2154 |
rtl::Reference< ChildAccess > child(getChild(descriptor)); |