summaryrefslogtreecommitdiff
path: root/basic
diff options
context:
space:
mode:
authorMichael Stahl <mstahl@redhat.com>2016-01-15 12:18:11 +0100
committerMichael Stahl <mstahl@redhat.com>2016-01-15 13:03:09 +0100
commit9694a0edfeb3cfe20d7c1286db097ba9b7c51e37 (patch)
tree6f05fdfe019fa70045bceb59aab3c5fb57318f4f /basic
parent80b55dcfc9754553e42625d0d6e9ebbb728200eb (diff)
basic: coverity#1348466 checked return
Kind of unnecessary but let's hope it shuts up coverity. Change-Id: I4903c9df788ce5fb9648c5fd68627ff21362828f
Diffstat (limited to 'basic')
-rw-r--r--basic/source/basmgr/basmgr.cxx15
1 files changed, 10 insertions, 5 deletions
diff --git a/basic/source/basmgr/basmgr.cxx b/basic/source/basmgr/basmgr.cxx
index ac453835a9ad..c5f2f3ea9612 100644
--- a/basic/source/basmgr/basmgr.cxx
+++ b/basic/source/basmgr/basmgr.cxx
@@ -1343,8 +1343,9 @@ OUString BasicManager::GetLibName( sal_uInt16 nLib )
return OUString();
}
-void BasicManager::LoadLib( sal_uInt16 nLib )
+bool BasicManager::LoadLib( sal_uInt16 nLib )
{
+ bool bDone = false;
DBG_ASSERT( nLib < mpImpl->aLibs.size() , "Lib?!" );
if ( nLib < mpImpl->aLibs.size() )
{
@@ -1354,11 +1355,11 @@ void BasicManager::LoadLib( sal_uInt16 nLib )
{
OUString aLibName = rLibInfo.GetLibName();
xLibContainer->loadLibrary( aLibName );
- xLibContainer->isLibraryLoaded( aLibName );
+ bDone = xLibContainer->isLibraryLoaded( aLibName );
}
else
{
- ImpLoadLibrary( &rLibInfo, nullptr );
+ bDone = ImpLoadLibrary( &rLibInfo, nullptr );
StarBASIC* pLib = GetLib( nLib );
if ( pLib )
{
@@ -1372,6 +1373,7 @@ void BasicManager::LoadLib( sal_uInt16 nLib )
StringErrorInfo* pErrInf = new StringErrorInfo( ERRCODE_BASMGR_LIBLOAD, OUString(), ERRCODE_BUTTON_OK );
aErrors.push_back(BasicError(*pErrInf, BasicErrorReason::LIBNOTFOUND, OUString::number(nLib)));
}
+ return bDone;
}
StarBASIC* BasicManager::CreateLib( const OUString& rLibName )
@@ -1584,8 +1586,11 @@ namespace
StarBASIC* pLib = i_manager->GetLib( nLib );
if( !pLib )
{
- i_manager->LoadLib( nLib );
- pLib = i_manager->GetLib( nLib );
+ bool const bLoaded = i_manager->LoadLib( nLib );
+ if (bLoaded)
+ {
+ pLib = i_manager->GetLib( nLib );
+ }
}
if( pLib )