23#include <com/sun/star/lang/XMultiComponentFactory.hpp>
24#include <com/sun/star/ucb/SimpleFileAccess.hpp>
29static uno::Reference< container::XIndexAccess >
lcl_getAddinCollection(
const uno::Reference< XHelperInterface >& xParent,
const uno::Reference< uno::XComponentContext >& xContext )
34 uno::Reference< lang::XMultiComponentFactory > xMCF( xContext->getServiceManager(), uno::UNO_SET_THROW );
35 uno::Reference<ucb::XSimpleFileAccess3> xSFA(ucb::SimpleFileAccess::create(xContext));
39 SAL_INFO(
"sw.vba",
"lcl_getAddinCollection: " << aAddinPath );
40 if( xSFA->isFolder( aAddinPath ) )
42 const uno::Sequence< OUString > sEntries = xSFA->getFolderContents( aAddinPath,
false );
43 for(
const OUString& sUrl : sEntries )
45 if( !xSFA->isFolder( sUrl ) && sUrl.endsWithIgnoreAsciiCase(
".dot" ) )
47 aAddins.push_back( uno::Reference< word::XAddin >(
new SwVbaAddin( xParent, xContext, sUrl ) ) );
67uno::Reference< container::XEnumeration >
70 uno::Reference< container::XEnumerationAccess > xEnumerationAccess(
m_xIndexAccess, uno::UNO_QUERY_THROW );
71 return xEnumerationAccess->createEnumeration();
86css::uno::Sequence<OUString>
89 static uno::Sequence< OUString >
const sNames
css::uno::Reference< css::container::XIndexAccess > m_xIndexAccess
const OUString & GetAddinPath() const
virtual css::uno::Type SAL_CALL getElementType() override
virtual css::uno::Any createCollectionObject(const css::uno::Any &aSource) override
virtual css::uno::Reference< css::container::XEnumeration > SAL_CALL createEnumeration() override
virtual css::uno::Sequence< OUString > getServiceNames() override
SwVbaAddins(const css::uno::Reference< ov::XHelperInterface > &xParent, const css::uno::Reference< css::uno::XComponentContext > &xContext)
virtual OUString getServiceImplName() override
css::uno::Type const & get()
#define SAL_INFO(area, stream)
static uno::Reference< container::XIndexAccess > lcl_getAddinCollection(const uno::Reference< XHelperInterface > &xParent, const uno::Reference< uno::XComponentContext > &xContext)