48 lines
2.1 KiB
C++
48 lines
2.1 KiB
C++
![]() |
#ifndef FACTORY_HXX_
|
||
|
#define FACTORY_HXX_
|
||
|
|
||
|
#include <com/sun/star/lang/XSingleServiceFactory.hpp>
|
||
|
#include <com/sun/star/lang/XServiceInfo.hpp>
|
||
|
#include <cppuhelper/implbase2.hxx>
|
||
|
#include <toolkit/dllapi.h>
|
||
|
|
||
|
namespace layoutimpl
|
||
|
{
|
||
|
class Layout;
|
||
|
}
|
||
|
|
||
|
class TOOLKIT_DLLPUBLIC LayoutFactory : public ::cppu::WeakImplHelper2< ::com::sun::star::lang::XSingleServiceFactory,
|
||
|
::com::sun::star::lang::XServiceInfo >
|
||
|
{
|
||
|
::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > m_xFactory;
|
||
|
|
||
|
public:
|
||
|
LayoutFactory( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& xFactory )
|
||
|
: m_xFactory( xFactory )
|
||
|
{
|
||
|
OSL_ENSURE( xFactory.is(), "No service manager is provided!\n" );
|
||
|
}
|
||
|
|
||
|
static ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL
|
||
|
impl_staticGetSupportedServiceNames();
|
||
|
|
||
|
static ::rtl::OUString SAL_CALL impl_staticGetImplementationName();
|
||
|
|
||
|
static ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > SAL_CALL
|
||
|
impl_staticCreateSelfInstance(
|
||
|
const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& xServiceManager );
|
||
|
|
||
|
|
||
|
// XSingleServiceFactory
|
||
|
virtual ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > SAL_CALL createInstance() throw (::com::sun::star::uno::Exception, ::com::sun::star::uno::RuntimeException);
|
||
|
virtual ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > SAL_CALL createInstanceWithArguments( const ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any >& aArguments ) throw (::com::sun::star::uno::Exception, ::com::sun::star::uno::RuntimeException);
|
||
|
|
||
|
// XServiceInfo
|
||
|
virtual ::rtl::OUString SAL_CALL getImplementationName() throw (::com::sun::star::uno::RuntimeException);
|
||
|
virtual sal_Bool SAL_CALL supportsService( const ::rtl::OUString& ServiceName ) throw (::com::sun::star::uno::RuntimeException);
|
||
|
virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getSupportedServiceNames() throw (::com::sun::star::uno::RuntimeException);
|
||
|
|
||
|
};
|
||
|
|
||
|
#endif /* FACTORY_HXX */
|