diff options
author | Olivier Hallot <olivier.hallot@documentfoundation.org> | 2012-01-01 12:55:53 -0200 |
---|---|---|
committer | Luboš Luňák <l.lunak@suse.cz> | 2012-01-02 19:17:17 +0100 |
commit | 6af59644d6508049409a03d1c4a598ea2bef521e (patch) | |
tree | 6897eaf76372c606a487ebb0135962e6c7e52cb7 /oox/source/ole/vbamodule.cxx | |
parent | 93d2a2eb4dd13d81b9be4f087653baecb33ead67 (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/ole/vbamodule.cxx')
-rw-r--r-- | oox/source/ole/vbamodule.cxx | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/oox/source/ole/vbamodule.cxx b/oox/source/ole/vbamodule.cxx index cbd9744b03d0..d907051c8238 100644 --- a/oox/source/ole/vbamodule.cxx +++ b/oox/source/ole/vbamodule.cxx @@ -197,8 +197,8 @@ void VbaModule::importDirRecords( BinaryInputStream& rDirStrm ) #undef OOX_ENSURE_RECORDSIZE } } - OSL_ENSURE( maName.getLength() > 0, "VbaModule::importDirRecords - missing module name" ); - OSL_ENSURE( maStreamName.getLength() > 0, "VbaModule::importDirRecords - missing module stream name" ); + OSL_ENSURE( !maName.isEmpty(), "VbaModule::importDirRecords - missing module name" ); + OSL_ENSURE( !maStreamName.isEmpty(), "VbaModule::importDirRecords - missing module stream name" ); OSL_ENSURE( mnType != ModuleType::UNKNOWN, "VbaModule::importDirRecords - missing module type" ); OSL_ENSURE( mnOffset < SAL_MAX_UINT32, "VbaModule::importDirRecords - missing module stream offset" ); } @@ -218,7 +218,7 @@ void VbaModule::createEmptyModule( const Reference< XNameContainer >& rxBasicLib OUString VbaModule::readSourceCode( StorageBase& rVbaStrg, const Reference< XNameContainer >& rxOleNameOverrides ) const { OUStringBuffer aSourceCode; - if( (maStreamName.getLength() > 0) && (mnOffset != SAL_MAX_UINT32) ) + if( !maStreamName.isEmpty() && (mnOffset != SAL_MAX_UINT32) ) { BinaryXInputStream aInStrm( rVbaStrg.openInputStream( maStreamName ), true ); OSL_ENSURE( !aInStrm.isEof(), "VbaModule::readSourceCode - cannot open module stream" ); @@ -280,7 +280,7 @@ void VbaModule::extractOleOverrideFromAttr( const OUString& rAttribute, const Re void VbaModule::createModule( const OUString& rVBASourceCode, const Reference< XNameContainer >& rxBasicLib, const Reference< XNameAccess >& rxDocObjectNA ) const { - if( maName.getLength() == 0 ) + if( maName.isEmpty() ) return; // prepare the Basic module |