diff options
Diffstat (limited to 'stoc/source/simpleregistry')
-rw-r--r-- | stoc/source/simpleregistry/simpleregistry.cxx | 2 | ||||
-rw-r--r-- | stoc/source/simpleregistry/textualservices.cxx | 26 |
2 files changed, 14 insertions, 14 deletions
diff --git a/stoc/source/simpleregistry/simpleregistry.cxx b/stoc/source/simpleregistry/simpleregistry.cxx index 085b73a22c3b..d396e08f9a64 100644 --- a/stoc/source/simpleregistry/simpleregistry.cxx +++ b/stoc/source/simpleregistry/simpleregistry.cxx @@ -1151,7 +1151,7 @@ void SimpleRegistry::open( "): instance already open"))), static_cast< OWeakObject * >(this)); } - RegError err = (rURL.getLength() == 0 && bCreate) + RegError err = (rURL.isEmpty() && bCreate) ? REG_REGISTRY_NOT_EXISTS : registry_.open(rURL, bReadOnly ? REG_READONLY : REG_READWRITE); if (err == REG_REGISTRY_NOT_EXISTS && bCreate) { diff --git a/stoc/source/simpleregistry/textualservices.cxx b/stoc/source/simpleregistry/textualservices.cxx index 1ea425883aa9..611d0ea7351e 100644 --- a/stoc/source/simpleregistry/textualservices.cxx +++ b/stoc/source/simpleregistry/textualservices.cxx @@ -247,7 +247,7 @@ void Parser::handleComponent() { if (nsId == xmlreader::XmlReader::NAMESPACE_NONE && name.equals(RTL_CONSTASCII_STRINGPARAM("uri"))) { - if (attrUri_.getLength() != 0) { + if (!attrUri_.isEmpty()) { throw css::registry::InvalidRegistryException( (reader_.getUrl() + rtl::OUString( @@ -256,7 +256,7 @@ void Parser::handleComponent() { css::uno::Reference< css::uno::XInterface >()); } attrUri_ = reader_.getAttributeValue(false).convertFromUtf8(); - if (attrUri_.getLength() == 0) { + if (attrUri_.isEmpty()) { throw css::registry::InvalidRegistryException( (reader_.getUrl() + rtl::OUString( @@ -267,7 +267,7 @@ void Parser::handleComponent() { } else if (nsId == xmlreader::XmlReader::NAMESPACE_NONE && name.equals(RTL_CONSTASCII_STRINGPARAM("loader"))) { - if (attrLoader_.getLength() != 0) { + if (!attrLoader_.isEmpty()) { throw css::registry::InvalidRegistryException( (reader_.getUrl() + rtl::OUString( @@ -277,7 +277,7 @@ void Parser::handleComponent() { css::uno::Reference< css::uno::XInterface >()); } attrLoader_ = reader_.getAttributeValue(false).convertFromUtf8(); - if (attrLoader_.getLength() == 0) { + if (attrLoader_.isEmpty()) { throw css::registry::InvalidRegistryException( (reader_.getUrl() + rtl::OUString( @@ -288,7 +288,7 @@ void Parser::handleComponent() { } else if (nsId == xmlreader::XmlReader::NAMESPACE_NONE && name.equals(RTL_CONSTASCII_STRINGPARAM("prefix"))) { - if (attrPrefix_.getLength() != 0) { + if (!attrPrefix_.isEmpty()) { throw css::registry::InvalidRegistryException( (reader_.getUrl() + rtl::OUString( @@ -298,7 +298,7 @@ void Parser::handleComponent() { css::uno::Reference< css::uno::XInterface >()); } attrPrefix_ = reader_.getAttributeValue(false).convertFromUtf8(); - if (attrPrefix_.getLength() == 0) { + if (attrPrefix_.isEmpty()) { throw css::registry::InvalidRegistryException( (reader_.getUrl() + rtl::OUString( @@ -310,7 +310,7 @@ void Parser::handleComponent() { OSL_FAIL ("unexpected component attribute, expected 'uri' or 'loader' or 'prefix'"); } } - if (attrUri_.getLength() == 0) { + if (attrUri_.isEmpty()) { throw css::registry::InvalidRegistryException( (reader_.getUrl() + rtl::OUString( @@ -318,7 +318,7 @@ void Parser::handleComponent() { ": <component> is missing \"uri\" attribute"))), css::uno::Reference< css::uno::XInterface >()); } - if (attrLoader_.getLength() == 0) { + if (attrLoader_.isEmpty()) { throw css::registry::InvalidRegistryException( (reader_.getUrl() + rtl::OUString( @@ -377,7 +377,7 @@ rtl::OUString Parser::getNameAttribute() { if (nsId == xmlreader::XmlReader::NAMESPACE_NONE && name.equals(RTL_CONSTASCII_STRINGPARAM("name"))) { - if (attrName.getLength() != 0) { + if (!attrName.isEmpty()) { throw css::registry::InvalidRegistryException( (reader_.getUrl() + rtl::OUString( @@ -386,7 +386,7 @@ rtl::OUString Parser::getNameAttribute() { css::uno::Reference< css::uno::XInterface >()); } attrName = reader_.getAttributeValue(false).convertFromUtf8(); - if (attrName.getLength() == 0) { + if (attrName.isEmpty()) { throw css::registry::InvalidRegistryException( (reader_.getUrl() + rtl::OUString( @@ -403,7 +403,7 @@ rtl::OUString Parser::getNameAttribute() { css::uno::Reference< css::uno::XInterface >()); } } - if (attrName.getLength() == 0) { + if (attrName.isEmpty()) { throw css::registry::InvalidRegistryException( (reader_.getUrl() + rtl::OUString( @@ -422,7 +422,7 @@ rtl::OUString pathToString(std::vector< rtl::OUString > const & path) { buf.append(sal_Unicode('/')); buf.append(*i); } - if (buf.getLength() == 0) { + if (buf.isEmpty()) { buf.append(sal_Unicode('/')); } return buf.makeStringAndClear(); @@ -969,7 +969,7 @@ bool Key::find( sal_Int32 i = 0; do { rtl::OUString seg(relative.getToken(0, '/', i)); - if (seg.getLength() != 0) { + if (!seg.isEmpty()) { p.push_back(seg); } } while (i >= 0); |