summaryrefslogtreecommitdiff
path: root/desktop/source/deployment/manager
diff options
context:
space:
mode:
authorOlivier Hallot <olivier.hallot@alta.org.br>2011-12-20 19:01:12 -0200
committerCédric Bosdonnat <cedric.bosdonnat@free.fr>2011-12-21 09:52:48 +0100
commit1835d0599e3d8984c7dfa2bbef2be5747596716a (patch)
treef8b20cd5bcc94ad70e4bca8050b6c885fef29875 /desktop/source/deployment/manager
parent1623b021cf580d3f84d562b638cb034847792401 (diff)
Fix for fdo43460 Part XIII getLength() to isEmpty()
Part XIII Module desktop
Diffstat (limited to 'desktop/source/deployment/manager')
-rw-r--r--desktop/source/deployment/manager/dp_activepackages.cxx2
-rw-r--r--desktop/source/deployment/manager/dp_extensionmanager.cxx2
-rw-r--r--desktop/source/deployment/manager/dp_informationprovider.cxx10
-rw-r--r--desktop/source/deployment/manager/dp_manager.cxx28
4 files changed, 21 insertions, 21 deletions
diff --git a/desktop/source/deployment/manager/dp_activepackages.cxx b/desktop/source/deployment/manager/dp_activepackages.cxx
index 3ff4b320cba8..47a86c5008b2 100644
--- a/desktop/source/deployment/manager/dp_activepackages.cxx
+++ b/desktop/source/deployment/manager/dp_activepackages.cxx
@@ -162,7 +162,7 @@ ActivePackages::Entries ActivePackages::getEntries() const {
for (::dp_misc::t_string2string_map::const_iterator i(m.begin());
i != m.end(); ++i)
{
- if (i->first.getLength() > 0 && i->first[0] == separator) {
+ if (!i->first.isEmpty() && i->first[0] == separator) {
es.push_back(
::std::make_pair(
::rtl::OUString(
diff --git a/desktop/source/deployment/manager/dp_extensionmanager.cxx b/desktop/source/deployment/manager/dp_extensionmanager.cxx
index a5082dafdab9..4f0331aa2df4 100644
--- a/desktop/source/deployment/manager/dp_extensionmanager.cxx
+++ b/desktop/source/deployment/manager/dp_extensionmanager.cxx
@@ -1233,7 +1233,7 @@ void ExtensionManager::reinstallDeployedExtensions(
{
const OUString id = dp_misc::getIdentifier(extensions[ pos ]);
const OUString fileName = extensions[ pos ]->getName();
- OSL_ASSERT(id.getLength());
+ OSL_ASSERT(!id.isEmpty());
activateExtension(id, fileName, false, true, xAbortChannel, xCmdEnv );
}
catch (const lang::DisposedException &)
diff --git a/desktop/source/deployment/manager/dp_informationprovider.cxx b/desktop/source/deployment/manager/dp_informationprovider.cxx
index c3f53edd3c72..dc879d1e4d4d 100644
--- a/desktop/source/deployment/manager/dp_informationprovider.cxx
+++ b/desktop/source/deployment/manager/dp_informationprovider.cxx
@@ -155,15 +155,15 @@ PackageInformationProvider::getPackageLocation( const rtl::OUString& _sExtension
{
rtl::OUString aLocationURL = getPackageLocation( UNISTRING("user"), _sExtensionId );
- if ( aLocationURL.getLength() == 0 )
+ if ( aLocationURL.isEmpty() )
{
aLocationURL = getPackageLocation( UNISTRING("shared"), _sExtensionId );
}
- if ( aLocationURL.getLength() == 0 )
+ if ( aLocationURL.isEmpty() )
{
aLocationURL = getPackageLocation( UNISTRING("bundled"), _sExtensionId );
}
- if ( aLocationURL.getLength() )
+ if ( !aLocationURL.isEmpty() )
{
::ucbhelper::Content aContent( aLocationURL, NULL );
aLocationURL = aContent.getURL();
@@ -189,7 +189,7 @@ PackageInformationProvider::isUpdateAvailable( const rtl::OUString& _sExtensionI
}
std::vector<std::pair<uno::Reference<deployment::XPackage>, uno::Any > > errors;
dp_misc::UpdateInfoMap updateInfoMap;
- if (_sExtensionId.getLength())
+ if (!_sExtensionId.isEmpty())
{
std::vector<uno::Reference<deployment::XPackage> > vecExtensions;
uno::Reference<deployment::XPackage> extension;
@@ -268,7 +268,7 @@ PackageInformationProvider::isUpdateAvailable( const rtl::OUString& _sExtensionI
updateVersion = updateVersionUser;
else
updateVersion = updateVersionShared;
- if (updateVersion.getLength())
+ if (!updateVersion.isEmpty())
{
rtl::OUString aNewEntry[2];
diff --git a/desktop/source/deployment/manager/dp_manager.cxx b/desktop/source/deployment/manager/dp_manager.cxx
index 63720c5de74c..d2a6550cf2b5 100644
--- a/desktop/source/deployment/manager/dp_manager.cxx
+++ b/desktop/source/deployment/manager/dp_manager.cxx
@@ -125,9 +125,9 @@ OUString getExtensionFolder(OUString const & parentFolder,
void PackageManagerImpl::initActivationLayer(
Reference<XCommandEnvironment> const & xCmdEnv )
{
- if (m_activePackages.getLength() == 0)
+ if (m_activePackages.isEmpty())
{
- OSL_ASSERT( m_registryCache.getLength() == 0 );
+ OSL_ASSERT( m_registryCache.isEmpty() );
// documents temp activation:
m_activePackagesDB.reset( new ActivePackages );
::ucbhelper::Content ucbContent;
@@ -161,7 +161,7 @@ void PackageManagerImpl::initActivationLayer(
OUString mediaType( detectMediaType( sourceContent,
false /* no throw */) );
- if (mediaType.getLength() >0)
+ if (!mediaType.isEmpty())
{
ActivePackages::Data dbData;
insertToActivationLayer(
@@ -180,7 +180,7 @@ void PackageManagerImpl::initActivationLayer(
else
{
// user|share:
- OSL_ASSERT( m_activePackages.getLength() > 0 );
+ OSL_ASSERT( !m_activePackages.isEmpty() );
m_activePackages_expanded = expandUnoRcUrl( m_activePackages );
m_registrationData_expanded = expandUnoRcUrl(m_registrationData);
if (!m_readOnly)
@@ -304,7 +304,7 @@ void PackageManagerImpl::initActivationLayer(
//______________________________________________________________________________
void PackageManagerImpl::initRegistryBackends()
{
- if (m_registryCache.getLength() > 0)
+ if (!m_registryCache.isEmpty())
create_folder( 0, m_registryCache,
Reference<XCommandEnvironment>(), false);
m_xRegistry.set( ::dp_registry::create(
@@ -408,7 +408,7 @@ Reference<deployment::XPackageManager> PackageManagerImpl::create(
try {
//There is no stampURL for the bundled folder
- if (stampURL.getLength() > 0)
+ if (!stampURL.isEmpty())
{
#define CURRENT_STAMP "1"
try {
@@ -441,7 +441,7 @@ Reference<deployment::XPackageManager> PackageManagerImpl::create(
}
}
- if (!that->m_readOnly && logFile.getLength() > 0)
+ if (!that->m_readOnly && !logFile.isEmpty())
{
const Any any_logFile(logFile);
that->m_xLogFile.set(
@@ -601,9 +601,9 @@ OUString PackageManagerImpl::detectMediaType(
}
catch (const beans::UnknownPropertyException &) {
}
- OSL_ENSURE( mediaType.getLength() > 0, "### no media-type?!" );
+ OSL_ENSURE( !mediaType.isEmpty(), "### no media-type?!" );
}
- if (mediaType.getLength() == 0)
+ if (mediaType.isEmpty())
{
try {
Reference<deployment::XPackage> xPackage(
@@ -781,14 +781,14 @@ Reference<deployment::XPackage> PackageManagerImpl::addPackage(
OUString destFolder;
OUString mediaType(mediaType_);
- if (mediaType.getLength() == 0)
+ if (mediaType.isEmpty())
mediaType = detectMediaType( sourceContent );
Reference<deployment::XPackage> xPackage;
// copy file:
progressUpdate(
getResourceString(RID_STR_COPYING_PACKAGE) + title, xCmdEnv );
- if (m_activePackages.getLength() == 0)
+ if (m_activePackages.isEmpty())
{
::ucbhelper::Content docFolderContent;
create_folder( &docFolderContent, m_context, xCmdEnv );
@@ -940,7 +940,7 @@ void PackageManagerImpl::removePackage(
{
ActivePackages::Data val;
m_activePackagesDB->get( & val, id, fileName);
- OSL_ASSERT(val.temporaryName.getLength());
+ OSL_ASSERT(!val.temporaryName.isEmpty());
OUString url(makeURL(m_activePackages_expanded,
val.temporaryName + OUSTR("removed")));
::ucbhelper::Content contentRemoved(url, xCmdEnv );
@@ -1217,7 +1217,7 @@ void PackageManagerImpl::reinstallDeployedPackages(
try_dispose( m_xRegistry );
m_xRegistry.clear();
- if (m_registryCache.getLength() > 0)
+ if (!m_registryCache.isEmpty())
erase_path( m_registryCache, xCmdEnv );
initRegistryBackends();
Reference<util::XUpdatable> xUpdatable( m_xRegistry, UNO_QUERY );
@@ -1430,7 +1430,7 @@ bool PackageManagerImpl::synchronizeAddedExtensions(
dbData.fileName = title;
dbData.mediaType = xPackage->getPackageType()->getMediaType();
dbData.version = xPackage->getVersion();
- OSL_ENSURE(dbData.version.getLength() > 0,
+ OSL_ENSURE(!dbData.version.isEmpty(),
"Extension Manager: bundled and shared extensions must have "
"an identifier and a version");