diff options
Diffstat (limited to 'desktop/source/deployment/misc')
-rw-r--r-- | desktop/source/deployment/misc/dp_descriptioninfoset.cxx | 12 | ||||
-rw-r--r-- | desktop/source/deployment/misc/dp_misc.cxx | 8 | ||||
-rw-r--r-- | desktop/source/deployment/misc/dp_resource.cxx | 8 | ||||
-rw-r--r-- | desktop/source/deployment/misc/dp_update.cxx | 10 |
4 files changed, 19 insertions, 19 deletions
diff --git a/desktop/source/deployment/misc/dp_descriptioninfoset.cxx b/desktop/source/deployment/misc/dp_descriptioninfoset.cxx index ec774ad0511d..286a16c1fc42 100644 --- a/desktop/source/deployment/misc/dp_descriptioninfoset.cxx +++ b/desktop/source/deployment/misc/dp_descriptioninfoset.cxx @@ -441,7 +441,7 @@ css::uno::Sequence< ::rtl::OUString > DescriptionInfoset::getSupportedPlaforms() { ::rtl::OUString aToken = value.getToken( 0, ',', nIndex ); aToken = aToken.trim(); - if (aToken.getLength()) + if (!aToken.isEmpty()) vec.push_back(aToken); } @@ -487,10 +487,10 @@ DescriptionInfoset::getUpdateDownloadUrls() const css::uno::Sequence< ::rtl::OUString > aStrListHC = getUrls( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "desc:icon/desc:high-contrast/@xlink:href"))); - if ( bHighContrast && aStrListHC.hasElements() && aStrListHC[0].getLength() ) + if ( bHighContrast && aStrListHC.hasElements() && !aStrListHC[0].isEmpty() ) return aStrListHC[0]; - if ( aStrList.hasElements() && aStrList[0].getLength() ) + if ( aStrList.hasElements() && !aStrList[0].isEmpty() ) return aStrList[0]; return ::rtl::OUString(); @@ -503,7 +503,7 @@ DescriptionInfoset::getUpdateDownloadUrls() const const ::rtl::OUString sURL (getLocalizedHREFAttrFromChild(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "/desc:description/desc:update-website")), &bParentExists )); - if (sURL.getLength() > 0) + if (!sURL.isEmpty()) return ::boost::optional< ::rtl::OUString >(sURL); else return bParentExists ? ::boost::optional< ::rtl::OUString >(::rtl::OUString()) : @@ -663,7 +663,7 @@ DescriptionInfoset::getSimpleLicenseAttributes() const css::uno::Reference< css::xml::dom::XNode > DescriptionInfoset::getLocalizedChild( const ::rtl::OUString & sParent) const { - if ( ! m_element.is() || !sParent.getLength()) + if ( ! m_element.is() || sParent.isEmpty()) return css::uno::Reference< css::xml::dom::XNode > (); css::uno::Reference< css::xml::dom::XNode > xParent; @@ -719,7 +719,7 @@ DescriptionInfoset::matchCountryAndLanguage( OSL_ASSERT(xParent.is()); css::uno::Reference<css::xml::dom::XNode> nodeMatch; - if (officeLocale.Country.getLength()) + if (!officeLocale.Country.isEmpty()) { const ::rtl::OUString sLangCountry(officeLocale.Language + ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("-")) + diff --git a/desktop/source/deployment/misc/dp_misc.cxx b/desktop/source/deployment/misc/dp_misc.cxx index 75686187cb1e..467bc990362a 100644 --- a/desktop/source/deployment/misc/dp_misc.cxx +++ b/desktop/source/deployment/misc/dp_misc.cxx @@ -134,7 +134,7 @@ const OUString OfficePipeId::operator () () bool existsOfficePipe() { OUString const & pipeId = OfficePipeId::get(); - if (pipeId.getLength() == 0) + if (pipeId.isEmpty()) return false; ::osl::Security sec; ::osl::Pipe pipe( pipeId, osl_Pipe_OPEN, sec ); @@ -284,9 +284,9 @@ OUString makeURL( OUString const & baseURL, OUString const & relPath_ ) else buf.append( baseURL ); OUString relPath(relPath_); - if (relPath.getLength() > 0 && relPath[ 0 ] == '/') + if (!relPath.isEmpty() && relPath[ 0 ] == '/') relPath = relPath.copy( 1 ); - if (relPath.getLength() > 0) + if (!relPath.isEmpty()) { buf.append( static_cast<sal_Unicode>('/') ); if (baseURL.matchAsciiL( @@ -599,7 +599,7 @@ void syncRepositories(Reference<ucb::XCommandEnvironment> const & xCmdEnv) { OUString sDisable; ::rtl::Bootstrap::get( OUSTR( "DISABLE_EXTENSION_SYNCHRONIZATION" ), sDisable, OUString() ); - if (sDisable.getLength() > 0) + if (!sDisable.isEmpty()) return; Reference<deployment::XExtensionManager> xExtensionManager; diff --git a/desktop/source/deployment/misc/dp_resource.cxx b/desktop/source/deployment/misc/dp_resource.cxx index 4f112573efa0..04609e7603be 100644 --- a/desktop/source/deployment/misc/dp_resource.cxx +++ b/desktop/source/deployment/misc/dp_resource.cxx @@ -49,7 +49,7 @@ struct OfficeLocale : OUString slang(utl::ConfigManager::getLocale()); //fallback, the locale is currently only set when the user starts the //office for the first time. - if (slang.getLength() == 0) + if (slang.isEmpty()) slang = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("en-US")); return slang; } @@ -180,7 +180,7 @@ void checkThirdSubtag(::rtl::OUString const & tag) checkPrimarySubtag(lang); locale.Language = lang; OUString country = _sLang.getToken( 0, '-', nIndex ); - if (country.getLength() > 0) + if (!country.isEmpty()) { bool bIsCountry = false; checkSecondSubtag(country, bIsCountry); @@ -193,10 +193,10 @@ void checkThirdSubtag(::rtl::OUString const & tag) locale.Variant = country; } } - if (locale.Variant.getLength() == 0) + if (locale.Variant.isEmpty()) { OUString variant = _sLang.getToken( 0, '-', nIndex ); - if (variant.getLength() > 0) + if (!variant.isEmpty()) { checkThirdSubtag(variant); locale.Variant = variant; diff --git a/desktop/source/deployment/misc/dp_update.cxx b/desktop/source/deployment/misc/dp_update.cxx index 4995453ebec2..6ae4bf296912 100644 --- a/desktop/source/deployment/misc/dp_update.cxx +++ b/desktop/source/deployment/misc/dp_update.cxx @@ -146,7 +146,7 @@ void getDefaultUpdateInfos( std::vector<std::pair<Reference<deployment::XPackage>, uno::Any> > & out_errors) { const rtl::OUString sDefaultURL(dp_misc::getExtensionDefaultUpdateURL()); - OSL_ASSERT(sDefaultURL.getLength()); + OSL_ASSERT(!sDefaultURL.isEmpty()); Any anyError; Sequence< Reference< xml::dom::XElement > > @@ -248,7 +248,7 @@ UPDATE_SOURCE isUpdateUserExtension( UPDATE_SOURCE retVal = UPDATE_SOURCE_NONE; if (bReadOnlyShared) { - if (userVersion.getLength()) + if (!userVersion.isEmpty()) { int index = determineHighestVersion( userVersion, sharedVersion, bundledVersion, onlineVersion); @@ -259,7 +259,7 @@ UPDATE_SOURCE isUpdateUserExtension( else if (index == 3) retVal = UPDATE_SOURCE_ONLINE; } - else if (sharedVersion.getLength()) + else if (!sharedVersion.isEmpty()) { int index = determineHighestVersion( OUString(), sharedVersion, bundledVersion, onlineVersion); @@ -272,7 +272,7 @@ UPDATE_SOURCE isUpdateUserExtension( } else { - if (userVersion.getLength()) + if (!userVersion.isEmpty()) { int index = determineHighestVersion( userVersion, sharedVersion, bundledVersion, onlineVersion); @@ -298,7 +298,7 @@ UPDATE_SOURCE isUpdateSharedExtension( return UPDATE_SOURCE_NONE; UPDATE_SOURCE retVal = UPDATE_SOURCE_NONE; - if (sharedVersion.getLength()) + if (!sharedVersion.isEmpty()) { int index = determineHighestVersion( OUString(), sharedVersion, bundledVersion, onlineVersion); |