20#include <com/sun/star/uno/Exception.hpp>
25#include <com/sun/star/lang/XComponent.hpp>
26#include <com/sun/star/lang/XMultiServiceFactory.hpp>
27#include <com/sun/star/uno/XComponentContext.hpp>
31#include <cppunit/Protector.h>
48class Prot :
public CppUnit::Protector
53 virtual ~Prot()
override;
55 Prot(
const Prot&) =
delete;
56 Prot& operator=(
const Prot&) =
delete;
59 CppUnit::Functor
const & functor,
60 CppUnit::ProtectorContext
const & context)
override;
62 uno::Reference<uno::XComponentContext>
m_xContext;
69 uno::Reference<lang::XMultiComponentFactory>
xFactory =
m_xContext->getServiceManager();
70 uno::Reference<lang::XMultiServiceFactory> xSFactory(xFactory, uno::UNO_QUERY_THROW);
76 CppUnit::Functor
const & functor, CppUnit::ProtectorContext
const &)
83 uno::Reference< lang::XComponent >(m_xContext, uno::UNO_QUERY_THROW)->dispose();
Reference< XComponentContext > m_xContext
Reference< XSingleServiceFactory > xFactory
void setProcessServiceFactory(const Reference< XMultiServiceFactory > &xSMgr)
CPPUHELPER_DLLPUBLIC css::uno::Reference< css::uno::XComponentContext > SAL_CALL defaultBootstrap_InitialComponentContext()
SAL_DLLPUBLIC_EXPORT CppUnit::Protector * unobootstrapprotector()