summaryrefslogtreecommitdiff
path: root/oox/source/helper/storagebase.cxx
diff options
context:
space:
mode:
authorOlivier Hallot <olivier.hallot@documentfoundation.org>2012-01-01 12:55:53 -0200
committerLuboš Luňák <l.lunak@suse.cz>2012-01-02 19:17:17 +0100
commit6af59644d6508049409a03d1c4a598ea2bef521e (patch)
tree6897eaf76372c606a487ebb0135962e6c7e52cb7 /oox/source/helper/storagebase.cxx
parent93d2a2eb4dd13d81b9be4f087653baecb33ead67 (diff)
Fix for fdo43460 Part XXV getLength() to isEmpty()
Please find attached a partial fix for Easy Hack FDO43460 Part XXI Module oox
Diffstat (limited to 'oox/source/helper/storagebase.cxx')
-rw-r--r--oox/source/helper/storagebase.cxx18
1 files changed, 9 insertions, 9 deletions
diff --git a/oox/source/helper/storagebase.cxx b/oox/source/helper/storagebase.cxx
index 7e5b2d0f4966..38eacaf727a4 100644
--- a/oox/source/helper/storagebase.cxx
+++ b/oox/source/helper/storagebase.cxx
@@ -110,7 +110,7 @@ bool StorageBase::isStorage() const
bool StorageBase::isRootStorage() const
{
- return implIsStorage() && (maStorageName.getLength() == 0);
+ return implIsStorage() && maStorageName.isEmpty();
}
bool StorageBase::isReadOnly() const
@@ -151,9 +151,9 @@ StorageRef StorageBase::openSubStorage( const OUString& rStorageName, bool bCrea
{
OUString aElement, aRemainder;
lclSplitFirstElement( aElement, aRemainder, rStorageName );
- if( aElement.getLength() > 0 )
+ if( !aElement.isEmpty() )
xSubStorage = getSubStorage( aElement, bCreateMissing );
- if( xSubStorage.get() && (aRemainder.getLength() > 0) )
+ if( xSubStorage.get() && !aRemainder.isEmpty() )
xSubStorage = xSubStorage->openSubStorage( aRemainder, bCreateMissing );
}
return xSubStorage;
@@ -164,9 +164,9 @@ Reference< XInputStream > StorageBase::openInputStream( const OUString& rStreamN
Reference< XInputStream > xInStream;
OUString aElement, aRemainder;
lclSplitFirstElement( aElement, aRemainder, rStreamName );
- if( aElement.getLength() > 0 )
+ if( !aElement.isEmpty() )
{
- if( aRemainder.getLength() > 0 )
+ if( !aRemainder.isEmpty() )
{
StorageRef xSubStorage = getSubStorage( aElement, false );
if( xSubStorage.get() )
@@ -192,9 +192,9 @@ Reference< XOutputStream > StorageBase::openOutputStream( const OUString& rStrea
{
OUString aElement, aRemainder;
lclSplitFirstElement( aElement, aRemainder, rStreamName );
- if( aElement.getLength() > 0 )
+ if( !aElement.isEmpty() )
{
- if( aRemainder.getLength() > 0 )
+ if( !aRemainder.isEmpty() )
{
StorageRef xSubStorage = getSubStorage( aElement, true );
if( xSubStorage.get() )
@@ -216,8 +216,8 @@ Reference< XOutputStream > StorageBase::openOutputStream( const OUString& rStrea
void StorageBase::copyToStorage( StorageBase& rDestStrg, const OUString& rElementName )
{
OSL_ENSURE( rDestStrg.isStorage() && !rDestStrg.isReadOnly(), "StorageBase::copyToStorage - invalid destination" );
- OSL_ENSURE( rElementName.getLength() > 0, "StorageBase::copyToStorage - invalid element name" );
- if( rDestStrg.isStorage() && !rDestStrg.isReadOnly() && (rElementName.getLength() > 0) )
+ OSL_ENSURE( !rElementName.isEmpty(), "StorageBase::copyToStorage - invalid element name" );
+ if( rDestStrg.isStorage() && !rDestStrg.isReadOnly() && !rElementName.isEmpty() )
{
StorageRef xSubStrg = openSubStorage( rElementName, false );
if( xSubStrg.get() )