Resolves: tdf#93474 crash on importing a macro library
its a SfxLibrary which is not a XLibraryContainer (a SfxLibraryContainer is however) I think the issue is simply an empty name making code go down the container rather than library route. Change-Id: Ib0245d402fe375ac26ab9f2b14fe708b2a34a7a7
This commit is contained in:
@@ -255,7 +255,8 @@ void SAL_CALL BasMgrContainerListenerImpl::elementInserted( const container::Con
|
|||||||
if( bLibContainer )
|
if( bLibContainer )
|
||||||
{
|
{
|
||||||
uno::Reference< script::XLibraryContainer > xScriptCont( Event.Source, uno::UNO_QUERY );
|
uno::Reference< script::XLibraryContainer > xScriptCont( Event.Source, uno::UNO_QUERY );
|
||||||
insertLibraryImpl( xScriptCont, mpMgr, Event.Element, aName );
|
if (xScriptCont.is())
|
||||||
|
insertLibraryImpl(xScriptCont, mpMgr, Event.Element, aName);
|
||||||
StarBASIC* pLib = mpMgr->GetLib( aName );
|
StarBASIC* pLib = mpMgr->GetLib( aName );
|
||||||
if ( pLib )
|
if ( pLib )
|
||||||
{
|
{
|
||||||
@@ -274,8 +275,8 @@ void SAL_CALL BasMgrContainerListenerImpl::elementInserted( const container::Con
|
|||||||
SbModule* pMod = pLib->FindModule( aName );
|
SbModule* pMod = pLib->FindModule( aName );
|
||||||
if( !pMod )
|
if( !pMod )
|
||||||
{
|
{
|
||||||
OUString aMod;
|
OUString aMod;
|
||||||
Event.Element >>= aMod;
|
Event.Element >>= aMod;
|
||||||
uno::Reference< vba::XVBAModuleInfo > xVBAModuleInfo( Event.Source, uno::UNO_QUERY );
|
uno::Reference< vba::XVBAModuleInfo > xVBAModuleInfo( Event.Source, uno::UNO_QUERY );
|
||||||
if ( xVBAModuleInfo.is() && xVBAModuleInfo->hasModuleInfo( aName ) )
|
if ( xVBAModuleInfo.is() && xVBAModuleInfo->hasModuleInfo( aName ) )
|
||||||
{
|
{
|
||||||
|
Reference in New Issue
Block a user