diff options
Diffstat (limited to 'filter/source/svg/svgfilter.cxx')
-rw-r--r-- | filter/source/svg/svgfilter.cxx | 27 |
1 files changed, 22 insertions, 5 deletions
diff --git a/filter/source/svg/svgfilter.cxx b/filter/source/svg/svgfilter.cxx index eb22854abca8..755684091bc0 100644 --- a/filter/source/svg/svgfilter.cxx +++ b/filter/source/svg/svgfilter.cxx @@ -43,6 +43,7 @@ #include <osl/mutex.hxx> #include "svgfilter.hxx" +#include "svgwriter.hxx" using namespace ::com::sun::star; @@ -306,23 +307,39 @@ OUString SAL_CALL SVGFilter::detect( Sequence< PropertyValue >& io_rDescriptor ) // ----------------------------------------------------------------------------- +#define SVG_FILTER_IMPL_NAME "com.sun.star.comp.Draw.SVGFilter" +#define SVG_WRITER_IMPL_NAME "com.sun.star.comp.Draw.SVGWriter" + namespace sdecl = comphelper::service_decl; - sdecl::class_<SVGFilter> serviceImpl; + sdecl::class_<SVGFilter> serviceFilterImpl; const sdecl::ServiceDecl svgFilter( - serviceImpl, - "com.sun.star.comp.Draw.SVGFilter", + serviceFilterImpl, + SVG_FILTER_IMPL_NAME, "com.sun.star.document.ImportFilter;" "com.sun.star.document.ExportFilter;" "com.sun.star.document.ExtendedTypeDetection" ); + sdecl::class_<SVGWriter> serviceWriterImpl; + const sdecl::ServiceDecl svgWriter( + serviceWriterImpl, + SVG_WRITER_IMPL_NAME, + "com.sun.star.svg.SVGWriter" ); + // The C shared lib entry points extern "C" SAL_DLLPUBLIC_EXPORT void* SAL_CALL svgfilter_component_getFactory( sal_Char const* pImplName, ::com::sun::star::lang::XMultiServiceFactory* pServiceManager, ::com::sun::star::registry::XRegistryKey* pRegistryKey ) { - return component_getFactoryHelper( pImplName, pServiceManager, - pRegistryKey, svgFilter ); + if ( rtl_str_compare (pImplName, SVG_FILTER_IMPL_NAME) == 0 ) + { + return component_getFactoryHelper( pImplName, pServiceManager, pRegistryKey, svgFilter ); + } + else if ( rtl_str_compare (pImplName, SVG_WRITER_IMPL_NAME) == 0 ) + { + return component_getFactoryHelper( pImplName, pServiceManager, pRegistryKey, svgWriter ); + } + return NULL; } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ |