summaryrefslogtreecommitdiff
path: root/scripting/source/basprov
diff options
context:
space:
mode:
Diffstat (limited to 'scripting/source/basprov')
-rw-r--r--scripting/source/basprov/baslibnode.cxx10
1 files changed, 5 insertions, 5 deletions
diff --git a/scripting/source/basprov/baslibnode.cxx b/scripting/source/basprov/baslibnode.cxx
index aee5ae04ada7..b39368ee03ce 100644
--- a/scripting/source/basprov/baslibnode.cxx
+++ b/scripting/source/basprov/baslibnode.cxx
@@ -20,6 +20,7 @@
#include "baslibnode.hxx"
#include "basmodnode.hxx"
#include <com/sun/star/script/browse/BrowseNodeTypes.hpp>
+#include <comphelper/sequence.hxx>
#include <osl/mutex.hxx>
#include <vcl/svapp.hxx>
#include <basic/basmgr.hxx>
@@ -77,7 +78,7 @@ namespace basprov
{
SolarMutexGuard aGuard;
- Sequence< Reference< browse::XBrowseNode > > aChildNodes;
+ std::vector< Reference< browse::XBrowseNode > > aChildNodes;
if ( m_xLibContainer.is() && m_xLibContainer->hasByName( m_sLibName ) && !m_xLibContainer->isLibraryLoaded( m_sLibName ) )
m_xLibContainer->loadLibrary( m_sLibName );
@@ -90,19 +91,18 @@ namespace basprov
Sequence< OUString > aNames = m_xLibrary->getElementNames();
sal_Int32 nCount = aNames.getLength();
const OUString* pNames = aNames.getConstArray();
- aChildNodes.realloc( nCount );
- Reference< browse::XBrowseNode >* pChildNodes = aChildNodes.getArray();
+ aChildNodes.resize( nCount );
for ( sal_Int32 i = 0 ; i < nCount ; ++i )
{
SbModule* pModule = pBasic->FindModule( pNames[i] );
if ( pModule )
- pChildNodes[i] = static_cast< browse::XBrowseNode* >( new BasicModuleNodeImpl( m_xContext, m_sScriptingContext, pModule, m_bIsAppScript ) );
+ aChildNodes[i] = static_cast< browse::XBrowseNode* >( new BasicModuleNodeImpl( m_xContext, m_sScriptingContext, pModule, m_bIsAppScript ) );
}
}
}
- return aChildNodes;
+ return comphelper::containerToSequence(aChildNodes);
}