summaryrefslogtreecommitdiff
path: root/basic/source/uno
diff options
context:
space:
mode:
authorOlivier Hallot <olivier.hallot@alta.org.br>2011-12-10 13:35:14 -0200
committerIvan Timofeev <timofeev.i.s@gmail.com>2011-12-10 21:13:58 +0400
commit91d4fe75eed800fd37211555b09cac0af3b1d640 (patch)
tree252226d546a37e4a7c93920b96cb90270b92d8a4 /basic/source/uno
parent93a9f170be76965ec004b200ac939e55e8382ca0 (diff)
Fix for fdo43460 Part III getLength to isEmpty
Part III Module basic
Diffstat (limited to 'basic/source/uno')
-rw-r--r--basic/source/uno/namecont.cxx18
-rw-r--r--basic/source/uno/scriptcont.cxx10
2 files changed, 14 insertions, 14 deletions
diff --git a/basic/source/uno/namecont.cxx b/basic/source/uno/namecont.cxx
index 6f223f8d4018..f65a6ebb0c30 100644
--- a/basic/source/uno/namecont.cxx
+++ b/basic/source/uno/namecont.cxx
@@ -612,7 +612,7 @@ sal_Bool SfxLibraryContainer::init_Impl(
meInitMode = DEFAULT;
INetURLObject aInitUrlInetObj( maInitialDocumentURL );
OUString aInitFileName = aInitUrlInetObj.GetMainURL( INetURLObject::NO_DECODE );
- if( aInitFileName.getLength() )
+ if( !aInitFileName.isEmpty() )
{
// We need a BasicManager to avoid problems
StarBASIC* pBas = new StarBASIC();
@@ -836,7 +836,7 @@ sal_Bool SfxLibraryContainer::init_Impl(
// Check storage URL
OUString aStorageURL = rLib.aStorageURL;
- if( !bStorage && !aStorageURL.getLength() && nPass == 0 )
+ if( !bStorage && aStorageURL.isEmpty() && nPass == 0 )
{
String aLibraryPath;
if( meInitMode == CONTAINER_INIT_FILE )
@@ -1235,7 +1235,7 @@ void SfxLibraryContainer::implScanExtensions( void )
rtl::OUString aLibURL;
bool bPureDialogLib = false;
- while( (aLibURL = aScriptIt.nextBasicOrDialogLibrary( bPureDialogLib )).getLength() > 0 )
+ while ( !(aLibURL = aScriptIt.nextBasicOrDialogLibrary( bPureDialogLib )).isEmpty())
{
if( bPureDialogLib && maInfoFileName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "script" ) ) )
continue;
@@ -1347,7 +1347,7 @@ OUString SfxLibraryContainer::createAppLibraryFolder
( SfxLibrary* pLib, const OUString& aName )
{
OUString aLibDirPath = pLib->maStorageURL;
- if( !aLibDirPath.getLength() )
+ if( aLibDirPath.isEmpty() )
{
INetURLObject aInetObj( String(maLibraryPath).GetToken(1) );
aInetObj.insertName( aName, sal_True, INetURLObject::LAST_SEGMENT, sal_True, INetURLObject::ENCODE_ALL );
@@ -1448,7 +1448,7 @@ void SfxLibraryContainer::implStoreLibrary( SfxLibrary* pLib,
else
{
// Export?
- bool bExport = aTargetURL.getLength();
+ bool bExport = !aTargetURL.isEmpty();
try
{
Reference< XSimpleFileAccess > xSFI = mxSFI;
@@ -1582,7 +1582,7 @@ void SfxLibraryContainer::implStoreLibraryIndexFile( SfxLibrary* pLib,
else
{
// Export?
- bool bExport = aTargetURL.getLength();
+ bool bExport = !aTargetURL.isEmpty();
Reference< XSimpleFileAccess > xSFI = mxSFI;
if( xToUseSFI.is() )
xSFI = xToUseSFI;
@@ -1948,7 +1948,7 @@ void SfxLibraryContainer::storeLibraries_Impl( const uno::Reference< embed::XSto
// if we did an in-place save into a storage (i.e. a save into the storage we were already based on),
// then we need to clean up the temporary storage we used for this
- if ( bInplaceStorage && sTempTargetStorName.getLength() )
+ if ( bInplaceStorage && !sTempTargetStorName.isEmpty() )
{
SAL_WARN_IF(
!xSourceLibrariesStor.is(), "basic",
@@ -3106,7 +3106,7 @@ void SfxLibrary::impl_removeWithoutChecks( const ::rtl::OUString& _rElementName
implSetModified( sal_True );
// Remove element file
- if( maStorageURL.getLength() )
+ if( !maStorageURL.isEmpty() )
{
INetURLObject aElementInetObj( maStorageURL );
aElementInetObj.insertName( _rElementName, sal_False,
@@ -3240,7 +3240,7 @@ rtl::OUString ScriptExtensionIterator::nextBasicOrDialogLibrary( bool& rbPureDia
{
rtl::OUString aRetLib;
- while( !aRetLib.getLength() && m_eState != END_REACHED )
+ while( aRetLib.isEmpty() && m_eState != END_REACHED )
{
switch( m_eState )
{
diff --git a/basic/source/uno/scriptcont.cxx b/basic/source/uno/scriptcont.cxx
index 977f6bd0df24..c6fbc5d842bb 100644
--- a/basic/source/uno/scriptcont.cxx
+++ b/basic/source/uno/scriptcont.cxx
@@ -305,7 +305,7 @@ Any SAL_CALL SfxScriptLibraryContainer::importLibraryElement
// TODO: Check language
// aMod.aLanguage
// aMod.aName ignored
- if( aMod.aModuleType.getLength() > 0 )
+ if( !aMod.aModuleType.isEmpty() )
{
/* If in VBA compatibility mode, force creation of the VBA Globals
object. Each application will create an instance of its own
@@ -473,8 +473,8 @@ void SAL_CALL SfxScriptLibraryContainer::changeLibraryPassword( const OUString&
if( OldPassword == NewPassword )
return;
- sal_Bool bOldPassword = ( OldPassword.getLength() > 0 );
- sal_Bool bNewPassword = ( NewPassword.getLength() > 0 );
+ sal_Bool bOldPassword = ( !OldPassword.isEmpty() );
+ sal_Bool bNewPassword = ( !NewPassword.isEmpty() );
sal_Bool bStorage = mxStorage.is() && !pImplLib->mbLink;
if( pImplLib->mbReadOnly || (bOldPassword && !pImplLib->mbPasswordProtected) )
@@ -592,7 +592,7 @@ sal_Bool SfxScriptLibraryContainer::implStorePasswordLibrary( SfxLibrary* pLib,
const ::com::sun::star::uno::Reference< ::com::sun::star::embed::XStorage >& xStorage,
const ::rtl::OUString& aTargetURL, const Reference< XSimpleFileAccess > xToUseSFI, const ::com::sun::star::uno::Reference< ::com::sun::star::task::XInteractionHandler >& xHandler )
{
- bool bExport = aTargetURL.getLength();
+ bool bExport = !aTargetURL.isEmpty();
BasicManager* pBasicMgr = getBasicManager();
OSL_ENSURE( pBasicMgr, "SfxScriptLibraryContainer::implStorePasswordLibrary: cannot do this without a BasicManager!" );
@@ -1260,7 +1260,7 @@ bool SfxScriptLibrary::containsValidModule( const Any& aElement )
{
OUString sModuleText;
aElement >>= sModuleText;
- return ( sModuleText.getLength() > 0 );
+ return ( !sModuleText.isEmpty() );
}
bool SAL_CALL SfxScriptLibrary::isLibraryElementValid( ::com::sun::star::uno::Any aElement ) const